/* PearlPulse Premium Theme - Light Mode */
:root {
    --pearl-bg: #f1f5f9;      /* Light Slate Background */
    --pearl-card: #ffffff;    /* White Cards */
    --pearl-accent: #6366f1;  /* Indigo 500 */
    --pearl-text: #334155;    /* Slate 700 Text */
    --pearl-heading: #0f172a; /* Dark Slate Heading */
    
    --sidebar-bg: #0f172a;    /* Deep Ocean Blue Sidebar */
    --sidebar-text: #94a3b8;  /* Slate 400 */
    --sidebar-active: #6366f1;
    
    --sidebar-width: 260px;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--pearl-bg);
    color: var(--pearl-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    display: block !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--pearl-heading);
    font-weight: 600;
}

/* --- Dashboard Layout --- */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar-wrapper {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed; /* Fixed sidebar */
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    background: rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

#sidebar-wrapper .list-group {
    width: 100%;
    padding: 1rem 0;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent;
    color: var(--sidebar-text);
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

#sidebar-wrapper .list-group-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: white;
    border-left-color: var(--pearl-accent);
    font-weight: 500;
}

#sidebar-wrapper .list-group-item i {
    width: 24px;
    text-align: center;
    margin-right: 8px;
}

#page-content-wrapper {
    width: 100%;
    margin-left: var(--sidebar-width); /* Offset for fixed sidebar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Navbar --- */
.top-navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.top-navbar .navbar-text {
    color: var(--pearl-heading) !important;
    font-size: 1.1rem;
}

/* --- Cards --- */
.card {
    background-color: var(--pearl-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* --- Login Card (Centered) --- */
.login-card {
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- Metrics --- */
.metric-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pearl-heading);
    margin: 0.5rem 0;
}

/* --- Forms & Tables --- */
.form-control, .form-select {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--pearl-heading);
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--pearl-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    color: var(--pearl-heading);
}

.table {
    color: var(--pearl-text);
}

.table th {
    font-weight: 600;
    color: var(--pearl-heading);
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* --- Buttons --- */
.btn-pearl {
    background-color: var(--pearl-accent);
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    transition: background-color 0.2s;
}

.btn-pearl:hover {
    background-color: #4f46e5;
    color: white;
}

/* --- Utilities --- */
.text-small { font-size: 0.875rem; }
.star-gold { color: #f59e0b; }
.star-gray { color: #cbd5e1; }

/* --- Responsive --- */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #page-content-wrapper {
        margin-left: 0;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}
