/* Admin Portal Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Fonts */
    --font-main: "Inter", "SF Pro Text", system-ui, -apple-system, sans-serif;

    /* Color Palette - Light Black / Obsidian Theme */
    --bg-dark: #0a0a0c;
    --bg-main: #121214;
    --surface: #1e1e20;
    --surface-light: #252528;
    
    /* Primary / Accent */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.3);
    --accent: #6366f1;
    
    /* Text Colors */
    --text-white: #ffffff;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Glassmorphism / Glossy Shades */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    
    /* Border & Radius */
    --border: rgba(255, 255, 255, 0.06);
    --radius-xl: 8px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* Legacy Mapping */
    --bg-light: var(--bg-main);
    --white: var(--surface);
    --text-dark: var(--text-main);
    --border-color: var(--border);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.glass-select-wrapper {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    overflow: hidden;
    height: 48px;
}

.glass-select-wrapper:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.live-track-container .live-data-table {
    table-layout: fixed;
    width: 100%;
}
.glass-select {
    width: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0 15px;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.glass-select option {
    background: var(--surface);
    color: var(--text-main);
}

.chart-area {
    background: var(--surface-light);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Stats Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1.6rem 2rem;
    border-radius: 20px;
    border: 1.5px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.8rem;
    transition: var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}

/* Recent Charging Cards */
.recent-charging-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.recent-charge-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recent-charge-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.charge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.charge-point-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.charge-status-pill {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-charging { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-completed { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-poweroff { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.charge-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.charge-customer {
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: 600;
}

.charge-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Wave Graph Styles */
.wave-graph-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#wave-graph-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.graph-point {
    fill: var(--primary);
    stroke: var(--bg-main);
    stroke-width: 2;
    transition: all 0.3s ease;
}

.graph-point:hover {
    r: 6;
    stroke-width: 3;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    width: 65px;
    height: 65px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    transition: var(--transition);
    flex-shrink: 0;
}

.stat-card:hover .stat-icon {
    background: var(--primary);
    color: white;
    transform: rotate(-5deg) scale(1.1);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}

.s-card-header {
    border-bottom: 1.5px solid var(--glass-border);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

/* Page Layout */
.dashboard-body {
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Admin Header */
.admin-header {
    background: var(--bg-dark);
    backdrop-filter: var(--glass-blur);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-shrink: 0;
}

/* Global Search Bar */
.header-center {
    flex: 1;
    max-width: 1000px;
    margin: 0 40px;
}

.global-search-wrapper {
    position: relative;
    width: 100%;
}

.global-search-wrapper i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.global-search-wrapper input {
    width: 100%;
    height: 45px;
    padding: 10px 55px 10px 20px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    background: var(--surface-light);
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

@media (max-width: 992px) {
    .desktop-only {
        display: none !important;
    }
    
    .admin-header {
        padding: 0.8rem 1rem;
    }

    .header-logo img {
        height: 32px !important;
    }

    .header-center {
        margin: 0 10px;
        flex: 1;
        max-width: none;
    }

    .header-actions {
        gap: 0.6rem;
    }

    .global-search-wrapper input {
        height: 38px;
        padding-left: 12px;
        padding-right: 35px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .global-search-wrapper div {
        width: 35px !important;
        height: 38px !important;
        border-radius: 0 8px 8px 0 !important;
    }
}

.global-search-wrapper input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(33, 74, 223, 0.08);
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    z-index: 2000;
    max-height: 450px;
    overflow-y: auto;
    display: none;
    padding: 8px 0;
}

.search-results-dropdown.show {
    display: block;
    animation: fadeInDown 0.2s ease;
}

.search-result-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f8fafc;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--surface-light);
}

.result-icon {
    width: 38px;
    height: 38px;
    background: rgba(33, 74, 223, 0.08);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    overflow: hidden;
}

.result-title {
    display: block;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.search-category-header {
    padding: 10px 20px 5px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #fcfcfc;
}

.global-search-wrapper input::placeholder {
    color: #94a3b8;
}

/* Customer Info Styling */
.customer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-name {
    font-weight: 700;
    color: var(--text-dark);
}

.customer-phone {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.text-right {
    text-align: right;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary);
}

.icon-btn.active {
    color: var(--primary);
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 1.5rem 0.8rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding-top: 0px !important;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    padding-bottom: 10px; /* Bridge the gap for hover */
    margin-bottom: -10px;
}

.profile-dropdown:hover .dropdown-menu {
    display: block;
}

.header-user {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.profile-circle {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.profile-circle:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.header-user i {
    font-size: 0.9rem;
    color: var(--text-white);
    transition: var(--transition);
}

.profile-circle:hover i {
    color: var(--primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    padding: 8px;
    display: none;
    z-index: 1001;
    animation: fadeInDown 0.3s ease;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--surface-light);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.dropdown-menu a.logout-item {
    color: #ef4444;
}

.dropdown-menu a.logout-item:hover {
    background: rgba(239, 68, 68, 0.05);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Notifications */
.header-notification-wrapper {
    position: relative;
}

.notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

/* Glowing Red Animation for Poweroff Alert */
.header-notification-wrapper.has-poweroff .notif-btn {
    color: #ef4444;
    animation: criticalGlow 1.5s infinite ease-in-out;
    background: rgba(239, 68, 68, 0.1);
}

@keyframes criticalGlow {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    border: 2px solid #fff;
    display: none;
}

.header-notification-wrapper.has-poweroff .notif-badge {
    display: block;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    display: none;
    flex-direction: column;
    z-index: 1002;
    overflow: hidden;
    animation: fadeInDown 0.3s ease;
}

@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed !important;
        top: 75px !important;
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
        max-width: none !important;
        max-height: 80vh !important;
    }
}

.notif-dropdown.show {
    display: flex;
}

.notif-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1c24;
}

#notif-status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.notif-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f8faff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.notif-item:hover {
    background: #f8fbff;
}

.notif-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-point {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
}

.notif-cust {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notif-pending {
    font-size: 0.7rem;
    color: #ef4444;
    font-weight: 600;
}

.notif-footer {
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.restart-all-btn {
    width: 100%;
    padding: 10px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.restart-all-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Tab Content Styling */
.tab-pane-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1.5rem 0.8rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    animation: fadeInUp 0.4s ease;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.header-left h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 5px;
}

.header-left p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-refresh {
    background: var(--surface-light);
    color: var(--primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.filter-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.filter-row-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto; /* Actions take only needed space */
    gap: 1.5rem;
    align-items: flex-end;
}

.actions-inline {
    display: flex;
    flex-direction: column;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-buttons button {
    padding: 11px 25px; /* Reduced vertical padding, specific horizontal */
    width: auto;
    white-space: nowrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important; /* Force white icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 2;
    pointer-events: none;
    transition: var(--transition);
}

.icon-bg.right {
    right: 0;
    border-radius: 0 10px 10px 0;
}

.filter-group input {
    width: 100%;
    padding: 10px 50px 10px 15px;
    height: 46px; 
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--surface-light);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
    appearance: none;
}

/* Hide native browser calendar icon */
/* Fix for date picker overlay */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.filter-group select {
    width: 100%;
    padding: 10px 50px 10px 15px;
    height: 46px; 
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--surface-light);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
    appearance: none;
}

.filter-group input:focus, 
.filter-group select:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Search Icon Bg specific */
.search-icon-bg {
    left: auto;
    right: 0;
    width: 50px;
    height: 46px; /* Unified Height */
    border-radius: 0 12px 12px 0;
    font-size: 1.1rem;
}

.search-full-width input {
    height: 46px; /* Unified Height */
    padding-right: 65px;
    border-radius: 12px;
}

.btn-primary-filter {
    background: var(--primary);
    color: white;
    font-size: 16px;
    border: none;
    height: 46px; /* Unified Height */
    padding: 0 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear {
    font-size: 16px;
    background: var(--surface-light);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    height: 46px; /* Unified Height */
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 74, 223, 0.2);
}

/* Search Bottom Row */
.filter-row-bottom {
    width: 100%;
}

.search-full-width {
    position: relative;
    width: 100%;
}

.search-full-width input {
    width: 100%;
    padding: 14px 45px 14px 20px; /* Padding-right instead of padding-left */
    background: var(--surface-light);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 15px rgba(33, 74, 223, 0.15);
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 700;
}

.stat-change.positive { color: #10b981; }
.stat-change.negative { color: #ef4444; }

/* Table Section */
.table-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
}

.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-export {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-export i {
    font-size: 1rem;
}

/* Excel Style */
.btn-export.excel { color: #16a34a; border-color: rgba(22, 163, 74, 0.2); }
.btn-export.excel:hover { background: rgba(22, 163, 74, 0.1); border-color: #16a34a; transform: translateY(-2px); }

/* PDF Style */
.btn-export.pdf { color: #dc2626; border-color: rgba(220, 38, 38, 0.2); }
.btn-export.pdf:hover { background: rgba(220, 38, 38, 0.1); border-color: #dc2626; transform: translateY(-2px); }

/* CSV Style */
.btn-export.csv { color: var(--primary); border-color: rgba(33, 74, 223, 0.2); }
.btn-export.csv:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--primary); transform: translateY(-2px); }

.table-responsive {
    overflow-x: auto;
}

.standard-table {
    width: 100%;
    border-collapse: collapse;
}

.standard-table th, .standard-table td {
    padding: 12px 15px;
    border: 1.5px solid var(--glass-border); 
    color: var(--text-main);
    font-size: 1rem;
    text-align: center !important;
}

.standard-table thead tr {
    background: var(--surface-light) !important;
}

.standard-table thead th {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--text-white); 
    border: 1px solid var(--glass-border) !important;
    border-right: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0;
    text-align: center !important;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 15px !important;
}

.standard-table thead th:last-child {
    border-right: 1px solid var(--glass-border) !important;
}

.standard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Transaction ID column specific styling */
.standard-table td:nth-child(5), 
.standard-table th:nth-child(5),
.standard-table td:nth-child(6),
.standard-table th:nth-child(6),
.standard-table td:nth-child(5) code,
.standard-table td:nth-child(6) code {
    font-size: 0.65rem !important;
    font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
    letter-spacing: -0.2px;
    opacity: 0.8;
}

/* Station / Point specific styling */
.standard-table td:nth-child(2),
.standard-table td:nth-child(3),
.standard-table td:nth-child(4) {
    color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 700;
}

/* End of table styles */

.status-badge.success, .status-badge.charging { background: rgba(16, 185, 129, 0.1) !important; color: #059669 !important; }
.status-badge.pending, .status-badge.waiting { background: rgba(245, 158, 11, 0.1) !important; color: #b45309 !important; }
.status-badge.completed, .status-badge.paid { background: rgba(33, 74, 223, 0.1) !important; color: #214adf !important; }
.status-badge.stop, .status-badge.poweroff { background: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; }

/* Power Column Glowing Effects (Text Only) */
.status-badge.power-on {
    background: transparent !important;
    color: #10b981 !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: power-text-glow-green 1.5s infinite alternate ease-in-out;
    font-weight: 850;
    border: none !important;
    font-size: 0.85rem !important;
}

.status-badge.power-off {
    background: transparent !important;
    color: #ef4444 !important;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    animation: power-text-glow-red 1.5s infinite alternate ease-in-out;
    font-weight: 850;
    border: none !important;
    font-size: 0.85rem !important;
}

@keyframes power-text-glow-green {
    from { text-shadow: 0 0 4px rgba(16, 185, 129, 0.4); transform: scale(1); }
    to { text-shadow: 0 0 12px rgba(16, 185, 129, 1); transform: scale(1.05); }
}

@keyframes power-text-glow-red {
    from { text-shadow: 0 0 4px rgba(239, 68, 68, 0.4); transform: scale(1); }
    to { text-shadow: 0 0 12px rgba(239, 68, 68, 1); transform: scale(1.05); }
}


.point-tag {
    background: var(--surface-light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

/* Live Status Specifics */
.status-badge.ongoing {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.poweroff {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.timer-val {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.pending-amt {
    font-weight: 800;
    color: var(--text-dark);
}

.power-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.power-status.on {
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.power-status.off {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.power-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.power-status.on .power-dot {
    animation: pulsePower 2s infinite ease-in-out;
}

@keyframes pulsePower {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Live Data Table - Compact & No Scroll */
.live-data-table {
    table-layout: fixed; /* Force fixed layout for total control */
    width: 100%;
    min-width: auto !important; /* Remove the 1000px restriction */
    font-size: 0.8rem; /* Smaller font to fit 14 columns */
}

.live-data-table th, 
.live-data-table td {
    padding: 12px 6px !important; /* Ultra-compact padding */
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Precise Width Allocations (Total 100%) */
.live-data-table th:nth-child(1), .live-data-table td:nth-child(1) { width:2%; text-align: center; } /* SL */
.live-data-table th:nth-child(2), .live-data-table td:nth-child(2) { width: 8%; white-space: nowrap; } /* Date */
.live-data-table th:nth-child(3), .live-data-table td:nth-child(3) { width: 6.5%; } /* Customer */
.live-data-table th:nth-child(4), .live-data-table td:nth-child(4) { width: 7%; } /* Point */
.live-data-table th:nth-child(5), .live-data-table td:nth-child(5) { width: 7%; } /* Trasaction ID */
.live-data-table th:nth-child(6), .live-data-table td:nth-child(6) { width: 7.5%; } /* Amount */
.live-data-table th:nth-child(7), .live-data-table td:nth-child(7) { width: 4%; } /* Hours */
.live-data-table th:nth-child(8), .live-data-table td:nth-child(8) { width: 4%; } /* Txn Time */
.live-data-table th:nth-child(9), .live-data-table td:nth-child(9) { width: 5.5%; } /* Start */
.live-data-table th:nth-child(10), .live-data-table td:nth-child(10) { width: 5.5%; } /* End */
.live-data-table th:nth-child(11), .live-data-table td:nth-child(11) { width: 6.5%; } /* Pending Time */
.live-data-table th:nth-child(12), .live-data-table td:nth-child(12) { width: 5%; } /* Pending ₹ */
.live-data-table th:nth-child(13), .live-data-table td:nth-child(13) { width: 4%; text-align: left; } /* Power */
.live-data-table th:nth-child(14), .live-data-table td:nth-child(14) { width: 5%; text-align: left; } /* Status */

/* Adjusting elements for the smaller font */
.live-data-table .point-tag { padding: 2px 6px; font-size: 0.75rem; }
.live-data-table .status-badge { padding: 3px 8px; font-size: 0.7rem; }
.live-data-table .customer-phone { font-size: 0.7rem; font-weight: 600;}
.live-data-table .timer-val { font-size: 0.80rem; }
.live-data-table .pending-amt { font-size: 0.80rem; }

.action-btns {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
}

.action-btn.edit, .btn-action-edit { 
    background: rgba(37, 99, 235, 0.1); 
    color: #3b82f6; 
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    font-size: 1rem;
}
.action-btn.delete, .btn-action-delete { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-action-edit:hover { background: #dbeafe; transform: translateY(-2px); }
.btn-action-delete:hover { background: #fee2e2; transform: translateY(-2px); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    background: var(--surface-light);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-numbers span {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.page-numbers span:hover:not(.active) {
    background: var(--surface-light);
}

.page-numbers span.active {
    background: var(--primary);
    color: white;
}

/* Admin Footer */
.admin-footer {
    background: var(--bg-dark);
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.company-name {
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    font-size: 16px;
}

.company-name:hover {
    text-decoration: underline;
}

/* Mobile responsive cards */
.mobile-cards-container {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.mobile-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
}

@media (max-width: 768px) {
    .table-responsive { display: none; } /* Hide standard tables on mobile */
    .mobile-cards-container { display: flex; }
    .admin-header { padding: 1rem; }
    .header-search { display: none; }
    .header-user span { display: none; }
    .dashboard-content { padding: 1rem; }

    /* Filter Stack on Mobile */
    .filter-row-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-buttons {
        width: 100%;
        margin-top: 10px;
    }

    .filter-buttons button {
        flex: 1;
        justify-content: center;
    }
    
    .actions-inline label {
        display: none;
    }

    /* Responsive Table to Check/Card View */
    .settings-list-card .table-responsive {
        display: block;
        overflow: visible;
    }

    .settings-list-card .standard-table thead {
        display: none;
    }

    .settings-list-card .standard-table tbody tr {
        display: block;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--card-shadow);
    }

    .settings-list-card .standard-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.9rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.9rem;
        color: #ffffff !important;
        box-sizing: border-box;
        min-height: 45px;
    }

    .settings-list-card .standard-table td[data-label="Status"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
        padding: 1.2rem 0;
    }

    .settings-list-card .standard-table td > * {
        text-align: right !important;
    }

    .settings-list-card .standard-table td[data-label="Status"] > * {
        width: 100%;
        text-align: left !important;
    }

    .settings-list-card .standard-table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        padding-top: 1rem;
        margin-top: 0.5rem;
    }

    .settings-list-card .standard-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #94a3b8;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }
    
    .settings-list-card .standard-table input.editable-input {
        text-align: right;
        max-width: 150px;
        justify-self: end; /* Grid alignment */
    }

    .side-popup {
        width: 100% !important;
        max-width: 100% !important;
        right: -100% !important;
    }
    .side-popup.active {
        right: 0 !important;
    }

    .summary-header-main {
        flex-direction: column !important;
        gap: 20px !important;
        align-items: stretch !important;
    }
    .summary-header-controls {
        align-items: stretch !important;
        width: 100% !important;
    }
    .summary-export-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100% !important;
    }
    .summary-export-row button {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Side Popup Slider Styles */
.side-popup {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 50%;
    max-width: 50%;
    height: 100%;
    background: var(--surface);
    box-shadow: -5px 0 25px rgba(0,0,0,0.8);
    z-index: 2001; /* Above modal overlay */
    border-left: 1px solid var(--glass-border);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-popup.active {
    right: 0;
}

.side-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.side-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
}

.popup-header h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-popup-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-dark);
}

.popup-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.popup-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.popup-detail-row:last-child {
    border-bottom: none;
}

.p-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.p-value {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: right;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Styles (Re-added here for completeness if needed) */
.login-body {
    background: linear-gradient(135deg, #f0f4ff 0%, #d9e2ff 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 400px;
}

/* Confirmation Modals */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.admin-modal.show {
    opacity: 1;
    pointer-events: all;
}

.admin-modal .modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.85) translateY(20px);
    transition: var(--transition);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.admin-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.delete-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-icon {
    background: rgba(33, 74, 223, 0.1);
    color: var(--primary);
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.modal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-cancel {
    background: var(--surface-light);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.btn-cancel:hover {
    background: var(--surface);
}

.btn-confirm-delete {
    background: #ef4444;
    color: white;
    border: none;
}

.btn-confirm-delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-confirm-logout {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

.btn-confirm-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 74, 223, 0.3);
}

/* Settings Page Specific Styles */
.page-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.back-link:hover {
    transform: translateX(-5px);
}

.breadcrumb h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.settings-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.settings-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.s-card-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.s-icon-bg {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 15px rgba(33, 74, 223, 0.15);
}

.s-card-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.s-card-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    width: 100%;
    height: 50px;
    padding: 10px 60px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.input-with-icon input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(33, 74, 223, 0.1);
}

.unit-tag {
    position: absolute;
    right: 0;
    height: 100%;
    padding: 0 15px;
    display: flex;
    align-items: center;
    background: var(--surface-light);
    border-left: 1px solid var(--border-color);
    border-radius: 0 12px 12px 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.price-helper-text {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 1rem;
    background: rgba(33, 74, 223, 0.05);
    border-radius: 12px;
    color: var(--primary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Info Card / Preview */
.info-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.rate-preview {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.r-label {
    color: var(--text-muted);
    font-weight: 500;
}

.r-value {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.rate-divider {
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
    border-style: dashed;
}

.last-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--accent);
    font-size: 1.2rem;
}

@media (max-width: 992px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #f8faff 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-header img {
    height: 60px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(33, 74, 223, 0.1));
}

.login-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-left: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--primary);
    font-size: 1rem;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(33, 74, 223, 0.05);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(33, 74, 223, 0.2);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(33, 74, 223, 0.3);
}

.login-footer {
    margin-top: 2.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Login Page Adjustments */
.login-body {
    overflow: hidden; /* Prevent scrollbar */
}

.input-wrapper input {
    padding-left: 16px !important; /* Reset padding since icons are removed */
    padding-right: 45px !important; /* Space for eye icon on the right */
}

/* Captcha Row Layout */
.captcha-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.captcha-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#captcha-canvas {
    border: none;
    border-radius: 10px;
    width: 100%;
    height: 56px;
    display: block;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.refresh-btn {
    width: 36px;
    height: 36px;
    font-size: 18px !important;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.refresh-btn:hover {
    background: var(--bg-light);
    transform: rotate(360deg);
    border-radius: 50%;
}

.captcha-row .input-wrapper {
    flex: 1;
}

.captcha-row .input-wrapper input {
    height: 56px;
    padding: 16px !important;
    font-size: 1.1rem;
    border-radius: 14px;
}


/* Tabs Navigation */
.settings-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    padding-bottom: 2px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 3px;
}

.tab-btn.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(8px);
    border-radius: 12px;
}

.tab-btn.active::after {
    display: none;
}

@media (max-width: 992px) {
    .settings-tabs {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
        margin-bottom: 20px;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0 !important;
    }

    .tab-btn i {
        display: none !important;
    }

    .tab-btn.active {
        background: var(--faint-primary);
        color: var(--primary);
    }
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scanner Styles */
.scanner-upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    background: var(--surface-light);
    cursor: pointer;
    transition: var(--transition);
    max-width: 500px;
    margin: 0 auto;
}

.scanner-upload-area:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.upload-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

#scanner-preview {
    max-width: 200px;
    margin: 20px auto;
    border-radius: 12px;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Table Enhancements for Settings */
.settings-list-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
}

/* Editable Input in Table */
.editable-input {
    width: 100%;
    max-width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.editable-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(33, 74, 223, 0.1);
}

.action-header {
    text-align: right;
    padding-right: 20px;
}

/* Toggle Switch */
.switch {
    display: inline-block;
    width: 36px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.switch-label {
    margin-left: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Scanner Grid Layout */
.scanner-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.scanner-item {
    position: relative;
    width: 280px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.scanner-img-box {
    position: relative;
    width: 100%;
    height: 250px; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: var(--surface-light);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.scanner-img-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.scanner-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    padding: 10px;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px; /* Match img box */
}

/* Overlay targeting */
.scanner-img-box:hover .scanner-overlay {
    opacity: 1;
}

.scanner-upi-input {
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upi-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    white-space: nowrap;
}

.upi-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upi-input-wrapper input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.upi-input-wrapper input:enabled {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.upi-action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.upi-action-btn.save-mode {
    background: #10b981;
}

.upi-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.icon-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.view-btn {
    background: var(--primary);
}

.delete-btn {
    background: #ef4444;
}

.scanner-upload-placeholder {
    width: 180px;
    height: 180px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--surface-light);
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.scanner-upload-placeholder:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    color: var(--primary);
}

.scanner-upload-placeholder i {
    font-size: 2rem;
    margin-bottom: 10px;
}


/* Navigation Strip Wrapper */
.nav-tabs-wrapper {
    background: var(--surface);
    border-bottom: 1px solid var(--glass-border);
    margin: 0 -0.8rem 0 -0.8rem; /* Removed negative top margin to prevent cutting */
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.nav-tabs-wrapper.collapsed {
    margin-bottom: 0;
}

.nav-tabs-wrapper.collapsed .dashboard-tabs-grid {
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Nav Toggle Button */
.nav-toggle-btn {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    width: 45px;
    height: 22px;
    border-top: none;
    border-radius: 0 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2f3135;
    font-size: 1.5rem;
    z-index: 11;
    transition: var(--transition);
}

.nav-toggle-btn:hover {
    color: var(--primary);
    height: 25px;
    bottom: -25px;
}

/* Integrated Date & Time Strip - Full Width Brand Bar */
.datetime-strip-integrated {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin: 0;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    z-index: 12;
}

/* Ensure it remains visible even when parent is collapsed */
.nav-tabs-wrapper.collapsed .datetime-strip-integrated {
    height: auto;
    padding: 7px 25px;
    opacity: 1;
    pointer-events: auto;
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.current-date, .current-time {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700; /* Set to consistent bold weight */
    color: white;
    letter-spacing: 0.5px;
    font-family: 'Plus Jakarta Sans', sans-serif; /* Use same font family for consistency */
}

#current-time {
    color: white;
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
}

#current-date {
    color: white;
}

#tab-content-container {
    padding-top: 20px;
}

/* Dashboard Tabs - Card Grid Style */
.dashboard-tabs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
    width: 100%;
    margin: 0;
    padding: 1.5rem 0.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.tab-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.tab-card.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05); /* Very slight blue tint */
}

/* Icon Styles inside Tab Card */
.tab-icon {
    width: 50px;
    height: 50px;
    background: var(--surface-light);
    color: var(--text-muted);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.tab-card.active .tab-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 10px rgba(33, 74, 223, 0.3);
}

/* Text Styles inside Tab Card */
.tab-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.tab-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 600;
}

.tab-card.active .tab-info h3 {
    color: var(--primary);
}

/* Mobile Responsive Tabs */
@media (max-width: 992px) {
    .dashboard-tabs-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 576px) {
    .dashboard-tabs-grid {
        grid-template-columns: 1fr; /* Stack on very small screens */
        gap: 1rem;
    }
    .datetime-strip {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 15px;
    }
}

/* Tab Content Animation */
.tab-pane-content {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Accounts Page Styles --- */
.accounts-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease;
}

/* Inner Tabs */
.accounts-header-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.acc-tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.acc-tab-btn.active {
    color: var(--primary);
}

.acc-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    /* background: var(--primary); */
    border-radius: 3px 3px 0 0;
}

/* Filter Row & Opening Balance */
.accounts-filter-row {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: row; 
    align-items: flex-end;
    gap: 1.5rem;
}

.filter-controls.full-width-filters {
    display: flex;
    flex-direction: row; /* Ensure children are in a row */
    gap: 1.5rem;
    width: 100%; /* Take full width */
    flex: 1;
}

.control-group.flex-grow {
    flex: 1; /* Distribute space evenly */
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex overflow */
}

/* Ensure inputs fill their container */
.search-wrapper-acc, .acc-input, .static-display-box {
    width: 100%;
}

/* Search Wrapper */
.search-wrapper-acc {
    position: relative;
    width: 100%;
}

.search-icon-acc {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Static Display Box for Duration */
.static-display-box {
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #e0e7ff; /* Light indigo background */
    color: var(--primary);
    font-weight: 800;
    border-radius: 10px;
    border: 1px solid rgba(33, 74, 223, 0.2);
    letter-spacing: 1px;
}

/* Balance Row Right Alignment */
.balance-row-right {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem; /* Space before table */
}

/* Opening Balance Card adjustment */
.opening-balance-card {
    /* Background matching primary theme but dark for contrast */
    background: linear-gradient(135deg, #1e293b, #0f172a); 
    color: white;
    padding: 10px 25px; /* Compact vertically */
    height: auto;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 280px;
    box-shadow: var(--card-shadow);
}

.ob-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.ob-details {
    display: flex;
    flex-direction: column;
}

.ob-label {
    font-size: 0.75rem;
    opacity: 0.7;
}

.ob-value {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Transactions Card */
.accounts-content-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.section-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.acc-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
}

/* Custom Table Header for Accounts - Matching other sections */
.acc-table thead tr {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.acc-table th {
    color: white !important; 
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 15px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2); 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acc-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.9rem;
    vertical-align: middle;
    text-align: left;
}

/* Ensure filter styles are specific enough */
.accounts-filter-row .acc-input, .filter-card .acc-input {
    width: 100%; 
    height: 50px; 
    padding: 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #f8faff;
    color: var(--text-dark);
    font-size: 0.95rem;
    display: block; /* Ensure block display */
}

/* Fix Date Picker Icon */
.filter-card input[type="date"].acc-input::-webkit-calendar-picker-indicator,
.accounts-filter-row input[type="date"].acc-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.4); /* Make it darker gray if background is white/light */
    font-size: 1.2rem;
    padding: 5px;
}

/* .acc-table tr:last-child td removed to show bottom border */

/* Specific override for right-aligned headers */
.acc-table th.text-right {
    text-align: right;
}

.text-right { text-align: right; }
.text-success { color: #00c853 !important; font-weight: 700; } /* Vibrant Green */
.text-danger { color: #ff3d00 !important; font-weight: 700; }   /* Vibrant Red */

/* Footer Summary */
/* Footer Summary Styling */
.accounts-footer-summary {
    display: flex;
    justify-content: flex-end; /* Align right */
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center align text */
    min-width: 200px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04); /* Soft, attractive shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Remove old highlight background */
.summary-item.highlight {
    background: var(--white);
    border-color: #e2e8f0;
}

.summary-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.summary-item.highlight .s-value {
    color: var(--primary);
}

.s-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.s-value {
    font-size: 1.8rem; /* Larger, clearer numbers */
    font-weight: 800;
}

/* Responsive Accounts */
@media (max-width: 768px) {
    .accounts-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .control-group {
        width: 100%;
    }
    
    .acc-input {
        width: 100%;
    }
    
    .btn-acc-view {
        width: 100%;
    }
    
    .opening-balance-card {
        width: 100%;
        margin-top: 10px;
    }

    .accounts-footer-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-item {
        width: 100%;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Table Header with Flex Layout */
.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem;
}

.section-title {
    margin-bottom: 0; /* Remove bottom margin as flex parent handles gap */
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Opening Balance Card adjustment inside header */
.opening-balance-card {
    background: linear-gradient(135deg, #1e293b, #0f172a); 
    color: white;
    padding: 8px 20px; /* More compact */
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px; /* Reduced min-width */
    box-shadow: var(--card-shadow);
    /* No margin top needed now */
}

.ob-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.ob-value {
    font-size: 1.2rem;
}

/* Responsive Table vs Cards Toggle */
.mobile-cards-view {
    display: none; /* Hidden by default (Desktop) */
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

@media (max-width: 992px) {
    .table-container.table-responsive {
        display: none; /* Hide table on mobile/tablet */
    }

    .mobile-cards-view {
        display: flex; /* Show cards on mobile/tablet */
    }
}

/* Mobile Card Styling */
.mobile-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s;
}

.mobile-card:active {
    transform: scale(0.98);
}

.m-card-header {
    background: #f8faff;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-card-header strong {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.m-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.m-card-row span:first-child {
    color: var(--text-muted);
    font-weight: 600;
}

.m-card-row span:last-child {
    color: var(--text-dark);
    font-weight: 700;
}

/* Customer info in mobile card */
.m-card-customer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}


/* Custom Select for Settings */
.custom-select {
    padding: 10px 35px 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #f8faff;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    /* Custom arrow using encoded SVG */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    min-width: 200px;
    transition: var(--transition);
}

.custom-select:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(33, 74, 223, 0.1);
}
/* Summary Table Specific Widths (Total ~100%) */
.summary-table th, 
.summary-table td {
    padding: 12px 6px !important;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-table th:nth-child(1), .summary-table td:nth-child(1) { width: 1%; text-align: center; } /* SL */
.summary-table th:nth-child(2), .summary-table td:nth-child(2) { width: 8%; white-space: nowrap; } /* Date */
.summary-table th:nth-child(3), .summary-table td:nth-child(3) { width: 14%; } /* Customer - LARGER WIDTH */
.summary-table th:nth-child(4), .summary-table td:nth-child(4) { width: 5%; } /* Point - SMALL WIDTH */
.summary-table th:nth-child(5), .summary-table td:nth-child(5) { width: 10%; } /* Transaction ID */
.summary-table th:nth-child(6), .summary-table td:nth-child(6) { width:4%; } /* Amount */
.summary-table th:nth-child(7), .summary-table td:nth-child(7) { width: 4%; } /* Hours */
.summary-table th:nth-child(8), .summary-table td:nth-child(8) { width: 8%; } /* Txn Time */
.summary-table th:nth-child(9), .summary-table td:nth-child(9) { width: 8%; } /* Start */
.summary-table th:nth-child(10), .summary-table td:nth-child(10) { width: 8%; } /* End */
.summary-table th:nth-child(11), .summary-table td:nth-child(11) { width: 10%; } /* Status */
.summary-table th:nth-child(12), .summary-table td:nth-child(12) { width: 5%; text-align: center; } /* Action */

/* Status Badge for Completed */
.status-badge.completed { background: rgba(33, 74, 223, 0.1); color: #214adf; }

.summary-table .customer-phone {
    display: block;
    margin-top: 2px;
}

/* Accounts Table Column Widths & Alignment */
.acc-table th:nth-child(1), .acc-table td:nth-child(1) { width: 5%; }
.acc-table th:nth-child(2), .acc-table td:nth-child(2) { width: 12%; }
.acc-table th:nth-child(3), .acc-table td:nth-child(3) { width: 35%; }
.acc-table th:nth-child(4), .acc-table td:nth-child(4) { width: 12%; }
.acc-table th:nth-child(5), .acc-table td:nth-child(5) { width: 18%; text-align: right; } /* Credit - Right Aligned */
.acc-table th:nth-child(6), .acc-table td:nth-child(6) { width: 18%; text-align: right; } /* Debit - Right Aligned */

/* Reports Page Styles */
.reports-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.reports-filter-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.report-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-control-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-left: 4px;
}

.report-input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f8faff;
    color: var(--text-dark);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.report-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(33, 74, 223, 0.05);
}

.btn-generate {
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(33, 74, 223, 0.2);
    width: 100%;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(33, 74, 223, 0.3);
}

.report-preview-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    min-height: 400px;
}

.report-preview-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-dark);
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.report-table thead tr {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.report-table th {
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 15px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.9rem;
    vertical-align: middle;
}

.report-table tbody tr:hover {
    background: #f8fbff;
}

.text-amount {
    font-family: monospace;
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
}

.report-footer-row {
    background: #f8faff;
    font-weight: 800;
}

.report-footer-row td {
    border-top: 2px solid var(--border-color);
    color: var(--primary);
    font-size: 1rem;
    padding: 15px;
    text-align: right;
}

.report-footer-row td.text-amount {
    text-align: right;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .reports-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* PDF Preview Modal (Right Slide-in) */
.pdf-preview-modal {
    position: fixed;
    bottom: -100%; 
    left: 0;
    width: 100%;
    height: 95vh; 
    top: auto;
    right: 0;
    background: var(--bg-main);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
    z-index: 2000;
    transition: bottom 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--glass-border);
}

.pdf-preview-modal.active {
    bottom: 0;
}

.pdf-preview-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--glass-border);
}

.pdf-preview-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.close-preview-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.close-preview-btn:hover {
    color: var(--danger);
}

.pdf-preview-body {
    flex: 1;
    background: var(--bg-dark);
    padding: 20px;
    overflow: hidden; /* Iframe handles scroll */
}

.pdf-preview-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff; /* White background for the actual PDF content is usually preferred for readability */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
}

.pdf-preview-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--surface);
}

/* Overlay for modal */
.pdf-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.pdf-preview-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .pdf-preview-modal {
        width: 100%; /* Full width on mobile */
    }
}

/* Modal Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(33, 74, 223, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 74, 223, 0.4);
}

.btn-cancel {
    background: var(--surface-light);
    color: var(--text-muted);
    padding: 12px 25px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--surface);
    color: var(--text-dark);
}

/* Grid View Styles for Tables */
.grid-view table.standard-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    border: none;
    background: transparent;
}
.grid-view table.standard-table thead {
    display: none;
}
.grid-view table.standard-table tbody {
    display: contents;
}
.grid-view table.standard-table tr {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    padding: 20px;
    gap: 12px;
}
.grid-view table.standard-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 0;
    font-size: 0.95rem;
}
.grid-view table.standard-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding-right: 15px;
}
.grid-view table.standard-table td .editable-input {
    width: 60%;
    text-align: right;
}
.grid-view .station-pass-display,
.grid-view .username-display,
.grid-view .station-name-display {
    text-align: right !important;
    width: 60% !important;
}
.grid-view .action-btns {
    width: 100%;
    justify-content: flex-end !important;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* ===========================
   Add-Form Utilities (Settings Split Layout)
   =========================== */
.add-form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.add-form-input {
    width: 100%;
    padding: 15px 13px;
    border: 1.5px solid var(--glass-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.add-form-input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(33, 74, 223, 0.2);
}

/* Fix for white dropdown in select */
select.add-form-input option {
    background-color: var(--surface);
    color: var(--text-white);
}

.add-form-btn {
    width: 100%;
    padding: 8px 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 4px;
}

.add-form-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.add-form-btn:active {
    transform: translateY(0);
}

/* Settings container overflow for split grid */
.settings-container {
    overflow-y: auto;
    flex: 1;
}

/* Sub-view toggle buttons */
.s-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1.5px solid #e2e8f0;
}

.sub-view-tabs {
    display: flex;
    background: var(--surface-light);
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 992px) {
    .s-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        padding: 1.25rem !important;
    }

    .sub-view-tabs {
        width: 100% !important;
    }

    .search-input-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .btn-sub-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 10px 15px !important;
    }
}

.btn-sub-tab {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    min-width: 100px;
}

.btn-sub-tab:hover:not(.active) {
    background: var(--surface);
    color: #475569;
}

.status-badge.paid,
.status-badge.completed {
    background: #ecfdf5;
    color: #10b981;
}

.btn-sub-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* View Toggle Button Styles */
.view-toggle-btn {
    background: var(--surface-light);
    color: var(--text-muted);
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 20px;
}

.view-toggle-btn:hover {
    background: var(--surface);
    color: var(--primary);
}

.view-toggle-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Settings Add Form Grid */
.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.2rem;
}

.search-filter-wrapper{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-toggle-btn{
  display: none;
}

@media (max-width: 992px) {
    .settings-form-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Ensure span items also adjust in flex layout */
    .settings-form-grid > div {
        grid-column: span 1 !important;
        width: 100% !important;
    }

    /* Filters stacking as requested */
    .search-input-group {
        gap: 10px !important;
    }

    .search-input-group > div {
        width: 100% !important;
        min-width: 0 !important;
    }

    .search-input-group input {
        border-radius: 10px !important;
        border-right: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    }

    .search-btn {
        width: 100% !important;
        border-radius: 10px !important;
        height: 48px !important;
        justify-content: center !important;
    }

    .search-filter-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
}


/* Grid View for Tables */
.table-responsive.grid-view .standard-table thead {
    display: none;
}

.table-responsive.grid-view .standard-table, 
.table-responsive.grid-view .standard-table tbody {
    display: block;
    width: 100%;
}

.table-responsive.grid-view .standard-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.table-responsive.grid-view .standard-table tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.table-responsive.grid-view .standard-table tr:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.table-responsive.grid-view .standard-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 !important;
    border-bottom: 1px dashed #f1f5f9 !important;
    text-align: right;
    min-height: 40px;
    width: 100% !important;
    background: transparent !important;
}

.table-responsive.grid-view .standard-table td:last-child {
    border-bottom: none !important;
    margin-top: 10px;
    padding-top: 15px !important;
    justify-content: center;
}

.table-responsive.grid-view .standard-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    text-align: left;
    margin-right: 1.5rem;
}


/* Grid Card Title Styling */
.table-responsive.grid-view .standard-table td[data-label*='NAME'] {
    display: flex;
    text-align: center;
    border-bottom: 1.5px solid #e2e8f0 !important;
    padding-bottom: 15px !important;
    margin-bottom: 10px;
}


/* Overview Stats Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    min-height: 140px;
}

.stat-icon {
    background: rgba(33, 74, 223, 0.1);
    color: #214adf;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    color: #ffffff !important;
    font-size: 2rem;
    font-weight: 800;
}

.overview-main-grid, .performance-tables-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (max-width: 992px) {
    /* Fix cutting issue by adjusting main padding */
    .dashboard-content {
        padding: 1rem !important;
    }

    .overview-main-grid, .performance-tables-grid {
        display: block !important; /* Stack them naturally */
        width: 100% !important;
    }

    .dashboard-card {
        padding: 1rem !important;
        margin-bottom: 1.2rem !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Stack Revenue Header to prevent cutting */
    .revenue-header-row {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .revenue-header-row > div:last-child {
        display: flex !important;
        justify-content: flex-start !important;
        width: 100% !important;
        gap: 20px !important;
        border-top: 1px solid #f1f5f9 !important;
        padding-top: 15px !important;
    }

    /* Reduce chart container padding to fit screen */
    #performance-chart-container {
        padding: 20px 10px !important;
    }

    #revenue-bars-container, #revenue-x-axis {
        left: 10px !important;
        right: 10px !important;
    }
    
    .dashboard-tabs-grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 0.6rem !important;
        padding: 0.8rem !important;
        background: var(--glass-bg);
    }

    .tab-card {
        padding: 0.5rem 0.8rem !important;
        justify-content: center !important;
        border-radius: 10px !important;
    }

    .tab-icon {
        display: none !important;
    }

    .tab-info h3 {
        font-size: 0.85rem !important;
        margin: 0 !important;
    }

    .tab-info p {
        display: none !important;
    }

    /* Chart Filters Row */
    .chart-filter-row {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .chart-filter-row > div {
        width: 100% !important;
        padding-left: 0 !important;
        display: block !important; /* Force block to ensure sub-select takes full width */
    }

    .chart-filter-row select {
        display: block !important;
        width: 100% !important;
        padding: 12px 15px !important;
        min-width: 0 !important;
        background: transparent !important;
        appearance: auto !important;
        font-size: 0.85rem !important;
    }

    /* Stats Grid - Now 2 Cards Per Row */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
        width: 100% !important;
    }
    
    .stat-card {
        padding: 1rem !important;
        margin-bottom: 0 !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px !important;
    }

    .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }

    .stat-details {
        text-align: center !important;
    }

    .stat-label {
        font-size: 0.65rem !important;
    }

    .stat-value {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    .header-center {
        display: none !important;
    }
}

/* Final Mobile Overrides */
@media (max-width: 992px) {
    /* Show tables in overview that are hidden by line 1092 */
    .overview-container .table-responsive {
        display: block !important;
        overflow-x: auto !important;
        width: 100% !important;
    }
    
    /* Ensure stats stay 2 per row on all mobile */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
        width: 100% !important;
    }
    
    .stat-card {
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    /* Fix Recent Charging Card Squishing */
    .recent-charging-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }

    /* Force select arrows to the far right */
    .chart-filter-row > div {
        padding: 0 !important;
        display: flex !important;
        background: var(--surface) !important;
    }

    /* Live Track Responsiveness */
    .live-filter-bar {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .live-filter-bar > div {
        width: 100% !important;
    }

    /* Force Table view on mobile for Live Track */
    .table-container.table-responsive {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-top: 1rem;
    }

    .live-data-table {
        min-width: 1200px !important; /* Force width to ensure scrollbar appears */
    }

    /* Hide card view if user wants only table */
    .mobile-cards-view {
        display: none !important;
    }
}

/* Button Styling */
.btn-clear {
    background: var(--surface-light) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: var(--surface) !important;
    color: var(--primary) !important;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .pane-header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
    }

    .tab-pane-content {
        padding: 1.5rem 1rem !important; /* Smaller padding on mobile */
    }
}

/* Side Popup Left Slide Support */
.side-popup {
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.side-popup.left {
    right: auto !important;
    left: -100% !important;
}

.side-popup.left.active {
    left: 0 !important;
}
/* Fix for content cutting under header ONLY on mobile */
@media (max-width: 992px) {
    .admin-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
    .header-center {
        display: none !important; /* Hide desktop search in center on mobile */
    }
    .mobile-only-search-btn {
        display: flex !important;
    }
    .header-right {
        margin-left: auto !important;
        display: flex !important;
        justify-content: flex-end !important;
        flex: 1 !important;
    }
    .header-actions {
        gap: 0.75rem !important;
    }
    .dashboard-content {
        padding-top: 70px !important;
    }

    /* Mobile Search Bar Styles */
    .mobile-search-overlay {
        position: fixed;
        top: 65px; /* Directly below the sticky header */
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--glass-border);
        padding: 12px 15px;
        z-index: 999;
        backdrop-filter: blur(12px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        display: none;
        animation: slideDown 0.3s ease;
    }

    .mobile-search-container {
        display: flex;
        align-items: center;
        gap: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1.5px solid var(--glass-border);
        border-radius: 12px;
        padding: 0 15px;
        height: 48px;
    }

    .mobile-search-container input {
        flex: 1;
        background: transparent;
        border: none;
        color: white;
        font-family: inherit;
        font-size: 0.95rem;
        outline: none;
    }

    .close-mobile-search {
        background: transparent;
        border: none;
        color: #94a3b8;
        font-size: 1.1rem;
        cursor: pointer;
    }

    @keyframes slideDown {
        from { transform: translateY(-20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
}

.mobile-only-search-btn, .mobile-search-overlay {
    display: none;
}

@media (max-width: 768px) {

      .header-right {
        margin-left: auto !important;
        display: flex !important;
        justify-content: flex-end !important;
        flex: 1 !important;
    }
}

/* Settings Page Responsive Fixes */
@media (max-width: 992px) {
    .s-card-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.2rem !important;
        padding: 1.25rem 1rem !important;
    }

    .s-card-header > div:last-child {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }

    .limit-wrapper {
        width: 100% !important;
        justify-content: space-between !important;
        padding: 10px 15px !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .sub-view-tabs {
        width: 100% !important;
    }

    .btn-sub-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 10px !important;
        font-size: 0.85rem !important;
    }

    /* Fix table cutting / Card transformation for mobile */
    .table-responsive {
        width: 100% !important;
        overflow-x: hidden !important;
        padding: 0 0.5rem 1rem !important;
    }
}

@media (max-width: 650px) {
    .standard-table thead {
        display: none !important;
    }

    .standard-table:not(.no-card-view) {
        table-layout: auto !important;
        display: block !important;
        width: 100% !important;
    }

    .standard-table:not(.no-card-view) tbody, 
    .standard-table:not(.no-card-view) tr, 
    .standard-table:not(.no-card-view) td {
        display: block !important;
        width: 100% !important;
    }

    .standard-table:not(.no-card-view) tr {
        margin-bottom: 1.5rem !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: 16px !important;
        padding: 1.2rem !important;
        position: relative;
    }

    .standard-table:not(.no-card-view) td {
        border: none !important;
        text-align: right !important;
        padding: 0.8rem 1rem 0.8rem 120px !important;
        display: block !important;
        position: relative !important;
        min-height: 40px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .standard-table td:last-child {
        border-bottom: none !important;
        padding-left: 1rem !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .standard-table td::before {
        content: attr(data-label);
        position: absolute !important;
        left: 1rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 100px !important;
        text-align: left !important;
        font-weight: 850;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--text-muted);
        letter-spacing: 0.5px;
    }

    .standard-table:not(.no-card-view) td[data-label="Status"] {
        padding-left: 1rem !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
        align-items: flex-start !important;
    }

    .standard-table:not(.no-card-view) td[data-label="Status"]::before {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        margin-bottom: 0;
        display: block !important;
    }

    .standard-table:not(.no-card-view) td[data-label="Status"] > * {
        width: 100%;
        text-align: left !important;
    }

    .status-tab-group {
        width: 100% !important;
        max-width: 100% !important;
    }

    .status-tab {
        font-size: 0.65rem !important;
        padding: 10px 4px !important;
    }

    .point-tag {
        font-size: 1.1rem !important;
    }

    .settings-form-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 576px) {
    .s-icon-bg {
        width: 34px !important;
        height: 34px !important;
    }
    .s-icon-bg i {
        font-size: 0.9rem !important;
    }
}
