﻿
/* ==========================================================================
   NOVA ADMIN — DESIGN TOKENS
   ========================================================================== */
:root {
    /* Palette */
    --sidebar-from: #171933;
    --sidebar-to: #1F2245;
    --sidebar-border: rgba(255, 255, 255, 0.06);
    --violet: #6C5CE7;
    --violet-light: #8B7DF2;
    --teal: #17C3B2;
    --amber: #FFB020;
    --coral: #F2415A;
    --bg: #F5F6FB;
    --surface: #FFFFFF;
    --text-dark: #1F2137;
    --text-muted: #8A8DA6;
    --text-on-dark: #E7E8F5;
    --text-on-dark-muted: #9497C4;
    --border-soft: #ECEDF6;
    --shadow-sm: 0 2px 8px rgba(31, 33, 55, 0.05);
    --shadow-md: 0 8px 24px rgba(31, 33, 55, 0.08);
    --shadow-lg: 0 20px 48px rgba(23, 25, 51, 0.14);
    /* Layout */
    --sidebar-width: 272px;
    --sidebar-width-collapsed: 84px;
    --topbar-height: 60px;
    --footer-bar-height: 47px;
    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --speed: 0.28s;
}

/* ==========================================================================
   BASE
   ========================================================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, .brand-name, .stat-value {
    font-family: 'Sora', 'Inter', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Scrollbar (webkit) */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    /*background: linear-gradient(180deg, var(--sidebar-from), var(--sidebar-to));*/
    background: linear-gradient(180deg, var(--sidebar-from), var(--sidebar-to));
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: width var(--speed) var(--ease), transform var(--speed) var(--ease);
    box-shadow: var(--shadow-lg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    min-height: var(--topbar-height);
    flex-shrink: 0;
    background: #f5f5f7;
    border-right: 1px solid #e3e3ef;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    overflow: hidden;
}

.brand-mark {
    flex-shrink: 0;
/*    width: 38px;*/
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
/*    background: linear-gradient(135deg, #ffffff, #ffffff);*/
    color: #fff;
    font-size: 1.05rem;
/*    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.45);*/
display:none;
}
.sidebar.collapsed .brand-mark {
    display: block
}
.sidebar.collapsed .main-logo{display:none}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    white-space: nowrap;
    transition: opacity var(--speed) var(--ease);
}

.brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-on-dark-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-pin-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--sidebar-border);
    background: rgba(255,255,255,0.04);
    color: var(--text-on-dark-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--speed) var(--ease);
}

    .sidebar-pin-btn:hover {
        background: #1a1c39;
        color: white;
        border-color: var(--violet);
    }

    .sidebar-pin-btn i {
        transition: transform var(--speed) var(--ease);
        font-size: 0.8rem;
    }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 1rem 1rem;
}

.nav-eyebrow {
    padding: 1.1rem 0.75rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-on-dark-muted);
    opacity: 0.7;
    white-space: nowrap;
    transition: opacity var(--speed) var(--ease);
}

.nav-item {
    margin-bottom: 0.2rem;
    position: relative;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    color: var(--text-on-dark);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

    .nav-link:hover {
        /*background: rgba(255, 255, 255, 0.06);*/
        background: linear-gradient(135deg, var(--violet), #7B6CF6);
        color: #fff;
    }

    .nav-link.active {
        background: linear-gradient(135deg, var(--violet), #7B6CF6);
        color: #fff;
        /*box-shadow: 0 8px 20px rgba(108, 92, 231, 0.35);*/
    }

    .nav-link:focus, .nav-link:hover {
        color: white;
    }


.nav-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.nav-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--speed) var(--ease);
}

.nav-arrow {
    font-size: 0.72rem;
    transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
    flex-shrink: 0;
}

.nav-link[aria-expanded="true"] .nav-arrow {
    transform: rotate(180deg);
}

.nav-badge {
    background: var(--coral);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    flex-shrink: 0;
    transition: opacity var(--speed) var(--ease);
}

/* Submenu
   NOTE: animated with a pure-CSS max-height transition (no JS height
   measurement) so that Blazor can drive it with a single "show" class
   toggled from C# state — no interop required. */
.submenu {
    max-height: 0;
    overflow: hidden;
    margin: 0 0 0 1.6rem;
    border-left: 1px solid var(--sidebar-border);
    transition: max-height var(--speed) var(--ease);
}

    .submenu.show {
        max-height: 600px; /* comfortably larger than any real submenu's content */
        padding: 0.3rem 0;
    }

.submenu-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-on-dark-muted);
    white-space: nowrap;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), padding var(--speed) var(--ease);
}

    .submenu-link i {
        font-size: 1.3rem;
        line-height: 0;
    }

    .submenu-link:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
        padding-left: 1rem;
    }

    .submenu-link.active {
        color: var(--teal);
        font-weight: 600;
    }

        .submenu-link.active i {
            color: var(--teal);
        }

/* Sidebar footer / storage widget */
.sidebar-footer {
    padding: 0.75rem 1.25rem 1.25rem;
    flex-shrink: 0;
}

.storage-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sidebar-border);
    border-radius: 16px;
    padding: 1rem;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--speed) var(--ease);
}

.storage-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--teal), #12A092);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.storage-info {
    min-width: 0;
}

.storage-title {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.storage-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--violet-light));
    border-radius: 999px;
}

.storage-text {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-on-dark-muted);
}

/* ==========================================================================
   SIDEBAR — COLLAPSED STATE (desktop icon-only mode)
   ========================================================================== */
.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .nav-text,
    .sidebar.collapsed .nav-arrow,
    .sidebar.collapsed .nav-badge,
    .sidebar.collapsed .nav-eyebrow span,
    .sidebar.collapsed .storage-card {
        opacity: 0;
        pointer-events: none;
        position: absolute;
    }

    .sidebar.collapsed .nav-eyebrow {
        height: 1.25rem;
        overflow: hidden;
    }

    .sidebar.collapsed .sidebar-brand {
        justify-content: center;
        padding: 0.5rem 0;
    }

    .sidebar.collapsed .sidebar-pin-btn {
        display: none !important;
    }

    .sidebar.collapsed .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .sidebar.collapsed .submenu {
        display: none !important;
    }

    .sidebar.collapsed .sidebar-nav {
        overflow: visible;
    }

    /* Tooltip for collapsed icons (desktop only) */
    .sidebar.collapsed .nav-link {
        position: relative;
    }

        .sidebar.collapsed .nav-link::after {
            content: attr(data-tooltip);
            position: absolute;
            left: calc(100% + 14px);
            top: 50%;
            transform: translateY(-50%) scale(0.9);
            background: var(--text-dark);
            color: #fff;
            padding: 0.4rem 0.75rem;
            border-radius: 8px;
            font-size: 0.78rem;
            font-weight: 500;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
            box-shadow: var(--shadow-md);
            z-index: 1200;
        }

        .sidebar.collapsed .nav-link:hover::after,
        .sidebar.collapsed .nav-link:focus-visible::after {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) scale(1);
        }

/* ==========================================================================
   SIDEBAR OVERLAY (mobile)
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 18, 38, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--speed) var(--ease), visibility var(--speed) var(--ease);
}

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

/* ==========================================================================
   MAIN WRAPPER
   ========================================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--speed) var(--ease);
}

    .main-wrapper.collapsed {
        margin-left: var(--sidebar-width-collapsed);
    }

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
}

/* Footer*/
/*.topbar-footer {
    margin-top: auto;
    position: sticky;
    bottom: 0;*/
    /*z-index: 1030;*/
    /*height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
}*/

.topbar-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50px; /* ya var(--topbar-height) */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    /*display: flex;*/
    align-items: center;
    justify-content: space-between;
    padding: 12px 1.5rem;
    text-align:center;
    box-sizing: border-box;
}
/*.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}*/

.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px; /* Footer ki height jitni */
    box-sizing: border-box;
}
.page-content {
    padding-bottom: 50px;
}

.topbar-start, .topbar-end {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hamburger */
.hamburger-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
    flex-shrink: 0;
}

    .hamburger-btn:hover {
        box-shadow: var(--shadow-sm);
        background: #FBFBFF;
    }

.hamburger-line {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-dark);
    transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease), width var(--speed) var(--ease);
}

.hamburger-btn[aria-expanded="false"] .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-btn[aria-expanded="false"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn[aria-expanded="false"] .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Search */
.topbar-search {
    align-items: center;
    gap: 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0.55rem 0.9rem;
    min-width: 280px;
    color: var(--text-muted);
    transition: box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

    .topbar-search:focus-within {
        border-color: var(--violet);
        box-shadow: 0 0 0 4px rgba(108,92,231,0.12);
    }

    .topbar-search input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 0.88rem;
        color: var(--text-dark);
        flex: 1;
        min-width: 0;
    }

    .topbar-search kbd {
        font-size: 0.68rem;
        color: var(--text-muted);
        background: var(--surface);
        border: 1px solid var(--border-soft);
        border-radius: 6px;
        padding: 0.1rem 0.4rem;
    }

/* Icon buttons (notif/chat) */
.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--text-dark);
    transition: all var(--speed) var(--ease);
}

    .icon-btn:hover {
        background: #1b1d3b;
        color:white;
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px);
    }

   /*  Topbar icon */
.icon-btn-topbar {
    position: relative;
    width: 35px;
    height: 35px;
    border-radius: 20px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--text-dark);
    transition: all var(--speed) var(--ease);
}

    .icon-btn-topbar:hover {
        background: #1b1d3b;
        color: white;
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px);
    }



.badge-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

.badge-teal {
    background: var(--teal);
}

.badge-coral {
    background: var(--coral);
}

.topbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border-soft);
}

/* User button */
.user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    border: none;
    padding: 0.25rem 0.4rem 0.25rem 0.25rem;
    border-radius: 12px;
    transition: background var(--speed) var(--ease);
}

    .user-btn:hover {
        background: var(--bg);
    }

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 1.5px var(--border-soft);
}

.user-info {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.user-caret {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   DROPDOWN PANELS
   ========================================================================== */
/*.dropdown-menu {
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  border-radius: 16px;
  padding: 0;
  animation: dropIn 0.18s var(--ease);
  transform-origin: top right;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}*/

.dropdown-menu {
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
    padding: 0;
    animation: dropIn 0.18s var(--ease);
    transform-origin: top right;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dropdown-item:focus, .dropdown-item:hover {
    color: var(--bs-dropdown-link-hover-color);
    background-color: var(--bs-dropdown-link-hover-bg);
}

.panel-menu {
    width: 340px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-soft);
}

.panel-link {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--violet);
}

    .panel-link:hover {
        text-decoration: underline;
    }

.panel-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 1.1rem;
    transition: background var(--speed) var(--ease);
}

    .panel-item:hover {
        background: var(--bg);
    }

.panel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.panel-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.bg-soft-violet {
    background: rgba(108, 92, 231, 0.12);
    color: var(--violet);
}

.bg-soft-teal {
    background: rgba(23, 195, 178, 0.14);
    color: #0FA396;
}

.bg-soft-amber {
    background: rgba(255, 176, 32, 0.16);
    color: #B87200;
}

.bg-soft-coral {
    background: rgba(242, 65, 90, 0.12);
    color: var(--coral);
}

.panel-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.panel-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.panel-footer {
    display: block;
    text-align: center;
    padding: 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--violet);
    border-top: 1px solid var(--border-soft);
    background: var(--bg);
}

    .panel-footer:hover {
        background: #EFF0FB;
    }

/* User panel */
.user-panel {
    width: 280px;
    padding-bottom: 0.5rem;
}

.user-panel-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem;
}

    .user-panel-head img {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        object-fit: cover;
    }

.user-panel-name {
    margin: 0;
    font-weight: 700;
    font-size: 0.92rem;
}

.user-panel-email {
    margin: 0;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: background var(--speed) var(--ease);
}

    .dropdown-item i {
        font-size: 1rem;
        width: 18px;
        color: var(--text-muted);
    }

    .dropdown-item:hover {
        background: var(--bg);
    }

    .dropdown-item.text-danger {
        color: var(--coral) !important;
    }

        .dropdown-item.text-danger i {
            color: var(--coral);
        }



/* ==========================================================================
   PAGE CONTENT
   ========================================================================== */
.page-content {
    padding: 0.75rem;
}
/*.page-content { padding: 0.75rem; max-width: 1400px;}*/
/*.page-content { padding: 0.75rem; max-width: 1400px; margin: 0 auto; }*/

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

    .page-head h1 {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0 0 0.25rem;
    }

    .page-head p {
        margin: 0;
        color: var(--text-muted);
        font-size: 0.9rem;
    }

.btn-primary-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--violet), var(--violet-light));
    color: #fff;
    border: none;
    padding: 0.7rem 1.3rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
    transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

    .btn-primary-soft:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 24px rgba(108, 92, 231, 0.38);
    }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    user-select:none;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 1.4rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

    .stat-card:hover {
        transform: translateY(-3px);
        transition: all 0.3s ease;
       /* box-shadow: inset 0 2px 0 2px #000c29, rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;*/
    }

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-label {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    margin: 0.2rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-delta {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

    .stat-delta.up {
        color: #0FA396;
    }

    .stat-delta.down {
        color: var(--coral);
    }

.content-placeholder {
    background: var(--surface);
    border: 1.5px dashed var(--border-soft);
    border-radius: 18px;
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

    .content-placeholder i {
        font-size: 2rem;
        color: var(--violet-light);
        margin-bottom: 0.75rem;
        display: block;
    }

    .content-placeholder p {
        margin: 0;
        max-width: 420px;
        margin-inline: auto;
        font-size: 0.9rem;
    }

/* ==========================================================================
   RESPONSIVE BEHAVIOR
   ========================================================================== */

/* Tablet: sidebar collapses to icon-only by default, main content shifts */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .sidebar:not(.force-expanded) {
        width: var(--sidebar-width-collapsed);
    }

    .main-wrapper:not(.force-expanded) {
        margin-left: var(--sidebar-width-collapsed);
    }
}

/* Below desktop: sidebar becomes an off-canvas drawer */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

        .sidebar.show {
            transform: translateX(0);
        }

        .sidebar.collapsed .brand-text,
        .sidebar.collapsed .nav-text,
        .sidebar.collapsed .nav-arrow,
        .sidebar.collapsed .nav-badge,
        .sidebar.collapsed .nav-eyebrow span,
        .sidebar.collapsed .storage-card {
            opacity: 1;
            pointer-events: auto;
            position: static;
        }

        .sidebar.collapsed .nav-link {
            justify-content: flex-start;
            padding: 0.7rem 0.75rem;
        }

            .sidebar.collapsed .nav-link::after {
                content: none;
            }

        .sidebar.collapsed .submenu {
            display: block !important;
        }

    .main-wrapper, .main-wrapper.collapsed {
        margin-left: 0;
    }

    .topbar-search {
        min-width: 200px;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 1.25rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-head {
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}



/* ==============================
   Dashboard Stat Grid
============================== */

/*.stat-grid-Site {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
}*/

.stat-grid-Site {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* gap: 16px;*/
    margin-bottom: 5px;
    background: white;
    margin-top: -10px;
    padding: 10px;
    border-radius: 10px;
}

/* ==============================
   Card
============================== */

.stat-card-Site {
    display: flex;
    align-items: center;
    gap: 14px;
    /*padding: 16px;*/
    width: 100%;
    min-width: 0;
    /*background: #fff;*/
    /*border: 1px solid #e8edf5;*/
    border-radius: 16px;
    /*box-shadow: 0 4px 14px rgba(0,0,0,.06);*/
    transition: .25s ease;
  /*  border-left: 4px solid #272c5e;
    border-right: 1px solid #272c5e;
    border-top: 1px solid #272c5e;
    border-bottom: 1px solid #272c5e;*/
}

    .stat-card-Site:hover {
        transform: translateY(-2px);
        /*box-shadow: 0 10px 24px rgba(0,0,0,.12);*/
    }

.stat-icon-Site {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon-Site i {
        color: #fff;
        font-size: 22px;
    }





/* ==============================
   Icon
============================== */

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon i {
        color: #fff;
        font-size: 22px;
    }

/* ==============================
   Text
============================== */

.dashboard-label {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.stat-value {
    margin: 4px 0 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

/* ==============================
   Laptop
============================== */

@media (max-width:1200px) {

    .stat-grid-Site {
        grid-template-columns: repeat(3,1fr);
    }
}

/* ==============================
   Tablet
============================== */

@media (max-width:992px) {

    .stat-grid-Site {
        grid-template-columns: repeat(2,1fr);
    }
}

/* ==============================
   Mobile
============================== */

@media (max-width:576px) {

    .stat-grid-Site {
        grid-template-columns: repeat(2,1fr);
        gap: 12px;
    }

    .stat-card-Site {
        /*padding: 14px;*/
        border-radius: 14px;
    }

    .stat-icon {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

        .stat-icon i {
            font-size: 20px;
        }

    .stat-icon-Site {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

        .stat-icon-Site i {
            font-size: 20px;
        }

    .dashboard-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 20px;
    }
}