/* ============================================================
   120HZ PERFORMANCE ENGINE — GPU COMPOSITOR LAYER
   All transitions use only transform + opacity (zero layout/paint)
   Target: 120fps on high-refresh displays, 0 jank on 60fps.
   ============================================================ */
html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

/* Force GPU compositing — promote interactive elements to compositor layers.
   IMPORTANT: contain:layout removed — it blocks GPU layer promotion via will-change */
.tab-btn,
.sub-tab-btn,
.btn-action,
.btn-premium,
.card,
.panel,
.modal-content,
.premium-alert,
.settings-tab-content,
.sidebar,
.top-bar,
.mobile-bottom-nav button,
.filter-card {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Smooth scroll container — momentum-based */
.main-content,
.panel-left,
.panel-right,
.table-responsive,
.cards-grid {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}



/* Global Scrollbar Customization */
/* For PC View: Unique & Premium Design */
@media (min-width: 1025px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    body.dark-mode ::-webkit-scrollbar-track {
        background: #1a1a2e;
    }

    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #1ABC9C 0%, #16A085 100%);
        border-radius: 10px;
        transition: all 0.3s;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #16A085;
        box-shadow: 0 0 10px rgba(26, 188, 156, 0.4);
    }

    /* Firefox support */
    * {
        scrollbar-width: thin;
        scrollbar-color: #1ABC9C transparent;
    }
}

/* For Mobile View: Hide Scrollbars for a clean app-like feel */
@media (max-width: 1024px) {
    ::-webkit-scrollbar {
        display: none !important;
    }

    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
}

/* --- LENIS SMOOTH SCROLLING OVERRIDES --- */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
    /* Prevents native CSS smooth scroll from conflicting with Lenis JS */
}

.lenis.lenis-stopped {
    overflow: hidden;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    overflow: hidden !important;
    height: 100% !important;
    margin: 0;
    padding: 0;
}

body {
    background-color: #ECF0F1;
    color: #333;
}

.hidden {
    display: none !important;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- LANDING PAGE --- */
.landing-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #2C3E50;
    text-align: center;
}

.landing-box {
    background: #fff;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
}

.landing-box h1 {
    margin-bottom: 15px;
    color: #2C3E50;
}

.landing-box p {
    margin-bottom: 30px;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.btn-landing {
    display: inline-block;
    padding: 12px 24px;
    margin: 10px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary {
    background-color: #2980B9;
}

.btn-primary:hover {
    background-color: #21618C;
}

.btn-secondary {
    background-color: #27AE60;
}

.btn-secondary:hover {
    background-color: #1E8449;
}

/* --- LOGIN SCREEN --- */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: #2C3E50;
    pointer-events: none;
    /* Let clicks pass through to the form */
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: transparent;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 400px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.signup-box {
    width: 650px;
    max-width: 95%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
}

.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.portal-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.portal-btn {
    flex: 1;
    padding: 10px 5px;
    background: #ecf0f1;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    color: #7f8c8d;
    transition: background 0.3s, color 0.3s;
}

.portal-btn.active {
    background: #2980B9;
    color: white;
}

.login-header {
    margin-bottom: 30px;
    color: #2C3E50;
}

.login-logo-img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    object-fit: contain;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.input-group input {
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    /* Prevent text from typing under the icon */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    bottom: 12px;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 16px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.btn-login {
    background-color: #E67E22;
}

.btn-login:hover {
    background-color: #d35400;
}

.auth-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-top: 15px;
}

.auth-link:hover {
    text-decoration: underline;
}

/* --- DASHBOARD SCREEN --- */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2C3E50;
    color: white;
    padding: 10px 20px;
    min-height: 60px;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
}

.brand {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.brand-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    object-fit: contain;
}

.main-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #2C3E50 0%, #1a252f 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling for iOS */
    overscroll-behavior-y: contain;
    /* Prevents whole page from bouncing/scrolling when sidebar ends */
    touch-action: pan-y;
    /* Ensures vertical touch panning works correctly */
    /* Important for width:0 */
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar.collapsed {
    width: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%);
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.4);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.nav-buttons {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 0;
    gap: 4px;
}

.nav-buttons button {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 12px 20px;
    margin: 0 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.nav-buttons button i {
    width: 28px;
    font-size: 16px;
    text-align: center;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.nav-buttons button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding-left: 25px;
}

.nav-buttons button:hover i {
    transform: scale(1.15);
}

.nav-buttons button.active {
    background: linear-gradient(90deg, #1ABC9C 0%, #16A085 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
}

.nav-buttons button.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #F1C40F;
    border-radius: 0 4px 4px 0;
}

.btn-theme {
    background: transparent;
    color: #F1C40F;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 15px;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 15px;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h3 {
    color: #34495E;
    margin-bottom: 15px;
    border-bottom: 2px solid #BDC3C7;
    padding-bottom: 5px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-top: 4px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

/* Card Colors matching Tkinter App */
.card-blue {
    border-top-color: #2980B9;
}

.card-red {
    border-top-color: #C0392B;
}

.card-orange {
    border-top-color: #E67E22;
}

.card-green {
    border-top-color: #27AE60;
}

.card-primary {
    border-top-color: #16A085;
    background-color: #e8f8f5;
}

.card-dark {
    border-top-color: #34495E;
}

/* Sub-tabs and Content Logic */
.sub-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 15px;
    width: 100%;
    /* Allow taking full width available */
    max-width: fit-content;
    /* Cap growth but preserve overflow capability */
    overflow-x: auto;
    /* Enable explicit scrolling flow */
    -webkit-overflow-scrolling: touch;
    /* Boost kinetic touch responsiveness */
    scrollbar-width: none;
    /* Firefox compatibility hides messy tracking */
}

.sub-tabs::-webkit-scrollbar {
    display: none;
    /* Clean Chrome viewport */
}

.sub-tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #a0aec0;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
}

.sub-tab-btn.active {
    background: #2980B9;
    color: #fff;
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.3);
}

body.dark-mode .sub-tab-btn.active {
    background: #1ABC9C;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Table Optimization for Stock Check */
@media (max-width: 768px) {

    .data-table th:nth-child(1),
    .data-table td:nth-child(1),
    .data-table th:nth-child(3),
    .data-table td:nth-child(3),
    .data-table th:nth-child(8),
    .data-table td:nth-child(8) {
        display: none !important;
    }

    .data-table {
        font-size: 13px;
    }
}

.card-gray {
    border-top-color: #7F8C8D;
}

.card-yellow {
    border-top-color: #F39C12;
}

/* --- APP LAYOUTS (SPLIT PANELS) --- */
.split-layout {
    display: flex;
    gap: 20px;
    height: 100%;
}

.panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.panel-left {
    flex: 2;
    min-width: 350px;
}

.panel-right {
    flex: 3;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.panel h3 {
    color: #2C3E50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* --- FORMS & INPUTS --- */
.form-group {
    margin-bottom: 15px;
    flex: 1;
}

.form-group-row {
    display: flex;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* --- PREMIUM SEARCH --- */
.premium-search-container {
    flex: 2;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 25px;
    /* More modern, pill-shaped */
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    overflow: hidden;
    height: 48px;
    /* More prominent */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.premium-search-container:focus-within {
    border-color: #2980B9;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.15);
    transform: translateY(-1px);
}

body.dark-mode .premium-search-container {
    background: #1e1e2d;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .premium-search-container:focus-within {
    border-color: #1ABC9C;
    box-shadow: 0 8px 25px rgba(26, 188, 156, 0.2);
}

.premium-search-container input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 10px 20px !important;
    /* More padding */
    outline: none !important;
    position: relative;
    z-index: 3;
    color: inherit;
    box-shadow: none !important;
    font-size: 16px;
    /* Larger text */
    font-weight: 500;
}

#search-gl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#premium-placeholder {
    position: absolute;
    left: 20px;
    /* Aligned with input padding */
    pointer-events: none;
    z-index: 2;
    display: flex;
    font-size: 15px;
    font-weight: 600;
    /* Bolder */
    color: #2980B9;
    white-space: pre;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.5px;
}

.divider {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}

/* --- AUTOCOMPLETE DROPDOWN --- */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-results li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
}

.autocomplete-results li:last-child {
    border-bottom: none;
}

.autocomplete-results li:hover,
.autocomplete-results li.autocomplete-active {
    background-color: #f1f1f1;
}

body.dark-mode .autocomplete-results {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .autocomplete-results li {
    border-bottom-color: #444;
    color: #ecf0f1;
}

body.dark-mode .autocomplete-results li:hover,
body.dark-mode .autocomplete-results li.autocomplete-active {
    background-color: #3d3d3d;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    padding-right: 30px !important;
}

.dropdown-icon {
    position: absolute;
    right: 10px;
    color: #7f8c8d;
    pointer-events: none;
    font-size: 0.8rem;
}

body.dark-mode .autocomplete-results li:hover,
body.dark-mode .autocomplete-results li.autocomplete-active {
    background-color: #3d3d3d;
}

/* --- DATA TABLES --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background-color: #34495E;
    color: white;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.text-center {
    text-align: center !important;
}

/* --- UTILITIES & BUTTONS --- */
.btn-action {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.bg-orange {
    background-color: #E67E22;
}

.bg-green {
    background-color: #27AE60;
}

.bg-dark {
    background-color: #2C3E50;
}

.bg-blue {
    background-color: #2980B9;
}

.bg-purple {
    background-color: #8E44AD;
}

.bg-red {
    background-color: #C0392B;
}

.text-green {
    color: #27AE60 !important;
}

.text-blue {
    color: #2980B9 !important;
}

.net-total {
    color: #C0392B;
    margin-top: 10px;
    font-size: 22px;
}

/* --- DARK MODE THEME --- */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .card,
body.dark-mode .panel,
body.dark-mode .login-box {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

body.dark-mode .card-value,
body.dark-mode .panel h3,
body.dark-mode .login-header h2 {
    color: #ffffff;
}

body.dark-mode .panel h3 {
    border-bottom-color: #333;
}

body.dark-mode input,
body.dark-mode select {
    background-color: #2d2d2d;
    color: #ffffff;
    border-color: #444;
}

body.dark-mode .data-table td {
    border-color: #444;
}

body.dark-mode .data-table tr:nth-child(even) td {
    background-color: #2a2a2a;
}

body.dark-mode .data-table tr:nth-child(odd) td {
    background-color: #1e1e1e;
}

body.dark-mode .autocomplete-results {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .autocomplete-results li {
    border-color: #444;
}

body.dark-mode .autocomplete-results li:hover {
    background-color: #3d3d3d;
}

/* --- PREMIUM SUB TABS --- */
.sub-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    white-space: nowrap;
    scrollbar-width: none;
}

/* --- PREMIUM AUTHENTICATION STYLES --- */
.auth-body {
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo-container {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.auth-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 480px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }
}

.auth-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.auth-group label i {
    margin-right: 8px;
    color: #7C3AED;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 18px;
    border-radius: 15px;
    color: white;
    font-size: 15px;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    border-color: #7C3AED;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.forgot-link {
    color: #7C3AED;
    font-weight: 600;
    text-decoration: none;
}

.btn-auth-primary {
    background: #7C3AED;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 15px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
}

.btn-auth-primary:hover {
    background: #6D28D9;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(124, 58, 237, 0.5);
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
}

.auth-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-footer a {
    color: #7C3AED;
    font-weight: 700;
    text-decoration: none;
}

.auth-divider {
    position: relative;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 25px 0;
}

.auth-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    padding: 0 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

.btn-guest {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 12px;
    border-radius: 15px;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-guest:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Mobile Responsive Auth Screen Overrides */
@media (max-width: 480px) {
    .auth-body {
        padding: 16px 12px !important;
        align-items: center !important;
    }

    .auth-container {
        max-width: 100% !important;
    }

    .auth-card {
        padding: 28px 20px !important;
        border-radius: 24px !important;
    }

    .auth-header {
        margin-bottom: 24px !important;
    }

    .auth-logo-container {
        width: 60px !important;
        height: 60px !important;
        border-radius: 16px !important;
        margin-bottom: 16px !important;
    }

    .auth-logo {
        width: 38px !important;
        height: 38px !important;
    }

    .auth-header h1 {
        font-size: 24px !important;
        margin-bottom: 6px !important;
    }

    .auth-header p {
        font-size: 13px !important;
    }

    .auth-form {
        gap: 16px !important;
    }

    .input-wrapper input {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
    }

    .btn-auth-primary {
        padding: 14px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
    }

    .auth-options {
        font-size: 12px !important;
    }

    .auth-divider {
        margin: 20px 0 !important;
    }

    .auth-footer {
        margin-top: 20px !important;
    }

    .auth-footer p {
        font-size: 12px !important;
    }

    /* Login method tabs responsive sizes */
    .login-method-switcher {
        margin-bottom: 20px !important;
        border-radius: 12px !important;
    }

    .login-method-btn {
        padding: 8px 10px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }

    .bio-panel-inner {
        gap: 16px !important;
    }

    .bio-ring {
        width: 90px !important;
        height: 90px !important;
    }

    .bio-ring-icon {
        font-size: 38px !important;
    }

    .bio-title {
        font-size: 14px !important;
    }
}

.sub-tabs::-webkit-scrollbar {
    display: none;
}

.sub-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #a0aec0;
    cursor: pointer;
    border-radius: 12px;
    scroll-snap-align: start;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.sub-tab-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sub-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateY(-2px);
}

.sub-tab-btn:hover i {
    transform: scale(1.2);
}

.sub-tab-btn.active {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.2), rgba(26, 188, 156, 0.05));
    color: #1ABC9C;
    border-color: rgba(26, 188, 156, 0.3);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.15);
}

.sub-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: #1ABC9C;
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px #1ABC9C;
}

/* Light mode overrides for sub-tabs */
body:not(.dark-mode) .sub-tabs {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .sub-tab-btn {
    color: #718096;
}

body:not(.dark-mode) .sub-tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2d3748;
}

body:not(.dark-mode) .sub-tab-btn.active {
    background: rgba(26, 188, 156, 0.1);
    color: #16a085;
    border-color: rgba(26, 188, 156, 0.2);
}

/* --- FILTER CHIPS --- */
.filter-chips {
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-chip i {
    font-size: 14px;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.filter-chip.active {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

body:not(.dark-mode) .filter-chip {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: #4a5568;
}

body:not(.dark-mode) .filter-chip:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #2d3748;
}

body:not(.dark-mode) .filter-chip.active {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: white;
}

.storefront-wrap {
    font-family: 'Outfit', sans-serif;
    background-color: #050505;
    /* Deep rich dark background for the 3D canvas to pop against */
    color: #e0e0e0;
    min-height: 100vh;
    height: auto;
    display: block;
}

.storefront-wrap h1,
.storefront-wrap h2,
.storefront-wrap h3,
.storefront-wrap .hero-title {
    font-family: 'Space Grotesk', sans-serif;
}

.storefront-wrap.dashboard-wrapper,
.storefront-wrap .dashboard-wrapper,
.storefront-wrap .main-body,
.storefront-wrap .main-content {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- HERO SECTION --- */
.hero-section {
    color: white;
    padding: 80px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

.hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* Let clicks pass through to the button */
}

.hero-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
}

.hero-title {
    font-size: 3.5em;
    margin-bottom: 10px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #3498db 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.hero-btn {
    display: inline-block;
    width: auto;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 30px;
    background-color: #E67E22;
    transition: transform 0.2s, background-color 0.3s;
}

.hero-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px) scale(1.05);
}

/* --- CUSTOMER STOREFRONT --- */
.store-header {
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-header .nav-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    background: transparent;
}

.store-header .nav-buttons button {
    border-bottom: none !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    white-space: nowrap;
}

.store-header .nav-buttons button.active {
    border-left: none !important;
    background: rgba(26, 188, 156, 0.2) !important;
    color: #1ABC9C !important;
    border: 1px solid rgba(26, 188, 156, 0.3) !important;
}

.product-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(79, 172, 254, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(79, 172, 254, 0.25);
}

.product-title {
    font-weight: 600;
    margin: 10px 0 5px;
    color: #ffffff;
    font-size: 15px;
    font-family: 'Space Grotesk', sans-serif;
}

.product-price {
    color: #4facfe;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

.btn-buy {
    background: linear-gradient(45deg, #00f2fe 0%, #4facfe 100%);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: all 0.3s;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.storefront-search {
    width: 100%;
    max-width: 500px;
    padding: 15px 25px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 16px;
    outline: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s ease;
    margin: 0 auto 40px auto;
    display: block;
}

.storefront-search:focus {
    border-color: rgba(79, 172, 254, 0.5);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

/* New CTA Button for Hero Section */
.cta.hero-btn {
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-bottom: 10px;
    padding-left: 2px;
    letter-spacing: 4px;
    font-size: 14px;
    text-transform: uppercase;
    margin-right: 10px;
    position: relative;
    color: #ffffff;
    /* Changed to white for visibility */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    /* Added for contrast */
}

.cta.hero-btn::before {
    content: "\21DD";
    font-size: 28px;
    position: absolute;
    top: -12px;
    right: -10px;
    transform: translateX(100%);
}

.cta.hero-btn:active {
    transform: scale(0.9);
}

.cta.hero-btn::after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    /* Changed to white */
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.cta.hero-btn:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- STOREFRONT INFO SECTIONS --- */
.info-section {
    position: relative;
    z-index: 5;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 80px 40px;
    border-radius: 16px;
    margin: 60px auto;
    max-width: 1200px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.section-title {
    font-size: 2.2em;
    margin-bottom: 25px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #a8c0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}

.info-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(79, 172, 254, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(79, 172, 254, 0.2);
}

.info-card:hover::before {
    left: 200%;
}

.info-card i {
    font-size: 40px;
    color: #4facfe;
    margin-bottom: 20px;
}

.info-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #fff;
}

.info-card p {
    color: #a0aec0;
    line-height: 1.6;
}

.testimonial-card h4 {
    margin-top: 20px;
    color: #f1c40f;
}

.stars i {
    color: #f1c40f;
    font-size: 16px;
    margin: 0 2px 15px;
}

.feature-showcase {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    text-align: left;
}

.showcase-content {
    flex: 1;
    min-width: 300px;
}

.showcase-content p {
    font-size: 1.1em;
    color: #ddd;
    margin-bottom: 20px;
}

.feature-list {
    list-style: none;
    padding: 0;
    line-height: 2;
    color: #a0aec0;
}

.feature-list i {
    margin-right: 10px;
}

.showcase-visual {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.showcase-icon {
    font-size: 150px;
    color: #3498db;
    text-shadow: 0 0 30px rgba(52, 152, 219, 0.5);
}

.final-cta {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-color: rgba(230, 126, 34, 0.3);
}

.final-cta p {
    font-size: 1.2em;
    color: #ddd;
    margin-bottom: 25px;
}

/* --- RING SEQUENCE LAYOUT --- */
.ring-sequence-layout {
    position: relative;
    width: 100%;
    display: grid;
}

.ring-sticky-visual {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    pointer-events: none;
}

.ring-scrolling-features {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    width: 50%;
    max-width: 550px;
    margin-left: 2vw;
    display: flex;
    flex-direction: column;
    padding: 50vh 0;
    gap: 60vh;
    z-index: 1;
}

.ring-feature-block {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ring-feature-block h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: #4facfe;
    font-size: 1.8em;
    margin-bottom: 15px;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(79, 172, 254, 0));
    }

    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 10px rgba(79, 172, 254, 0.8));
        color: #ffffff;
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(79, 172, 254, 0));
    }
}

.ring-feature-block h3 i {
    margin-right: 10px;
    font-size: 1.1em;
    display: inline-block;
    /* Required for CSS transforms like scale() to work */
    animation: iconPulse 2.5s infinite ease-in-out;
}

.ring-feature-block p {
    color: #a0aec0;
    font-size: 1.1em;
    line-height: 1.6;
}

.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* --- MOBILE RESPONSIVENESS --- */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 3;
        margin-left: 10px;
        z-index: 10001;
        position: relative;
    }

    .store-header {
        flex-wrap: wrap;
    }

    .store-header .brand {
        flex: 1;
        /* Pushes other items to the right */
    }

    .store-header .brand span {
        font-size: 16px !important;
        /* Scale down logo text */
    }

    .user-controls {
        display: flex;
        align-items: center;
    }

    .btn-theme {
        margin-left: 5px;
    }

    .btn-logout {
        margin-left: 5px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .store-header .nav-buttons {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column !important;
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 20;
    }

    .store-header .nav-buttons.active {
        display: flex !important;
    }

    .store-header .nav-buttons button {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }

    /* --- HERO AND INFO SECTIONS RESPONSIVENESS --- */
    .hero-section {
        padding: 40px 15px;
        min-height: 250px;
    }

    .hero-title {
        font-size: 2.2em;
    }

    .hero-subtitle {
        font-size: 1em;
    }

    .info-section {
        padding: 40px 20px;
        margin: 30px 15px;
    }

    .section-title {
        font-size: 1.8em;
    }

    .cards-container {
        grid-template-columns: 1fr;
        /* Stacks the cards completely vertically */
        gap: 20px;
    }

    .info-card {
        padding: 30px 20px;
    }

    .product-card {
        padding: 20px 15px;
    }

    .feature-showcase {
        flex-direction: column;
        /* Moves the headphone icon below the text */
        text-align: center;
    }

    .showcase-content {
        min-width: 100%;
    }

    .feature-list {
        display: inline-block;
        text-align: left;
    }

    .showcase-icon {
        font-size: 100px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        /* Allows 2 columns on most modern phones */
        gap: 15px;
        padding: 0 15px;
    }

    /* --- RING SEQUENCE MOBILE --- */
    .ring-sequence-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ring-sticky-visual {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
        width: 100%;
        opacity: 0.8;
    }

    .ring-scrolling-features {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
        width: 100%;
        padding: 30vh 20px;
        gap: 30vh;
    }
}

/* --- MOBILE ACCESSORIES SHOP PRO THEME --- */
:root {
    --pro-primary: #2D1B4E;
    /* Twilight Purple */
    --pro-secondary: #FF8C00;
    /* Sunset Orange */
    --pro-accent: #FFD700;
    /* Gold */
    --pro-dark: #1A0F2E;
    /* Deep Twilight */
    --pro-darker: #0F081B;
    /* Void Black */
    --pro-light: #FFF8E7;
    /* Cosmic Cream */
    --pro-gray: #F5F0E6;
    /* Warm Sand */
    --pro-bg: #F4F5F7;
    /* Main Content Background */
    --pro-text: #2D1B4E;
    --pro-text-light: #6B5B95;
    --pro-gradient: linear-gradient(135deg, #2D1B4E 0%, #5B3472 100%);
    --pro-shadow: 0 10px 40px rgba(45, 27, 78, 0.15);
}

/* --- DARK MODE OVERRIDES FOR PRO THEME --- */
.pro-theme.dark-mode {
    --pro-primary: #5B3472;
    --pro-secondary: #FF8C00;
    --pro-accent: #FFD700;
    --pro-dark: #0F081B;
    --pro-darker: #05030A;
    --pro-light: #1A0F2E;
    --pro-gray: #130B24;
    --pro-bg: #0F081B;
    --pro-text: #FFF8E7;
    --pro-text-light: #B0A1C7;
    --pro-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.pro-theme {
    font-family: 'Poppins', sans-serif;
    background-color: var(--pro-gray);
    color: var(--pro-text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.pro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Utility Bar */
.pro-top-bar {
    background-color: var(--pro-primary);
    color: var(--pro-light);
    font-size: 12px;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-right span {
    margin-left: 20px;
}

.top-bar-right i,
.top-bar-left i {
    margin-right: 5px;
    color: var(--pro-accent);
}

/* Main Header */
.pro-header {
    background-color: var(--pro-dark);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pro-brand {
    font-size: 24px;
    font-weight: 800;
    color: #FFF8E7;
    cursor: pointer;
    letter-spacing: 1px;
}

.pro-brand-highlight {
    background: var(--pro-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pro-nav {
    display: flex;
    gap: 30px;
}

.pro-nav a {
    color: #FFF8E7;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.pro-nav a:hover,
.pro-nav a.active {
    color: var(--pro-accent);
}

.pro-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--pro-accent);
}

.pro-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pro-search-bar {
    display: flex;
    background: rgba(34, 34, 34, 0.1);
    border-radius: 30px;
    padding: 5px 15px;
    align-items: center;
    transition: background 0.3s;
}

.pro-theme.dark-mode .pro-search-bar {
    background: rgba(255, 255, 255, 0.1);
}

.pro-search-bar input {
    background: transparent;
    border: none;
    color: #FFF8E7;
    padding: 5px;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    width: 150px;
}

.pro-search-bar button {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
}

.pro-icon-btns {
    display: flex;
    gap: 15px;
}

.pro-icon-btn {
    background: transparent;
    border: none;
    color: #FFF8E7;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.pro-icon-btn:hover {
    color: var(--pro-accent);
}

.cart-badge,
.wishlist-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4757;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--pro-light);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-badge:empty,
.wishlist-badge:empty,
.cart-badge[data-count="0"],
.wishlist-badge[data-count="0"] {
    display: none;
}

/* Hero Banner */
.pro-hero-banner {
    background: var(--pro-gradient);
    position: relative;
    padding: 60px 0 100px 0;
    overflow: hidden;
}

.hero-inner {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    color: #FFF8E7;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    max-width: 500px;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 1;
}

.hero-wave svg {
    width: 100%;
    display: block;
}

.hero-wave-path {
    fill: var(--pro-bg);
    transition: fill 0.4s ease;
}

/* Main Content */
.pro-main-content {
    padding: 60px 0 100px 0;
    background-color: var(--pro-bg);
    transition: background-color 0.4s ease;
}

.pro-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.pro-section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--pro-text);
    margin-bottom: 10px;
}

.pro-heading-line {
    width: 60px;
    height: 3px;
    background: var(--pro-gradient);
    margin: 0 auto;
    border-radius: 3px;
}

/* Category Grid */
.pro-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.pro-category-card {
    background: var(--pro-light);
    border-radius: 12px;
    padding: 30px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pro-category-card i {
    font-size: 36px;
    color: var(--pro-primary);
    margin-bottom: 15px;
    transition: color 0.3s;
}

.pro-category-card span {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--pro-text);
}

.pro-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.pro-category-card.active {
    border-color: var(--pro-primary);
    background: var(--pro-gradient);
}

.pro-category-card.active i,
.pro-category-card.active span {
    color: #FFF8E7;
}

/* Product Grid */
.pro-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* ── New Flat Card Layout ── */
.pro-product-card {
    background: var(--pro-light);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease, background-color 0.4s ease;
    cursor: pointer;
}

.pro-theme.dark-mode .pro-product-card {
    border-color: rgba(255, 255, 255, 0.05);
}

.pro-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(75, 0, 130, 0.13);
}

/* Top badge row inside the image panel */
.pro-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.pro-badge-label {
    background: var(--pro-primary);
    color: #fff;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pro-badge-discount {
    background: #FF4757;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.pro-wishlist {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: #9CA3AF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 14px;
}

.pro-wishlist:hover,
.pro-wishlist.active {
    background: #FEE2E2;
    color: #EF4444;
    transform: scale(1.12);
}

.pro-share-btn {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: #9CA3AF;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    flex-shrink: 0;
}

.pro-share-btn:hover {
    background: #E0F2FE;
    color: #0EA5E9;
    transform: scale(1.12);
}

/* Star rating row */
.pro-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #F59E0B;
    margin-bottom: 6px;
}

.pro-rating span {
    color: #6B7280;
    font-size: 11px;
    margin-left: 2px;
}

/* Image panel */
.pro-product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #F8F5FF 0%, #EEF2FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: background 0.4s ease;
}

.pro-theme.dark-mode .pro-product-image {
    background: linear-gradient(135deg, #1f1435 0%, #150c26 100%);
}

.pro-product-image>i {
    font-size: 72px;
    color: #C4B5FD;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pro-product-card:hover .pro-product-image>i {
    transform: scale(1.15) rotate(-4deg);
    color: #7C3AED;
}

.pro-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pro-quick-view-btn {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: var(--pro-primary);
    border: none;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
}

.pro-product-card:hover .pro-quick-view-btn {
    bottom: 0;
    opacity: 1;
}

.pro-quick-view-btn:hover {
    background: var(--pro-primary);
    color: white;
}

.pro-theme.dark-mode .pro-quick-view-btn {
    background: rgba(31, 20, 53, 0.9);
    color: var(--cyber-cyan);
}

/* Quick View Modal Styles */
.pro-qv-modal-content {
    max-width: 900px !important;
    width: 95% !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: row;
    border-radius: 24px !important;
}

.pro-qv-left {
    flex: 1.2;
    background: linear-gradient(135deg, #F8F5FF 0%, #EEF2FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    position: relative;
}

.pro-qv-left img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.1));
}

.pro-qv-left i {
    font-size: 150px;
    color: #C4B5FD;
}

.pro-qv-right {
    flex: 1;
    padding: 40px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pro-theme.dark-mode .pro-qv-left {
    background: linear-gradient(135deg, #1f1435 0%, #150c26 100%);
}

.pro-theme.dark-mode .pro-qv-right {
    background: #150c26;
    color: white;
}

.qv-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    color: var(--pro-text);
}

.pro-theme.dark-mode .qv-title {
    color: white;
}

.qv-price-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.qv-price-now {
    font-size: 24px;
    font-weight: 700;
    color: #7C3AED;
}

.qv-price-was {
    font-size: 18px;
    text-decoration: line-through;
    color: #9CA3AF;
}

.qv-desc {
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 15px;
}

.pro-theme.dark-mode .qv-desc {
    color: #a0aec0;
}

.qv-features {
    list-style: none;
    margin-bottom: 35px;
}

.qv-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.qv-features li i {
    color: #10B981;
}

.qv-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.pro-theme.dark-mode .qv-close {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.qv-close:hover {
    background: #FF4757;
    color: white;
    transform: rotate(90deg);
}

@media (max-width: 850px) {
    .pro-qv-modal-content {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto !important;
    }

    .pro-qv-left {
        padding: 30px;
        height: 250px;
        flex: none;
    }

    .pro-qv-left img {
        max-height: 200px;
    }

    .pro-qv-right {
        padding: 30px;
    }
}

.pro-product-card:hover .pro-product-image img {
    transform: scale(1.08);
}

/* Info section */
.pro-product-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pro-product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pro-text);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pro-product-desc {
    font-size: 12px;
    color: var(--pro-text-light);
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Price & action row */
.pro-product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #F3F4F6;
    gap: 10px;
}

.pro-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pro-price-current {
    font-size: 19px;
    font-weight: 800;
    color: var(--pro-primary);
    line-height: 1;
}

.pro-price-old {
    font-size: 12px;
    color: var(--pro-text-light);
    text-decoration: line-through;
    font-weight: 500;
    opacity: 0.7;
}

/* New solid pill Add-to-Cart button */
.pro-add-btn {
    background: var(--pro-gradient);
    color: var(--pro-light);
    border: none;
    padding: 10px 18px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.28s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(75, 0, 130, 0.25);
    flex-shrink: 0;
}

.pro-add-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 20px rgba(75, 0, 130, 0.35);
}

.pro-add-btn.is-added {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.pro-add-btn i {
    font-size: 13px;
}

.pro-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--pro-text-light);
    font-size: 18px;
}

/* Footer */
.pro-footer {
    background-color: var(--pro-darker);
    color: #9CA3AF;
}

.pro-newsletter {
    background-color: var(--pro-primary);
    padding: 40px 0;
}

.newsletter-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nl-text h3 {
    color: var(--pro-light);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.nl-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.nl-form {
    display: flex;
    background: var(--pro-light);
    border-radius: 30px;
    padding: 5px;
    width: 100%;
    max-width: 400px;
}

.nl-form input {
    flex-grow: 1;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.nl-form button {
    background: var(--pro-dark);
    color: var(--pro-light);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.nl-form button:hover {
    background: var(--pro-secondary);
}

.pro-footer-main {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h4 {
    color: var(--pro-light);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-col ul a:hover {
    color: var(--pro-accent);
}

.contact-list li {
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.contact-list i {
    color: var(--pro-accent);
    margin-top: 4px;
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--pro-light);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-socials a:hover {
    background: var(--pro-accent);
    color: var(--pro-dark);
}

.pro-footer-bottom {
    background: #0a0a0a;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-text h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .pro-nav.active {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--pro-dark);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .pro-nav.active a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .top-bar-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .top-bar-right span {
        margin: 0 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nl-text {
        text-align: center;
    }
}

/* Toast Notification */
.pro-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pro-toast {
    background-color: var(--pro-dark);
    color: var(--pro-light);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--pro-accent);
}

.pro-toast.show {
    transform: translateX(0);
}

.pro-toast i {
    color: var(--pro-accent);
    font-size: 18px;
}

/* --- PRO CART SIDEBAR --- */
.pro-cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--pro-light);
    z-index: 10001;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pro-cart-sidebar.open {
    right: 0;
}

.pro-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.pro-cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.pro-cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pro-cart-header h3 {
    color: var(--pro-dark);
    margin: 0;
}

.btn-close-cart {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--pro-text-light);
    transition: color 0.3s;
}

.btn-close-cart:hover {
    color: var(--pro-primary);
}

.pro-cart-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.empty-cart-msg {
    text-align: center;
    color: var(--pro-text-light);
    margin-top: 50px;
}

.pro-cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.pro-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: var(--pro-dark);
}

/* Dark mode compatibility for the cart */
body.dark-mode .pro-cart-sidebar {
    background: var(--pro-darker);
    border-left: 1px solid #333;
}

body.dark-mode .pro-cart-header,
body.dark-mode .pro-cart-footer {
    border-color: #333;
    background: var(--pro-dark);
}

body.dark-mode .pro-cart-header h3,
body.dark-mode .pro-cart-total {
    color: var(--pro-light);
}

/* --- STOCK CHECK UNIQUE UI --- */
.stock-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stock-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid transparent;
}

.stock-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stock-widget:nth-child(1) {
    border-left-color: #2980B9;
}

.stock-widget:nth-child(2) {
    border-left-color: #27AE60;
}

.stock-widget:nth-child(3) {
    border-left-color: #E67E22;
}

.stock-widget:nth-child(4) {
    border-left-color: #C0392B;
}


.widget-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.widget-info h4 {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
}

.widget-info h2 {
    margin: 5px 0 0 0;
    font-size: 22px;
    color: #2c3e50;
}

.stock-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    min-width: 90px;
    letter-spacing: 0.5px;
}

.stock-badge.safe {
    background: #E8F8F5;
    color: #27AE60;
}

.stock-badge.warning {
    background: #FEF5E7;
    color: #E67E22;
}

.stock-badge.danger {
    background: #FDEDEC;
    color: #C0392B;
}

/* Stock UI Dark Mode */
body.dark-mode .stock-widget {
    background: #1e1e1e;
    border-top: 1px solid #333;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
}

body.dark-mode .widget-info h2 {
    color: #fff;
}

body.dark-mode .stock-badge.safe {
    background: rgba(39, 174, 96, 0.15);
}

body.dark-mode .stock-badge.warning {
    background: rgba(230, 126, 34, 0.15);
}

body.dark-mode .stock-badge.danger {
    background: rgba(192, 57, 43, 0.15);
}

/* --- PREMIUM GLASSMORPHIC ALERT SYSTEM --- */
.premium-alert-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.premium-alert {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    width: 390px;
    max-width: calc(100vw - 50px);
    box-shadow: 0 15px 50px -12px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateX(125%) scale(0.9);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.17, 0.89, 0.32, 1.28),
        opacity 0.5s ease;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.premium-alert.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.premium-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.premium-alert.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.premium-alert.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.premium-alert.warning {
    border-color: rgba(234, 179, 8, 0.4);
}

.premium-alert.info {
    border-color: rgba(59, 130, 246, 0.4);
}

.premium-alert.success::before {
    background: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.premium-alert.error::before {
    background: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

.premium-alert.warning::before {
    background: #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.6);
}

.premium-alert.info::before {
    background: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

.premium-alert-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 1px;
    filter: drop-shadow(0 0 10px currentColor);
}

.premium-alert.success .premium-alert-icon {
    color: #22c55e;
}

.premium-alert.error .premium-alert-icon {
    color: #ef4444;
}

.premium-alert.info .premium-alert-icon {
    color: #3b82f6;
}

.premium-alert.warning .premium-alert-icon {
    color: #eab308;
}

.premium-alert-content {
    flex: 1;
}

.premium-alert-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 3px;
    letter-spacing: 0.8px;
    color: #fff;
    text-transform: uppercase;
}

.premium-alert-message {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 400;
}

.premium-alert-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-top: -5px;
    margin-right: -5px;
}

.premium-alert-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(180deg);
}

.premium-alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.03);
    width: 100%;
}

.premium-alert-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    filter: brightness(1.3);
}

.premium-alert.success .premium-alert-progress-bar {
    background: linear-gradient(90deg, #22c55e, #86efac);
}

.premium-alert.error .premium-alert-progress-bar {
    background: linear-gradient(90deg, #ef4444, #fca5a5);
}

.premium-alert.info .premium-alert-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
}

.premium-alert.warning .premium-alert-progress-bar {
    background: linear-gradient(90deg, #eab308, #fef08a);
}

/* --- DASHBOARD MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.animate-modal {
    animation: modalSlideIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.filter-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.btn-filter {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.btn-filter.active {
    background: #2980B9;
    color: white;
    border-color: #2980B9;
    box-shadow: 0 4px 10px rgba(41, 128, 185, 0.3);
}

body.dark-mode .modal-content {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .btn-filter {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .btn-filter:hover {
    background: #3d3d3d;
}

body.dark-mode .modal-header h2,
body.dark-mode #filter-modal-title {
    color: #ffffff !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* --- UIVERSE PREMIUM ADD TO CART BUTTON (legacy, kept for non-shop pages) --- */
.uiverse-cart-btn-wrapper {
    transform: scale(0.48);
    transform-origin: center center;
    margin: 0;
}

/* On the shop page the .pro-product-card uses the new .pro-add-btn pill button instead */

.uiverse-cart-btn {
    --primary: #fff;
    --neutral-1: #ffffff;
    --neutral-2: #f5f5f5;
    --radius: 10px;
}


.uiverse-cart-btn {
    cursor: pointer;
    border-radius: var(--radius);

    color: #4a4a4a;
    border: none;
    box-shadow:
        0 0.5px 0.5px 1px rgba(255, 255, 255, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 4px 5px 0px rgba(0, 0, 0, 0.05);

    position: relative;
    transition: all 0.3s ease;
    min-width: 200px;
    height: 70px;
    font-style: normal;
    font-size: 19px;
    font-weight: 500;
    background: none;
    padding: 0;
}

.uiverse-cart-btn .wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.uiverse-cart-btn::after {
    content: "";
    inset: -7px;
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.4),
        inset 0 -2px 2px rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    transition: all 0.5s ease 0.2s;
    z-index: 0;
}

.uiverse-cart-btn:hover:after {
    inset: -9px;
}

.uiverse-cart-btn::before {
    content: "";
    inset: 11px;
    position: absolute;
    background: linear-gradient(to top, var(--neutral-1), var(--neutral-2));
    opacity: 0.7;
    border-radius: 30px;
    filter: blur(0.5px);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    z-index: 2;
}

.uiverse-cart-btn:hover {
    transform: scale(1.02);
    box-shadow:
        0 0 1px 2px rgba(255, 255, 255, 0.3),
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 10px 3px -3px rgba(0, 0, 0, 0.04);
}

.uiverse-cart-btn:active {
    transform: scale(1);
    box-shadow:
        0 0 1px 2px rgba(255, 255, 255, 0.3),
        0 10px 3px -3px rgba(0, 0, 0, 0.2);
}

.uiverse-cart-btn .bg {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background:
        linear-gradient(var(--neutral-1), var(--neutral-2)) padding-box,
        linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45)) border-box;
    z-index: 1;
    transition: all 0.4s ease;
}

.uiverse-cart-btn:hover .bg {
    transform: scale(1.04, 1.1);
    box-shadow: inset 0 0 8px 3px rgba(0, 0, 0, 0.5);
}

.uiverse-cart-btn .bg-spin {
    position: absolute;
    border-radius: inherit;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    inset: -5px;
}

.uiverse-cart-btn .bg-spin::before {
    content: "";
    position: absolute;
    inset: -100%;
    filter: blur(20px);
    background: conic-gradient(transparent 30%,
            rgba(255, 255, 255, 0.1) 80%,
            transparent 100%);
    animation: uiverse-spin 2s linear infinite;
    animation-play-state: paused;
}

@keyframes uiverse-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.uiverse-cart-btn:hover .bg-spin {
    opacity: 1;
}

.uiverse-cart-btn:hover .bg-spin::before {
    animation-play-state: running;
}

.uiverse-cart-btn .bg-gradient {
    position: absolute;
    overflow: hidden;
    border-radius: 13px;
    inset: -7px;
    z-index: 0;
    opacity: 0.3;
    transition: all 0.5s linear;
    filter: blur(10px);
}

.uiverse-cart-btn:hover .bg-gradient {
    opacity: 1;
}

.uiverse-cart-btn .bg-gradient::before {
    content: "";
    position: absolute;
    inset: -4px;
    margin: auto;
    aspect-ratio: 1;
    background-image: linear-gradient(90deg, #0d3fe4, #ff52e2, #fd4845, #f7d35b, #50f77d, #25e1e4);
    animation: uiverse-spin 2s linear infinite;
}

.uiverse-cart-btn .state p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.uiverse-cart-btn .state .icon,
.uiverse-cart-btn .state .icon-cart {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.uiverse-cart-btn .state .icon-cart {
    transform: translate(-80px, 9px);
}

.uiverse-cart-btn.is-added .state .icon-cart {
    animation: uiverse-cart 2s linear;
}

.uiverse-cart-btn.is-added .state .icon-cart svg path {
    animation: uiverse-cartPath 2s linear;
}

.uiverse-cart-btn .state .icon-cart svg {
    height: 30px;
    width: auto;
}

@keyframes uiverse-cart {
    0% {
        transform: translate(-80px, 9px);
    }

    18% {
        transform: translate(-20px, 9px);
    }

    25% {
        transform: translate(0, 9px) rotate(4deg);
    }

    31% {
        transform: translate(10px, 9px) rotate(-25deg);
    }

    45% {
        transform: translate(30px, 9px) rotate(0deg);
    }

    60% {
        transform: translate(60px, 9px) rotate(0deg);
    }

    100% {
        transform: translate(240px, 9px) rotate(-40deg);
    }
}

@keyframes uiverse-cartPath {

    0%,
    45% {
        fill: transparent;
    }

    55%,
    100% {
        fill: currentColor;
    }
}

.uiverse-cart-btn .state--default .icon-cart:before,
.uiverse-cart-btn .state--default .icon-cart:after {
    content: "";
    position: absolute;
    height: 2px;
    top: 8px;
    right: 30px;
    opacity: 0.5;
    color: rgba(128, 255, 162, 0.8);
    background: linear-gradient(to right, transparent, currentColor);
    transform-origin: right;
}

.uiverse-cart-btn .state--default .icon-cart:after {
    top: 15px;
    right: 28px;
    opacity: 0.3;
}

.uiverse-cart-btn.is-added .state--default .icon-cart:before,
.uiverse-cart-btn.is-added .state--default .icon-cart:after {
    animation: uiverse-trace 2s linear forwards;
}

.uiverse-cart-btn.is-added .state--default .icon-cart:after {
    color: rgba(255, 255, 255, 0.4);
}

@keyframes uiverse-trace {
    0% {
        transform: rotate(0deg);
        width: 20px;
        opacity: 0.8;
        filter: blur(3px);
    }

    10% {
        transform: rotate(0deg);
        width: 20px;
    }

    25% {
        transform: rotate(-4deg);
        width: 30px;
        filter: blur(0);
        opacity: 0.2;
    }

    31% {
        transform: rotate(25deg);
        width: 5px;
        opacity: 0.2;
        filter: blur(2px);
    }

    45% {
        transform: rotate(0deg);
        width: 40px;
        filter: blur(0);
    }

    60% {
        transform: rotate(0deg);
        width: 50px;
        filter: blur(0);
    }

    100% {
        transform: rotate(40deg);
        width: 100px;
        filter: blur(3px);
    }
}

.uiverse-cart-btn .state--default .icon svg {
    animation: uiverse-plus 0.6s ease forwards;
}

.uiverse-cart-btn .state--default .icon svg path {
    transform-origin: center;
}

.uiverse-cart-btn:hover .icon svg path {
    stroke-width: 4px;
}

@keyframes uiverse-plus {
    0% {
        transform: translateX(-60px) translateY(30px) rotate(-100deg) scale(2);
        opacity: 0;
        filter: blur(3px);
        color: lightgreen;
    }

    100% {
        transform: translateX(0) translateY(0) rotate(0);
        opacity: 1;
        filter: blur(0);
    }
}

.uiverse-cart-btn:hover .state--default .icon svg path {
    animation: uiverse-rotatePlus 0.6s cubic-bezier(0.5, 1, 0.3, 1.6) forwards;
}

.uiverse-cart-btn:hover .state--default .icon svg {
    animation: uiverse-scalePlus 0.6s cubic-bezier(0.5, 1, 0.3, 1.6) forwards;
}

.uiverse-cart-btn.is-added .state--default .icon svg {
    animation: uiverse-movePlus 2s linear forwards;
}

@keyframes uiverse-rotatePlus {
    30% {
        stroke: white;
    }

    100% {
        transform: rotate(90deg);
    }
}

@keyframes uiverse-scalePlus {
    30% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes uiverse-movePlus {

    10%,
    18% {
        transform: translate(0px, 0px);
        stroke: white;
    }

    25% {
        transform: translate(5px, 0px) rotate(-80deg);
        stroke: #00ff00;
        filter: blur(0);
    }

    40% {
        transform: translate(32px, -15px) rotate(-200deg);
        filter: blur(2px);
    }

    55% {
        transform: translate(55px, 10px) rotate(-360deg);
    }

    60%,
    100% {
        transform: translate(80px, 10px) rotate(-360deg) scale(0);
    }
}

.uiverse-cart-btn .state p span {
    display: block;
    opacity: 0;
    animation: uiverse-slideDown 0.8s ease forwards calc(var(--i) * 0.03s);
}

.uiverse-cart-btn:hover p span {
    opacity: 1;
    animation: uiverse-wave 0.5s ease forwards calc(var(--i) * 0.03s);
}

.uiverse-cart-btn.is-added p span {
    opacity: 1;
    animation: uiverse-disappear 0.6s ease forwards calc(0.5s + var(--i) * 0.1s);
}

@keyframes uiverse-wave {
    30% {
        opacity: 1;
        transform: translateY(4px) translateX(0) rotate(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px) translateX(0) rotate(0);
        color: var(--primary);
    }

    100% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0);
    }
}

@keyframes uiverse-slideDown {
    0% {
        opacity: 0;
        transform: translateY(20px) translateX(0px);
        color: var(--primary);
        filter: blur(5px);
    }

    20% {
        opacity: 1;
        transform: translateY(-4px) translateX(-2px) rotate(-10deg);
        filter: blur(0);
    }

    50% {
        opacity: 1;
        transform: translateY(3px) translateX(3px) rotate(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0);
    }
}

@keyframes uiverse-disappear {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateX(5px) translateY(-20px);
        color: var(--primary);
        filter: blur(5px);
    }
}

.uiverse-cart-btn svg path {
    transition: all 0.5s ease;
}

.uiverse-cart-btn .state {
    padding-left: 29px;
    display: flex;
    position: relative;
}

.uiverse-cart-btn .state--default span:nth-child(3),
.uiverse-cart-btn .state--default span:nth-child(5) {
    margin-right: 5px;
}

.uiverse-cart-btn .state--added {
    display: none;
    color: white;
}

.uiverse-cart-btn .state--added .icon svg {
    stroke-dasharray: 24 24;
    stroke-dashoffset: -24;
}

.uiverse-cart-btn.is-added .state--default {
    position: absolute;
    visibility: hidden;
}

.uiverse-cart-btn.is-added .state--added {
    display: flex;
    --primary: lightgreen;
}

.uiverse-cart-btn.is-added .state--added span {
    opacity: 0;
    animation: uiverse-slideDown 1.2s ease forwards calc(1s + var(--i) * 0.1s);
}

.uiverse-cart-btn.is-added .state--added .icon svg {
    animation: uiverse-check 1s cubic-bezier(0.5, -0.15, 0.3, 1.4) forwards 1s;
}

@keyframes uiverse-check {
    0% {
        stroke-dashoffset: -24;
        transform: scale(4);
        filter: blur(3px);
    }

    50% {
        stroke-dashoffset: -7;
    }

    100% {
        transform: scale(1);
        stroke-dashoffset: 0;
    }
}

/* --- PREMIUM HISTORY FILTERS (Light Mode Default) --- */
.premium-filter-container {
    margin-bottom: 25px;
}

.filter-card {
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.1);
}

.filter-field {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-field label i {
    color: #f39c12;
    /* Golden Twilight Accent */
    font-size: 0.9rem;
}

.filter-field input,
.filter-field select {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: #333;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-field input:focus,
.filter-field select:focus {
    background: #fff;
    border-color: #f39c12;
    outline: none;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.15);
    transform: translateY(-1px);
}

.filter-field input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.filter-field select option {
    background: #fff;
    color: #333;
}

/* --- DARK MODE OVERRIDES --- */
body.dark-mode .filter-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body.dark-mode .filter-field label {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .filter-field input,
body.dark-mode .filter-field select {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-mode .filter-field input:focus,
body.dark-mode .filter-field select:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.3);
}

body.dark-mode .filter-field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.dark-mode .filter-field select option {
    background: #1a1a1a;
    color: #fff;
}

.btn-premium {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
    filter: brightness(1.1);
}

.btn-premium:active {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .filter-card {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-field {
        min-width: 100%;
    }
}

/* --- PREMIUM SUB-TABS --- */
/* backdrop-filter:blur() removed — it forces a full GPU repaint on EVERY frame,
   causing jank on every scroll, hover, and animation near the element. */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    background: rgba(30, 30, 50, 0.92);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.sub-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.sub-tab-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #b0a1c7;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.sub-tab-btn i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.sub-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sub-tab-btn:hover i {
    transform: translateY(-1px);
}

.sub-tab-btn.active {
    background: linear-gradient(135deg, #FF8C00 0%, #FFD700 100%);
    color: #1A0F2E;
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.2);
}

.sub-tab-btn.active i {
    color: #1A0F2E;
}

/* --- PREMIUM SUB-TABS UNIFICATION OVERRIDE --- */
/* backdrop-filter removed from tab bar — most expensive per-frame GPU op.
   Replaced with an opaque dark tint that looks identical but costs ZERO repaint. */
.tab-navigation,
.premium-tabs-bar {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
    background: rgba(30, 30, 50, 0.92) !important;
    padding: 4px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: fit-content !important;
    overflow-x: auto !important;
}

body.dark-mode .tab-navigation,
body.dark-mode .premium-tabs-bar {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Force all sub-tab buttons — instant transition with NO lag */
.sub-tab-btn,
.tab-btn {
    padding: 6px 16px !important;
    border: none !important;
    background: transparent !important;
    color: #a0aec0 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    will-change: auto !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

.sub-tab-btn:hover,
.tab-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.sub-tab-btn:active,
.tab-btn:active {
    background: rgba(255, 255, 255, 0.12) !important;
}

.sub-tab-btn.active,
.tab-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35) !important;
}

.sub-tab-btn.active i,
.tab-btn.active i {
    color: #ffffff !important;
}

/* --- GLOBAL MOBILE RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        top: 0;
        bottom: 0;
        z-index: 1000001;
        /* Above overlay */
        transition: width 0.3s ease, left 0.3s ease;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.4);
        padding-top: 20px;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 1000000;
        /* Just below sidebar */
    }

    .sidebar-overlay.active {
        display: block;
    }

    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        margin-right: 15px;
        position: relative;
        z-index: 1000002;
        /* Highest point to remain clickable */
    }
}

/* --- MOBILE BOTTOM NAVIGATION --- */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {

    /* --- MOBILE BOTTOM NAVIGATION (APP-LIKE) --- */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #ffffff;
        z-index: 9999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        justify-content: space-around;
        padding: 12px 5px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid #f0f0f0;
    }

    body.dark-mode .mobile-bottom-nav {
        background: #1e1e1e;
        border-top: 1px solid #333;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    }

    .mobile-bottom-nav button {
        background: transparent;
        border: none;
        color: #95a5a6;
        font-size: 11px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        font-weight: 600;
        flex: 1;
        transition: color 0.3s, transform 0.2s;
    }

    .mobile-bottom-nav button i {
        font-size: 20px;
    }

    .mobile-bottom-nav button.active {
        color: #2980B9;
    }

    body.dark-mode .mobile-bottom-nav button.active {
        color: #1ABC9C;
    }

    .main-body {
        padding-bottom: 70px;
    }

    .split-layout {
        flex-direction: column;
        height: auto !important;
        gap: 15px;
    }

    .panel-left,
    .panel-right {
        min-width: 100%;
        max-height: none !important;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .form-group-row {
        flex-direction: column;
        gap: 0;
    }

    .top-bar {
        padding: 10px 15px;
    }

    .brand {
        font-size: 15px;
        max-width: 70%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-logo {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }

    .user-controls span {
        display: none;
        /* Hide date on small mobile */
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Table Responsiveness */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 15px;
        border-radius: 8px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .data-table {
        min-width: 600px;
        /* Force horizontal scroll for wide tables */
    }

    /* Dashboard Widget Stacking */
    .dashboard-section h3 {
        font-size: 1.1rem;
    }

    /* Premium WebGL-Enhanced Glassmorphic Dashboard Cards on Mobile */
    .cards-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 16px;
        padding: 10px 20px 30px 5px;
        -webkit-overflow-scrolling: touch;
    }

    .cards-grid::-webkit-scrollbar {
        display: none;
    }

    .card {
        flex: 0 0 calc(75% - 10px);
        scroll-snap-align: center;
        padding: 35px 20px;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        background: rgba(20, 25, 35, 0.45) !important;
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        color: #fff !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;
        overflow: hidden;
    }

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
        transform: skewX(-25deg);
        animation: premiumGlassShine 5s infinite;
        pointer-events: none;
    }

    @keyframes premiumGlassShine {
        0% {
            left: -100%;
        }

        20% {
            left: 200%;
        }

        100% {
            left: 200%;
        }
    }

    .card-blue {
        border-bottom: 3px solid #6dd5ed !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(109, 213, 237, 0.4);
    }

    .card-red {
        border-bottom: 3px solid #ff6a00 !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(255, 106, 0, 0.4);
    }

    .card-orange {
        border-bottom: 3px solid #f2c94c !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(242, 201, 76, 0.4);
    }

    .card-green {
        border-bottom: 3px solid #38ef7d !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(56, 239, 125, 0.4);
    }

    .card-primary {
        border-bottom: 3px solid #96c93d !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(150, 201, 61, 0.4);
    }

    .card-dark {
        border-bottom: 3px solid #4ca1af !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(76, 161, 175, 0.4);
    }

    .card-gray {
        border-bottom: 3px solid #bdc3c7 !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(189, 195, 199, 0.4);
    }

    .card-yellow {
        border-bottom: 3px solid #ffd200 !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 -15px 30px -15px rgba(255, 210, 0, 0.4);
    }

    .card-title {
        font-size: 11px;
        margin-bottom: 8px;
        color: rgba(255, 255, 255, 0.7) !important;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 2px;
        z-index: 1;
    }

    .card-value {
        font-size: 28px;
        color: #ffffff !important;
        font-weight: 900;
        word-break: break-all;
        z-index: 1;
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .card {
        flex: 0 0 calc(85% - 10px);
        padding: 25px 15px;
    }

    .sub-tabs {
        padding: 5px;
        gap: 8px;
        border-radius: 12px;
    }

    .sub-tab-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .login-box {
        width: 95%;
        padding: 25px;
    }

    .premium-alert {
        width: 90% !important;
        right: 5% !important;
        left: 5% !important;
    }
}

/* --- ANIMATED HERO SECTION (Landing Page) --- */
.animated-hero-section {
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-color: #1a1a1a;
    color: #FFFFFFDD;
    font-family: "Inter", sans-serif;
    max-width: 100%;
}

#demo {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.animated-hero-section .card {
    position: absolute;
    left: 0;
    top: 0;
    background-position: center;
    background-size: cover;
    background-color: #2a2a2a;
    /* Fallback color */
    box-shadow: 6px 6px 10px 2px rgba(0, 0, 0, 0.6);
    visibility: visible !important;
    opacity: 1 !important;
    border: 3px solid #7C3AED;
    /* Purple border for visibility */
    z-index: 20;
}

.animated-hero-section .card-content {
    position: absolute;
    left: 0;
    top: 0;
    color: #FFFFFFDD;
    padding-left: 16px;
}

.animated-hero-section .content-place {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
}

.animated-hero-section .content-title-1,
.animated-hero-section .content-title-2 {
    font-weight: 600;
    font-size: 20px;
    font-family: "Oswald", sans-serif;
}

.animated-hero-section .content-start {
    width: 30px;
    height: 5px;
    border-radius: 99px;
    background-color: #FFFFFFDD;
}

.animated-hero-section .details {
    z-index: 22;
    position: absolute;
    top: 240px;
    left: 60px;
}

.animated-hero-section .details .place-box {
    height: 46px;
    overflow: hidden;
}

.animated-hero-section .details .place-box .text {
    padding-top: 16px;
    font-size: 20px;
}

.animated-hero-section .details .place-box .text:before {
    top: 0;
    left: 0;
    position: absolute;
    content: "";
    width: 30px;
    height: 4px;
    border-radius: 99px;
    background-color: white;
}

.animated-hero-section .details .title-1,
.animated-hero-section .details .title-2 {
    font-weight: 600;
    font-size: 72px;
    font-family: "Oswald", sans-serif;
    line-height: 1;
}

.animated-hero-section .details .title-box-1,
.animated-hero-section .details .title-box-2 {
    margin-top: 2px;
    height: 100px;
    overflow: hidden;
}

.animated-hero-section .details>.desc {
    margin-top: 16px;
    width: 500px;
    font-size: 16px;
    line-height: 1.5;
}

.animated-hero-section .details>.cta {
    width: 500px;
    margin-top: 24px;
    display: flex;
    align-items: center;
}

.animated-hero-section .details>.cta>.bookmark {
    border: none;
    background-color: #ecad29;
    width: 36px;
    height: 36px;
    border-radius: 99px;
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.animated-hero-section .details>.cta>.discover {
    border: 1px solid #ffffff;
    background-color: transparent;
    height: 36px;
    border-radius: 99px;
    color: #ffffff;
    padding: 4px 24px;
    font-size: 12px;
    margin-left: 16px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.animated-hero-section .details>.cta>.discover:hover {
    background-color: #ffffff;
    color: #1a1a1a;
}

.animated-hero-section .indicator {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    z-index: 60;
    background-color: #ecad29;
}

.animated-hero-section .pagination {
    position: absolute;
    left: 0px;
    top: 0px;
    display: inline-flex;
}

.animated-hero-section .pagination>.arrow {
    z-index: 60;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    border: 2px solid #ffffff55;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.3s;
}

.animated-hero-section .pagination>.arrow:hover {
    background: rgba(255, 255, 255, 0.1);
}

.animated-hero-section .pagination>.arrow:nth-child(2) {
    margin-left: 20px;
}

.animated-hero-section .pagination .progress-sub-container {
    margin-left: 24px;
    z-index: 60;
    width: 500px;
    height: 50px;
    display: flex;
    align-items: center;
}

.animated-hero-section .pagination .progress-sub-container .progress-sub-background {
    width: 100%;
    height: 3px;
    background-color: #ffffff33;
}

.animated-hero-section .pagination .progress-sub-container .progress-sub-background .progress-sub-foreground {
    height: 3px;
    background-color: #ecad29;
}

.animated-hero-section .slide-numbers {
    width: 50px;
    height: 50px;
    overflow: hidden;
    z-index: 60;
    position: relative;
}

.animated-hero-section .slide-numbers .item {
    width: 50px;
    height: 50px;
    position: absolute;
    color: white;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: bold;
}

.animated-hero-section .cover {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    z-index: 100;
}

/* --- EXTRAVAGANZA MOBILE HERO SECTION (Dribbble Inspired) --- */
.mobile-hero-extravaganza {
    position: relative;
    width: 100%;
    height: 620px;
    /* Further reduced to tighten layout */
    background: #0f172a;
    overflow: hidden;
    display: none;
}

.extravaganza-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Moved up from center */
    padding-top: 80px;
    /* Reduced gap from header */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.extravaganza-slide.active {
    opacity: 1;
    visibility: visible;
}

.extravaganza-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 1;
    font-family: 'Space Grotesk', sans-serif;
    pointer-events: none;
}

.extravaganza-img-container {
    position: relative;
    z-index: 5;
    width: 80%;
    max-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.extravaganza-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    animation: floatProduct 4s ease-in-out infinite;
}

@keyframes floatProduct {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.extravaganza-content {
    position: relative;
    margin-top: 20px;
    /* Changed from -20px to +20px for a minor gap */
    width: calc(100% - 40px);
    z-index: 10;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.extravaganza-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #7C3AED;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.extravaganza-title {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    line-height: 1.1;
}

.extravaganza-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.extravaganza-btn {
    background: white;
    color: black;
    border: none;
    padding: 15px 40px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.extravaganza-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
}

.extravaganza-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.extravaganza-dot.active {
    background: #7C3AED;
    height: 30px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .animated-hero-section {
        display: none !important;
    }

    .mobile-hero-extravaganza {
        display: block !important;
    }
}


/* --- PREMIUM MOBILE DASHBOARD OVERHAUL --- */
:root {
    --premium-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --premium-glass: rgba(255, 255, 255, 0.05);
    --premium-glass-border: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {

    /* Better Top Bar for Mobile */
    .top-bar {
        padding: 15px 20px !important;
        height: auto !important;
        background: rgba(15, 23, 42, 0.8) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }

    .brand {
        font-size: 14px !important;
        font-weight: 700 !important;
    }

    .brand-logo {
        width: 22px !important;
        height: 22px !important;
    }

    .btn-logout {
        padding: 8px 12px !important;
        font-size: 10px !important;
        border-radius: 12px !important;
    }

    /* Refined Headings */
    .dashboard-section h3 {
        font-family: 'Space Grotesk', sans-serif;
        font-weight: 800;
        font-size: 1.1rem;
        /* Smaller, more elegant */
        margin: 30px 0 15px 15px;
        color: rgba(255, 255, 255, 0.9);
        text-transform: uppercase;
        letter-spacing: 2px;
        position: relative;
    }

    .dashboard-section h3::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 30px;
        height: 3px;
        background: var(--premium-gradient);
        border-radius: 3px;
    }

    /* Premium Hero Section */
    .premium-dashboard-hero {
        background: var(--premium-gradient);
        margin: 20px 15px;
        padding: 35px 25px;
        border-radius: 32px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.5);
    }

    .hero-welcome-text h1 {
        font-size: 2rem;
        font-weight: 900;
        letter-spacing: -0.5px;
        color: #fff;
    }

    .mini-stat {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        padding: 15px;
        border-radius: 24px;
    }

    /* Quick Actions Grid */
    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .quick-action-card {
        background: var(--premium-glass);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid var(--premium-glass-border);
        border-radius: 28px;
        padding: 25px 15px;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    /* Premium Bottom Navigation */
    .mobile-bottom-nav {
        background: rgba(15, 23, 42, 0.85) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 15px 10px !important;
        height: auto !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4) !important;
    }

    .mobile-bottom-nav button {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    .mobile-bottom-nav button.active {
        color: #6366f1 !important;
        text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    }

    .mobile-bottom-nav button i {
        font-size: 22px !important;
        margin-bottom: 4px;
    }

    /* Table & View Section Spacing */
    .view-section {
        padding-bottom: 100px !important;
        /* Avoid bottom nav overlap */
    }

    .data-table {
        background: var(--premium-glass) !important;
        border-radius: 20px !important;
        border: 1px solid var(--premium-glass-border) !important;
        overflow: hidden;
    }
}

/* --- MOBILE ADMIN TAB NAVIGATION --- */
.admin-mobile-tabs {
    display: none;
    gap: 12px;
    padding: 20px 15px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    overflow-x: auto;
    position: sticky;
    top: 60px;
    /* Below top bar */
    z-index: 998;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-mobile-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    color: #a0aec0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-tab-item i {
    font-size: 14px;
}

.admin-tab-item.active {
    background: linear-gradient(135deg, #1ABC9C, #16A085);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
}

.admin-tab-item:active {
    transform: scale(0.95);
}

@media (max-width: 1024px) {
    .admin-mobile-tabs {
        display: flex;
    }

    .main-content {
        padding-top: 0 !important;
    }
}

body.dark-mode .admin-mobile-tabs {
    background: rgba(10, 10, 15, 0.6);
}

/* --- FUTURISTIC HUB THEME --- */
:root {
    --premium-bg: #0a0a0c;
    --premium-card: #141417;
    --premium-accent: #00f2fe;
    --premium-text: #ffffff;
    --cyber-bg: #050505;
    --cyber-glass: rgba(255, 255, 255, 0.03);
    --cyber-border: rgba(255, 255, 255, 0.08);
    --cyber-cyan: #00f2fe;
    --cyber-pink: #ff00de;
    --cyber-blue: #4facfe;
}

/* Light Mode Overrides */
body.light-mode {
    --premium-bg: #f0f2f5;
    --premium-card: #ffffff;
    --premium-accent: #6366f1;
    --premium-text: #1a1a1b;
    --cyber-bg: #f8fafc;
    --cyber-glass: rgba(255, 255, 255, 0.8);
    --cyber-border: rgba(0, 0, 0, 0.06);
    --cyber-cyan: #4f46e5;
    --cyber-pink: #db2777;
    --cyber-blue: #2563eb;
}

body.futuristic-mode {
    background-color: #0a0a0c !important;
    transition: background-color 0.3s ease;
}

body.futuristic-mode.light-mode {
    background-color: #f8fafc !important;
}

body.light-mode .node-value,
body.light-mode .core-value,
body.light-mode .grid-cluster-title,
body.light-mode .hero-welcome-text h1,
body.light-mode .dashboard-section h3 {
    color: #1a1a1b;
}

body.light-mode .node-label,
body.light-mode .core-label,
body.light-mode .hero-welcome-text p {
    color: rgba(0, 0, 0, 0.6);
}

body.light-mode .neural-node {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

body.light-mode .core-metric-inner {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.1);
}

body.light-mode .floating-control-bar {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1), 0 0 15px rgba(26, 188, 156, 0.05);
}

body.light-mode .floating-control-bar button {
    color: rgba(0, 0, 0, 0.35);
}

body.light-mode .floating-control-bar button:hover {
    color: var(--cyber-cyan);
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .floating-control-bar button.active {
    color: #1ABC9C;
    background: rgba(26, 188, 156, 0.1);
}

body.light-mode .floating-refresh-btn {
    border-left: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.futuristic-hub {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    background: var(--cyber-dark);
    position: relative;
    overflow: hidden;
}

/* Central Metric Core */
.core-metric-outer {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 40px 0;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.05) 0%, transparent 70%);
}

.core-metric-inner {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--cyber-dark);
    border: 1px solid var(--cyber-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: inset 0 0 30px rgba(0, 242, 254, 0.1), 0 0 50px rgba(0, 242, 254, 0.05);
}

.core-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: orbitRotation 20s linear infinite;
}

@keyframes orbitRotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.core-value {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    font-family: 'Space Grotesk', sans-serif;
}

.core-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--cyber-cyan);
    margin-top: 10px;
    font-weight: 800;
}

/* Asymmetrical Neural Grid */
.neural-grid-container {
    width: 100%;
    max-width: 800px;
    padding-bottom: 120px;
}

.grid-cluster-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.3);
    margin: 30px 0 15px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid-cluster-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(0, 242, 254, 0.2), transparent);
}

.neural-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.neural-node {
    background: var(--cyber-glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--cyber-border);
    padding: 18px 15px;
    border-radius: 20px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    cursor: pointer;
}

.neural-node::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cyber-cyan);
    box-shadow: 0 0 10px var(--cyber-cyan);
    opacity: 0.6;
}

.node-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 5px;
}

.node-value {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--cyber-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.neural-node:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 242, 254, 0.3);
    transform: translateY(-2px);
}

.neural-node:hover .node-accent {
    opacity: 1;
}

/* Futuristic Bottom Menu - Admin Panel */
.floating-control-bar {
    position: fixed;
    bottom: 15px;
    /* Use 50vw so the bar is always centered relative to the VISUAL viewport,
       not the layout/scroll viewport — fixes drift when page is scrollable */
    left: 50vw !important;
    transform: translateX(-50%) !important;
    width: auto;
    max-width: 85vw;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 25px;
    /* Fully rounded capsule */
    display: flex;
    justify-content: center;
    /* Center buttons; overflow-x handles scrolling when content overflows */
    align-items: center;
    gap: 8px;
    z-index: 99999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-control-bar::-webkit-scrollbar {
    display: none;
}

.floating-control-bar button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    /* Brighter default color */
    font-size: 18px;
    /* Slightly larger for visibility */
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.floating-control-bar button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.floating-control-bar button.active {
    color: #1ABC9C;
    background: rgba(26, 188, 156, 0.15);
    box-shadow: 0 0 15px rgba(26, 188, 156, 0.2);
    transform: scale(1.1) translateY(-2px);
}

.floating-refresh-btn {
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    margin-left: 5px;
    padding-left: 15px !important;
}

.fa-spin-once {
    animation: spinOnce 0.8s ease-in-out;
}

@keyframes spinOnce {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- INVOICE / BILLING MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {

    /* Optimize Input Fields for Touch and prevent iOS Zoom */
    .form-group input,
    .form-group select {
        font-size: 16px !important;
        padding: 12px 14px !important;
        border-radius: 8px;
    }

    /* Autocomplete dropdown touch targets */
    .autocomplete-results {
        max-height: 250px;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    .autocomplete-results li {
        padding: 14px 16px;
        font-size: 15px;
    }

    /* Cart Table Improvements */
    #cart-table,
    .split-layout .data-table {
        min-width: 100% !important;
        width: 100% !important;
        table-layout: fixed !important;
    }

    #cart-table th,
    #cart-table td,
    .split-layout .data-table th,
    .split-layout .data-table td {
        padding: 6px 4px !important;
        font-size: 11px !important;
        vertical-align: middle;
        word-wrap: break-word !important;
        white-space: normal !important;
    }

    /* Column Widths for Billing/Inventory/Return Carts on Mobile (5 columns) */
    #cart-table th:nth-child(1),
    #cart-table td:nth-child(1),
    .split-layout .data-table th:nth-child(1),
    .split-layout .data-table td:nth-child(1) {
        width: 38% !important;
        text-align: left !important;
    }

    #cart-table th:nth-child(2),
    #cart-table td:nth-child(2),
    .split-layout .data-table th:nth-child(2),
    .split-layout .data-table td:nth-child(2) {
        width: 18% !important;
        text-align: center !important;
    }

    #cart-table th:nth-child(3),
    #cart-table td:nth-child(3),
    .split-layout .data-table th:nth-child(3),
    .split-layout .data-table td:nth-child(3) {
        width: 12% !important;
        text-align: center !important;
    }

    #cart-table th:nth-child(4),
    #cart-table td:nth-child(4),
    .split-layout .data-table th:nth-child(4),
    .split-layout .data-table td:nth-child(4) {
        width: 18% !important;
        text-align: center !important;
    }

    #cart-table th:nth-child(5),
    #cart-table td:nth-child(5),
    .split-layout .data-table th:nth-child(5),
    .split-layout .data-table td:nth-child(5) {
        width: 14% !important;
        text-align: center !important;
    }

    #cart-table td button {
        width: 32px;
        height: 32px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        margin: 0 auto;
    }

    /* Prominent Add buttons */
    #btn-add-cart,
    #btn-add-to-bill {
        padding: 14px;
        font-size: 16px;
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
    }

    /* Grand Total Display */
    #bill-net-total,
    #return-net-total,
    #pur-return-total,
    .net-total {
        font-size: 26px !important;
        text-align: center;
        background: rgba(192, 57, 43, 0.08);
        padding: 15px;
        border-radius: 12px;
        margin: 20px 0;
        display: block;
        border: 1px solid rgba(192, 57, 43, 0.2);
    }

    body.dark-mode #bill-net-total,
    body.dark-mode #return-net-total,
    body.dark-mode #pur-return-total,
    body.dark-mode .net-total {
        background: rgba(231, 76, 60, 0.15);
    }

    /* Generate Bill / Finalize Action Button */
    #btn-generate-bill,
    #btn-process-return,
    #btn-process-pur-return,
    #btn-save-bill {
        padding: 16px;
        font-size: 18px;
        border-radius: 12px;
        background: linear-gradient(135deg, #27AE60, #2ECC71);
        box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 25px;
        /* Spacing above bottom mobile nav */
    }

    #btn-generate-bill:active,
    #btn-process-return:active,
    #btn-process-pur-return:active,
    #btn-save-bill:active {
        transform: scale(0.98);
    }

    /* Make panels span full width elegantly */
    .panel-left,
    .panel-right {
        padding: 15px;
        border-radius: 16px;
    }
}



/* Hide old components in Hub mode */
.futuristic-mode:not(.history-page) .view-section>*:not(.futuristic-hub) {
    display: none !important;
}

.futuristic-mode .main-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* --- HERO SLIDE EDITOR --- */
.hero-slide-editor-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 30px;
    display: flex;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body:not(.futuristic-mode) .hero-slide-editor-card {
    background: white;
    border-color: #eee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.slide-preview-thumb {
    width: 180px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: relative;
    /* CRITICAL: Contains the .thumb-overlay */
    overflow: hidden;
}

body:not(.futuristic-mode) .slide-preview-thumb {
    border-right-color: #eee;
}

.slide-editor-main {
    flex: 1;
    padding: 25px;
}

.hero-slide-editor-card:hover {
    border-color: var(--cyber-cyan);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 40px rgba(0, 243, 255, 0.1);
    transform: translateY(-5px);
}

body:not(.futuristic-mode) .hero-slide-editor-card:hover {
    border-color: #1ABC9C;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hero-slide-editor-card h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--cyber-cyan);
    margin-bottom: 25px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

body:not(.futuristic-mode) .hero-slide-editor-card h4 {
    color: #2c3e50;
}

.slide-form-grid input,
.slide-form-grid textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

body:not(.futuristic-mode) .slide-form-grid input,
body:not(.futuristic-mode) .slide-form-grid textarea {
    background: #f9f9f9;
    border-color: #ddd;
    color: #333;
}

.btn-remove-slide {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-slide:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
}

.settings-subtitle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    margin-top: 5px;
}

body:not(.futuristic-mode) .settings-subtitle {
    color: #7f8c8d;
}

.loading-slides {
    padding: 40px;
    text-align: center;
    color: var(--cyber-cyan);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

body:not(.futuristic-mode) .loading-slides {
    color: #1ABC9C;
}

/* --- PREMIUM SETTINGS TABS --- */
.premium-tabs-bar {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Crucial for multi-finger kinetic gesture support */
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body:not(.futuristic-mode) .premium-tabs-bar {
    background: #f1f2f6;
    border-color: #ddd;
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    white-space: nowrap;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    will-change: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.premium-tabs-bar::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .premium-tabs-bar {
        padding: 10px;
        gap: 8px;
        border-radius: 12px;
        flex-wrap: wrap !important;
        /* Allow wrapping to make ALL items instantly visible */
        overflow: visible !important;
        width: 100% !important;
        /* Nullifies 'fit-content' constraint preventing leaking */
        height: auto !important;
        /* Allows dynamic multi-row vertical growth */
        box-sizing: border-box !important;
    }

    .tab-btn {
        flex: 1 1 auto !important;
        /* Automatically fill row width evenly */
        padding: 12px 16px;
        font-size: 12px;
        justify-content: center;
    }
}





body:not(.futuristic-mode) .tab-btn {
    color: #666;
}

.tab-btn i {
    font-size: 14px;
}

.tab-btn.active {
    background: var(--cyber-glass);
    color: var(--cyber-cyan);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.15);
}

body:not(.futuristic-mode) .tab-btn.active {
    background: #1ABC9C;
    color: white;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.2);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

body:not(.futuristic-mode) .tab-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.thumb-overlay i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--cyber-cyan);
}

.thumb-overlay span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bg-blue-dim {
    background: rgba(52, 152, 219, 0.1) !important;
    color: #3498db !important;
    border: 1px solid rgba(52, 152, 219, 0.2) !important;
}

.bg-blue-dim:hover {
    background: #3498db !important;
    color: white !important;
}

@media (max-width: 768px) {
    .hero-slide-editor-card {
        flex-direction: column;
    }

    .slide-preview-thumb {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .slide-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium History Search UI */
.premium-search-container {
    background: var(--cyber-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--cyber-border);
    border-radius: 24px;
    padding: 25px;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.search-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.smart-search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.smart-search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyber-cyan);
    font-size: 18px;
    pointer-events: none;
}

.smart-search-input {
    width: 100%;
    background: var(--cyber-glass);
    border: 1.5px solid var(--cyber-border);
    border-radius: 16px;
    padding: 15px 20px 15px 55px;
    color: var(--premium-text);
    font-size: 16px;
    transition: all 0.3s ease;
}

.smart-search-input:focus {
    outline: none;
    background: var(--cyber-glass);
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.filter-toggle-btn {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(79, 172, 254, 0.1));
    border: 1px solid var(--cyber-border);
    color: var(--cyber-cyan);
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    transform: translateY(-2px);
}

.advanced-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--cyber-border);
    animation: slideDown 0.4s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.premium-filter-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--premium-text);
    opacity: 0.6;
    font-weight: 600;
}

.premium-filter-group input,
.premium-filter-group select {
    background: var(--cyber-glass);
    border: 1px solid var(--cyber-border);
    border-radius: 12px;
    padding: 12px;
    color: var(--premium-text);
    font-size: 14px;
}

.premium-filter-group input:focus {
    border-color: var(--cyber-cyan);
    outline: none;
}

.search-stats-mini {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--premium-text);
    opacity: 0.7;
    font-size: 13px;
    font-weight: 500;
}

.stat-pill {
    background: var(--cyber-glass);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--cyber-border);
}

.stat-pill b {
    color: var(--cyber-cyan);
}

/* Premium History Table & Stats */
.history-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.history-stat-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

body.futuristic-mode .history-stat-card {
    background: var(--cyber-glass);
    border-color: var(--cyber-border);
}

.history-stat-card h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555 !important;
    margin-bottom: 12px;
    font-weight: 700;
}

body.futuristic-mode .history-stat-card h4 {
    color: var(--premium-text) !important;
    opacity: 0.7;
}

.history-stat-card .value {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a !important;
    font-family: 'Space Grotesk', sans-serif;
    display: block;
}

body.futuristic-mode .history-stat-card .value {
    color: white !important;
}

.history-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--cyber-cyan);
}

/* Premium Search Hub Fixes */
.premium-search-container {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body.futuristic-mode .premium-search-container {
    background: var(--cyber-glass);
    border-color: var(--cyber-border);
}

.search-hub-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.smart-search-box {
    position: relative;
    flex-grow: 1;
}

.smart-search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyber-cyan);
    font-size: 16px;
}

.smart-search-input {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px 15px 12px 45px;
    color: #333 !important;
    font-size: 15px;
}

body.futuristic-mode .smart-search-input {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--cyber-border);
    color: white !important;
}

.search-stats-mini {
    display: flex;
    gap: 10px;
}

.stat-pill {
    background: #eee;
    padding: 6px 12px;
    border-radius: 8px;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

body.futuristic-mode .stat-pill {
    background: rgba(255, 255, 255, 0.05);
    color: var(--premium-text);
}

.stat-pill b {
    color: var(--cyber-cyan);
}

.filter-toggle-btn {
    background: #f1f2f6;
    border: 1px solid #ddd;
    color: #2f3542;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

body.futuristic-mode .filter-toggle-btn {
    background: var(--cyber-glass);
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
}

/* Premium Table Styling */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.premium-table thead th {
    color: #777;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    text-align: left;
}

body.futuristic-mode .premium-table thead th {
    color: rgba(255, 255, 255, 0.5);
}

.premium-table tbody tr {
    background: white !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

body.futuristic-mode .premium-table tbody tr {
    background: var(--cyber-glass) !important;
}

.premium-table td {
    padding: 15px 20px;
    color: #333 !important;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
}

body.futuristic-mode .premium-table td {
    color: white !important;
    border-color: var(--cyber-border);
}

.premium-table td:first-child {
    border-left: 1px solid #f1f1f1;
    border-radius: 12px 0 0 12px;
}

.premium-table td:last-child {
    border-right: 1px solid #f1f1f1;
    border-radius: 0 12px 12px 0;
}

.premium-action-btn {
    background: #f1f2f6;
    border: 1px solid #ddd;
    color: #2f3542 !important;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

body.futuristic-mode .premium-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--cyber-border);
    color: white !important;
}

.premium-badge {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

/* --- ULTRA-COMPACT FLOATING CONTROL BAR --- */
.floating-control-bar {
    position: fixed;
    bottom: 10px;
    left: 50vw !important;
    transform: translateX(-50%) !important;
    background: rgba(45, 27, 78, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 4px 10px;
    /* Minimal padding */
    border-radius: 25px;
    display: flex;
    width: fit-content;
    /* Shrink to fit buttons — bar auto-sizes, then centered via left:50%+translateX(-50%) */
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 99999;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    max-width: 85vw;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
}

.floating-control-bar::-webkit-scrollbar {
    display: none;
}

.floating-control-bar button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 30px;
    /* Ultra small buttons */
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    /* Minimal icon size */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.floating-control-bar button:hover,
.floating-control-bar button.active {
    background: #1ABC9C;
    color: white;
    transform: scale(1.1);
}

/* --- PREMIUM AUTH SYSTEM (FIX) --- */
.auth-body {
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    color: #f1f5f9;
    margin: 0;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    z-index: 10;
}

.auth-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: authFadeIn 0.6s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-logo {
    width: 50px;
    height: auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
}

.auth-header p {
    color: #94a3b8;
    font-size: 14px;
}

.auth-group {
    margin-bottom: 25px;
    position: relative;
}

.auth-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s ease;
    padding-left: 5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

/* Fixed Label on Focus */
.auth-group:focus-within label {
    color: #38bdf8;
    transform: translateY(-2px);
}

.toggle-password {
    position: absolute;
    right: 16px;
    color: #64748b;
    cursor: pointer;
}

.btn-auth-primary {
    width: 100%;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.4);
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
}

.auth-footer a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
}

/* ==========================================================
   PREMIUM MODAL SYSTEM (DASHBOARD & GLOBAL)
   ========================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: all 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 0;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.animate-modal {
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.close-modal:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* Premium Filter Buttons */
.filter-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.btn-filter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-filter.active {
    background: #7C3AED;
    border-color: #7C3AED;
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Premium Table for Details */
.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.premium-table thead th {
    text-align: left;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-table tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
}

.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.hidden {
    display: none !important;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .filter-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- PREMIUM MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.premium-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .premium-modal {
    transform: translateY(0);
}

body.dark-mode .premium-modal {
    background: #1a1a2e;
    color: #e2e8f0;
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(90deg, #2C3E50 0%, #1a252f 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .modal-header {
    background: linear-gradient(90deg, #1ABC9C 0%, #16A085 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-modal:hover {
    background: #e74c3c;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: 70vh;
}

.modal-footer {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

body.dark-mode .modal-footer {
    background: #1e1e2d;
    border-color: rgba(255, 255, 255, 0.05);
}

.info-card {
    background: #f1f5f9;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}

body.dark-mode .info-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.stock-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.stock-badge.safe {
    background: #dcfce7;
    color: #166534;
}

.stock-badge.warning {
    background: #fef9c3;
    color: #854d0e;
}

.stock-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

body.dark-mode .stock-badge.safe {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* --- FUTURISTIC HUB MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .futuristic-hub {
        padding: 10px;
        padding-top: 20px;
        min-height: calc(100vh - 120px);
    }

    .core-metric-outer {
        width: 220px;
        height: 220px;
        margin: 20px 0 30px 0;
    }

    .core-metric-inner {
        width: 170px;
        height: 170px;
    }

    .core-value {
        font-size: 2.2rem;
    }

    .neural-grid-container {
        padding-bottom: 80px;
    }

    .neural-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .neural-node {
        padding: 15px 12px;
        border-radius: 16px;
    }

    .node-label {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .node-value {
        font-size: 1rem;
    }

    .grid-cluster-title {
        font-size: 10px;
        margin: 25px 0 12px 5px;
    }
}

@media (max-width: 480px) {
    .neural-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .core-metric-outer {
        width: 190px;
        height: 190px;
    }

    .core-metric-inner {
        width: 150px;
        height: 150px;
    }

    .core-value {
        font-size: 1.8rem;
    }
}

body.dark-mode .stock-badge.warning {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

body.dark-mode .stock-badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Customers and Suppliers Mobile View Extensions */
@media (max-width: 768px) {

    /* Panel header optimizations (e.g., All Customers + Search) */
    #customer-supplier-tab .panel>div[style*="display: flex; justify-content: space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }

    #customer-supplier-tab .panel>div[style*="display: flex; justify-content: space-between"]>div[style*="width: 400px"] {
        width: 100% !important;
    }

    #customer-supplier-tab .panel {
        padding: 12px !important;
        /* Maximize real estate */
    }

    #customer-supplier-tab .data-table {
        min-width: 0 !important;
        /* Prevent global horizontal scroll enforcement */
        width: 100% !important;
    }

    #customer-supplier-tab .data-table thead {
        display: none !important;
    }

    #cs-table-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 10px 0 !important;
    }

    #cs-table-body tr {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 96% !important;
        margin: 0 auto !important;
        background: linear-gradient(145deg, rgba(26, 31, 51, 0.8), rgba(13, 17, 33, 0.9)) !important;
        border: 1px solid rgba(124, 58, 237, 0.25) !important;
        border-top: 2px solid rgba(124, 58, 237, 0.5) !important;
        backdrop-filter: blur(20px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
        border-radius: 16px !important;
        padding: 12px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
        gap: 6px !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    }

    #cs-table-body tr:hover {
        transform: translateY(-2px) !important;
        border-color: rgba(124, 58, 237, 0.5) !important;
        box-shadow: 0 10px 25px rgba(124, 58, 237, 0.15), 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    }

    #cs-table-body td {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 5px 0 !important;
        border: none !important;
        color: #f1f5f9 !important;
        font-size: 0.88rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    }

    #cs-table-body td[data-label="Email"],
    #cs-table-body td[data-label="Contact"] {
        display: none !important;
    }

    #cs-table-body td::before {
        content: attr(data-label);
        font-weight: 700 !important;
        color: #a78bfa !important;
        font-size: 0.7rem !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-right: 15px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        opacity: 0.85;
    }

    #cs-table-body td[data-label="Name"]::before {
        color: #38bdf8 !important;
    }

    #cs-table-body td[data-label="Phone"]::before {
        color: #34d399 !important;
    }

    #cs-table-body td[data-label="Address"]::before {
        color: #fca5a5 !important;
    }

    #cs-table-body td[data-label="Name"] {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #38bdf8 !important;
    }

    #cs-table-body td[data-label="Actions"]::before {
        content: "" !important;
    }

    #cs-table-body td[data-label="Actions"] {
        justify-content: center !important;
        margin-top: 6px !important;
        border-bottom: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        padding-top: 10px !important;
        gap: 10px !important;
    }

    #cs-table-body td[data-label="Actions"] button {
        flex: 1 !important;
        max-width: 90px !important;
        height: 36px !important;
        border-radius: 10px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
        transition: transform 0.2s ease, filter 0.2s ease !important;
        font-size: 13px !important;
    }

    #cs-table-body td[data-label="Actions"] button:hover {
        transform: scale(1.08) !important;
        filter: brightness(1.2) !important;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    margin-top: 15px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-color, #64748b);
    font-weight: 600;
}

body.dark-mode .pagination-info {
    color: #94a3b8;
}

.btn-page {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-color, #1e293b);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .btn-page {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-color, #00f2fe);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.3);
}

body.dark-mode .btn-page:hover:not(:disabled) {
    background: #00f2fe;
    color: #0f172a;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ======================================================= */
/* ULTIMATE GLOBAL MOBILE OVERRIDE ENGINE                  */
/* Forces 100% responsiveness across ALL HTML modules      */
/* ======================================================= */
@media (max-width: 768px) {

    /* 1. Universal Boundary Containment */
    body,
    html {
        overflow-x: hidden;
        /* Prevent generic horizontal wobble */
        width: 100%;
    }

    .dashboard-wrapper {
        overflow-x: hidden;
    }

    /* 1b. Grid Structure Containment - Prevent content expansion / Force stacking */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .form-grid>* {
        grid-column: span 1 !important;
        /* Crucial: Stops items from forcing multi-column engines to exist */
    }

    .main-content,
    .view-section {
        padding: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    /* 1c. Component Panel Isolation - Prevents wide internal children (tables) from breaking constraints */
    .panel {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        /* Forces wide children to adopt local internal scrolling/containment */
        padding: 15px !important;
        /* Balances visual breathability on small glass */
    }

    /* 2. The Header (Top Bar) Stack Fix */
    .top-bar {
        flex-direction: column !important;
        height: auto !important;
        padding: 10px 15px !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .top-bar .brand {
        font-size: 14px !important;
        width: 100% !important;
        justify-content: space-between !important;
    }

    .top-bar .user-controls {
        width: 100% !important;
        justify-content: space-between !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 10px !important;
    }

    /* 3. Sub-Tabs Full Wrap Display (Show all tabs without scrolling) */
    .sub-tabs,
    .report-sub-navigation {
        display: flex !important;
        flex-wrap: wrap !important;
        /* ALLOW WRAPPING TO SHOW ALL */
        white-space: normal !important;
        gap: 10px !important;
        padding: 10px 0 !important;
        justify-content: flex-start !important;
        overflow: visible !important;
    }

    .sub-tab-btn {
        flex: 1 1 auto !important;
        /* Fill row dynamically */
        font-size: 12px !important;
        padding: 12px 15px !important;
        text-align: center;
        min-width: calc(50% - 10px);
        /* Force 2-up grid stack on very narrow screens */
        justify-content: center !important;
    }

    /* 4. Layout Split Stack (Forces Left/Right panels to stack) */
    .split-layout,
    .billing-split,
    .inventory-split {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .panel-left,
    .panel-right,
    .split-column {
        width: 100% !important;
        flex: 1 1 auto !important;
        max-width: 100% !important;
    }

    /* 5. Hub Controls Grid (FORCE OVERRIDE INLINE STYLES) */
    .hub-controls-grid {
        grid-template-columns: 1fr !important;
        /* Kills the 1.5fr 1fr 1fr inline */
        gap: 15px !important;
        padding: 15px !important;
    }

    .hub-mode-selector {
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 0 !important;
    }

    /* 6. Action Forms Grid Stack */
    .form-group-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .form-group-row>.form-group {
        width: 100% !important;
    }

    /* Quick Checkout Panel Force Resize */
    div[style*="display: flex; justify-content: space-between; align-items: flex-start;"] {
        flex-direction: column !important;
        gap: 20px !important;
    }

    div[style*="width: 45%;"] {
        width: 100% !important;
    }

    /* 7. Tables & Modals Containers */
    .table-container,
    div[style*="overflow-x: auto"],
    .data-table-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 15px;
    }

    .data-table {
        min-width: 600px;
        /* Force standard view table to not crash columns, rely on container scroll */
    }

    /* Modals */
    .modal-content {
        width: 95% !important;
        margin: 2.5% auto !important;
        padding: 10px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        flex-direction: row !important;
        /* Maintain row for close button */
        padding: 15px !important;
    }

    .modal-header h2 {
        font-size: 1.1rem !important;
    }
}

/* Specialized Tweaks for Desktop Sidebar collapsing smoothly */
@media (min-width: 1025px) {
    .sidebar.collapsed {
        width: 75px !important;
    }

    .sidebar.collapsed .nav-buttons button {
        font-size: 0 !important;
        padding: 14px 0 !important;
        margin: 6px 8px !important;
        justify-content: center !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    .sidebar.collapsed .nav-buttons button:hover {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .sidebar.collapsed .nav-buttons button i {
        margin-right: 0 !important;
        width: auto !important;
        font-size: 1.3rem !important;
        transition: none !important;
    }
}

/* ======================================================= */
/* ITEM HEADS MOBILE TABS & DESKTOP SPLIT UNIFICATION      */
/* ======================================================= */
.heads-mobile-tabs {
    display: none !important;
}

@media (max-width: 768px) {
    .heads-mobile-tabs {
        display: flex !important;
        margin-bottom: 15px !important;
    }
}

@media (min-width: 769px) {

    .split-layout #tab-heads-list.tab-content,
    .split-layout #tab-add-head.tab-content {
        display: flex !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        height: 100% !important;
    }

    .split-layout #tab-heads-list.tab-content {
        flex: 3 !important;
    }

    .split-layout #tab-add-head.tab-content {
        flex: 2 !important;
    }

    .split-layout .tab-content .panel {
        width: 100% !important;
        height: 100% !important;
    }
}

/* --- HOLD & RESUME BILL SYSTEM --- */
.hold-actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 15;
}

.hold-actions-row button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hold-active {
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-hold-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
}

.btn-hold-active:active {
    transform: translateY(0);
}

.btn-hold-disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.2) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn-resume-trigger {
    background: linear-gradient(135deg, #8e44ad 0%, #2c3e50 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
    position: relative;
}

.btn-resume-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.5);
}

.btn-resume-trigger .badge-count {
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 20px;
    position: absolute;
    top: -5px;
    right: -5px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
    border: 2px solid #0f172a;
}

/* Glassmorphic Dropdown List */
.held-bills-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

.held-bills-dropdown.active {
    display: flex;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.held-bill-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.held-bill-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(142, 68, 173, 0.4);
    transform: translateX(3px);
}

.held-bill-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: #f1f5f9;
}

.held-bill-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #94a3b8;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ULTRA-PREMIUM DARK MODE ENHANCEMENTS 
   (Customers, Suppliers, History, Settings)
   ========================================== */

/* 1. Global Dark Mode Overrides for Inputs & Form Fields */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #1e1e2f !important;
    background: #1e1e2f !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}

body.dark-mode label {
    color: #cbd5e1 !important;
}

/* 2. Customers & Suppliers Tabs Styling */
/* Search Bars with inline background override */
body.dark-mode #cs-search,
body.dark-mode #ledger-customer-search {
    background-color: #1e1e2f !important;
    background: #1e1e2f !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

/* Ledger selection lists & dynamic scroll elements */
body.dark-mode #ledger-selection-list {
    background: #151521 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Customer / Supplier Profile Card */
body.dark-mode #ledger-customer-profile {
    background: #1e1e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode #lbl-cs-details-name {
    color: #ffffff !important;
}

body.dark-mode #lbl-cs-details-phone {
    color: #cbd5e0 !important;
}

/* Red/Pink Outstanding Balance panel */
body.dark-mode div[style*="background: #fff5f5"],
body.dark-mode div[style*="background:#fff5f5"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

body.dark-mode #lbl-cs-details-balance {
    color: #fca5a5 !important;
}

body.dark-mode div[style*="background: #fff5f5"] label,
body.dark-mode div[style*="background:#fff5f5"] label {
    color: #f87171 !important;
}

/* Quick Payment Form - Translucent emerald glassmorphism */
body.dark-mode #cs-customer-payment-form {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

body.dark-mode #cs-customer-payment-form h4 {
    color: #34d399 !important;
}

/* Supplier Transaction Form - Translucent amber glassmorphism */
body.dark-mode #cs-supplier-transaction-form {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode #cs-supplier-transaction-form h3,
body.dark-mode #cs-supplier-transaction-form label {
    color: #fbbf24 !important;
}

body.dark-mode #cs-supplier-transaction-form input {
    border-color: rgba(245, 158, 11, 0.2) !important;
}

/* Table wrappers & Dynamic Panels */
body.dark-mode #cs-details-pane div[style*="background: white"],
body.dark-mode #cs-details-pane div[style*="background:white"],
body.dark-mode #cs-details-pane div[style*="background: #fff"],
body.dark-mode #cs-details-pane div[style*="background:#fff"] {
    background: #1e1e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #cs-details-pane div[style*="border-bottom: 1px solid #eee"],
body.dark-mode #cs-details-pane div[style*="border-bottom: 1px solid #eee"] h4 {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    background: #1e1e2d !important;
    color: #ffffff !important;
}

/* 3. History Tab Styling */
body.dark-mode .history-stat-card {
    background: #1e1e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .history-stat-card h4 {
    color: #a0aec0 !important;
}

body.dark-mode .history-stat-card .value {
    color: #ffffff !important;
}

/* Premium invoice lists & return lists tables override */
body.dark-mode .premium-table {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .premium-table thead th {
    background: #151521 !important;
    color: #e2e8f0 !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .premium-table tbody tr {
    background: #1e1e2d !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

body.dark-mode .premium-table td {
    color: #cbd5e0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Receipt Bill Preview Modal */
body.dark-mode .receipt-modal {
    background: #1e1e2d !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .receipt-content {
    background: #151521 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .receipt-store-name {
    color: #ffffff !important;
}

body.dark-mode .receipt-store-info {
    color: #a0aec0 !important;
}

body.dark-mode .receipt-divider {
    border-top-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode .receipt-info-value {
    color: #ffffff !important;
}

body.dark-mode .receipt-info-label {
    color: #a0aec0 !important;
}

body.dark-mode .receipt-table th {
    color: #94a3b8 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .receipt-table td {
    color: #cbd5e0 !important;
}

body.dark-mode .receipt-total-row.grand-total {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    color: #1abc9c !important;
}

body.dark-mode .modal-actions {
    background: #1e1e2d !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .btn-modal-close {
    background: #2d2d3f !important;
    color: #e2e8f0 !important;
}

body.dark-mode .btn-modal-close:hover {
    background: #3d3d5f !important;
}

/* 4. Settings Tab Overrides */
/* Override all nested white card panels in settings pages */
body.dark-mode .settings-tab-content div[style*="background:#ffffff"],
body.dark-mode .settings-tab-content div[style*="background:#fff"],
body.dark-mode .settings-tab-content div[style*="background: #ffffff"],
body.dark-mode .settings-tab-content div[style*="background: #fff"],
body.dark-mode .settings-tab-content div[style*="background: white"],
body.dark-mode .settings-tab-content div[style*="background:white"] {
    background: #1e1e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
}

/* Keep headings bright and labels clear */
body.dark-mode .settings-tab-content h3,
body.dark-mode .settings-tab-content h4,
body.dark-mode .settings-tab-content div[style*="color:#1e293b"],
body.dark-mode .settings-tab-content div[style*="color: #1e293b"] {
    color: #ffffff !important;
}

body.dark-mode .settings-tab-content .settings-subtitle {
    color: #a0aec0 !important;
}

body.dark-mode .settings-tab-content label {
    color: #cbd5e1 !important;
}

body.dark-mode .settings-tab-content small {
    color: #a0aec0 !important;
}

/* Days Close Panel Specifics */
body.dark-mode #settings-dayclose .panel {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dark-mode #settings-dayclose div[style*="background: rgba(124, 58, 237, 0.02)"] {
    background: rgba(124, 58, 237, 0.05) !important;
    border-color: rgba(124, 58, 237, 0.25) !important;
}

body.dark-mode #settings-dayclose h2 {
    color: #ffffff !important;
}

body.dark-mode #dc-current-date-display {
    color: #ffffff !important;
}

/* User management specific overrides */
body.dark-mode #new-user-panel {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

body.dark-mode #manage-user-role {
    background: #1e1e2f !important;
    color: #ffffff !important;
}

body.dark-mode #pages-checkbox-grid {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Device Management Specific overrides */
body.dark-mode #master-max-devices {
    background: #1e1e2f !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode #device-management-panel div[style*="background: rgba(99, 102, 241, 0.05)"] {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

/* Time Travel Calendar picker */
body.dark-mode #timetravel-datetime {
    background: #1e1e2f !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Database Migration Panel */
body.dark-mode #mdf-upload-status,
body.dark-mode #ldf-upload-status {
    background: #151521 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e0 !important;
}

body.dark-mode #mdf-upload-progress-container {
    background: #1e1e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #mdf-upload-progress-title {
    color: #cbd5e0 !important;
}

/* Live Printer Preview Widget */
body.dark-mode #pdf-preview-widget-container {
    background: #1e1e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #pdf-preview-widget-container span {
    color: #cbd5e0 !important;
}

body.dark-mode #pdf-preview-frame-container {
    background: #151521 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #pdf-preview-loader {
    background: #151521 !important;
    color: #cbd5e0 !important;
}

/* ==========================================================================
   PREMIUM MODALS & DATE INPUT OVERRIDES (DASHBOARD DRILL-DOWN / ANALYZE)
   ========================================================================== */

/* --- DARK / FUTURISTIC THEME (DEFAULT) --- */

/* Modal Content & Containers */
body.futuristic-mode #date-filter-modal .modal-content,
body.futuristic-mode #details-modal .modal-content {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(25px) !important;
}

body.futuristic-mode #date-filter-modal .modal-header,
body.futuristic-mode #details-modal .modal-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.futuristic-mode #date-filter-modal .modal-header h3,
body.futuristic-mode #details-modal .modal-header h3 {
    background: linear-gradient(to right, #ffffff, #94a3b8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Date Picker Inputs in Dark Theme */
body.futuristic-mode #date-filter-modal input[type="date"] {
    background: #151521 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    outline: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

body.futuristic-mode #date-filter-modal input[type="date"]:focus {
    border-color: #7C3AED !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4) !important;
    background: #1a1a2e !important;
}

body.futuristic-mode #date-filter-modal .auth-group label {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Premium Dynamic Table in Dark Theme */
body.futuristic-mode #details-modal .premium-table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    width: 100% !important;
}

body.futuristic-mode #details-modal .premium-table thead th {
    color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: none !important;
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
}

body.futuristic-mode #details-modal .premium-table tbody tr {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
}

body.futuristic-mode #details-modal .premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

body.futuristic-mode #details-modal .premium-table td {
    color: #e2e8f0 !important;
    padding: 14px 20px !important;
    border: none !important;
    font-size: 0.85rem !important;
}

body.futuristic-mode #details-modal .premium-table td:first-child {
    border-radius: 12px 0 0 12px !important;
}

body.futuristic-mode #details-modal .premium-table td:last-child {
    border-radius: 0 12px 12px 0 !important;
    font-weight: 600 !important;
}


/* --- LIGHT THEME OVERRIDES --- */

body.light-mode #date-filter-modal .modal-content,
body.light-mode #details-modal .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode #date-filter-modal .modal-header,
body.light-mode #details-modal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: rgba(0, 0, 0, 0.01) !important;
}

body.light-mode #date-filter-modal .modal-header h3,
body.light-mode #details-modal .modal-header h3 {
    background: linear-gradient(to right, #1e293b, #64748b) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

body.light-mode #date-filter-modal .close-modal,
body.light-mode #details-modal .close-modal {
    color: rgba(0, 0, 0, 0.4) !important;
}

body.light-mode #date-filter-modal .close-modal:hover,
body.light-mode #details-modal .close-modal:hover {
    color: #ef4444 !important;
}

/* Date Picker Inputs in Light Theme */
body.light-mode #date-filter-modal input[type="date"] {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    outline: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

body.light-mode #date-filter-modal input[type="date"]:focus {
    border-color: #7C3AED !important;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.15) !important;
    background: #ffffff !important;
}

body.light-mode #date-filter-modal .auth-group label {
    color: #475569 !important;
}

/* Premium Dynamic Table in Light Theme */
body.light-mode #details-modal .premium-table tbody tr {
    background: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body.light-mode #details-modal .premium-table tbody tr:hover {
    background: #f8fafc !important;
}

body.light-mode #details-modal .premium-table td {
    color: #1e293b !important;
}

body.light-mode #details-modal .premium-table thead th {
    color: #64748b !important;
    background: rgba(0, 0, 0, 0.02) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body.light-mode #details-modal #details-loader p {
    color: #64748b !important;
}

/* ============================================================
   120HZ QUALITY BOOSTER — appended last so it wins specificity
   ============================================================ */

/* High-DPI display sharpness — subpixel anti-aliasing */
@media (-webkit-min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }

    .card,
    .panel,
    .modal-content,
    .tab-btn,
    .sub-tab-btn {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Promote tab panels to their own GPU compositor layer.
   contain:paint removed — it created a new stacking context that prevented
   the browser from batching this layer with the compositor thread properly.
   isolation:isolate retained to prevent z-index bleed. */
.settings-tab-content {
    isolation: isolate;
    will-change: opacity;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Button press micro-feedback — instant, 120Hz feel */
.btn-action:active,
.btn-premium:active {
    transition: transform 0.06s cubic-bezier(0.4, 0, 1, 1),
        box-shadow 0.06s cubic-bezier(0.4, 0, 1, 1) !important;
    transform: scale(0.96) translateZ(0) !important;
}

/* Table row hover — compositor-only transform */
.data-table tbody tr,
.premium-table tbody tr {
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background-color 0.1s ease !important;
    will-change: transform;
    transform: translateZ(0);
}

.data-table tbody tr:hover,
.premium-table tbody tr:hover {
    transform: translateX(3px) translateZ(0) !important;
}

/* Input focus — GPU-safe glow, no layout shift */
input:focus,
select:focus,
textarea:focus {
    transition: box-shadow 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.12s ease !important;
    transform: none !important;
}

/* Modal open animation — compositor only */
.modal-content {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Sidebar slide — GPU layer */
.sidebar {
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}