:root {
    --sidebar-bg: #16233b;
    --sidebar-bg-active: #1f2f4d;
    --sidebar-text: #b9c4d6;
    --sidebar-text-active: #ffffff;
    --accent: #0d9488;
    --accent-dark: #0f766e;
    --page-bg: #f4f6f9;
    --card-bg: #ffffff;
    --border: #e5e9f0;
    --text-primary: #1a2233;
    --text-secondary: #64748b;
}

body {
    font-family: "Segoe UI", "Noto Nastaliq Urdu", Tahoma, sans-serif;
    background: var(--page-bg);
    color: var(--text-primary);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

.sidebar-brand {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0 0.5rem 1.5rem;
    line-height: 1.35;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.92rem;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
    background: var(--sidebar-bg-active);
    color: #fff;
}

.sidebar-nav a.active {
    background: var(--accent);
    color: #fff;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1rem;
    margin-top: 1rem;
}

.sidebar-user {
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.lang-switch {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.lang-switch a {
    flex: 1;
    text-align: center;
    padding: 4px 0;
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
}

.lang-switch a.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.25rem;
}

.card-metric {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
}

.card-metric .metric-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.card-metric .metric-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.btn-brand {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-brand:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

table.table {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

table.table thead th {
    background: #fafbfd;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

table.table td, table.table th {
    vertical-align: middle;
    border-color: var(--border);
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--sidebar-bg) 0%, #0b1526 100%);
}

.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
    .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; }
}
