:root {
    --sidebar-width: 280px;
    --sidebar-collapsed: 78px;
    --primary: #14b8a6;
    --primary-hover: #0d9488;
    --caribbean-green: #00C875;
    --jade-green: #00B368;
    --haze-green: #009E5B;
    --primary-light: #f0fdfa;
    --primary-light-1: #eff6ff;
    --active-color: #bfdbfe;
    --active-hover-color: #dbeafe;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #0f172a;
    --secondary: #64748b;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --hover: #f8fafc;
    --danger: #dc2626;
    --success: #16a34a;
    --border-color: #e5e7eb;
    --white-smoke: #F5F5F5;
    --antiflesh: #FAFAFA;
    --gainsboro: #F0F0F0;
    --off-white: #FBFBFB;
    --ghost-white: #F8F8FF;
    --alice-blue: #F0F8FF;
    --snow: #FFFAFA;
    --lvory: #FFFFF0;
    --floral-white: #FFFAF0;
    --honeydew: #F5FFF5;
    --rich-black: #020D19;
    --obsidian: #0B1215;
    --charcoal-gray: #171717;
    --deep-navy-blue: #011222;
    --midnight-green: #0D1F1E;
    --dark-slate-gray: #0D1717;
    --oil-black: #0C0C0C;
    --midnight-blue: #101720;
    --sunset-orange: #F97316;
    --cream-beige: #FFF7ED;
    --emerald-green: #1EB583;
    --soft-mint: #D1FAE5;
    --sky-blue: #7DD3FC;
    --deep-ocean: #082F49;
    --sulu: #9FE870;
    --deep-fir: #163300;
    --royal-purple: #6D28D9;
    --blush-pink: #FBCFE8;
    --teal-blue: #0F766E;
    --light-aqua: #CCFBF1;
    --jet-stream: #BDD9D7;
    --blue-whale: #03363D;
    --turquoise: #34E0A1;
    --black: #000000;
    --periwinkle: #6260FF;
    --lavender: #E4E4FF;
    --text-main: #374151;
    --text-muted: #9ca3af;
    --text-heading: #1f2937;
    --main-text: #111827;
    --section-card: #f9fafb;
    --mesh-1: #6f52ee;
    --mesh-2: #3ca3e7;
    --mesh-3: #23a6d5;
    --mesh-4: #23d5ab;
    --mesh-opacity: 0.05;
    --shadow: 0 6px 25px rgba(15, 23, 42, .06);
    --menu-shadow: 0 15px 40px rgba(15, 23, 42, .12)
}

body {
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text)
}

button,
input {
    font: inherit
}

.admin-shell button {
    border: 0
}

svg {
    display: block
}

.sidebar-tooltip {
    position: fixed;
    z-index: 99999;
    display: none;
    transform: translateY(-50%);
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--rich-black);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .2);
    pointer-events: none
}

.sidebar-tooltip.show {
    display: block
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    background: rgba(15, 23, 42, .35)
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    width: var(--sidebar-width);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    transition: width .3s ease, transform .3s ease
}

.sidebar-header {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    transition: .3s
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap
}

.logo-box {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800
}

.logo-text {
    font-size: 20px;
    font-weight: 800
}

.logo-text span {
    color: var(--primary)
}

.sidebar-menu {
    padding: 16px 12px 30px;
    transition: .3s
}

.menu-title {
    padding: 14px 12px 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    white-space: nowrap
}

.menu-item {
    position: relative;
    margin: 4px 0;
}

.menu-link {
    width: 100%;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 11px;
    border-radius: 9px;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .2s, color .2s
}

.menu-link:hover {
    background: var(--active-color);
    color: var(--text)
}

.menu-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px
}

.menu-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    color: currentColor
}

.menu-text {
    white-space: nowrap
}

.menu-expander {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 5px;
    color: #94a3b8;
    transition: .2s
}

.menu-expander::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 1.5px;
    margin-top: -.75px;
    border-radius: 2px;
    background: currentColor
}

.menu-expander::after {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 50%;
    width: 1.5px;
    margin-left: -.75px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .22s, opacity .22s
}

.menu-item.open>.submenu-toggle .menu-expander::after {
    transform: scaleY(0);
    opacity: 0
}

.submenu {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        height .32s cubic-bezier(.4, 0, .2, 1),
        opacity .22s ease,
        transform .32s cubic-bezier(.4, 0, .2, 1)
}

.menu-item.open>.submenu {
    opacity: 1;
    transform: translateY(0)
}

.submenu>.menu-item>.menu-link {
    position: relative;
    padding-left: 40px;
    font-size: 13.5px
}

.submenu>.menu-item:not(.has-submenu)>.menu-link::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 50%;
    width: 8px;
    height: 1.5px;
    border-radius: 2px;
    background: #cbd5e1
}

.submenu .submenu>.menu-item>.menu-link {
    padding-left: 48px;
    font-size: 13px
}

.submenu .submenu>.menu-item:not(.has-submenu)>.menu-link::before {
    left: 32px
}

.submenu>.menu-item.has-submenu>.submenu-toggle {
    position: relative
}

.submenu>.menu-item.has-submenu>.submenu-toggle::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 50%;
    width: 8px;
    height: 1.5px;
    border-radius: 2px;
    background: #cbd5e1
}

.menu-link.active {
    color: var(--white);
    background: var(--primary);
    font-weight: 700;
}

.menu-link.active:hover {
    color: var(--white);
    background: var(--primary-hover)
}

.menu-item.active-parent>.menu-link {
    color: var(--primary);
    font-weight: 700;
    background: var(--primary-light)
}

.menu-item.active-parent>.menu-link:hover {
    color: var(--primary);
    background: var(--active-hover-color)
}

.menu-item.active-parent>.menu-link .menu-expander {
    color: var(--primary)
}

.submenu>.menu-item>.menu-link.active::before,
.submenu .submenu>.menu-item>.menu-link.active::before {
    background: var(--white)
}

.sidebar.collapsed .menu-link.active {
    color: var(--white);
    background: var(--primary)
}

.main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left .3s
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 500;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color)
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.icon-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #fff;
    color: var(--secondary);
    cursor: pointer;
    transition: .2s
}

.icon-button:hover {
    background: var(--hover);
    color: var(--text)
}

.header-svg {
    width: 18px;
    height: 18px
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--secondary)
}

.breadcrumb strong {
    color: var(--text)
}

.search-box {
    position: relative
}

.search-box input {
    width: 240px;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: #f8fafc;
    color: var(--text)
}

.search-box input:focus {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 3px #dbeafe
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none
}

.notification-button {
    position: relative
}

.notification-dot {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef4444
}

.profile-wrapper {
    position: relative
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: .2s
}

.profile-button:hover {
    background: var(--hover)
}

.avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800
}

.profile-text {
    text-align: left
}

.profile-text strong {
    display: block;
    font-size: 13px
}

.profile-text span {
    display: block;
    margin-top: 2px;
    color: var(--secondary);
    font-size: 11px
}

.profile-chevron {
    width: 15px;
    height: 15px;
    color: var(--muted);
    transition: transform .2s
}

.profile-wrapper.open .profile-chevron {
    transform: rotate(180deg)
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 54px;
    width: 230px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--menu-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: .2s
}

.profile-wrapper.open .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.dropdown-user {
    margin-bottom: 5px;
    padding: 10px 11px;
    border-bottom: 1px solid var(--border-color)
}

.dropdown-user strong {
    display: block;
    font-size: 13px
}

.dropdown-user span {
    color: var(--secondary);
    font-size: 11px
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 8px;
    background: transparent;
    color: var(--secondary);
    text-align: left;
    cursor: pointer;
    transition: .2s;
    font-size: 13px;
}

.dropdown-item:hover {
    background: var(--hover);
    color: var(--text)
}

.dropdown-item.danger {
    color: var(--danger)
}

.dropdown-icon {
    width: 17px;
    height: 17px;
    min-width: 17px
}

.content {
    padding: 28px
}

.page-header {
    margin-bottom: 24px
}

.page-header h1 {
    margin-bottom: 5px;
    font-size: 26px
}

.page-header p {
    color: var(--secondary);
    font-size: 14px
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px
}

.card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow)
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px
}

.card-label {
    color: var(--secondary);
    font-size: 13px
}

.card-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--primary-light);
    color: var(--primary)
}

.card-icon svg {
    width: 19px;
    height: 19px
}

.card h2 {
    font-size: 27px
}

.card small {
    display: block;
    margin-top: 8px;
    color: var(--success)
}

.panel {
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow)
}

.panel h3 {
    margin-bottom: 8px
}

.panel p {
    color: var(--secondary);
    font-size: 14px
}
/* chart js */
.dashboard-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr);
    gap: 18px;
    margin-top: 22px
}

.chart-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow)
}

.chart-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px
}

.chart-panel-header h3 {
    margin-bottom: 5px;
    color: var(--text-heading);
    font-size: 16px
}

.chart-panel-header p {
    color: var(--secondary);
    font-size: 13px
}

.chart-period {
    flex-shrink: 0;
    padding: 6px 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--secondary);
    font-size: 11px;
    font-weight: 600
}

.chart-canvas {
    position: relative;
    width: 100%
}

.chart-canvas-line {
    height: 270px
}

.chart-canvas-doughnut {
    height: 270px
}

/* chart js end */

.sidebar.collapsed {
    width: var(--sidebar-collapsed)
}

.sidebar.collapsed~.main {
    margin-left: var(--sidebar-collapsed)
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0
}

.sidebar.collapsed .sidebar-menu {
    padding-left: 10px;
    padding-right: 10px
}

.sidebar.collapsed .collapse-hide {
    display: none !important
}

.sidebar.collapsed .menu-link {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px
}

.sidebar.collapsed .menu-left {
    justify-content: center;
    gap: 0
}

.sidebar.collapsed .submenu {
    display: none
}

@media(max-width:1100px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .search-box {
        display: none
    }
}

@media(max-width:768px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%)
    }

    .main,
    .sidebar.collapsed~.main {
        margin-left: 0
    }

    .sidebar.collapsed {
        width: 280px
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: flex-start;
        padding: 0 20px
    }

    .sidebar.collapsed .sidebar-menu {
        padding: 16px 12px 30px
    }

    .sidebar.collapsed .collapse-hide {
        display: initial !important
    }

    .sidebar.collapsed .menu-link {
        justify-content: space-between;
        padding: 10px 12px
    }

    .sidebar.collapsed .menu-left {
        justify-content: flex-start;
        gap: 12px
    }

    .sidebar.collapsed .submenu {
        display: block
    }

    .sidebar.mobile-open {
        transform: translateX(0)
    }

    .overlay.show {
        display: block
    }

    .breadcrumb {
        display: none
    }

    .profile-text {
        display: none
    }

    .dashboard-charts {
        grid-template-columns: 1fr
    }
}

@media(max-width:560px) {
    .content {
        padding: 18px
    }

    .topbar {
        padding: 0 15px
    }

    .cards {
        grid-template-columns: 1fr
    }
}

/* ===================================
   BRANCH ACTIVE PATH
=================================== */
.menu-link.active-path {
    color: var(--primary) !important;
    background: var(--primary-light) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.menu-link.active-path:hover {
    background: var(--active-hover-color) !important;
}

.menu-link.branch-active {
    color: var(--primary) !important;
    background: var(--active-hover-color) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.menu-link.branch-active:hover {
    background: var(--active-color) !important;
}

.menu-link.active-path .menu-expander,
.menu-link.branch-active .menu-expander {
    color: var(--primary) !important;
}

.sidebar.collapsed .menu-link.branch-active {
    color: var(--white) !important;
    background: var(--primary) !important;
}