/* ================================================================
   SHIKOŖER BONDHON — Global Design System
   International-Standard Premium Finance Dashboard
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800;900&display=swap');

/* ── CSS Tokens ─────────────────────────────────────────────── */
:root {
    /* Brand */
    --primary:        #6366f1;
    --primary-hover:  #4f46e5;
    --primary-glow:   rgba(99, 102, 241, 0.25);
    --accent:         #8b5cf6;
    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --info:           #3b82f6;

    /* Sidebar */
    --sidebar-bg:     #0f172a;
    --sidebar-width:  260px;
    --sidebar-border: rgba(255,255,255,0.06);
    --nav-active-bg:  rgba(99,102,241,0.18);
    --nav-hover-bg:   rgba(255,255,255,0.06);
    --nav-text:       #94a3b8;
    --nav-text-active:#e2e8f0;

    /* Page */
    --page-bg:        #f1f5f9;
    --topbar-height:  68px;
    --topbar-bg:      rgba(241,245,249,0.85);

    /* Cards */
    --card-bg:        #ffffff;
    --card-radius:    20px;
    --card-shadow:    0 2px 8px rgba(0,0,0,0.05), 0 8px 32px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --card-border:    1px solid #e8edf5;

    /* Text */
    --text:           #0f172a;
    --text-muted:     #64748b;
    --text-subtle:    #94a3b8;

    /* Misc */
    --radius-sm:      10px;
    --radius-md:      16px;
    --radius-lg:      20px;
    --radius-xl:      28px;
    --transition:     0.22s cubic-bezier(.4,0,.2,1);
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--page-bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-heading { font-family: 'Outfit', sans-serif; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Sidebar ────────────────────────────────────────────────── */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    overflow: hidden;
}

.sidebar-brand {
    padding: 0 20px;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #f1f5f9;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 0.68rem;
    color: #475569;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 24px;
}

.sidebar-body::-webkit-scrollbar { width: 3px; }
.sidebar-body::-webkit-scrollbar-thumb { background: #1e293b; }

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 18px 10px 8px;
}

.nav-section-label:first-child { padding-top: 4px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    color: var(--nav-text);
    text-decoration: none !important;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.sidebar-link .nav-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.04);
    transition: all var(--transition);
    flex-shrink: 0;
}

.sidebar-link:hover {
    color: var(--nav-text-active);
    background: var(--nav-hover-bg);
}

.sidebar-link:hover .nav-icon {
    background: rgba(99,102,241,0.12);
    color: var(--primary);
}

.sidebar-link.active {
    color: #e0e7ff;
    background: var(--nav-active-bg);
}

.sidebar-link.active .nav-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 3px 10px var(--primary-glow);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

/* ── Topbar ─────────────────────────────────────────────────── */
#topbar {
    height: var(--topbar-height);
    position: fixed;
    top: 0; right: 0;
    left: var(--sidebar-width);
    background: var(--topbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1040;
    display: flex;
    align-items: center;
    padding: 0 28px;
    justify-content: space-between;
    gap: 16px;
    transition: left var(--transition);
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 16px;
    min-width: 240px;
    transition: all var(--transition);
}

.topbar-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.topbar-search input {
    border: none;
    outline: none;
    background: none;
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
}

.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-icon-btn {
    width: 40px; height: 40px;
    border-radius: 11px;
    border: none;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
    position: relative;
}

.topbar-icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.notif-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--page-bg);
}

/* Profile Dropdown */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 6px 14px 6px 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.profile-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.avatar {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.profile-info { text-align: left; }
.profile-name { font-size: 0.8rem; font-weight: 700; color: var(--text); line-height: 1; }
.profile-role { font-size: 0.68rem; color: var(--text-muted); }

.dropdown-menu-pro {
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 200px;
    margin-top: 8px !important;
    background: white;
}

.dropdown-item-pro {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-decoration: none;
    transition: all var(--transition);
}

.dropdown-item-pro .item-icon {
    width: 30px; height: 30px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: all var(--transition);
}

.dropdown-item-pro:hover {
    color: var(--primary);
    background: #f5f3ff;
}

.dropdown-item-pro:hover .item-icon {
    background: var(--primary);
    color: white;
}

.dropdown-item-pro.danger:hover {
    color: var(--danger);
    background: #fff1f2;
}

.dropdown-item-pro.danger:hover .item-icon {
    background: var(--danger);
    color: white;
}

/* ── Main Content ────────────────────────────────────────────── */
#main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 32px 30px;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left var(--transition);
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header-block {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header-block h1,
.page-header-block h2,
.page-header-block h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    margin: 0;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 4px 0 0;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card-pro {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: var(--card-border);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

.card-pro:hover { box-shadow: var(--card-shadow-hover); }

.card-pro-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-pro-body { padding: 24px; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: var(--card-border);
    padding: 22px 20px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.stat-card-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-sub {
    font-size: 0.72rem;
    color: var(--text-subtle);
    margin-top: 6px;
}

.stat-card-stripe {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* color variants */
.stat-indigo .stat-card-icon { background: #eef2ff; color: #6366f1; }
.stat-indigo .stat-card-stripe { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.stat-violet .stat-card-icon { background: #f5f3ff; color: #8b5cf6; }
.stat-violet .stat-card-stripe { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-blue .stat-card-icon { background: #eff6ff; color: #3b82f6; }
.stat-blue .stat-card-stripe { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-green .stat-card-icon { background: #ecfdf5; color: #10b981; }
.stat-green .stat-card-stripe { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-amber .stat-card-icon { background: #fffbeb; color: #f59e0b; }
.stat-amber .stat-card-stripe { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-red .stat-card-icon { background: #fef2f2; color: #ef4444; }
.stat-red .stat-card-stripe { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-pro { width: 100%; border-collapse: collapse; }

.table-pro thead th {
    background: #f8fafc;
    padding: 13px 20px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    white-space: nowrap;
}

.table-pro thead th:first-child { border-radius: 10px 0 0 10px; }
.table-pro thead th:last-child  { border-radius: 0 10px 10px 0; }

.table-pro tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.875rem;
}

.table-pro tbody tr:last-child td { border-bottom: none; }

.table-pro tbody tr {
    transition: background var(--transition);
}

.table-pro tbody tr:hover td { background: #f8fafc; }

/* ── Badges & Pills ─────────────────────────────────────────── */
.badge-pro {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.badge-danger  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-indigo  { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.badge-violet  { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-gray    { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 11px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-pro-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-pro-primary:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-pro-ghost {
    background: white;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
}

.btn-pro-ghost:hover {
    background: #f8fafc;
    color: var(--text);
    border-color: #cbd5e1;
}

.btn-pro-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.btn-pro-danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-label-pro {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 7px;
    display: block;
}

.form-control-pro,
.form-select-pro {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text);
    background: white;
    transition: all var(--transition);
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-control-pro:focus,
.form-select-pro:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert-pro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

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

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

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs-pro {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 5px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    background: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Hero Banner ────────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);
    border-radius: var(--radius-xl);
    padding: 36px 36px 54px;
    margin-bottom: -28px;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -80px; left: 60px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-subtle);
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.25;
    margin-bottom: 16px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open #sidebar {
        transform: translateX(0);
    }

    #topbar {
        left: 0;
    }

    body.sidebar-open #topbar {
        left: var(--sidebar-width);
    }

    #main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .topbar-search { display: none; }
}

@media (max-width: 575.98px) {
    .stat-card-value { font-size: 1.4rem; }
    #main-content { padding: 16px 12px; }
}

/* ── Animation Utilities ────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50%       { box-shadow: 0 0 0 8px transparent; }
}

.fade-up { animation: fadeUp 0.4s ease both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.1s; }
.fade-up-3 { animation-delay: 0.15s; }
.fade-up-4 { animation-delay: 0.2s; }
.fade-up-5 { animation-delay: 0.25s; }

/* ── Sidebar overlay ────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1049;
    backdrop-filter: blur(2px);
}

body.sidebar-open .sidebar-overlay { display: block; }