/* ============================================
   ShopManager Pro — Custom Stylesheet
   Professional Modern Theme
   ============================================ */

/* ── CSS Variables ── */
:root {
    --primary: #1E3A5F;
    --primary-dark: #152C4A;
    --primary-light: #2A4F7F;
    --accent: #00BCD4;
    --accent-light: #26C6DA;
    --success: #4CAF50;
    --success-light: #66BB6A;
    --danger: #F44336;
    --danger-light: #EF5350;
    --warning: #FF9800;
    --warning-light: #FFA726;
    --info: #2196F3;
    --info-light: #42A5F5;
    --purple: #7C4DFF;
    --pink: #E91E63;
    
    --bg-body: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-sidebar: linear-gradient(180deg, #1E3A5F 0%, #0D2137 100%);
    
    --text-primary: #2C3E50;
    --text-secondary: #6C757D;
    --text-light: #ADB5BD;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
    
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    --transition: all 0.3s ease;
}

/* ── Base Styles ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* ══════════════════════════════════════════════
   TOP NAVBAR — FIXED (was missing critical styles)
   ══════════════════════════════════════════════ */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    height: var(--navbar-height);
    padding: 0 1rem;
    box-shadow: var(--shadow-md);
    z-index: 1040;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navbar Left: Hamburger + Brand */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* Sidebar Toggle Button (Hamburger) */
.sidebar-toggle {
    display: none; /* Hidden on desktop, shown on mobile */
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.sidebar-toggle:focus {
    outline: none;
}

/* Navbar Brand */
.top-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    min-width: 0;
}

.top-navbar .navbar-brand i {
    font-size: 1.3rem;
    color: var(--accent);
    flex-shrink: 0;
}

.top-navbar .navbar-brand span {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Navbar Right: Quick Add + User Dropdown */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.top-navbar .btn-accent.btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    white-space: nowrap;
}

/* User Dropdown Button */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none !important;
    padding: 0.35rem 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}

.user-dropdown:hover,
.user-dropdown:focus,
.user-dropdown.show {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}

.user-dropdown::after {
    /* Override Bootstrap dropdown caret */
    margin-left: 0.25rem;
    vertical-align: middle;
    border-top-color: rgba(255,255,255,0.6);
}

/* User Avatar Small (in navbar) */
.user-avatar-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-sm i {
    font-size: 1.25rem;
    color: var(--accent);
}

/* Navbar Dropdown Menu */
.top-navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    margin-top: 0.5rem;
    min-width: 220px;
    z-index: 1050;
}

.top-navbar .dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.top-navbar .dropdown-menu .dropdown-item:hover {
    background: var(--bg-body);
}

.top-navbar .dropdown-menu .dropdown-item i {
    width: 18px;
    text-align: center;
}

.top-navbar .dropdown-menu .dropdown-item-text {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.top-navbar .btn-outline-light {
    border-color: rgba(255,255,255,0.2);
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.top-navbar .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}


/* ══════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* Sidebar User Card */
.sidebar-user-card {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin: 0 0.75rem;
    background: rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
}

.user-avatar {
    font-size: 2rem;
    color: var(--accent);
    margin-right: 0.75rem;
    line-height: 1;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.65rem;
    width: fit-content;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar Divider */
.sidebar-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 0.75rem 1.25rem;
}

/* Sidebar Heading */
.sidebar-heading {
    display: block;
    padding: 0.25rem 1.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-left-color: var(--accent);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(0,188,212,0.15);
    border-left-color: var(--accent);
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link .badge {
    font-size: 0.65rem;
}

.sidebar-nav .nav-link .collapse-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    padding: 0.25rem 0;
}

.submenu .nav-link {
    padding: 0.45rem 1.5rem 0.45rem 3.25rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.submenu .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.submenu .nav-link.active {
    color: var(--accent);
    background: rgba(0,188,212,0.08);
}

.submenu .nav-link i {
    font-size: 0.85rem;
    width: 20px;
    margin-right: 0.5rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 0.75rem 1.25rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.3);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1025;
    backdrop-filter: blur(2px);
}

/* ── Main Content ── */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 1.5rem;
    min-height: calc(100vh - var(--navbar-height));
    transition: var(--transition);
}

/* ── Main Footer ── */
.main-footer {
    margin-left: var(--sidebar-width);
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-top: 1px solid #E9ECEF;
    font-size: 0.8rem;
    transition: var(--transition);
}

/* ── Page Header ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Breadcrumb */
.breadcrumb-custom {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.breadcrumb-custom .breadcrumb-item a {
    color: var(--accent);
}

/* ── Dashboard Cards ── */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.stat-card.card-cash::before { background: var(--success); }
.stat-card.card-airtel::before { background: var(--danger); }
.stat-card.card-paynearby::before { background: var(--info); }
.stat-card.card-income::before { background: var(--accent); }
.stat-card.card-expense::before { background: var(--warning); }
.stat-card.card-credit::before { background: var(--purple); }
.stat-card.card-borrow::before { background: var(--pink); }
.stat-card.card-transactions::before { background: var(--primary); }

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-card-icon.icon-cash { background: linear-gradient(135deg, #4CAF50, #66BB6A); }
.stat-card-icon.icon-airtel { background: linear-gradient(135deg, #F44336, #EF5350); }
.stat-card-icon.icon-paynearby { background: linear-gradient(135deg, #2196F3, #42A5F5); }
.stat-card-icon.icon-income { background: linear-gradient(135deg, #00BCD4, #26C6DA); }
.stat-card-icon.icon-expense { background: linear-gradient(135deg, #FF9800, #FFA726); }
.stat-card-icon.icon-credit { background: linear-gradient(135deg, #7C4DFF, #B388FF); }
.stat-card-icon.icon-borrow { background: linear-gradient(135deg, #E91E63, #F06292); }
.stat-card-icon.icon-transactions { background: linear-gradient(135deg, #1E3A5F, #2A4F7F); }

.stat-card-content {
    flex: 1;
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-top: 0.25rem;
}

.stat-card-value.text-success { color: var(--success) !important; }
.stat-card-value.text-danger { color: var(--danger) !important; }
.stat-card-value.text-warning { color: var(--warning) !important; }
.stat-card-value.text-info { color: var(--info) !important; }

/* ── Custom Cards ── */
.custom-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

.custom-card .card-header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--bg-body);
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-card .card-header i {
    margin-right: 0.5rem;
    color: var(--accent);
}

.custom-card .card-body {
    padding: 1.25rem;
}

/* ── Tables ── */
.table-custom {
    margin: 0;
}

.table-custom thead th {
    background: var(--bg-body);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border: none;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #F0F2F5;
    font-size: 0.875rem;
}

.table-custom tbody tr:hover {
    background: rgba(0,188,212,0.03);
}

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

/* ── Transaction Type Badges ── */
.txn-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.35rem;
}

.txn-badge.badge-withdrawal { background: rgba(30,136,229,0.1); color: #1E88E5; }
.txn-badge.badge-recharge { background: rgba(67,160,71,0.1); color: #43A047; }
.txn-badge.badge-money_transfer { background: rgba(142,36,170,0.1); color: #8E24AA; }
.txn-badge.badge-bill_payment { background: rgba(244,81,30,0.1); color: #F4511E; }
.txn-badge.badge-direct_service { background: rgba(0,172,193,0.1); color: #00ACC1; }
.txn-badge.badge-atm_withdrawal { background: rgba(255,179,0,0.1); color: #FFB300; }
.txn-badge.badge-app_load { background: rgba(109,76,65,0.1); color: #6D4C41; }
.txn-badge.badge-credit_collection { background: rgba(57,73,171,0.1); color: #3949AB; }

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-paid { background: rgba(76,175,80,0.1); color: var(--success); }
.status-unpaid { background: rgba(244,67,54,0.1); color: var(--danger); }
.status-pending { background: rgba(255,152,0,0.1); color: var(--warning); }
.status-repaid { background: rgba(76,175,80,0.1); color: var(--success); }
.status-partial { background: rgba(33,150,243,0.1); color: var(--info); }

/* ── Buttons ── */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(30,58,95,0.3);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,58,95,0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,188,212,0.3);
}

.btn-accent:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,188,212,0.4);
}

.btn-success-custom {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-success-custom:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-danger-custom {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: #fff;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger-custom:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 0.45rem 1.1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-icon-edit {
    background: rgba(33,150,243,0.1);
    color: var(--info);
    border: none;
}

.btn-icon-edit:hover {
    background: var(--info);
    color: #fff;
}

.btn-icon-delete {
    background: rgba(244,67,54,0.1);
    color: var(--danger);
    border: none;
}

.btn-icon-delete:hover {
    background: var(--danger);
    color: #fff;
}

/* ── Forms ── */
.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    border: 1.5px solid #DEE2E6;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    transition: var(--transition);
    background-color: #FAFBFC;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,188,212,0.15);
    background-color: #fff;
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.input-group-text {
    background: var(--bg-body);
    border: 1.5px solid #DEE2E6;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

/* ── Alert / Info Boxes ── */
.info-box {
    border-radius: var(--border-radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box-success {
    background: rgba(76,175,80,0.08);
    border: 1px solid rgba(76,175,80,0.2);
    color: #2E7D32;
}

.info-box-danger {
    background: rgba(244,67,54,0.08);
    border: 1px solid rgba(244,67,54,0.2);
    color: #C62828;
}

.info-box-warning {
    background: rgba(255,152,0,0.08);
    border: 1px solid rgba(255,152,0,0.2);
    color: #E65100;
}

.info-box-info {
    background: rgba(33,150,243,0.08);
    border: 1px solid rgba(33,150,243,0.2);
    color: #1565C0;
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A5F 0%, #0D2137 50%, #1a1a2e 100%);
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--accent), #0097A7);
    padding: 2rem;
    text-align: center;
    color: #fff;
}

.login-header i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.login-header h4 {
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.login-header p {
    margin: 0.25rem 0 0;
    opacity: 0.85;
    font-size: 0.85rem;
}

.login-body {
    padding: 2rem;
}

.login-body .form-control {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.login-body .btn {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h5 {
    font-weight: 700;
    color: var(--text-primary);
}

.empty-state p {
    max-width: 350px;
    margin: 0.5rem auto 0;
    font-size: 0.85rem;
}

/* ── Toasts / Alerts ── */
.alert-custom {
    border-radius: var(--border-radius-sm);
    border: none;
    padding: 0.85rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-custom i {
    font-size: 1.1rem;
}

/* ── Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.animate-delay-1 { animation-delay: 0.05s; }
.animate-delay-2 { animation-delay: 0.1s; }
.animate-delay-3 { animation-delay: 0.15s; }
.animate-delay-4 { animation-delay: 0.2s; }
.animate-delay-5 { animation-delay: 0.25s; }
.animate-delay-6 { animation-delay: 0.3s; }
.animate-delay-7 { animation-delay: 0.35s; }
.animate-delay-8 { animation-delay: 0.4s; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

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

    /* Show hamburger on mobile/tablet */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .main-footer {
        margin-left: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-card-value {
        font-size: 1.2rem;
    }

    .table-custom {
        font-size: 0.8rem;
    }

    .table-custom thead th,
    .table-custom tbody td {
        padding: 0.5rem 0.65rem;
    }

    /* Ensure navbar brand text doesn't overflow */
    .top-navbar .navbar-brand span {
        max-width: 140px;
    }
}

@media (max-width: 575.98px) {
    .main-content {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .stat-card-value {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .custom-card .card-header {
        padding: 0.85rem 1rem;
        font-size: 0.875rem;
    }

    .custom-card .card-body {
        padding: 1rem;
    }

    .login-header {
        padding: 1.5rem;
    }

    .login-body {
        padding: 1.5rem;
    }

    /* Compact navbar on small phones */
    .top-navbar .navbar-brand span {
        max-width: 100px;
        font-size: 0.95rem;
    }

    .user-dropdown span {
        display: none !important; /* Hide username text on very small screens */
    }

    .navbar-right .btn-accent.btn-sm {
        padding: 0.35rem 0.6rem;
    }
}

/* ── Print Styles ── */
@media print {
    .sidebar, .top-navbar, .main-footer, .btn, .sidebar-toggle {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ── Utility Classes ── */
.fw-800 { font-weight: 800; }
.fs-sm { font-size: 0.8rem; }
.fs-xs { font-size: 0.7rem; }
.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
.rounded-custom { border-radius: var(--border-radius); }
.rounded-custom-sm { border-radius: var(--border-radius-sm); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Currency highlight */
.currency-positive { color: var(--success); font-weight: 700; }
.currency-negative { color: var(--danger); font-weight: 700; }
.currency-neutral { color: var(--text-primary); font-weight: 700; }

/* ===============================
   HEADER / NAVBAR FINAL FIX
   Paste at the VERY END of style.css
   =============================== */

.top-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: linear-gradient(180deg, #1E3A5F 0%, #0D2137 100%) !important;
    z-index: 3000 !important;
}

.navbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.navbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
}

.custom-navbar-brand,
.top-navbar .navbar-brand,
.top-navbar .navbar-brand:link,
.top-navbar .navbar-brand:visited,
.top-navbar .navbar-brand:hover,
.top-navbar .navbar-brand:focus {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #ffffff !important;
    opacity: 1 !important;
    text-decoration: none !important;
    margin: 0 !important;
    font-weight: 700 !important;
}

.top-navbar .navbar-brand i {
    color: var(--accent) !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
}

.top-navbar .navbar-brand span {
    color: #ffffff !important;
    opacity: 1 !important;
    display: inline-block !important;
    max-width: 240px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sidebar-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    background: rgba(255,255,255,0.16) !important;
    color: #ffffff !important;
}

.sidebar-toggle i {
    font-size: 1.3rem !important;
    line-height: 1 !important;
}

.user-menu-dropdown {
    margin-left: auto !important;
}

.user-dropdown,
.user-dropdown:hover,
.user-dropdown:focus,
.user-dropdown.show {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 7px 12px !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.user-avatar-sm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.user-avatar-sm i {
    color: var(--accent) !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
}

.user-dropdown-name,
.user-dropdown-caret {
    color: #ffffff !important;
    opacity: 1 !important;
}

.user-dropdown-name {
    max-width: 130px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.top-navbar .dropdown-menu {
    z-index: 4000 !important;
    min-width: 220px !important;
}

@media (max-width: 991.98px) {
    .main-content,
    .main-footer {
        margin-left: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .top-navbar {
        padding: 0 10px !important;
    }

    .top-navbar .navbar-brand span {
        max-width: 140px !important;
        font-size: 0.95rem !important;
    }

    .user-dropdown-name {
        display: none !important;
    }
}
