:root {
    --primary-blue: #242785;
    --primary-blue-dark: #11145f;
    --primary-blue-light: #eef0ff;

    --primary-orange: #f05a28;
    --primary-orange-dark: #d94a1b;
    --primary-orange-light: #fff0ea;

    --bg: #f3f6fb;
    --sidebar-bg: #10172a;
    --sidebar-bg-2: #1d2a44;

    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;

    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;

    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

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

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-blue-dark), var(--sidebar-bg-2));
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}

/* Logo + Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.brand-text h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.brand-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.3;
}

/* Menu */
.menu {
    display: grid;
    gap: 8px;
}

.menu a {
    display: block;
    color: #e5e7eb;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 13px;
    font-weight: 650;
    font-size: 14px;
    transition: all 0.2s ease;
}

.menu a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.menu a.active {
    background: var(--primary-orange);
    color: #ffffff;
}

/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 28px;
}

/* Topbar */
.topbar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    border: 1px solid var(--border);
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-blue-dark);
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.user-badge {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 10px 16px;
    border-radius: 999px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}

.user-badge strong {
    color: var(--primary-blue);
}

/* =========================
   CARDS
========================= */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    border: 1px solid var(--border);
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 110px;
    height: 110px;
    background: rgba(36, 39, 133, 0.06);
    border-radius: 50%;
}

.metric-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
    font-size: 14px;
}

.metric-card h2 {
    margin: 13px 0 8px;
    font-size: 34px;
    font-weight: 850;
    color: #020617;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
}

.metric-card.success {
    border-left: 6px solid var(--success);
}

.metric-card.warning {
    border-left: 6px solid var(--warning);
}

.metric-card.orange {
    border-left: 6px solid var(--primary-orange);
}

.metric-card.blue {
    border-left: 6px solid var(--primary-blue);
}

/* Card header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
}

.card-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #020617;
}

.card-header span {
    color: var(--muted);
    font-size: 13px;
}

/* Summary list */
.summary-list {
    display: grid;
    gap: 14px;
}

.summary-list div {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.summary-list div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-list span {
    color: var(--muted);
    font-size: 14px;
}

.summary-list strong {
    font-size: 16px;
    color: #020617;
}

/* =========================
   TABLES
========================= */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th {
    background: #f8fafc;
    color: #475569;
    text-align: left;
    padding: 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

tr:hover {
    background: #f9fafb;
}

/* =========================
   BADGES / PILLS
========================= */

.pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 800;
}

.pill.orange {
    background: var(--primary-orange-light);
    color: var(--primary-orange-dark);
}

.pill.success {
    background: #dcfce7;
    color: #166534;
}

.pill.warning {
    background: #fef3c7;
    color: #92400e;
}

.pill.danger {
    background: #fee2e2;
    color: #991b1b;
}

.class-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 10px;
    background: var(--primary-orange-light);
    color: var(--primary-orange-dark);
    font-size: 12px;
    font-weight: 850;
}

/* =========================
   FORMS / INPUTS
========================= */

.search-input,
input,
select,
textarea {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 14px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    background: #ffffff;
}

.search-input {
    min-width: 260px;
}

.search-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(36, 39, 133, 0.14);
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-blue);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
}

.btn-orange {
    background: var(--primary-orange);
    color: #ffffff;
}

.btn-orange:hover {
    background: var(--primary-orange-dark);
    transform: translateY(-1px);
}

.btn-light {
    background: #f8fafc;
    color: var(--primary-blue);
    border: 1px solid var(--border);
}

.btn-light:hover {
    background: #eef2ff;
}

/* =========================
   PAGE SECTIONS
========================= */

.content {
    width: 100%;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.empty-state {
    background: #ffffff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

/* =========================
   ALERTS
========================= */

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 650;
}

.alert-info {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

.alert-warning {
    background: #fff7ed;
    color: #9a3412;
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
        width: calc(100% - 240px);
        padding: 20px;
    }


    .brand-text h2 {
        font-size: 17px;
    }

    .brand-text p {
        font-size: 11px;
    }
}

@media (max-width: 780px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 18px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }

    .cards-grid,
    .two-cols {
        grid-template-columns: 1fr;
    }

    .topbar {
        display: block;
    }

    .user-badge {
        margin-top: 14px;
        display: inline-flex;
    }

    .search-input {
        min-width: 100%;
        width: 100%;
    }

    .card-header {
        display: block;
    }

    .card-header .search-input {
        margin-top: 12px;
    }
}
/* =========================
   FIXED SMALL LOGO
========================= */

.sidebar {
    overflow-x: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    width: 100%;
    max-width: 100%;
}

.brand-logo-box {
    width: 46px;
    height: 46px;
    min-width: 46px;
    max-width: 46px;
    min-height: 46px;
    max-height: 46px;
    border-radius: 10px;
    background: #ffffff;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.brand-logo-box img {
    width: 100%;
    height: 100%;
    max-width: 38px;
    max-height: 38px;
    object-fit: contain;
    display: block;
}

.brand-text {
    min-width: 0;
    overflow: hidden;
}

.brand-text h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.1;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.brand-text p {
    margin: 4px 0 0;
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.2;
    white-space: nowrap;
}

/* Hii inazuia image yoyote ndani ya sidebar kuwa kubwa */
.sidebar img {
    max-width: 46px !important;
    max-height: 46px !important;
}
/* =========================
   RITHA LOGO FINAL FIX
========================= */

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #11145f, #1d2a44);
    color: white;
    padding: 18px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
}

.sidebar .brand {
    width: 100%;
    height: 64px;
    max-height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.sidebar .brand-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    max-width: 46px;
    min-height: 46px;
    max-height: 46px;
    background: #ffffff;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar .brand-icon img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    object-fit: contain !important;
    display: block !important;
}

.sidebar .brand-text {
    min-width: 0;
    overflow: hidden;
}

.sidebar .brand-text h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.1;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.sidebar .brand-text p {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.2;
    color: #cbd5e1;
    white-space: nowrap;
}

/* Force any wrong logo image inside sidebar to not explode */
.sidebar > img,
.sidebar img.brand-logo-img,
.sidebar .brand-logo-img {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    display: block !important;
}
/* =========================
   FINAL BRAND FIX - NO BIG LOGO
========================= */

.sidebar img,
.brand img,
.brand-logo-img,
.brand-logo-box img,
.brand-icon img {
    display: none !important;
}

.sidebar {
    width: 280px !important;
    background: linear-gradient(180deg, #11145f, #1d2a44) !important;
    color: white !important;
    padding: 18px !important;
    position: fixed !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 10 !important;
}

.brand {
    width: 100% !important;
    height: 66px !important;
    max-height: 66px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.14) !important;
    overflow: hidden !important;
}

.brand-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #f05a28, #242785) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.22) !important;
    flex-shrink: 0 !important;
}

.brand-icon span {
    color: #ffffff !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px !important;
}

.brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
}

.brand-text h2 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
    color: #ffffff !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.brand-text p {
    margin: 4px 0 0 !important;
    font-size: 11px !important;
    color: #cbd5e1 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}
/* FINAL LOGO REMOVE FIX */

.sidebar img,
.brand img,
.brand-logo-img,
.brand-logo-box img,
.brand-icon img {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
}

.sidebar {
    width: 280px !important;
    background: linear-gradient(180deg, #11145f, #1d2a44) !important;
    color: #ffffff !important;
    padding: 18px !important;
    position: fixed !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 999 !important;
}

.brand {
    width: 100% !important;
    height: 68px !important;
    max-height: 68px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.14) !important;
    overflow: hidden !important;
}

.brand-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #f05a28, #242785) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.22) !important;
    flex-shrink: 0 !important;
}

.brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
}

.brand-text h2 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
    color: #ffffff !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.brand-text p {
    margin: 4px 0 0 !important;
    font-size: 11px !important;
    color: #cbd5e1 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.main-content {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
}
/* =========================
   RITHA REAL LOGO FIX
========================= */

.brand {
    width: 100% !important;
    height: auto !important;
    min-height: 88px !important;
    max-height: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 24px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid rgba(255,255,255,0.14) !important;
    overflow: hidden !important;
}

.brand-logo-card {
    width: 190px !important;
    height: 78px !important;
    max-width: 190px !important;
    max-height: 78px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18) !important;
}

.brand-logo-card img {
    width: 100% !important;
    height: 100% !important;
    max-width: 174px !important;
    max-height: 62px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Zuia logo yoyote isipitilize */
.sidebar img {
    max-width: 190px !important;
    max-height: 78px !important;
    object-fit: contain !important;
}
.logout-link {
    margin-left: 10px;
    color: #f05a28;
    font-weight: 900;
    text-decoration: none;
    padding-left: 10px;
    border-left: 1px solid rgba(36, 39, 133, 0.25);
}

.logout-link:hover {
    color: #d94a1b;
    text-decoration: underline;
}
/* =========================
   LOGIN PAGE
========================= */

.login-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #11145f, #242785 45%, #f05a28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", Arial, sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f05a28, #242785);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 22px;
}

.login-logo h1 {
    margin: 0;
    color: #11145f;
    font-size: 28px;
    font-weight: 900;
}

.login-logo p {
    margin: 6px 0 0;
    color: #64748b;
}

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

.login-card label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.login-card input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
}

.login-card input:focus {
    border-color: #242785;
    box-shadow: 0 0 0 3px rgba(36, 39, 133, 0.14);
}

.login-btn {
    width: 100%;
    margin-top: 10px;
}

.login-note {
    margin-top: 18px;
    padding: 12px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    text-align: center;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}
/* =========================
   LOGIN LOGO FIX
========================= */

.login-logo-card {
    width: 170px;
    height: 70px;
    margin: 0 auto 16px;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.login-logo-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 154px !important;
    max-height: 54px !important;
    object-fit: contain !important;
}
/* =========================
   SIDEBAR PROFILE BOTTOM LEFT
========================= */

.sidebar {
    display: flex !important;
    flex-direction: column !important;
    width: 280px !important;
    height: 100vh !important;
    padding: 18px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.menu {
    flex: 1 !important;
    display: grid !important;
    align-content: start !important;
    gap: 8px !important;
}

/* Card iwe chini kabisa kwenye sidebar */
.sidebar-user-card {
    margin-top: auto !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 18px !important;
    padding: 14px !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.20) !important;
}

.sidebar-user-top {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
}

.user-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f05a28, #242785) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 2px solid rgba(255,255,255,0.75) !important;
}

.user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.user-avatar span {
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 20px !important;
}

.sidebar-user-info {
    min-width: 0 !important;
    overflow: hidden !important;
}

.sidebar-user-info h4 {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sidebar-user-info p {
    margin: 4px 0 0 !important;
    font-size: 10px !important;
    color: #cbd5e1 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.sidebar-user-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
}

.sidebar-user-actions a {
    text-decoration: none !important;
    color: #e5e7eb !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.08) !important;
    transition: all 0.2s ease !important;
}

.sidebar-user-actions a:hover {
    background: rgba(255,255,255,0.16) !important;
    transform: translateX(3px) !important;
}

.sidebar-user-actions .logout-action {
    background: rgba(240, 90, 40, 0.22) !important;
    color: #ffb199 !important;
}

.sidebar-user-actions .logout-action:hover {
    background: #f05a28 !important;
    color: #ffffff !important;
}
/* =========================
   USER DROPDOWN TOP RIGHT
========================= */

.user-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.user-dropdown-btn {
    border: 1px solid rgba(36, 39, 133, 0.18);
    background: #ffffff;
    color: #11145f;
    border-radius: 14px;
    padding: 7px 10px;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
}

.user-dropdown-btn:hover {
    border-color: #242785;
    box-shadow: 0 10px 24px rgba(36, 39, 133, 0.15);
}

.top-user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f05a28, #242785);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 900;
}

.top-user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.top-user-avatar span {
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.top-user-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    min-width: 0;
}

.top-user-name strong {
    font-size: 13px;
    color: #11145f;
    font-weight: 850;
    white-space: nowrap;
}

.top-user-name small {
    font-size: 10px;
    color: #64748b;
    margin-top: 3px;
    text-transform: uppercase;
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 15px;
    color: #242785;
    font-weight: 900;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    width: 260px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    padding: 12px;
    z-index: 9999;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-section-title {
    font-size: 12px;
    color: #64748b;
    font-weight: 800;
    margin: 6px 6px 8px;
}

.dropdown-info-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 6px;
    color: #334155;
    font-size: 13px;
    line-height: 1.2;
}

.dropdown-info-row span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    color: #242785;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 9px 0;
}

.dropdown-action {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 8px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
    transition: all 0.2s ease;
}

.dropdown-action:hover {
    background: #eef0ff;
    color: #242785;
}

.dropdown-action.logout {
    color: #d94a1b;
}

.dropdown-action.logout:hover {
    background: #fff0ea;
    color: #f05a28;
}
/* =========================
   TOPBAR + USER DROPDOWN FINAL FIX
========================= */

.topbar {
    background: #ffffff !important;
    border-radius: 18px !important;
    padding: 22px 26px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 26px !important;
    border: 1px solid #e5e7eb !important;
    position: relative !important;
    overflow: visible !important;
}

.topbar-title h1 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #11145f !important;
}

.topbar-title p {
    margin: 6px 0 0 !important;
    color: #64748b !important;
    font-size: 14px !important;
}

.user-dropdown {
    position: relative !important;
    display: inline-block !important;
    z-index: 9999 !important;
}

.user-dropdown-btn {
    border: 1px solid rgba(36, 39, 133, 0.22) !important;
    background: #ffffff !important;
    color: #11145f !important;
    border-radius: 14px !important;
    padding: 7px 10px !important;
    min-width: 155px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    cursor: pointer !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
}

.user-dropdown-btn:hover {
    border-color: #242785 !important;
    box-shadow: 0 10px 24px rgba(36, 39, 133, 0.15) !important;
}

.top-user-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f05a28, #242785) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    font-weight: 900 !important;
}

.top-user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.top-user-avatar span {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
}

.top-user-name {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    line-height: 1.1 !important;
    min-width: 0 !important;
}

.top-user-name strong {
    font-size: 13px !important;
    color: #11145f !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
}

.top-user-name small {
    font-size: 10px !important;
    color: #64748b !important;
    margin-top: 3px !important;
    text-transform: uppercase !important;
    max-width: 95px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.dropdown-arrow {
    margin-left: auto !important;
    font-size: 16px !important;
    color: #242785 !important;
    font-weight: 900 !important;
}

.user-dropdown-menu {
    display: none !important;
    position: absolute !important;
    right: 0 !important;
    top: 58px !important;
    width: 270px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22) !important;
    padding: 12px !important;
    z-index: 99999 !important;
}

.user-dropdown-menu.show {
    display: block !important;
}

.dropdown-section-title {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 850 !important;
    margin: 6px 6px 8px !important;
}

.dropdown-info-row {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 8px 6px !important;
    color: #334155 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

.dropdown-info-row span:last-child {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.dropdown-icon {
    width: 18px !important;
    min-width: 18px !important;
    text-align: center !important;
}

.dropdown-divider {
    height: 1px !important;
    background: #e5e7eb !important;
    margin: 9px 0 !important;
}

.dropdown-action {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    transition: all 0.2s ease !important;
}

.dropdown-action:hover {
    background: #eef0ff !important;
    color: #242785 !important;
}

.dropdown-action.logout {
    color: #d94a1b !important;
}

.dropdown-action.logout:hover {
    background: #fff0ea !important;
    color: #f05a28 !important;
}
/* =========================
   FINAL LAYOUT RESET
========================= */

html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #f3f6fb !important;
}

.app-layout {
    display: flex !important;
    min-height: 100vh !important;
}

.sidebar {
    width: 280px !important;
    height: 100vh !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    background: linear-gradient(180deg, #11145f, #1d2a44) !important;
    padding: 18px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 100 !important;
}

.main-content {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
    min-height: 100vh !important;
    padding: 28px !important;
    padding-top: 28px !important;
    background: #f3f6fb !important;
}

.content {
    margin-top: 0 !important;
}

/* Logo */
.brand {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 18px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.14) !important;
    display: flex !important;
    justify-content: center !important;
}

.brand-logo-card {
    width: 190px !important;
    height: 78px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18) !important;
}

.brand-logo-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 174px !important;
    max-height: 62px !important;
    object-fit: contain !important;
}

/* Menu */
.menu {
    display: grid !important;
    gap: 8px !important;
}

.menu a {
    display: block !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 13px 14px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

.menu a:hover {
    background: rgba(255,255,255,0.12) !important;
}

/* Topbar */
.topbar {
    background: #ffffff !important;
    border-radius: 18px !important;
    padding: 22px 26px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 0 0 26px 0 !important;
    border: 1px solid #e5e7eb !important;
    position: relative !important;
    overflow: visible !important;
}

.topbar-title h1 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #11145f !important;
}

.topbar-title p {
    margin: 6px 0 0 !important;
    color: #64748b !important;
    font-size: 14px !important;
}

/* User dropdown */
.user-dropdown {
    position: relative !important;
    display: inline-block !important;
    z-index: 9999 !important;
}

.user-dropdown-btn {
    border: 1px solid rgba(36,39,133,0.25) !important;
    background: #ffffff !important;
    color: #11145f !important;
    border-radius: 14px !important;
    padding: 7px 10px !important;
    min-width: 155px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    cursor: pointer !important;
    box-shadow: 0 8px 20px rgba(15,23,42,0.08) !important;
    font-family: inherit !important;
}

.top-user-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f05a28, #242785) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    overflow: hidden !important;
}

.top-user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.top-user-name {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    line-height: 1.1 !important;
}

.top-user-name strong {
    font-size: 13px !important;
    color: #11145f !important;
    font-weight: 850 !important;
}

.top-user-name small {
    font-size: 10px !important;
    color: #64748b !important;
    margin-top: 3px !important;
    text-transform: uppercase !important;
}

.dropdown-arrow {
    margin-left: auto !important;
    color: #242785 !important;
    font-weight: 900 !important;
}

.user-dropdown-menu {
    display: none !important;
    position: absolute !important;
    right: 0 !important;
    top: 58px !important;
    width: 270px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 45px rgba(15,23,42,0.22) !important;
    padding: 12px !important;
    z-index: 99999 !important;
}

.user-dropdown-menu.show {
    display: block !important;
}

.dropdown-section-title {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 850 !important;
    margin: 6px 6px 8px !important;
}

.dropdown-info-row {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 8px 6px !important;
    color: #334155 !important;
    font-size: 13px !important;
}

.dropdown-icon {
    width: 18px !important;
    min-width: 18px !important;
    text-align: center !important;
}

.dropdown-divider {
    height: 1px !important;
    background: #e5e7eb !important;
    margin: 9px 0 !important;
}

.dropdown-action {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 750 !important;
}

.dropdown-action:hover {
    background: #eef0ff !important;
    color: #242785 !important;
}

.dropdown-action.logout {
    color: #d94a1b !important;
}

.dropdown-action.logout:hover {
    background: #fff0ea !important;
    color: #f05a28 !important;
}
/* =========================
   FORMS
========================= */

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

.form-group {
    display: grid;
    gap: 7px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 800;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    background: #ffffff;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #242785;
    box-shadow: 0 0 0 3px rgba(36, 39, 133, 0.14);
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

@media (max-width: 780px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   SMALL ACTION BUTTONS
========================= */

.btn-small {
    border: none;
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    margin: 2px;
}

.btn-approve {
    background: #dcfce7;
    color: #166534;
}

.btn-approve:hover {
    background: #16a34a;
    color: #ffffff;
}

.btn-reject {
    background: #fee2e2;
    color: #991b1b;
}

.btn-reject:hover {
    background: #dc2626;
    color: #ffffff;
}

.muted-text {
    color: #94a3b8;
    font-size: 12px;
}
.btn-pay {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    text-decoration: none;
}

.btn-pay:hover {
    background: #0284c7;
    color: #ffffff;
}
.btn-light-mini {
    display: inline-block;
    background: #f8fafc;
    color: #242785;
    border: 1px solid #e5e7eb;
    text-decoration: none;
}

.btn-light-mini:hover {
    background: #eef0ff;
    color: #11145f;
}
.metric-card.danger {
    border-left: 5px solid #dc2626;
}

.metric-card.danger h2 {
    color: #dc2626;
}
.profile-big-avatar {
    width: 110px;
    height: 110px;
    border-radius: 18px;
    overflow: hidden;
    background: #eef0ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-big-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.profile-big-avatar span {
    font-size: 42px;
    font-weight: 900;
    color: #242785;
}
/* =========================
   TABLE PAGINATION
========================= */

.table-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 12px 0 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    flex-wrap: wrap;
}

.per-page-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.per-page-select {
    border: 1px solid #dbe1ff;
    border-radius: 10px;
    padding: 8px 10px;
    background: #ffffff;
    color: #11145f;
    font-weight: 800;
    outline: none;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    background: #242785;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.page-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.page-info {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
}

@media (max-width: 700px) {
    .table-pagination-controls {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* =========================
   SIDEBAR DROPDOWN MENU
========================= */

.sidebar-menu {
    padding: 12px 14px;
}

.sidebar-link,
.menu-toggle,
.submenu a {
    width: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    border-radius: 12px;
    box-sizing: border-box;
}

.sidebar-link {
    padding: 12px 14px;
    margin-bottom: 8px;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.menu-group {
    margin-bottom: 8px;
}

.menu-toggle {
    border: none;
    background: transparent;
    padding: 12px 14px;
    justify-content: space-between;
    cursor: pointer;
    font-family: inherit;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.submenu {
    display: none;
    margin-top: 4px;
    margin-left: 10px;
    padding-left: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.18);
}

.submenu.open {
    display: block;
}

.submenu a {
    padding: 9px 12px;
    margin-bottom: 4px;
    color: #e5e7ff;
    font-size: 13px;
    font-weight: 700;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.menu-toggle.active {
    background: rgba(255, 255, 255, 0.15);
}
/* =========================
   SIDEBAR DROPDOWN MENU FIX
========================= */

.sidebar-menu {
    padding: 14px;
}

.sidebar-menu a,
.sidebar-menu button {
    font-family: inherit;
}

.sidebar-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
    box-sizing: border-box;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.13);
}

.menu-group {
    margin-bottom: 8px;
}

.menu-toggle {
    width: 100%;
    border: 0;
    outline: 0;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    text-align: left;
    box-sizing: border-box;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-toggle.active {
    background: rgba(255, 255, 255, 0.18);
}

.menu-arrow {
    font-size: 11px;
    opacity: 0.85;
}

.submenu {
    display: none;
    margin: 6px 0 10px 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.18);
}

.submenu.open {
    display: block;
}

.submenu a {
    display: block;
    color: #e8ebff !important;
    text-decoration: none !important;
    padding: 9px 11px;
    margin-bottom: 4px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff !important;
}

/* Optional: reduce sidebar scroll pressure */
.sidebar {
    overflow-y: auto;
}
.alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 800;
    margin: 12px 0 18px;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 800;
    margin: 12px 0 18px;
}
/* =========================
   GLOBAL SYSTEM ALERTS
========================= */

.global-alert {
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 800;
    margin: 0 0 18px 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    animation: alertSlideDown 0.25s ease-out;
}

.alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

@keyframes alertSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.chart-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    min-height: 320px;
}

.chart-card h3 {
    margin: 0 0 18px 0;
    color: #06145f;
    font-size: 18px;
    font-weight: 800;
}

.chart-card canvas {
    width: 100% !important;
    max-height: 250px;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}
