@font-face {
    font-family: 'SF';
    src: url('../fonts/sf.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #5698b1;
    --primary-color-dark: #4a869d;
    --secondary-color: #ccaa7e;
    --secondary-color-dark: #b9966a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Headers */
.store-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.header-nav a:hover {
    color: #007bff;
}

/* Main Content */
.store-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
}

/* Products Grid */
.products-section {
    padding: 2rem 0;
}

.category-group {
    margin-bottom: 3rem;
}

.category-group h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-placeholder {
    width: 100%;
    height: 250px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1rem;
}

.product-card h3 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.1rem;
}

.product-card p {
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.product-footer {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.price {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Cart */
.empty-cart {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
}

.empty-cart p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.cart-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.cart-table thead {
    background-color: #f8f9fa;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.qty-input {
    width: 80px;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.qty-static {
    display: inline;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-weight: 400;
}

.cart-summary {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 400px;
}

.cart-summary h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.total-price {
    font-weight: bold;
    color: var(--primary-color);
}

.price-with-symbol {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    direction: rtl;
    unicode-bidi: isolate;
    flex-direction: row;
}

.price-with-symbol .price-value {
    order: 1;
    direction: ltr;
    unicode-bidi: isolate;
}

.price-with-symbol .riyal-symbol-inline {
    order: 2;
    width: 0.95em;
    height: 0.95em;
    object-fit: contain;
    vertical-align: middle;
    transform: translateY(0.04em);
}

.price-with-code {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    direction: rtl;
    unicode-bidi: isolate;
    flex-direction: row;
}

.price-with-code .price-value {
    order: 1;
    direction: ltr;
    unicode-bidi: isolate;
}

.price-with-code .currency-code-inline {
    order: 2;
    font-size: 0.88em;
    font-weight: 700;
    color: inherit;
}

/* Checkout */
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.checkout-form-section h1 {
    margin-bottom: 1.5rem;
}

.checkout-summary-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.checkout-summary-section h2 {
    margin-bottom: 1.5rem;
}

.order-items {
    margin-bottom: 0.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #ddd;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0;
    border-top: 0;
    font-size: 1.2rem;
}

.total-amount {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .thank-you-grid {
        grid-template-columns: 1fr;
    }

    .thank-you-actions {
        flex-direction: column;
    }

    .thank-you-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .order-items-table th,
    .order-items-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.9rem;
    }

    .checkout-wrapper {
        grid-template-columns: 1fr;
    }

    .header-nav {
        gap: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

/* Thank You */
.thank-you-message {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.thank-you-message h1 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

.thank-you-message p {
    color: #666;
    margin-bottom: 2rem;
}

.order-details {
    text-align: right;
    max-width: 600px;
    margin: 2rem auto;
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.order-details h2 {
    margin: 1.5rem 0 1rem;
}

.order-details h3 {
    margin: 1.5rem 0 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.detail-row span {
    color: #666;
}

.detail-row strong {
    color: #333;
}

/* Dark theme overrides for order detail rows */
.admin-page .detail-row {
    border-bottom-color: rgba(255,255,255,0.06);
}

.admin-page .detail-row span {
    color: #94a3b8;
}

.admin-page .detail-row strong {
    color: #e2e8f0;
}

/* Light theme — restore readable colors */
.admin-page:not(.dark-theme) .detail-row {
    border-bottom-color: #e2e8f0;
}

.admin-page:not(.dark-theme) .detail-row span {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .detail-row strong {
    color: #0f172a !important;
}

/* Note highlight — yellow badge (same in dark & light) */
.note-highlight {
    background: #ffca00 !important;
    color: #000000 !important;
    padding: 2px;
    border-radius: 5px;
    font-weight: 600;
}

/* Spacing before note row */
.detail-row-note {
    margin-top: 0.5rem;
}

/* Editable note in orders list — yellow badge (same in dark & light) */
.editable-note.note-badge-filled {
    background: #ffca00 !important;
    color: #000000 !important;
    border-radius: 5px;
    padding: 2px;
    cursor: pointer;
    display: inline-block;
    margin-top: 4px;
}
.editable-note.note-badge-empty {
    color: #64748b;
    cursor: pointer;
    font-size: 0.85em;
    display: inline-block;
    margin-top: 4px;
}

/* Order edit page — details-section dark theme */
.admin-page .details-section {
    background: #171725;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.2rem;
}
.admin-page .details-section h3 {
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 0.6rem;
    margin-bottom: 0.8rem;
}
.admin-page .order-header h2 {
    color: #fff;
}

/* Order edit — light theme */
.admin-page:not(.dark-theme) .details-section {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}
.admin-page:not(.dark-theme) .details-section h3 {
    color: #0f172a !important;
    border-bottom-color: #e2e8f0 !important;
}
.admin-page:not(.dark-theme) .order-header h2 {
    color: #0f172a !important;
}

/* Thank You Redesign */
.thank-you-page .store-main {
    padding: 1.4rem 0 2.2rem;
}

.thank-you-panel {
    background: #ffffff;
    border: 1px solid #dce7f1;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
    padding: 1.35rem 1.15rem 1.15rem;
    text-align: center;
}

.thank-you-page .success-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 0.6rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.thank-you-panel h1 {
    color: #0f172a;
    margin-bottom: 0.28rem;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.thank-you-subtitle {
    color: #475569;
    margin-bottom: 1rem;
}

.thank-you-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.thank-you-card {
    text-align: right;
    background: #f8fbff;
    border: 1px solid #d9e6f2;
    border-radius: 14px;
    padding: 0.9rem;
}

.thank-you-card h2 {
    margin-bottom: 0.55rem;
    font-size: 1.02rem;
    color: #0f172a;
}

.thank-you-card .details-row {
    padding: 0.42rem 0;
    border-bottom: 1px dashed #d6e2ef;
}

.thank-you-card .details-row:last-child {
    border-bottom: 0;
}

.paid-badge {
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
    font-size: 0.85rem;
}

.thank-you-items-card {
    text-align: right;
    border: 1px solid #d9e6f2;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.8rem;
    margin-bottom: 0.85rem;
}

.thank-you-items-card h3 {
    margin-bottom: 0.55rem;
    color: #0f172a;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
    padding: 0.6rem;
    border-bottom: 1px solid #e5edf5;
    text-align: right;
    font-size: 0.95rem;
}

.order-items-table th {
    color: #334155;
    background: #f8fbff;
    font-weight: 700;
}

.thank-you-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.thank-you-actions .btn {
    min-width: 190px;
    border-radius: 12px;
}

.thank-you-secondary-btn {
    background: #e2e8f0;
    color: #1e293b;
}

.thank-you-secondary-btn:hover {
    background: #cbd5e1;
}

.error-message {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dc3545;
}

.error-message h1 {
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Admin Styles */
.admin-page {
    background-color: #090717;
}

.admin-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header h1 {
    margin: 0;
}

.header-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.logout-btn {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.05);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.admin-container {
    display: flex;
    flex: 1;
}

.admin-sidebar {
    width: 250px;
    background-color: #34495e;
    color: white;
    padding: 1rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-link {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-right: 3px solid transparent;
    transition: all 0.3s;
    display: block;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(0, 0, 0, 0.2);
    border-right-color: var(--primary-color);
}

.admin-content {
    flex: 1;
    background-color: #090717;
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

.admin-content h2 {
    margin-bottom: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.06);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
}

.tab-button:hover {
    color: #cbd5e1;
    background: rgba(255,255,255,0.04);
}

.tab-button.active {
    border-bottom-color: #ffffff;
    color: #ffffff;
    background: rgba(255,255,255,0.06);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #171725;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.data-table thead {
    background-color: #111120;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
}

.data-table th {
    color: #e2e8f0;
}

.data-table tbody tr:hover {
    background-color: rgba(255,255,255,0.08);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: #171725;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #242431;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-card h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.stat-card p {
    color: #94a3b8;
}

/* Login Page */
.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 0.5rem;
    color: #333;
}

.login-box p {
    color: #666;
    margin-bottom: 2rem;
}

/* Footer */
.store-footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-content p {
    margin: 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-status-button {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.badge-new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-completed {
    background-color: #e8f5e9;
    color: #388e3c;
}

.badge-paid {
    background-color: #e8f5e9;
    color: #388e3c;
}

.badge-pending {
    background-color: #fff3e0;
    color: #f57c00;
}

.badge-failed {
    background-color: #ffebee;
    color: #c62828;
}

/* Admin Refresh */
.admin-page {
    background: #090717;
    color: #cbd5e1;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #1e1d30;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-top {
    width: min(1400px, 100%);
    padding: 0 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255,255,255,0.95);
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-store-name {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    margin-right: 0.4rem;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
}

.admin-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    gap: 0;
    padding: 0;
    align-items: flex-start;
    flex-direction: row;
}

.admin-sidebar {
    width: 240px;
    background: #1e1d30;
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem 0.6rem;
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s ease;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    margin-bottom: 0.6rem;
    transition: background 0.2s ease, color 0.2s ease;
}

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

.sidebar-toggle-icon {
    width: 20px;
    height: 20px;
}

.sidebar-toggle .icon-expand {
    display: none;
}

.admin-sidebar.collapsed .sidebar-toggle .icon-collapse {
    display: none;
}

.admin-sidebar.collapsed .sidebar-toggle .icon-expand {
    display: block;
}

.nav-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: inline-block;
    vertical-align: middle;
}

.nav-label {
    margin-right: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.25s ease;
}

.sidebar-nav {
    gap: 0.35rem;
}

.sidebar-nav .nav-link {
    border-radius: 10px;
    border-right: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.7rem 0.8rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
}

.sidebar-nav .nav-link.active {
    background: #3b3a4f;
    color: #ffffff;
}

/* Collapsed sidebar */
.admin-sidebar.collapsed {
    width: 68px;
    padding: 0.75rem 0.5rem;
}

.admin-sidebar.collapsed .nav-label {
    opacity: 0;
    width: 0;
    margin: 0;
    overflow: hidden;
}

.admin-sidebar.collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.admin-content {
    border-radius: 0;
    box-shadow: none;
    border: none;
    flex: 1;
    min-width: 0;
}

.page-actions {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.settings-form {
    display: grid;
    gap: 1rem;
}

.settings-tabs-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.settings-tab-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: #111120;
    color: #94a3b8;
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.settings-tab-btn:hover {
    border-color: #242431;
    color: #fff;
    background: #171725;
}

.settings-tab-btn.active {
    background: linear-gradient(90deg, #242431, #8b5cf6);
    color: #fff;
    border-color: #242431;
    box-shadow: 0 8px 16px rgba(255,255,255,0.08);
}

.settings-tab-pane {
    display: none;
}

.settings-tab-pane.active {
    display: block;
}

.form-section {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1rem;
    background: #111120;
}

.form-section h3 {
    margin-bottom: 0.8rem;
    color: #e2e8f0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.admin-page .order-details {
    margin: 0;
    max-width: 100%;
    background: transparent;
    padding: 0;
}

.details-section {
    background: #171725;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.data-table {
    min-width: 760px;
}

.admin-content {
    overflow-x: auto;
}

.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 14, 24, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 40;
}

@media (max-width: 1024px) {
    .admin-container {
        gap: 1rem;
        padding: 1rem;
    }

    .admin-content {
        padding: 1.25rem;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-right span {
        display: none;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: min(82vw, 280px);
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 0.28s ease;
        z-index: 50;
        padding-top: 70px;
        background: #090717;
        border-left: 1px solid rgba(255,255,255,0.06);
    }

    .admin-sidebar .nav-label {
        opacity: 1;
        width: auto;
        margin-right: 0.6rem;
        position: static;
        pointer-events: auto;
    }

    .admin-sidebar .sidebar-nav .nav-link {
        width: auto;
        height: auto;
        justify-content: flex-start;
        padding: 0.8rem 1.2rem;
    }

    .admin-nav-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-nav-open .admin-overlay {
        opacity: 1;
        visibility: visible;
    }

    .admin-container {
        padding: 0.5rem;
    }

    .admin-content {
        padding: 1rem;
        border-radius: 0;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.25rem;
        padding-bottom: 0.35rem;
    }

    .tab-button {
        padding: 0.7rem 0.9rem;
        font-size: 0.9rem;
    }

    .settings-tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding-bottom: 0.45rem;
    }

    .settings-tab-btn {
        flex: 0 0 auto;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .btn-small {
        width: auto;
    }
}

/* Admin Pro Theme v2 */
/* ══════════════════════════════════════════════════════
   ADMIN DARK THEME
   ══════════════════════════════════════════════════════ */
.admin-page {
    font-family: 'SF', system-ui, -apple-system, sans-serif;
    background: #090717;
    color: #cbd5e1;
}

.admin-page *,
.admin-page button,
.admin-page input,
.admin-page select,
.admin-page textarea {
    font-family: inherit;
}

.admin-header {
    background: #1e1d30;
    color: #fff;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.admin-sidebar {
    background: #1e1d30;
    border-left: 1px solid rgba(255,255,255,0.06);
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.06);
}

.sidebar-nav .nav-link.active {
    background: #3b3a4f;
}

.sidebar-nav .nav-link {
    color: #94a3b8;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
}

.admin-content {
    background: #090717;
}

.admin-content h2 {
    color: #ffffff;
}

.admin-page .btn {
    border-radius: 10px;
    font-weight: 600;
}

.admin-page .btn-primary {
    background: #3b3a4f !important;
    background-image: none !important;
    border-color: #4a4960 !important;
    color: #fff !important;
}

.admin-page .btn-primary:hover {
    background: #4a4960 !important;
    background-image: none !important;
    border-color: #5a5970 !important;
}

.admin-page .btn:not(.btn-primary):not(.btn-danger) {
    background: #171725;
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.08);
}

.admin-page .btn:not(.btn-primary):not(.btn-danger):hover {
    background: #1e1e3e;
    color: #fff;
    border-color: rgba(255,255,255,0.15);
}

.admin-page .btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

.admin-page .btn-secondary {
    background: #242431 !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
}

.admin-page .btn-secondary:hover {
    background: #3b3a4f !important;
    color: #fff !important;
}

/* Admin links dark */
.admin-page .admin-content a {
    color: #38bdf8;
    transition: color 0.15s;
}

.admin-page .admin-content a:hover {
    color: #7dd3fc;
}

/* Ensure btn links keep their own colors, not the general a color */
.admin-page .admin-content a.btn {
    color: inherit;
}

.admin-page .admin-content a.btn-primary {
    color: #fff !important;
}

.admin-page .admin-content a.btn:not(.btn-primary):not(.btn-danger) {
    color: #cbd5e1;
}

.admin-page .admin-content a.btn:not(.btn-primary):not(.btn-danger):hover {
    color: #fff;
}

/* Admin forms dark */
.admin-page input[type="text"],
.admin-page input[type="number"],
.admin-page input[type="email"],
.admin-page input[type="password"],
.admin-page input[type="url"],
.admin-page input[type="date"],
.admin-page input[type="search"],
.admin-page textarea,
.admin-page select {
    background: #111120;
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.08);
}

.admin-page input:focus,
.admin-page textarea:focus,
.admin-page select:focus {
    border-color: #242431;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

.admin-page label {
    color: #cbd5e1;
}

.admin-page small {
    color: #94a3b8 !important;
}

.admin-page .form-group {
    color: #cbd5e1;
}

/* Admin tables dark */
.admin-page .data-table {
    border-color: rgba(255,255,255,0.06);
}

.admin-page .data-table thead {
    background: #111120;
}

.admin-page .data-table th {
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.06);
    background: #111120;
}

.admin-page .data-table td {
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.04);
}

.admin-page .data-table td a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.admin-page .data-table td a:hover {
    color: #242431;
    text-decoration: underline;
}

.admin-page .data-table tbody tr {
    background: #171725;
}

.admin-page .data-table tbody tr:nth-child(even) {
    background: #111120;
}

.admin-page .data-table tbody tr:hover {
    background: #1e1e3e;
}

.admin-page .data-table tfoot th,
.admin-page .data-table tfoot td {
    background: #111120;
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.08);
}

/* Admin page-actions, search, filters */
.admin-page .page-actions {
    color: #cbd5e1;
}

/* Completed order row highlight */
.admin-page .data-table tbody tr.order-row-completed {
    background: #00ff4e0a;
}

/* Badges dark */
.admin-page .badge-paid { background: rgba(16, 185, 129, 0.2); color: #4ade80; }
.admin-page .badge-pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.admin-page .badge-failed { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.admin-page .badge-new { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.admin-page .badge-completed { background: rgba(16, 185, 129, 0.2); color: #4ade80; }

/* Admin pagination dark */
.admin-page .pagination a,
.admin-page .pagination span {
    background: #171725;
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.08);
}

.admin-page .pagination a:hover {
    background: rgba(255,255,255,0.08);
}

.admin-page .pagination .active {
    background: #242431;
    color: #fff;
    border-color: #242431;
}

/* Admin order details dark */
.admin-page .order-details {
    background: #171725;
    border-color: rgba(255,255,255,0.08);
    color: #cbd5e1;
}

/* Settings form dark */
.admin-page .settings-form label {
    color: #cbd5e1;
}

.admin-page .settings-tabs-nav {
    border-color: rgba(255,255,255,0.08);
}

.admin-page .settings-tab-btn {
    color: #94a3b8;
    background: #111120;
    border-color: rgba(255,255,255,0.08);
}

.admin-page .settings-tab-btn:hover {
    color: #fff;
    background: #171725;
}

.admin-page .settings-tab-btn.active {
    color: #fff;
    background: #242431;
    border-color: #242431;
}

/* Error/success messages dark */
.admin-page .error-message {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-page div[style*="background: #d4edda"] {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(120deg, #1a1a3e 0%, #2d1b69 55%, #4c1d95 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.08);
}

.dashboard-hero h2 {
    margin: 0;
    font-size: 1.5rem;
}

.dashboard-hero p {
    margin-top: 0.35rem;
    opacity: 0.9;
}

.dashboard-hero-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.dashboard-hero-actions .btn {
    min-width: 128px;
}

/* Gauge Meters */
.gauge-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.gauge-card {
    background: #0f0d1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 24px 24px 16px;
    text-align: center;
}

.gauge-title {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 600;
}

.gauge-chart {
    position: relative;
    width: 240px;
    height: 140px;
    margin: 0 auto;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.gauge-center-label {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.gauge-pct {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.gauge-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 4px 0 0;
}

.gauge-value small {
    font-size: 0.8rem;
    font-weight: 400;
    color: #94a3b8;
}

/* Light theme gauges */
.admin-page:not(.dark-theme) .gauge-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.admin-page:not(.dark-theme) .gauge-title {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .gauge-value {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .gauge-value small {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .gauge-svg path:first-child {
    stroke: rgba(0,0,0,0.1) !important;
}

.admin-page:not(.dark-theme) .gauge-svg circle[fill="#1e1b2e"] {
    fill: #ffffff !important;
}

@media (max-width: 760px) {
    .gauge-strip {
        grid-template-columns: 1fr;
    }
}

.performance-strip {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.95rem;
}

.performance-card {
    grid-column: span 3;
    background: #171725;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 0.95rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.performance-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.performance-label {
    display: block;
    color: #94a3b8;
    font-size: 0.86rem;
}

.perf-delta {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
}

.perf-delta.kpi-up {
    background: rgba(74, 222, 128, 0.15);
}

.perf-delta.kpi-down {
    background: rgba(248, 113, 113, 0.15);
}

.performance-revenue-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.perf-delta-sm {
    font-size: 0.72rem;
    font-weight: 600;
}

.performance-value {
    display: block;
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 0.28rem;
}

.performance-flag-only {
    font-size: 2.2rem;
    line-height: 1;
}

.performance-sub {
    color: #94a3b8;
    font-size: 0.84rem;
}

.performance-card--period .performance-value {
    margin-bottom: 0.2rem;
}

.performance-metrics {
    margin-top: 0.5rem;
    border-top: 1px dashed rgba(255,255,255,0.08);
    padding-top: 0.45rem;
    display: grid;
    gap: 0.28rem;
}

.performance-metric-row {
    display: flex;
    justify-content: space-between;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.82rem;
    color: #94a3b8;
}

.performance-metric-row strong {
    color: #e2e8f0;
    font-weight: 700;
    text-align: left;
}

.dashboard-performance-panels {
    grid-template-columns: 1.2fr 0.8fr;
}

.trend-30-panel {
    margin-bottom: 0.95rem;
    padding: 1rem 1rem 0.9rem;
}

.trend-30-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.trend-30-header h3 {
    margin: 0;
}

.trend-30-header p {
    margin: 0.28rem 0 0;
    color: #94a3b8;
    font-size: 0.88rem;
}

.trend-30-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    min-width: min(100%, 470px);
}

.trend-30-kpi {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: #111120;
    padding: 0.5rem 0.6rem;
}

.trend-30-kpi span {
    display: block;
    color: #94a3b8;
    font-size: 0.79rem;
    margin-bottom: 0.14rem;
}

.trend-30-kpi strong {
    display: block;
    color: #ffffff;
    font-size: 1rem;
}

.trend-30-kpi small {
    color: #94a3b8;
    font-size: 0.76rem;
}

.trend-30-kpi small.kpi-up {
    color: #4ade80 !important;
}

.trend-30-kpi small.kpi-down {
    color: #f87171 !important;
}

.trend-30-chart-wrap {
    position: relative;
    width: 100%;
    height: 400px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    background: linear-gradient(180deg, #111120 0%, #090717 100%);
    padding: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
}
.trend-30-chart-wrap svg {
    min-width: 1400px;
}

.trend-30-chart {
    width: 100%;
    height: 100%;
    display: block;
}

.trend-30-orders-bar {
    fill: rgba(255,255,255,0.06);
    rx: 3;
}

.trend-30-area {
    fill: url(#rev30Area);
    filter: brightness(1.1);
}

.trend-30-line {
    fill: none;
    stroke: #fbbf24;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.trend-30-grid {
    stroke: rgb(255 255 255 / 30%);
    stroke-width: 1;
    stroke-dasharray: 10 5;
}

.trend-30-vgrid {
    stroke: rgb(255 255 255 / 30%);
    stroke-width: 1;
    stroke-dasharray: 10 10;
}

.trend-30-y-label {
    fill: #94a3b8;
    font-size: 22px;
    font-family: system-ui, -apple-system, sans-serif;
}

.trend-30-legend {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.55rem;
    padding: 0 0.2rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    font-style: normal;
}

.legend-revenue {
    background: #fbbf24;
}

.legend-orders {
    background: #34d399;
}

.trend-30-point {
    fill: #fbbf24;
    stroke: #090717;
    stroke-width: 1.5;
    cursor: pointer;
    transition: r 0.15s ease;
}

.trend-30-point:hover {
    r: 5.5;
    fill: #ffffff;
}

.trend-30-orders-point {
    cursor: pointer;
    transition: r 0.15s ease;
}

.trend-30-orders-point:hover {
    r: 5.5;
    fill: #ffffff;
}

.trend-30-tick {
    fill: #64748b;
    font-size: 22px;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 500;
}

.trend-30-tick-day {
    fill: #94a3b8;
    font-size: 18px;
    font-weight: 400;
}

.trend-30-topbar {
    font-size: 22px;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
    pointer-events: none;
}
.trend-30-topbar-day {
    fill: #94a3b8;
    font-size: 18px;
    font-weight: 500;
}
.trend-30-topbar-revenue {
    fill: #fbbf24;
}
.trend-30-topbar-orders {
    fill: #34d399;
}

.trend-30-tooltip {
    position: absolute;
    background: #171725;
    color: #f1f5f9;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.55;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
    transition: opacity 0.15s ease;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.trend-30-tooltip.visible {
    opacity: 1;
}

.trend-30-tooltip strong {
    color: #e2e8f0;
}

.trend-30-tooltip b {
    color: #a5b4fc;
    font-weight: 600;
}

.kpi-up {
    color: #4ade80 !important;
}

.kpi-down {
    color: #f87171 !important;
}

.dashboard-panels.dashboard-intel-panels {
    grid-template-columns: repeat(3, 1fr);
}

.indicator-panel h3 {
    margin-bottom: 0.9rem;
}

/* Donut chart layout */
.donut-layout {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
}

.donut-chart-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    min-width: 140px;
}

.donut-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.2;
}

.donut-center strong {
    display: block;
    font-size: 1.6rem;
    color: #ffffff;
    font-weight: 700;
}

.donut-center span {
    font-size: 0.78rem;
    color: #94a3b8;
}

.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.donut-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    display: inline-block;
    font-style: normal;
}

.donut-legend-name {
    color: #cbd5e1;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donut-legend-pct {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.82rem;
    min-width: 38px;
    text-align: left;
}

/* Donut bar stats */
.donut-stats {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.6rem 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.donut-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    max-width: 50px;
}

.donut-stat-bar {
    width: 22px;
    border-radius: 6px;
    font-style: normal;
    display: block;
    transition: height 0.3s ease;
}

.donut-stat-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
}

.donut-stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
}

.revenue-trend-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.revenue-trend-summary small {
    color: #94a3b8;
    font-size: 0.8rem;
}

.revenue-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.24rem 0.65rem;
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.revenue-trend-up {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
}

.revenue-trend-down {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
}

.revenue-trend-flat {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
}

.revenue-sparkline-wrap {
    width: 100%;
    height: 190px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #111120;
    padding: 0.45rem;
    margin-bottom: 0.72rem;
}

.revenue-sparkline {
    width: 100%;
    height: 100%;
    display: block;
}

.revenue-sparkline-path {
    fill: none;
    stroke: url(#revLineGrad);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.revenue-sparkline-point {
    fill: #242431;
    stroke: #171725;
    stroke-width: 2;
}

.revenue-trend-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.revenue-day-chip {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: #111120;
    padding: 0.45rem 0.3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.revenue-day-label {
    color: #94a3b8;
    font-size: 0.72rem;
}

.revenue-day-chip strong {
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.15;
}

.revenue-day-dir {
    font-size: 0.88rem;
    line-height: 1;
}

.revenue-day-up {
    color: #4ade80;
}

.revenue-day-down {
    color: #f87171;
}

.revenue-day-flat {
    color: #94a3b8;
}

.ops-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.ops-kpi {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.65rem;
    background: #111120;
}

.ops-kpi span {
    display: block;
    color: #94a3b8;
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

.ops-kpi strong {
    color: #e2e8f0;
    font-size: 1.05rem;
}

.ops-kpi-countries {
    grid-column: 1 / -1;
}

.top-countries-list {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.top-country-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #111120;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.top-country-item i {
    font-style: normal;
    font-size: 1.15rem;
    line-height: 1;
}

.top-country-item strong {
    font-size: 0.9rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.metric-card {
    grid-column: span 4;
    background: #171725;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.metric-label {
    display: block;
    font-size: 0.88rem;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.metric-value {
    display: block;
    font-size: 1.65rem;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.metric-sub {
    color: #94a3b8;
    font-size: 0.88rem;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.dashboard-panel {
    background: #171725;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.1rem;
}

.dashboard-panel h3 {
    margin: 0 0 0.8rem;
    color: #ffffff;
}

.products-sales-panel {
    margin-bottom: 1rem;
}

.products-sales-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.products-sales-filter {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.products-sales-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.products-sales-filter-field label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.products-sales-filter-field input[type="date"] {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.42rem 0.55rem;
    min-width: 150px;
    font-family: inherit;
    background: #111120;
    color: #cbd5e1;
}

.products-sales-note {
    margin: 0.5rem 0 0.8rem;
    color: #94a3b8;
    font-size: 0.87rem;
}

.products-sales-table tfoot th {
    background: #111120;
    color: #e2e8f0;
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.status-row {
    display: grid;
    grid-template-columns: 95px 1fr 48px;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
}

.status-track {
    height: 9px;
    background: #090717;
    border-radius: 999px;
    overflow: hidden;
}

.status-track i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #0fc15f;
}

.status-pending .status-track i {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.status-failed .status-track i {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.status-other .status-track i {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.table-scroll {
    overflow-x: auto;
}

.empty-dashboard {
    color: #94a3b8;
    background: #111120;
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 1rem;
}

/* ─── NEW ANALYTICS STYLES ─────────────── */
.dashboard-kpi-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.kpi-mini-card {
    text-align: center;
}
.kpi-mini-card h3 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.kpi-mini-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 10px;
}
.kpi-mini-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}
.kpi-mini-detail {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 4px;
    margin-bottom: 8px;
}
.kpi-mini-bar-wrap {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 6px;
}
.kpi-mini-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease;
}
.kpi-mini-bars-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.kpi-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kpi-status-label {
    font-size: 0.78rem;
    color: #94a3b8;
    min-width: 42px;
    text-align: right;
}
.kpi-status-pct {
    font-size: 0.78rem;
    color: #ffffff;
    font-weight: 700;
    min-width: 36px;
    text-align: left;
}
.kpi-status-row .kpi-mini-bar-wrap {
    flex: 1;
    margin-top: 0;
}
.kpi-customers-split {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}
.kpi-cust-box {
    flex: 1;
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
}
.kpi-cust-box strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}
.kpi-cust-box span {
    font-size: 0.75rem;
    color: #94a3b8;
}
.kpi-cust-new {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.2);
}
.kpi-cust-repeat {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.2);
}

/* Peak Days */
.peak-days-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.peak-day-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.peak-day-name {
    font-size: 0.82rem;
    color: #94a3b8;
    min-width: 55px;
    text-align: right;
}
.peak-day-bar-wrap {
    flex: 1;
    height: 22px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    overflow: hidden;
}
.peak-day-bar {
    height: 100%;
    background: linear-gradient(90deg, #3d9bb5, #34d399);
    border-radius: 6px;
    transition: width 0.5s ease;
}
.peak-day-val {
    font-size: 0.82rem;
    color: #ffffff;
    font-weight: 700;
    min-width: 32px;
    text-align: left;
}

/* Day × Hour Heatmap */
.dayhour-heatmap {
    margin-top: 12px;
    overflow-x: auto;
}
.dayhour-header, .dayhour-row {
    display: grid;
    grid-template-columns: 65px repeat(24, 1fr);
    gap: 2px;
}
.dayhour-corner {
    font-size: 0.7rem;
}
.dayhour-h-label {
    text-align: center;
    font-size: 0.65rem;
    color: #64748b;
    padding: 2px 0;
}
.dayhour-d-label {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
}
.dayhour-cell {
    text-align: center;
    font-size: 0.65rem;
    color: #ffffff;
    border-radius: 3px;
    padding: 4px 0;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bar Charts (Monthly Growth & Avg Order) */
.bar-chart-simple {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 200px;
    margin-top: 12px;
    padding-bottom: 25px;
    position: relative;
}
.bar-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.bar-chart-val {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 600;
}
.bar-chart-bar-wrap {
    width: 100%;
    max-width: 40px;
    height: 70%;
    display: flex;
    align-items: flex-end;
}
.bar-chart-bar {
    width: 100%;
    background: linear-gradient(180deg, #22c55e, #16a34a);
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    transition: height 0.5s ease;
}
.bar-chart-bar-blue {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
}
.bar-chart-label {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 6px;
    text-align: center;
}

/* Light theme overrides for new sections */
.admin-page:not(.dark-theme) .kpi-mini-value { color: #0f172a; }
.admin-page:not(.dark-theme) .kpi-mini-detail { color: #64748b; }
.admin-page:not(.dark-theme) .kpi-mini-bar-wrap { background: #e2e8f0; }
.admin-page:not(.dark-theme) .kpi-status-pct { color: #0f172a; }
.admin-page:not(.dark-theme) .kpi-cust-box strong { color: #0f172a; }
.admin-page:not(.dark-theme) .kpi-cust-new { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.15); }
.admin-page:not(.dark-theme) .kpi-cust-repeat { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.15); }
.admin-page:not(.dark-theme) .peak-day-bar-wrap { background: #e2e8f0; }
.admin-page:not(.dark-theme) .peak-day-val { color: #0f172a; }
.admin-page:not(.dark-theme) .dayhour-cell { color: #0f172a; }
.admin-page:not(.dark-theme) .bar-chart-val { color: #475569; }

@media (max-width: 900px) {
    .dashboard-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .dayhour-h-label { font-size: 0.55rem; }
    .dayhour-d-label { font-size: 0.6rem; }
}

/* ─── END NEW ANALYTICS ────────────────── */

.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.quick-link-card {
    display: block;
    text-decoration: none !important;
    color: #cbd5e1 !important;
    background: #171725;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 10px 24px rgba(255,255,255,0.06);
}

.quick-link-card h4 {
    margin: 0 0 0.4rem;
    color: #ffffff;
}

.quick-link-card p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

@media (max-width: 1180px) {
    .performance-card {
        grid-column: span 6;
    }

    .dashboard-performance-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-panels.dashboard-intel-panels {
        grid-template-columns: 1fr;
    }

    .metric-card {
        grid-column: span 6;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-sales-header {
        align-items: stretch;
    }

    .trend-30-kpis {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .performance-strip {
        grid-template-columns: 1fr;
    }

    .performance-card {
        grid-column: span 1;
    }

    .ops-kpis {
        grid-template-columns: 1fr;
    }

    .revenue-sparkline-wrap {
        height: 160px;
    }

    .revenue-trend-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        grid-column: span 1;
    }

    .trend-30-chart-wrap {
        height: 320px;
    }

    .trend-30-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: 0.95rem;
    }

    .dashboard-hero h2 {
        font-size: 1.2rem;
    }

    .dashboard-hero-actions {
        width: 100%;
    }

    .dashboard-hero-actions .btn {
        flex: 1;
        min-width: 0;
    }

    .status-row {
        grid-template-columns: 76px 1fr 42px;
        font-size: 0.86rem;
    }

    .dashboard-quick-links {
        grid-template-columns: 1fr;
    }

    .products-sales-filter-field input[type="date"] {
        min-width: 135px;
    }
}

/* Store Pro Home */
.store-header {
    position: sticky;
    top: 0;
    z-index: 35;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e7edf3;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.store-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    min-height: 76px;
}

.store-header-border {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    opacity: 0.55;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #d8e3ee;
    background: #fff;
}

.brand-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    color: #0f172a;
    font-size: 1rem;
}

.brand-text small {
    color: #64748b;
    font-size: 0.78rem;
}

.header-nav {
    justify-content: center;
    gap: 1rem;
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    color: #1e293b;
    font-weight: 600;
}

.header-nav a:hover {
    background: #eef5fb;
    color: var(--primary-color);
}

.nav-counter {
    min-width: 22px;
    height: 22px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
}

.header-cta {
    white-space: nowrap;
}

.store-home {
    padding-top: 0;
}

.home-hero-image {
    padding: 1.4rem 0 1.1rem;
}

.hero-image-frame {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #dbe8f0;
    box-shadow: 0 25px 48px rgba(15, 23, 42, 0.18);
    background: #fff;
}

.hero-main-image {
    width: 100%;
    min-height: 320px;
    max-height: 560px;
    display: block;
    object-fit: cover;
}

.store-kpis {
    padding-bottom: 1.2rem;
}

.store-kpis-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.kpi-card {
    background: #fff;
    border: 1px solid #dce7f1;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
}

.kpi-card strong {
    display: block;
    font-size: 1.45rem;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.kpi-card span {
    color: #64748b;
    font-size: 0.85rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.category-banner {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 0.9rem;
    border: 1px solid #dde5ec;
}

.category-banner img {
    width: 100%;
    height: clamp(170px, 30vw, 300px);
    object-fit: cover;
    display: block;
}

.category-banner .category-banner-video {
    width: 100%;
    height: clamp(170px, 30vw, 300px);
    object-fit: cover;
    object-position: center center; /* المنتصف */
    display: block;
}

.category-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.45));
    padding: 1rem;
}

.category-banner-overlay h3 {
    color: #fff;
    font-size: clamp(1.2rem, 2.7vw, 2rem);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.category-header span {
    font-size: 0.85rem;
    color: var(--primary-color);
    background: #e7f9f8;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
}

.products-section {
    padding-top: 0.8rem;
}

.s-block--statistics {
    padding: 0.8rem 0 1.5rem;
}

.s-block__title {
    text-align: center;
    margin-bottom: 1rem;
}

.s-block__title h2 {
    color: #0f172a;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    margin-bottom: 0.35rem;
}

.s-block__title p {
    color: #64748b;
}

.statistics-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.statistics-list__item .outer {
    position: relative;
    border: none;
    border-radius: 14px;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.statistics-list__item .wrap {
    border-radius: 14px;
    border: none;
    padding: 0;
}

.statistics-list__item .inner {
    min-height: 220px;
    border: none;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.70rem;
    padding: 0.9rem 0.7rem;
}

.statistics-list__item .icon-wrap {
    width: 100px;
    height: 100px;
    border-radius: 999px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.statistics-list__item .icon-bg {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    opacity: 0.1;
    background: var(--primary-color);
}

.statistics-list__item .icon {
    position: relative;
    font-size: 1.45rem;
    color: var(--primary-color);
}

.achievement-icon-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.statistics-list__item strong {
    color: #0f172a;
    font-size: 1.6rem;
    line-height: 1.2;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: center;
}

.statistics-list__item p {
    color: #64748b;
    font-size: 1.2rem;
}

.statistics-list__item:hover .outer {
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.statistics-list__item:nth-child(5) {
    grid-column: 1 / span 1;
}

.product-card {
    border: 1px solid #e1e8ef;
    border-radius: 14px;
}

.product-card h3 {
    color: #0f172a;
}

.store-footer {
    border-top: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.86);
}

.footer-bottom-strip {
    margin-top: 0;
    padding: 0.95rem 0.9rem;
    background: var(--primary-color);
    border-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.footer-location {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.footer-social-icons .social-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.footer-social-icons .social-icon:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.55);
}

.footer-social-icons .social-icon svg {
    width: 18px;
    height: 18px;
}

.footer-rights {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 768px) {
    .footer-bottom-strip {
        margin-top: 0;
        padding: 0.75rem 0.5rem;
        gap: 0.45rem;
    }

    .footer-location {
        font-size: 0.85rem;
    }

    .footer-social-icons .social-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 980px) {
    .store-header-inner {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        padding: 0.7rem 0;
    }

    .brand-block {
        justify-content: center;
    }

    .header-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-cta {
        justify-self: center;
    }

    .statistics-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .statistics-list__item:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .store-kpis-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .hero-main-image {
        min-height: 210px;
    }

    .statistics-list {
        grid-template-columns: 1fr;
    }
}

/* Store Motion + Palette (Inspired) */
.store-home-page {
    background: #ffffff;
}

.store-home-page .store-main {
    background: #ffffff;
}

.store-home-page .store-header {
    background: rgba(255, 255, 255, 0.96);
}

.store-home-page .header-nav a:hover {
    color: #2f9e44;
}

.store-home-page .hero-image-frame {
    border-color: #d5ddd2;
    box-shadow: 0 28px 55px rgba(26, 64, 36, 0.15);
}

.store-home-page .kpi-card {
    border-color: #d9e3d7;
    box-shadow: 0 10px 20px rgba(28, 63, 38, 0.06);
}

.store-home-page .kpi-card strong {
    color: #1f5130;
}

.store-home-page .s-block__title h2 {
    color: #1a231c;
}

.store-home-page .statistics-list__item .outer {
    background: #ffffff;
}

.store-home-page .statistics-list__item:hover .outer {
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.store-home-page .product-card {
    border-color: #dde5dc;
    box-shadow: 0 8px 22px rgba(22, 46, 29, 0.06);
}

.store-home-page .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(22, 46, 29, 0.12);
}

.store-home-page .reveal-load {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
}

.store-home-page.is-loaded .reveal-load {
    animation: revealUp 0.75s cubic-bezier(.2,.65,.2,1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Minimal Header Layout */
.store-top-notice {
    background: var(--primary-color);
    color: #ffffff;
    text-align: center;
    font-size: 0.96rem;
    font-weight: 500;
    padding: 0.45rem 0;
}

.store-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand-logo {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    width: auto;
    height: 56px;
    max-width: 180px;
    object-fit: contain;
}

.brand-logo-fallback {
    border-radius: 10px;
    width: 56px;
    height: 56px;
}

.header-cta-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.store-currency-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #f8fafc;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 0.12rem 0.3rem;
}

.store-currency-label {
    display: none;
}

.store-currency-select {
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 600;
    min-width: 66px;
    max-width: 88px;
    outline: none;
    padding: 0;
}

.store-icon-btn {
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.store-icon-btn svg,
.store-icon-btn .store-icon-image {
    width: 40px;
    height: 40px;
}

.store-icon-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.97);
}

.app-store-btn {
    background: transparent;
}

.play-store-btn {
    background: transparent;
}

.whatsapp-contact-btn {
    background: #11bd70;
    border-color: #11bd70;
    color: #ffffff;
    border-radius: 10px;
    font-weight: 700;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    padding: 0.58rem 1rem;
}

.whatsapp-contact-btn:hover {
    background: #0fa963;
    border-color: #0fa963;
}

.whatsapp-contact-btn .whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05em;
    height: 1.05em;
}

.whatsapp-contact-btn .whatsapp-icon svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .store-top-notice {
        font-size: 0.82rem;
        padding: 0.36rem 0;
    }

    .store-header-inner .header-cta-group {
        gap: 0.35rem;
    }

    .store-currency-select-wrap {
        padding: 0.1rem 0.24rem;
    }

    .store-currency-select {
        min-width: 58px;
        max-width: 76px;
        font-size: 0.68rem;
    }

    .store-header-inner .store-icon-btn {
        width: auto;
        height: auto;
        border-radius: 0;
    }

    .store-header-inner .store-icon-btn svg,
    .store-header-inner .store-icon-btn .store-icon-image {
        width: 35px;
        height: 35px;
    }

    .store-header-inner .whatsapp-contact-btn {
        width: auto !important;
        max-width: 80vw;
        font-size: 0.84rem;
        padding: 0.5rem 0.7rem;
        margin-left: 0.6rem;
    }
}

/* Home Products - Card Layout (Reference Style) */
.store-home .category-header {
    justify-content: center;
    margin-bottom: 1rem;
}

.store-home .category-header h2 {
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    white-space: nowrap;
    color: #1f2937;
    font-size: clamp(1.15rem, 1.4vw, 1.5rem);
    font-weight: 700;
}

.store-home .category-header h2::before,
.store-home .category-header h2::after {
    content: "";
    flex: 1 1 auto;
    min-width: 24px;
    border-top: 1px solid #c9d3df;
}

.store-home .s-block__title h2 {
    margin: 0 0 0.35rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    white-space: nowrap;
}

.store-home .s-block__title h2::before,
.store-home .s-block__title h2::after {
    content: "";
    flex: 1 1 auto;
    min-width: 24px;
    border-top: 1px solid #c9d3df;
}

.store-home .products-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: stretch;
    margin-bottom: 0;
}

.store-home .products-section {
    padding-top: 0.8rem;
    padding-bottom: 0.35rem;
}

.store-home .category-group {
    margin-bottom: 1.25rem;
}

.store-home .category-group:last-child {
    margin-bottom: 1.25rem;
}

.store-home .s-block--statistics {
    padding-top: 0.15rem;
}

.store-home .product-card {
    background: #ffffff;
    border: 1px solid #d7dbe0;
    border-radius: 22px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 1rem 0.9rem 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.store-home .product-card:hover {
    transform: translateY(-4px);
    border-color: #c9d1da;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.store-home .product-card img:not(.riyal-symbol-inline),
.store-home .product-card .product-placeholder {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin: 0 auto 0.8rem;
    border-radius: 0;
}

.store-home .product-card h3 {
    margin: 0;
    padding: 0;
    color: #3d97b4;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
}

.store-home .product-card .product-footer {
    width: 100%;
    border-top: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem 0 0;
}

.store-home .product-card .price {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    direction: rtl;
    unicode-bidi: isolate;
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 0.28rem;
}

.store-home .product-card .price .price-value {
    order: 1;
    direction: ltr;
    unicode-bidi: isolate;
}

.store-home .product-card .price .currency-symbol {
    order: 2;
    width: 0.88em;
    height: 0.88em;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    transform: translateY(0.06em);
}

.store-home .product-card .price-with-symbol .riyal-symbol-inline {
    width: 0.9em;
    height: 0.9em;
    margin: 0;
}

.store-home .product-card .product-description {
    margin: 0.24rem 0 0.14rem;
    color: #475569;
    font-size: clamp(0.62rem, 2.2vw, 0.86rem);
    line-height: 1.2;
    min-height: 1.2em;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.store-home .product-card .btn {
    width: 100%;
    min-height: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
}

.store-home .product-card .btn.btn-primary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.store-home .product-card .btn.btn-primary:hover {
    background: var(--secondary-color-dark);
    border-color: var(--secondary-color-dark);
}

.reviews-action-wrap {
    margin-top: 1rem;
    text-align: center;
}

.reviews-open-btn {
    min-width: 180px;
    border-radius: 999px;
    font-weight: 700;
}

.review-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.review-modal[hidden] {
    display: none !important;
}

.review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}

.review-modal__dialog {
    position: relative;
    width: min(100%, 520px);
    background: #fff;
    border-radius: 16px;
    padding: 1.1rem 1rem 1rem;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.24);
}

.review-modal__dialog h3 {
    margin: 0 0 0.8rem;
    color: #0f172a;
    text-align: right;
}

.review-modal__close {
    position: absolute;
    top: 10px;
    left: 10px;
    border: 0;
    background: #eef2f7;
    color: #0f172a;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.review-form .form-group {
    margin-bottom: 0.75rem;
}

.review-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #334155;
}

.review-form input,
.review-form textarea {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    font: inherit;
    background: #fff;
}

.review-form textarea {
    resize: vertical;
}

.review-submit-btn {
    width: 100%;
    border-radius: 10px;
    font-weight: 700;
}

.review-toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(16px);
    background: #16a34a;
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
    z-index: 1250;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.review-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 1540px) {
    .store-home .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1220px) {
    .store-home .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .store-home .category-header h2 {
        gap: 0.45rem;
    }

    .store-home .s-block__title h2 {
        gap: 0.45rem;
    }

    .store-home .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-home .product-card {
        border-radius: 18px;
    }

    .store-home .product-card h3 {
        font-size: 18px;
    }

    .store-home .product-card .price {
        font-size: 15px;
    }

    .store-home .product-card .btn {
        font-size: 0.98rem;
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .store-home .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-home .product-card {
        min-height: 0;
    }
}

@media (max-width: 360px) {
    .store-home .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Customer Reviews Marquee */
.customer-reviews-section {
    padding: 0.8rem 0 1.8rem;
}

.reviews-marquee {
    width: 100%;
    overflow: hidden;
    direction: ltr;
    border-radius: 14px;
    border: 1px solid #dbe5ef;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.reviews-marquee-track {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    width: max-content;
    padding: 0.85rem;
    direction: ltr;
    animation: reviewsTicker 34s linear infinite;
    animation-play-state: paused;
    will-change: transform;
}

.store-home-page.reviews-running .reviews-marquee-track {
    animation-play-state: running;
}

.review-card {
    min-width: 320px;
    max-width: 320px;
    background: #f8fbfe;
    border: 1px solid #d8e4ee;
    border-radius: 12px;
    padding: 0.75rem;
    direction: rtl;
    text-align: right;
}

.review-message {
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.review-name {
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 700;
}

@keyframes reviewsTicker {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .review-card {
        min-width: 255px;
        max-width: 255px;
    }

    .review-message {
        font-size: 0.88rem;
    }

    .reviews-marquee-track {
        animation-duration: 28s;
    }
}

/* Checkout Redesign */
.checkout-page .store-main {
    padding: 1.2rem 0 2rem;
}

.checkout-page .checkout-wrapper {
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
    gap: 1.1rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.checkout-page .checkout-form-section,
.checkout-page .checkout-summary-section {
    background: #ffffff;
    border: 1px solid #dbe6f0;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.checkout-page .checkout-form-section {
    padding: 1.1rem;
}

.checkout-page .checkout-summary-section {
    padding: 1rem;
}

.checkout-page .checkout-form-section h1 {
    margin-bottom: 0.85rem;
    color: #0f172a;
    font-size: 1.45rem;
}

.checkout-page .checkout-block {
    border: 1px solid #e2e9f2;
    border-radius: 14px;
    background: #f9fbfd;
    padding: 0.9rem;
    margin-bottom: 0.85rem;
}

.checkout-page .checkout-block h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #0f172a;
}

.checkout-page .form-group label {
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #334155;
}

.checkout-page .form-group input,
.checkout-page .form-group select,
.checkout-page .form-group textarea {
    border-color: #d5e1ec;
    border-radius: 10px;
    background: #ffffff;
}

.checkout-page .form-group input:focus,
.checkout-page .form-group select:focus,
.checkout-page .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(86, 152, 177, 0.15);
}

.checkout-page .form-group.form-group-last {
    margin-bottom: 0;
}

.checkout-page .form-hint {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

.checkout-page .checkout-submit-btn {
    width: 100%;
    margin-top: 0.15rem;
    min-height: 52px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
}

.checkout-page .checkout-summary-section h2 {
    margin-bottom: 0.9rem;
    color: #0f172a;
}

.checkout-page .order-item {
    border-bottom: 1px dashed #d4dee8;
    font-size: 0.95rem;
}

.checkout-page .order-total {
    border-top: 0;
    margin-top: 0.4rem;
}

/* Payment Fail Page */
.fail-page .store-main {
    padding: 1.4rem 0 2.1rem;
}

.payment-fail-card {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #dbe6f0;
    border-radius: 18px;
    padding: 1.35rem 1.1rem 1.1rem;
    text-align: center;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.11);
}

.payment-fail-icon {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    margin: 0 auto 0.7rem;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #ef4444;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.payment-fail-card h1 {
    margin-bottom: 0.3rem;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
}

.payment-fail-subtitle {
    color: #475569;
    margin-bottom: 0.9rem;
}

.payment-fail-meta {
    max-width: 520px;
    margin: 0 auto 0.9rem;
    padding: 0.7rem;
    border: 1px dashed #dbe6f0;
    border-radius: 12px;
    background: #f8fbff;
}

.payment-fail-meta .meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    color: #1e293b;
    font-size: 0.95rem;
}

.payment-fail-meta .meta-row + .meta-row {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid #e3ecf5;
}

.payment-fail-tips {
    list-style: none;
    max-width: 520px;
    margin: 0 auto 1rem;
    text-align: right;
}

.payment-fail-tips li {
    position: relative;
    padding-right: 1.2rem;
    color: #334155;
    font-size: 0.97rem;
}

.payment-fail-tips li + li {
    margin-top: 0.4rem;
}

.payment-fail-tips li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.58rem;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ef4444;
}

.payment-fail-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.payment-fail-actions .btn {
    min-width: 190px;
    border-radius: 12px;
}

.payment-fail-secondary-btn {
    background: #e2e8f0;
    color: #1e293b;
}

.payment-fail-secondary-btn:hover {
    background: #cbd5e1;
}

.payment-fail-help {
    text-align: center;
    color: #64748b;
    font-size: 0.92rem;
    margin-top: 0.65rem;
}

@media (max-width: 900px) {
    .checkout-page .checkout-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .payment-fail-card {
        padding: 1rem 0.8rem 0.9rem;
        border-radius: 14px;
    }

    .payment-fail-actions {
        flex-direction: column;
    }

    .payment-fail-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .payment-fail-meta .meta-row {
        font-size: 0.9rem;
    }
}

@media (min-width: 861px) {
    .admin-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }

    .admin-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        flex-direction: row !important;
        align-items: stretch !important;
    }

    .dark-theme .admin-container {
        background: linear-gradient(180deg, #0f172a 0%, #13243f 52%, #0a1f36 100%) !important;
    }

    .admin-page:not(.dark-theme) .admin-container {
        background: #f0f2f5 !important;
    }

    .admin-sidebar {
        margin-right: 0 !important;
        margin-left: 0 !important;
        border-radius: 0 !important;
        position: sticky !important;
        top: 0 !important;
        max-height: none !important;
        height: 100vh !important;
        min-height: 100vh !important;
    }

    .dark-theme .admin-sidebar {
        background: linear-gradient(180deg, #0f172a 0%, #13243f 52%, #0a1f36 100%) !important;
    }

    .admin-page:not(.dark-theme) .admin-sidebar {
        background: #ffffff !important;
        border-left: 1px solid #e2e8f0 !important;
    }

    .admin-content {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: 0 !important;
        border-top: 0 !important;
        border-bottom: 0 !important;
    }

    .header-top {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
}

/* ══════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES - DEFAULT THEME
   Applies to .admin-page:not(.dark-theme)
   ══════════════════════════════════════════════════════ */

.admin-page:not(.dark-theme) {
    background: #f0f2f5 !important;
    color: #1e293b !important;
}

/* Header & Sidebar Light Theme */
.admin-page:not(.dark-theme) .admin-header {
    background: #ffffff !important;
    color: #1e293b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-page:not(.dark-theme) .admin-header h1,
.admin-page:not(.dark-theme) .admin-header h3 {
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) .admin-sidebar {
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
}

.admin-page:not(.dark-theme) .sidebar-nav .nav-link {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .sidebar-nav .nav-link:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) .sidebar-nav .nav-link.active {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) .sidebar-toggle {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

/* Admin Content Light Theme */
.admin-page:not(.dark-theme) .admin-content {
    background: #f0f2f5 !important;
}

.admin-page:not(.dark-theme) .admin-content h2 {
    color: #0f172a !important;
}

/* Logout Button Light Theme */
.admin-page:not(.dark-theme) .logout-btn {
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
}

.admin-page:not(.dark-theme) .logout-btn:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

/* Tabs Light Theme */
.admin-page:not(.dark-theme) .tabs {
    border-bottom: 2px solid #cbd5e1 !important;
}

.admin-page:not(.dark-theme) .tab-button {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .tab-button:hover {
    color: #1e293b !important;
    background: #f8fafc !important;
}

.admin-page:not(.dark-theme) .tab-button.active {
    border-bottom-color: #3d9bb5 !important;
    color: #3d9bb5 !important;
    background: transparent !important;
}

/* Data Table Light Theme */
.admin-page:not(.dark-theme) .data-table {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-page:not(.dark-theme) .data-table thead {
    background-color: #f8fafc !important;
}

.admin-page:not(.dark-theme) .data-table th,
.admin-page:not(.dark-theme) .data-table td {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .data-table th {
    color: #0f172a !important;
    background-color: #f8fafc !important;
}

.admin-page:not(.dark-theme) .data-table tbody tr {
    background: #ffffff !important;
}

.admin-page:not(.dark-theme) .data-table tbody tr:nth-child(even) {
    background: #f8fafc !important;
}

.admin-page:not(.dark-theme) .data-table tbody tr:hover {
    background-color: #f1f5f9 !important;
}

.admin-page:not(.dark-theme) .data-table tfoot th,
.admin-page:not(.dark-theme) .data-table tfoot td {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

/* Stat Cards Light Theme */
.admin-page:not(.dark-theme) .stat-card {
    background: #ffffff !important;
    border-left: 4px solid #3d9bb5 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-page:not(.dark-theme) .stat-card h3 {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .stat-card p {
    color: #64748b !important;
}

/* Settings Form Light Theme */
.admin-page:not(.dark-theme) .settings-tabs-nav {
    border-bottom: 1px solid #e2e8f0 !important;
}

.admin-page:not(.dark-theme) .settings-tab-btn {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .settings-tab-btn:hover {
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    background: #ffffff !important;
}

.admin-page:not(.dark-theme) .settings-tab-btn.active {
    background: #3d9bb5 !important;
    color: #ffffff !important;
    border-color: #3590a8 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Form Section Light Theme */
.admin-page:not(.dark-theme) .form-section {
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

.admin-page:not(.dark-theme) .form-section h3 {
    color: #0f172a !important;
}

/* Details Section Light Theme */
.admin-page:not(.dark-theme) .details-section {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

/* Order Details Light Theme */
.admin-page:not(.dark-theme) .order-details {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .order-details a {
    color: #3d9bb5 !important;
}

.admin-page:not(.dark-theme) .order-details a:hover {
    color: #34869c !important;
}

/* Ensure btn inside order-details keeps button styles */
.admin-page:not(.dark-theme) .order-details a.btn {
    color: inherit !important;
}

.admin-page:not(.dark-theme) .order-details a.btn-primary {
    color: #ffffff !important;
}

/* Buttons Light Theme */
.admin-page:not(.dark-theme) .btn {
    border-radius: 10px;
    font-weight: 600;
}

.admin-page:not(.dark-theme) .btn-primary {
    background: #3d9bb5 !important;
    background-image: none !important;
    border-color: #3590a8 !important;
    color: #ffffff !important;
}

.admin-page:not(.dark-theme) .btn-primary:hover {
    background: #34869c !important;
    background-image: none !important;
    border-color: #2d7589 !important;
}

.admin-page:not(.dark-theme) .btn:not(.btn-primary):not(.btn-danger) {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

.admin-page:not(.dark-theme) .btn:not(.btn-primary):not(.btn-danger):hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.admin-page:not(.dark-theme) .btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.admin-page:not(.dark-theme) .btn-secondary {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

.admin-page:not(.dark-theme) .btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Links Light Theme — blue for readability */
.admin-page:not(.dark-theme) .admin-content a {
    color: #3d9bb5 !important;
}

.admin-page:not(.dark-theme) .admin-content a:hover {
    color: #34869c !important;
}

/* Btn links must keep button colors, not the generic a blue */
.admin-page:not(.dark-theme) .admin-content a.btn {
    color: inherit !important;
}

.admin-page:not(.dark-theme) .admin-content a.btn-primary,
.admin-page:not(.dark-theme) .admin-content a.btn-primary:hover {
    color: #ffffff !important;
}

.admin-page:not(.dark-theme) .admin-content a.btn:not(.btn-primary):not(.btn-danger) {
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .admin-content a.btn:not(.btn-primary):not(.btn-danger):hover {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .data-table td a {
    color: #3d9bb5 !important;
}

.admin-page:not(.dark-theme) .data-table td a:hover {
    color: #34869c !important;
    text-decoration: underline;
}

/* Form Inputs Light Theme */
.admin-page:not(.dark-theme) input[type="text"],
.admin-page:not(.dark-theme) input[type="number"],
.admin-page:not(.dark-theme) input[type="email"],
.admin-page:not(.dark-theme) input[type="password"],
.admin-page:not(.dark-theme) input[type="url"],
.admin-page:not(.dark-theme) input[type="date"],
.admin-page:not(.dark-theme) input[type="search"],
.admin-page:not(.dark-theme) textarea,
.admin-page:not(.dark-theme) select {
    background: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

.admin-page:not(.dark-theme) input:focus,
.admin-page:not(.dark-theme) textarea:focus,
.admin-page:not(.dark-theme) select:focus {
    border-color: #3d9bb5 !important;
    box-shadow: 0 0 0 2px rgba(61, 155, 181, 0.15) !important;
}

.admin-page:not(.dark-theme) label {
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) small {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .form-group {
    color: #1e293b !important;
}

/* Pagination Light Theme */
.admin-page:not(.dark-theme) .pagination a,
.admin-page:not(.dark-theme) .pagination span {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.admin-page:not(.dark-theme) .pagination a:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .pagination .active {
    background: #3d9bb5 !important;
    color: #ffffff !important;
    border-color: #3590a8 !important;
}

/* Error/Success Messages Light Theme */
.admin-page:not(.dark-theme) .error-message {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.admin-page:not(.dark-theme) div[style*="background: #d4edda"] {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

/* Badges Light Theme */
.admin-page:not(.dark-theme) .badge-paid {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.admin-page:not(.dark-theme) .badge-pending {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.admin-page:not(.dark-theme) .badge-failed {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.admin-page:not(.dark-theme) .badge-new {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.admin-page:not(.dark-theme) .badge-completed {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

/* Dashboard Hero Light Theme */
.admin-page:not(.dark-theme) .dashboard-hero {
    background: linear-gradient(120deg, #e0e7ff 0%, #f3e8ff 55%, #fce7f3 100%) !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-page:not(.dark-theme) .dashboard-hero h2 {
    color: #0f172a !important;
}

/* Performance Cards Light Theme */
.admin-page:not(.dark-theme) .performance-card {
    grid-column: span 3;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-page:not(.dark-theme) .performance-label {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .performance-value {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .performance-sub {
    color: #64748b !important;
}

/* Trend 30 Light Theme */
.admin-page:not(.dark-theme) .trend-30-kpi {
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

.admin-page:not(.dark-theme) .trend-30-kpi span {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .trend-30-kpi strong {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .trend-30-kpi small {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .trend-30-kpi small.kpi-up {
    color: #16a34a !important;
}

.admin-page:not(.dark-theme) .trend-30-kpi small.kpi-down {
    color: #dc2626 !important;
}

.admin-page:not(.dark-theme) .trend-30-chart-wrap {
    border: 1px solid #e2e8f0 !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f0f2f5 100%) !important;
}

.admin-page:not(.dark-theme) .trend-30-grid {
    stroke: rgba(0, 0, 0, 0.08) !important;
}

.admin-page:not(.dark-theme) .trend-30-vgrid {
    stroke: rgba(0, 0, 0, 0.05) !important;
}

.admin-page:not(.dark-theme) .trend-30-orders-bar {
    fill: rgba(0, 0, 0, 0.08) !important;
}

.admin-page:not(.dark-theme) .trend-30-y-label {
    fill: #64748b !important;
}

.admin-page:not(.dark-theme) .trend-30-point {
    stroke: #ffffff !important;
}

.admin-page:not(.dark-theme) .trend-30-tooltip {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}

.admin-page:not(.dark-theme) .trend-30-tooltip strong {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .legend-item {
    color: #64748b !important;
}

/* Donut Chart Light Theme */
.admin-page:not(.dark-theme) .donut-center strong {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .donut-center span {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .donut-legend-name {
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .donut-legend-pct {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .donut-stats {
    border-top: 1px solid #e2e8f0 !important;
}

.admin-page:not(.dark-theme) .donut-stat-val {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .donut-stat-label {
    color: #64748b !important;
}

/* Metric Cards Light Theme */
.admin-page:not(.dark-theme) .metric-card {
    grid-column: span 4;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-page:not(.dark-theme) .metric-label {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .metric-value {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .metric-sub {
    color: #64748b !important;
}

/* Dashboard Panels Light Theme */
.admin-page:not(.dark-theme) .dashboard-panel {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-page:not(.dark-theme) .dashboard-panel h3 {
    color: #0f172a !important;
}

/* Revenue Sparkline Light Theme */
.admin-page:not(.dark-theme) .revenue-sparkline-wrap {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

.admin-page:not(.dark-theme) .revenue-sparkline-point {
    fill: #cbd5e1 !important;
    stroke: #ffffff !important;
}

.admin-page:not(.dark-theme) .revenue-day-chip {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

.admin-page:not(.dark-theme) .revenue-day-label {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .revenue-day-chip strong {
    color: #0f172a !important;
}

/* Ops KPI Light Theme */
.admin-page:not(.dark-theme) .ops-kpi {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

.admin-page:not(.dark-theme) .ops-kpi span {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .ops-kpi strong {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .top-country-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

/* Status Bars Light Theme */
.admin-page:not(.dark-theme) .status-track {
    background: #e2e8f0 !important;
}

.admin-page:not(.dark-theme) .empty-dashboard {
    color: #64748b !important;
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
}

/* Quick Link Cards Light Theme */
.admin-page:not(.dark-theme) .quick-link-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .quick-link-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.admin-page:not(.dark-theme) .quick-link-card h4 {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .quick-link-card p {
    color: #64748b !important;
}

/* Products Sales Light Theme */
.admin-page:not(.dark-theme) .products-sales-filter-field label {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .products-sales-filter-field input[type="date"] {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) .products-sales-note {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .products-sales-table tfoot th {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* Revenue Trend Light Theme */
.admin-page:not(.dark-theme) .revenue-trend-summary small {
    color: #64748b !important;
}

/* Page Actions Light Theme */
.admin-page:not(.dark-theme) .page-actions {
    color: #334155 !important;
}

/* Menu Toggle Light Theme */
.admin-page:not(.dark-theme) .menu-toggle {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(0, 0, 0, 0.04) !important;
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) .menu-toggle:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Theme Toggle Button Styling */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    color: inherit;
    line-height: 1;
}

.theme-toggle:hover {
    opacity: 0.7;
}

/* Dashboard inline style overrides for light theme */
.admin-page:not(.dark-theme) #hcCountry,
.admin-page:not(.dark-theme) .heatmap-country-select {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.admin-page:not(.dark-theme) .header-right span {
    color: #334155 !important;
}

/* Performance metric rows Light Theme */
.admin-page:not(.dark-theme) .performance-metric-row {
    color: #64748b !important;
}

.admin-page:not(.dark-theme) .performance-metric-row strong {
    color: #0f172a !important;
}

.admin-page:not(.dark-theme) .performance-card .performance-metrics {
    border-top-color: #e2e8f0 !important;
}

/* Trend 30 tick labels Light Theme */
.admin-page:not(.dark-theme) .trend-30-tick {
    fill: #64748b !important;
}

/* Trend 30 header paragraph */
.admin-page:not(.dark-theme) .trend-30-header p {
    color: #64748b !important;
}

/* KPI delta colors — keep up/down colors visible in both themes */
.admin-page:not(.dark-theme) .perf-delta {
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .perf-delta.kpi-up {
    color: #16a34a !important;
}

.admin-page:not(.dark-theme) .perf-delta.kpi-down {
    color: #dc2626 !important;
}

.admin-page:not(.dark-theme) .perf-delta-sm.kpi-up {
    color: #16a34a !important;
}

.admin-page:not(.dark-theme) .perf-delta-sm.kpi-down {
    color: #dc2626 !important;
}

/* Indicator panel heading light theme */
.admin-page:not(.dark-theme) .indicator-panel h3 {
    color: #0f172a !important;
}

/* Status bars light theme */
.admin-page:not(.dark-theme) .status-row span {
    color: #334155 !important;
}

.admin-page:not(.dark-theme) .status-row strong {
    color: #0f172a !important;
}

/* Legend revenue swatch light gradient */
.admin-page:not(.dark-theme) .legend-revenue {
    background: linear-gradient(90deg, #818cf8, #e879f9, #fbbf24) !important;
}

/* Admin overlay light theme */
.admin-page:not(.dark-theme) .admin-overlay {
    background: rgba(0, 0, 0, 0.25) !important;
}

/* Editable description text */
.editable-desc-text {
    cursor: pointer;
    display: inline-block;
    min-width: 120px;
    color: #cbd5e1;
}

.admin-page:not(.dark-theme) .editable-desc-text {
    color: #334155 !important;
}


/* Currency selector in the footer (makah-store) */
.store-footer .store-currency-select-wrap {
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
}

.store-footer .store-currency-label {
    display: inline;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
}

.store-footer .store-currency-select {
    color: #ffffff;
    font-size: 0.85rem;
    min-width: 0;
    max-width: 180px;
    cursor: pointer;
}

.store-footer .store-currency-select option {
    color: #0f172a;
}
