:root {
    --dash-sidebar: #0b172a;
    --dash-sidebar-muted: #9eacc0;
    --dash-surface: #ffffff;
    --dash-bg: #f3f6fa;
    --dash-border: #dfe6ef;
}

body.dashboard-body {
    background: var(--dash-bg);
    background-image: none;
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    background: var(--dash-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.dashboard-nav {
    display: grid;
    gap: 5px;
}

.dashboard-nav button,
.dashboard-nav a {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--dash-sidebar-muted);
    font-weight: 600;
    text-align: left;
}

.dashboard-nav button:hover,
.dashboard-nav button.active,
.dashboard-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.dashboard-nav i {
    font-size: 1.2rem;
}

.sidebar-footer {
    margin-top: auto;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-topbar {
    height: 76px;
    padding: 0 28px;
    background: rgba(255,255,255,0.94);
    border-bottom: 1px solid var(--dash-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.dashboard-topbar h1 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid var(--dash-border);
    border-radius: 8px;
    background: white;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: 800;
}

.dashboard-content {
    padding: 28px;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 22px;
}

.page-heading h2 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
}

.page-heading p {
    color: var(--text-muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric-card,
.dashboard-panel {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.metric-card {
    padding: 18px;
}

.metric-card .metric-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(11, 92, 173, 0.1);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.metric-card strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.7rem;
}

.metric-card span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
}

.dashboard-panel {
    padding: 20px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-heading h3 {
    font-family: var(--font-heading);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--dash-border);
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
}

.status-badge.warning {
    color: #92400e;
    background: #fef3c7;
}

.status-badge.info {
    color: #075985;
    background: #e0f2fe;
}

.dashboard-form {
    display: grid;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-form input,
.dashboard-form select,
.dashboard-form textarea,
.dashboard-search {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--dash-border);
    border-radius: 8px;
    background: white;
    color: var(--text-main);
    font: inherit;
}

.dashboard-form textarea {
    min-height: 90px;
    resize: vertical;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar .dashboard-search {
    min-width: 260px;
    flex: 1;
}

.empty-state {
    padding: 35px;
    text-align: center;
    color: var(--text-muted);
}

.activity-list {
    display: grid;
    gap: 12px;
}

.activity-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: start;
}

.activity-item i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(11, 92, 173, 0.08);
    color: var(--primary);
}

.activity-item small {
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
    .dashboard-nav {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
        overflow-x: auto;
    }
    .sidebar-footer {
        display: none;
    }
    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .dashboard-content,
    .dashboard-topbar {
        padding-left: 16px;
        padding-right: 16px;
    }
    .dashboard-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .metric-grid {
        grid-template-columns: 1fr;
    }
    .user-chip span {
        display: none;
    }
    .data-table {
        min-width: 650px;
    }
    .table-wrap {
        overflow-x: auto;
    }
}
