:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar: #0f172a;
    --sidebar-hover: #1e293b;
    --body-bg: #f5f7fb;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #64748b;
    --white: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0891b2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--body-bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
    font-size: 14px;
}

/* =========================
   TOP NAVBAR
========================= */

.admin-navbar,
.partner-navbar {
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 1030;
}

.brand-area {
    width: 250px;
    height: 64px;
    background: var(--sidebar);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0 22px;
    z-index: 1040;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    margin-right: 10px;
}

.brand-text {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
}

.navbar-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.search-box {
    width: 320px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 13px;
    top: 11px;
    color: #94a3b8;
}

.search-box input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0 15px 0 38px;
    outline: none;
    background: #f8fafc;
}

.search-box input:focus {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.notification-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: #f8fafc;
    color: #475569;
    position: relative;
}

.notification-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 7px;
    right: 7px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-profile-name {
    font-weight: 600;
    color: #1e293b;
}

.admin-profile-role {
    font-size: 11px;
    color: #94a3b8;
}

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

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 250px;
    background: var(--sidebar);
    overflow-y: auto;
    z-index: 1020;
    padding: 18px 12px;
}

.sidebar-section {
    margin: 15px 10px 7px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 13px;
    margin: 2px 0;
    border-radius: 8px;
    font-size: 13px;
    transition: .2s;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .2);
}

.sidebar-link.logout {
    color: #fca5a5;
}

.sidebar-link.logout:hover {
    background: rgba(220, 38, 38, .12);
    color: #fecaca;
}

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

.admin-main {
    margin-left: 250px;
    padding: 88px 25px 35px;
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-title {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    color: #0f172a;
}

.page-subtitle {
    color: var(--muted);
    margin-top: 5px;
    font-size: 13px;
}

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

.kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 19px;
    height: 100%;
    transition: .2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, .06);
}

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.kpi-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.kpi-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.kpi-icon.orange {
    background: #ffedd5;
    color: #ea580c;
}

.kpi-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.kpi-label {
    color: #64748b;
    font-size: 12px;
    margin-top: 15px;
}

.kpi-value {
    font-size: 25px;
    font-weight: 700;
    margin-top: 3px;
    color: #0f172a;
}

.kpi-change {
    font-size: 11px;
    margin-top: 7px;
}

.kpi-change.success {
    color: var(--success);
}

.kpi-change.warning {
    color: var(--warning);
}

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

.content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.card-header-custom {
    padding: 17px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.card-body-custom {
    padding: 20px;
}

/* =========================
   TABLE
========================= */

.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid var(--border);
    padding: 12px 15px;
}

.table tbody td {
    padding: 13px 15px;
    vertical-align: middle;
    border-color: #f1f5f9;
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-success {
    background: #dcfce7;
    color: #15803d;
}

.status-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}

/* =========================
   QUICK ACTIONS
========================= */

.quick-action {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #334155;
    text-decoration: none;
    transition: .2s;
}

.quick-action:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.quick-action i {
    font-size: 20px;
}

/* =========================
   FOOTER
========================= */

.admin-footer {
    margin-left: 250px;
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 15px 25px;
    color: #64748b;
    font-size: 12px;
}

.partner-footer {

    margin-left:250px;
    border-top:1px solid var(--border);
    background:#fff;
    padding:15px 25px;
    color:#64748b;
    font-size:12px;

}

/* =========================
   MOBILE
========================= */

@media (max-width: 991px) {

    .brand-area {
        width: 220px;
    }

   .admin-navbar,
    .partner-navbar {
        left:220px;
    }

    .admin-sidebar {
        width: 220px;
    }

    .admin-main {
        margin-left: 220px;
    }

 .admin-footer,
    .partner-footer {
        margin-left:220px;
    }

    .search-box {
        width: 220px;
    }
}

@media (max-width: 767px) {

    .brand-area {
        position: relative;
        width: 100%;
    }

   .admin-navbar,
    .partner-navbar {
        position:relative;
        left:0;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        top: 0;
        height: auto;
    }

    .admin-main {
        margin-left: 0;
        padding: 25px 15px;
    }

   .admin-footer,
.partner-footer {
    margin-left:0;
}

    .search-box {
        display: none;
    }

    .admin-profile-name,
    .admin-profile-role {
        display: none;
    }      
}

  /* =========================
        PARTNER LAYOUT
        ========================= */

        .partner-main {

            margin-left:250px;
            padding:88px 25px 35px;
            min-height:100vh;
            background:var(--body-bg);

        }


        .partner-card {

            background:#fff;
            border:1px solid var(--border);
            border-radius:12px;
            overflow:hidden;
        }


        .partner-card .card-header {

            padding:17px 20px;
            border-bottom:1px solid var(--border);
            background:#fff;
            font-weight:700;

        }


        .partner-card .card-body {

            padding:20px;

        }


        .partner-kpi {

            background:#fff;
            border:1px solid var(--border);
            border-radius:12px;
            padding:20px;
            height:100%;

        }


        .partner-kpi h3 {

            font-size:26px;
            font-weight:700;

        }


        .partner-main .card {

            border-radius:12px;

        }


        .partner-main .card-header {

            border-bottom:1px solid var(--border);

        }