:root {
    --sidebar-width: 270px;
    --topbar-height: 72px;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #0c2f7a; /* plain beautiful blue */
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --border: #e5e7eb;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
}

.app-shell { min-height: 100vh; display: flex; }


/* Sidebar Menu Scrollbar Integration */
.sidebar {
    width: var(--sidebar-width);
    background: #0f172a; /* solid dark sidebar */
    color: #fff;
    transition: transform .25s ease;
    box-shadow: 10px 0 30px rgba(0,0,0,.15);
    inset: 0 auto 0 0;
    z-index: 1040;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;        /* Forces the sidebar to span exactly the full viewport height */
    width: 260px;         /* Match your template's current sidebar width */
    overflow-y: auto;     /* Adds a vertical scrollbar ONLY when menu items overflow */
    overflow-x: hidden;   /* Prevents broken horizontal scrolling layouts */
    display: flex;
    flex-direction: column;
}

/* Optional: Smooth Custom Styling for Modern Browsers */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
      
    background: rgba(128, 127, 127, 0.446);  /* Darkens slightly on hover for usability */

   border-radius: 10px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
      background: rgba(208, 208, 208, 0.685); /* Subtly visible scroll thumb */
 }

.sidebar .brand { height: var(--topbar-height); display: flex; align-items: center; padding: .5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 800; letter-spacing: .2px; }

.brand-badge img { 
    width: 32px;
    height: 32px;
    object-fit: contain;
    background-color: #fff;
    padding: 4px;
    border-radius: 8px;
    margin-right: 0.75rem;
}

.sidebar .nav-section-title { padding: 1rem 1.25rem .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.45); }
.sidebar .nav-link { color: rgba(255,255,255,.82); border-radius: 14px; margin: 0 .75rem .4rem; padding: .82rem .95rem; display: flex; align-items: center; gap: .85rem; transition: all .2s ease; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-link:focus-visible { outline: 2px solid rgba(37,99,235,.18); outline-offset: 2px; }
.sidebar .nav-link.active {
    background: rgba(37,99,235,.16);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--primary);
}
.sidebar .nav-link.active i { color: #fff; }
.sidebar .nav-link i { width: 18px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 1rem 1.25rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.75); font-size: .92rem; }

.main-wrap { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
.topbar { height: var(--topbar-height); background: rgba(244,247,251,.86); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 1030; border-bottom: 1px solid rgba(229,231,235,.8); }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; gap: 1rem; }
.search-box { max-width: 420px; width: 100%; position: relative; }
.search-box .form-control { border-radius: 999px; padding-left: 2.75rem; height: 46px; border: 1px solid #dde3ea; background: #fff; box-shadow: none; }
.search-box .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.icon-btn { width: 46px; height: 46px; border: 1px solid #dde3ea; background: #fff; border-radius: 50%; display: inline-grid; place-items: center; color: var(--text); text-decoration: none; }
.content { padding: 1.25rem; }

.page-hero { background: var(--primary); color: #fff; border-radius: 26px; padding: 1.45rem; box-shadow: var(--shadow); }
.page-hero h1 { font-size: clamp(1.3rem, 2vw, 2rem); font-weight: 800; margin-bottom: .45rem; }
.page-hero p { margin: 0; color: rgba(255,255,255,.88); }

.card-soft { background: var(--card); border: 1px solid rgba(229,231,235,.95); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { padding: 1.1rem; height: 100%; }
.stat-icon { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; background: var(--primary); box-shadow: 0 10px 20px rgba(37,99,235,.18); }
.stat-label { color: var(--muted); font-size: .9rem; margin-bottom: .25rem; }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1.1; margin-bottom: .35rem; }
.stat-change { font-size: .88rem; color: var(--muted); }
.panel-title { font-size: 1rem; font-weight: 700; margin: 0; }
.panel-subtitle { color: var(--muted); font-size: .88rem; margin: .15rem 0 0; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .38rem .72rem; font-size: .82rem; font-weight: 600; }
.status-approved { background: rgba(22,163,74,.12); color: var(--success); }
.status-pending { background: rgba(245,158,11,.14); color: #b45309; }
.status-rejected { background: rgba(220,38,38,.12); color: var(--danger); }
.table thead th { border-bottom: 1px solid var(--border) !important; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tbody td { vertical-align: middle; border-top: 1px solid var(--border); }
.mini-list li { padding: .9rem 0; border-bottom: 1px solid #edf1f5; }
.mini-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.avatar { width: 42px; height: 42px; border-radius: 14px; background: #e8eefc; display: grid; place-items: center; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.chart-placeholder { min-height: 290px; border-radius: 18px; background: #f3f8ff; display: grid; place-items: center; color: var(--muted); text-align: center; border: 1px dashed #cfd8e3; }
.mobile-toggle { display: none; }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; display: none; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrap { margin-left: 0; width: 100%; }
    .mobile-toggle { display: inline-grid; }
    .search-box { display: none; }
    .overlay.show { display: block; }
}

@media (max-width: 767.98px) {
    .content { padding: 1rem; }
    .page-hero { padding: 1.1rem; border-radius: 22px; }
    .stat-value { font-size: 1.5rem; }
}

/* Breadcrumb styles */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.75rem;
    text-decoration: none;
}
.breadcrumb-item + .breadcrumb-item::before { content: ">"; color: var(--muted); padding: 0 0.5rem; }

/* action icon */
.action-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}
.btn-icon-only {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

/* Login page styles */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; position: relative; overflow: hidden; }
.auth-bubbles {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(circle at 10% 20%, rgba(37,99,235,0.06) 0 120px, transparent 121px),
                radial-gradient(circle at 80% 30%, rgba(37,99,235,0.05) 0 180px, transparent 181px),
                radial-gradient(circle at 50% 80%, rgba(99,102,241,0.04) 0 220px, transparent 221px);
}
.login-wrap { position: relative; z-index: 5; }
.login-card { display: flex; flex-direction: row; overflow: hidden; border-radius: 20px; }
.brand-side { background: var(--primary); color: #fff; padding: 2.25rem; display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.brand-side h2 { font-size: 1.6rem; margin: .6rem 0 0; font-weight: 800; }
.brand-side p { opacity: .95; margin: 0; }
.brand-accent {
    position: absolute; right: -60px; top: -40px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,0.06);
}
.form-side { padding: 2.25rem; background: var(--card); }
.login-logo { width: 72px; height: auto; border-radius: 12px; background: #fff; padding: 8px; }
.login-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .6rem; }
.login-sub { color: var(--muted); margin-bottom: 1rem; }
.form-control { border-radius: 12px; height: 46px; }
.btn-login { border-radius: 12px; padding: .65rem 1rem; }

@media (max-width: 767.98px) {
    .login-card { flex-direction: column; }
    .brand-side { padding: 1.5rem; text-align: center; }
    .form-side { padding: 1.5rem; }
    .brand-accent { display: none; }
}

