/*!
 * CEZN Admin Dashboard - Binance Style
 * Version: 7.0 - Fixed Binance Classes
 */

:root {
    /* Override Bootstrap 5 font variables so Inter takes effect everywhere */
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bs-body-font-size: 1rem; /* keeps Bootstrap at 16px base */

    --primary: #0EA5E9;
    --primary-hover: #0284C7;
    --dark-bg: #181A20;
    --light-bg: #FFFFFF;
    --white: #FFFFFF;
    --border: #E6E8EA;
    --text-primary: #1E2329;
    --text-secondary: #707A8A;
    --header-height: 64px;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, button, input, select, textarea, table {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 1rem; /* inherits 130% from html root ≈ 20.8px */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Reset background/color for non-button elements only.
   Buttons are excluded so custom colored buttons (purple gradients etc.)
   are not overridden to white — which would make white text invisible. */
body, input, select, textarea, table {
    background: var(--light-bg) !important;
    color: var(--text-primary);
}

/* ===== HEADER ===== */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid #2B3139;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    text-decoration: none;
}

.header-icon:hover {
    background: #2B3139;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    text-decoration: none;
}

.user-profile:hover {
    background: #2B3139;
    color: white;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* ===== SIDEBAR ===== */
.binance-sidebar,
.admin-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--white);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    padding: 16px 0;
}

.binance-sidebar-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Sidebar Items - binance classes */
.binance-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.binance-sidebar-item:hover {
    background: #F5F5F5;
    color: var(--primary);
    text-decoration: none;
}

.binance-sidebar-item.active {
    background: #E0F2FE;
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.binance-sidebar-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.binance-sidebar-item span {
    flex: 1;
}

/* Badges */
.binance-badge-sm {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.binance-badge-primary {
    background: var(--primary);
}

/* ===== DROPDOWN MENUS ===== */
.binance-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.binance-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.binance-dropdown-toggle:hover {
    background: #F5F5F5;
    color: var(--primary);
}

.binance-dropdown-toggle i:first-child {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.binance-chevron,
.binance-dropdown-toggle .fa-chevron-down {
    width: auto;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.binance-dropdown-toggle[aria-expanded="true"] .binance-chevron,
.binance-dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Collapse */
.collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapse.show {
    max-height: 2000px;
}

/* Submenu */
.binance-submenu {
    background: #F8F9FA;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
}

.binance-submenu-item {
    display: block;
    padding: 10px 20px 10px 52px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.binance-submenu-item:hover {
    background: #E9ECEF;
    color: var(--primary);
    text-decoration: none;
}

.binance-submenu-item.active {
    color: var(--primary);
    background: #E0F2FE;
    border-left: 3px solid var(--primary);
}

.binance-submenu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 20px;
}

.binance-submenu-header {
    padding: 8px 20px 8px 52px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 30px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
    flex-shrink: 0;
}

.stat-icon.blue { background: #E0F2FE; color: var(--primary); }
.stat-icon.yellow { background: #FEF3C7; color: #F59E0B; }
.stat-icon.green { background: #D1FAE5; color: #10B981; }

.stat-content h3 {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}

.stat-content .value {
    font-size: 34px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== CARD ===== */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 23px;
    font-weight: 600;
    margin: 0;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

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

/* --- 991px: Sidebar collapses, layout adapts --- */
@media (max-width: 991px) {
    .menu-btn {
        display: block;
    }

    .binance-sidebar,
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }

    .binance-sidebar.show,
    .admin-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        z-index: 1050;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Bootstrap row gutter reduction */
    .row {
        --bs-gutter-x: 1rem;
    }

    /* Cards */
    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 12px 16px;
    }

    /* Tables - horizontal scroll */
    .table-responsive,
    .table-wrapper,
    [class*="table-wrapper"] {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Page header spacing */
    .page-header {
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 31px;
    }
}

/* --- 767px: Major mobile adaptations --- */
@media (max-width: 767px) {
    .main-content {
        padding: 16px 12px;
    }

    /* Stats grid 2-col */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        border-radius: 10px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 23px;
        border-radius: 10px;
    }

    .stat-content h3 {
        font-size: 13px;
    }

    .stat-content .value {
        font-size: 29px;
    }

    /* Header */
    .user-profile span {
        display: none;
    }

    .header-right {
        gap: 6px;
    }

    .header-icon {
        width: 36px;
        height: 36px;
    }

    .page-title {
        font-size: 26px;
    }

    .page-subtitle {
        font-size: 17px;
    }

    /* Cards */
    .card {
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .card-body {
        padding: 14px;
    }

    .card-header {
        padding: 10px 14px;
    }

    .card-title {
        font-size: 21px;
    }

    /* Forms - Touch-friendly sizing */
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }

    .form-label,
    label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    textarea.form-control {
        min-height: 100px;
    }

    /* Buttons - Touch-friendly */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .btn-sm {
        min-height: 36px;
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Tables */
    .table th,
    .table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .table th {
        font-size: 0.75rem;
    }

    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header {
        padding: 0.875rem 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1;
    }

    /* Alerts */
    .alert {
        padding: 10px 14px;
        font-size: 0.8125rem;
        border-radius: 8px;
    }

    /* Bootstrap columns stack earlier */
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Row gap for stacked columns */
    .row > [class*="col-"] {
        margin-bottom: 0.75rem;
    }

    .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }

    /* Dropdowns */
    .dropdown-menu {
        border-radius: 10px;
        font-size: 0.875rem;
    }

    .dropdown-item {
        padding: 0.625rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }

    .page-link {
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8125rem;
        padding: 0.25rem 0.5rem;
    }

    /* Badge */
    .badge {
        font-size: 0.6875rem;
        padding: 0.25em 0.5em;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* --- 575px: Small mobile --- */
@media (max-width: 575px) {
    .main-content {
        padding: 12px 10px;
    }

    /* Stats 1-col */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 21px;
    }

    .stat-content .value {
        font-size: 26px;
    }

    .page-title {
        font-size: 23px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    /* Cards */
    .card-body {
        padding: 12px;
    }

    .card-header {
        padding: 10px 12px;
    }

    .card-title {
        font-size: 20px;
    }

    /* Buttons group */
    .btn-group,
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    /* Header compact */
    .admin-header,
    .binance-header {
        padding: 0 10px;
    }

    .binance-logo-text {
        font-size: 20px;
    }

    .header-favicon {
        width: 24px;
        height: 24px;
    }

    /* User button compact */
    .binance-user-info {
        display: none;
    }

    .binance-user-chevron {
        display: none;
    }

    .binance-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* Table even more compact */
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    /* Modals full-screen like */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
}

/* --- 480px: Very small screens --- */
@media (max-width: 480px) {
    .main-content {
        padding: 10px 8px;
    }

    .page-title {
        font-size: 21px;
    }

    .stat-card {
        padding: 10px;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 8px;
    }

    .stat-content .value {
        font-size: 23px;
    }

    .stat-content h3 {
        font-size: 12px;
    }

    .card-body {
        padding: 10px;
    }

    .form-control,
    .form-select {
        font-size: 14px;
        padding: 0.5rem;
    }

    .btn {
        min-height: 40px;
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    .btn-sm {
        min-height: 34px;
        font-size: 0.75rem;
    }

    /* Header minimal */
    .binance-logo-text {
        font-size: 18px;
    }

    .binance-user-avatar {
        width: 30px;
        height: 30px;
    }
}

/* ===== GLOBAL TOUCH & UX ENHANCEMENTS ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 130%; /* Global +30% — scales all rem-based Bootstrap components */
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

.main-content {
    overflow-x: hidden;
}

/* Touch-friendly links and interactive elements */
@media (hover: none) and (pointer: coarse) {
    a, button, .btn, .dropdown-item, .nav-link,
    .binance-sidebar-item, .nav-item, .nav-submenu-item {
        -webkit-tap-highlight-color: rgba(14, 165, 233, 0.1);
    }

    /* Remove hover effects on touch devices */
    .stat-card:hover,
    .card:hover {
        transform: none;
    }
}

/* Safe area support for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .binance-sidebar,
    .admin-sidebar {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* ===== OVERLAY ===== */
.overlay,
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

.overlay.show,
.sidebar-overlay.show {
    display: block;
}

/* ===== BINANCE HEADER ===== */
.binance-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--dark-bg);
    z-index: 1000;
    border-bottom: 1px solid #2B3139;
}

.binance-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    gap: 0;
}

.binance-logo {
    margin-left: 4px;
}

.binance-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-favicon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    padding: 2px;
}

.binance-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* Mobile Toggle Button */
.binance-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 1001;
    position: relative;
    margin-left: 4px;
}

.binance-mobile-toggle:hover,
.binance-mobile-toggle:active {
    background: #2B3139;
}

@media (max-width: 991px) {
    .binance-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .binance-header-container {
        justify-content: space-between;
        padding: 0 10px;
        gap: 0;
    }

    .binance-logo {
        margin-left: 0;
        margin-right: auto;
    }

    .binance-header-actions {
        margin-left: 0;
        gap: 2px;
    }
}

/* Header Actions */
.binance-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.binance-header-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #EAECEF;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.binance-header-link:hover {
    background: #2B3139;
    color: white;
}

.binance-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #EAECEF;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.binance-icon-btn:hover {
    background: #2B3139;
    color: white;
}

.binance-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: #F6465D;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Button */
.binance-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.binance-user-btn:hover {
    background: #2B3139;
}

.binance-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.binance-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.binance-user-avatar span,
.binance-user-avatar .avatar-fallback {
    color: white;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.binance-user-info {
    text-align: left;
}

.binance-user-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.binance-user-role {
    color: #707A8A;
    font-size: 12px;
}

.binance-user-chevron {
    color: #707A8A;
    font-size: 12px;
}

/* Dropdown Menu - Force Bootstrap default hidden state */
.binance-header-actions .dropdown-menu {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Show dropdown ONLY when Bootstrap adds .show class */
.binance-header-actions .dropdown-menu.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.binance-dropdown {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 220px;
    max-width: calc(100vw - 20px);
    right: 0 !important;
    left: auto !important;
    background: #fff;
    z-index: 1050;
}

/* User profile dropdown specific - needs more width */
.binance-header-actions .dropdown:last-child .binance-dropdown {
    min-width: 260px;
}

.binance-dropdown .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.binance-dropdown .dropdown-item:hover {
    background: #F5F5F5;
}

.binance-dropdown .dropdown-item.text-danger:hover {
    background: #FEE2E2;
}

.binance-dropdown-header {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
}

/* Ensure dropdowns don't overflow viewport on mobile */
@media (max-width: 576px) {
    .binance-dropdown {
        min-width: 200px;
        max-width: calc(100vw - 30px);
        position: fixed !important;
        right: 10px !important;
        left: auto !important;
        top: 60px !important;
    }
}

/* ===== UTILITIES ===== */
.d-none { display: none !important; }
.ms-auto { margin-left: auto !important; }

/* ===== SIDEBAR NAV (nav- prefix classes) ===== */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0;
    padding-bottom: 100px; /* Extra space to ensure last menu items are visible when scrolling */
    width: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 1px 6px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 400;
    font-size: 13.5px;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: calc(100% - 12px);
    text-align: left;
    cursor: pointer;
}

.nav-item:hover {
    background: #F5F5F5;
    color: var(--primary);
    text-decoration: none;
}

.nav-item.active {
    background: #E0F2FE;
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: auto;
}

/* Nav Dropdown */
.nav-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 1px 6px;
    border-radius: 8px;
    color: #475569;
    background: none;
    border: none;
    width: calc(100% - 12px);
    text-align: left;
    font-weight: 400;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-dropdown-toggle:hover {
    background: #F5F5F5;
    color: var(--primary);
}

.nav-dropdown-toggle.active {
    color: var(--primary);
}

.nav-dropdown-toggle i:first-child {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-dropdown-toggle span {
    flex: 1;
}

.nav-dropdown-toggle .fa-chevron-down,
.nav-dropdown-toggle .dropdown-arrow {
    width: auto;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-dropdown.open .nav-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

/* Nav Collapse - Custom dropdown content */
.nav-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-dropdown.open .nav-collapse {
    max-height: 500px;
}

/* Nav Submenu */
.nav-submenu {
    padding: 2px 6px 4px 0;
    display: flex;
    flex-direction: column;
    margin: 0 6px 2px 26px;
    border-left: 1.5px solid #e2e8f0;
    background: none;
}

.nav-submenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 14px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    border-radius: 6px;
    transition: all 0.15s;
}

.nav-submenu-item:hover {
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
}

.nav-submenu-item.active {
    color: #4f46e5;
    background: #eef2ff;
}

.nav-submenu-item i:first-child {
    font-size: 12px;
    width: 14px;
    flex-shrink: 0;
    text-align: center;
}

/* ========================================
   COLORFUL SIDEBAR ICONS
   ======================================== */

/* Dashboard - Blue */
.nav-item .fa-house {
    color: #3b82f6 !important;
}

/* Analytics - Green */
.nav-item .fa-chart-line,
.nav-dropdown-toggle .fa-chart-line {
    color: #10b981 !important;
}

/* Templates - Purple */
.nav-item .fa-palette {
    color: #8b5cf6 !important;
}

/* App Store - Orange */
.nav-item .fa-puzzle-piece {
    color: #f97316 !important;
}

/* Domains - Cyan */
.nav-item .fa-globe,
.nav-dropdown-toggle .fa-globe {
    color: #06b6d4 !important;
}

/* Webmail - Red */
.nav-item .fa-envelope {
    color: #ef4444 !important;
}

/* Support - Amber */
.nav-item .fa-headset {
    color: #f59e0b !important;
}

/* Pages - Indigo */
.nav-dropdown-toggle .fa-file-lines {
    color: #6366f1 !important;
}

/* Products - Blue */
.nav-dropdown-toggle .fa-box {
    color: #3b82f6 !important;
}

/* Orders - Purple */
.nav-item .fa-shopping-bag {
    color: #8b5cf6 !important;
}

/* Wallet - Green */
.nav-item .fa-wallet {
    color: #10b981 !important;
}

/* Rewards - Gold */
.nav-item .fa-gift {
    color: #f59e0b !important;
}

/* Bio Link - Pink */
.nav-item .fa-link {
    color: #ec4899 !important;
}

/* Social Bot - Cyan */
.nav-item .fa-robot {
    color: #06b6d4 !important;
}

/* SEO - Green */
.nav-dropdown-toggle .fa-magnifying-glass {
    color: #10b981 !important;
}

/* Marketing - Red */
.nav-dropdown-toggle .fa-bullhorn {
    color: #ef4444 !important;
}

/* Suppliers - Teal */
.nav-dropdown-toggle .fa-truck {
    color: #14b8a6 !important;
}

/* Get Paid - Green */
.nav-dropdown-toggle .fa-money-bill-wave {
    color: #10b981 !important;
}

/* HRM - Blue */
.nav-dropdown-toggle .fa-users-gear {
    color: #3b82f6 !important;
}

/* Customers - Purple */
.nav-item .fa-users,
.nav-dropdown-toggle .fa-users {
    color: #8b5cf6 !important;
}

/* Settings - Gray */
.nav-item .fa-gear,
.nav-dropdown-toggle .fa-gear,
.nav-dropdown-toggle .fa-cog {
    color: #6b7280 !important;
}

/* Landing Page - Rose */
.nav-dropdown-toggle .fa-desktop {
    color: #f43f5e !important;
}

/* Subscription Plans - Yellow/Gold */
.nav-dropdown-toggle .fa-crown {
    color: #eab308 !important;
}

/* Tools - Slate/Gray */
.nav-dropdown-toggle .fa-wrench {
    color: #64748b !important;
}

/* Merchants/Stores - Emerald */
.nav-dropdown-toggle .fa-dolly {
    color: #10b981 !important;
}

/* Team - Sky Blue */
.nav-dropdown-toggle .fa-user-group {
    color: #0ea5e9 !important;
}

/* POS - Violet */
.nav-item .fa-cash-register {
    color: #7c3aed !important;
}

/* API Management - Amber */
.nav-item .fa-key {
    color: #d97706 !important;
}

/* Language Settings - Indigo */
.nav-item .fa-language {
    color: #6366f1 !important;
}

/* Documentation - Blue */
.nav-item .fa-book-open {
    color: #3b82f6 !important;
}

/* External Link - Cyan */
.nav-item .fa-external-link {
    color: #06b6d4 !important;
}

/* Finances/Money - Green */
.nav-dropdown-toggle .fa-wallet {
    color: #10b981 !important;
}

/* ── Admin Page Header (global) ─────────────────────────────────────────── */
.cezn-page-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.cezn-page-header-left { display: flex; align-items: center; gap: 16px; }
.cezn-page-icon {
    width: 44px; height: 44px;
    background: #f1f5f9; color: #6366f1;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.cezn-page-info { display: flex; flex-direction: column; gap: 3px; }
.cezn-page-title  { font-size: 18px; font-weight: 700; color: #111827; margin: 0; letter-spacing: -.02em; }
.cezn-page-subtitle { font-size: 13px; color: #6b7280; margin: 0; }
.cezn-page-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 576px) {
    .cezn-page-header { padding: 14px 16px; }
    .cezn-page-title { font-size: 16px; }
}
