/**
 * DukaniKwangu Design System — Amazon-Style UI
 * Version: 5.0 — Complete Amazon E-commerce Standard
 *
 * Table of Contents:
 *  1. CSS Custom Properties (Design Tokens)
 *  2. Base Reset & Typography
 *  3. Spacing Utilities
 *  4. Scrollbar
 *  5. Sidebar Navigation
 *  6. Buttons — Amazon Style
 *  7. Cards — Amazon Product Cards
 *  8. Form Inputs
 *  9. Data Tables
 *  10. Status Badges
 *  11. Page Header
 *  12. Loading & Animations
 *  13. Micro-interactions
 *  14. Store-specific
 *  15. Amazon Components
 *  16. White Text on White BG Fixes
 */

/* ============================================================
   1. CSS Custom Properties (Design Tokens) — Amazon Palette
   ============================================================ */
:root {
    /* ─── Primary — Amazon Orange ─── */
    --color-primary:          #FF5000;
    --color-primary-hover:    #CC3300;
    --color-primary-active:   #AA2200;
    --color-primary-light:    #FFF1EB;
    --color-primary-ring:     rgba(255, 80, 0, 0.15);
    --color-primary-subtle:   rgba(255, 80, 0, 0.08);

    /* ─── Amazon Brand Colors ─── */
    --color-amazon-dark:      #131921;
    --color-amazon-darkblue:  #232F3E;
    --color-amazon-lightblue: #37475A;
    --color-amazon-blue:      #007185;
    --color-amazon-blue-hover:#C7511F;
    --color-amazon-price:     #B12704;
    --color-amazon-text:      #0F1111;
    --color-amazon-text-secondary: #565959;
    --color-amazon-border:    #EBEBEB;

    /* ─── Secondary — Slate ─── */
    --color-secondary:        #475569;
    --color-secondary-hover:  #334155;
    --color-secondary-light:  #F1F5F9;

    /* ─── Brand Accent — Amazon Dark ─── */
    --color-brand:            #131921;
    --color-brand-hover:      #232F3E;
    --color-brand-light:      #37475A;

    /* ─── Semantic Colors ─── */
    --color-success:          #067D62;
    --color-success-hover:    #055D4B;
    --color-success-bg:       #E6F7F3;
    --color-success-text:     #065F46;
    --color-success-border:   #A7F3D0;

    --color-warning:          #FF5000;
    --color-warning-hover:    #CC3300;
    --color-warning-bg:       #FFF3CD;
    --color-warning-text:     #92400E;
    --color-warning-border:   #FDE68A;

    --color-error:            #CC0C39;
    --color-error-hover:      #B71C2C;
    --color-error-bg:         #FEF2F2;
    --color-error-text:       #991B1B;
    --color-error-border:     #FECACA;

    --color-info:             #007185;
    --color-info-hover:       #005D6A;
    --color-info-bg:          #E6F7FA;
    --color-info-text:        #1E40AF;
    --color-info-border:      #BFDBFE;

    /* ─── Neutral Palette ─── */
    --color-white:            #FFFFFF;
    --color-gray-50:          #F8FAFC;
    --color-gray-100:         #F1F5F9;
    --color-gray-200:         #E2E8F0;
    --color-gray-300:         #CBD5E1;
    --color-gray-400:         #94A3B8;
    --color-gray-500:         #64748B;
    --color-gray-600:         #475569;
    --color-gray-700:         #334155;
    --color-gray-800:         #1E293B;
    --color-gray-900:         #0F172A;

    /* ─── Surfaces ─── */
    --color-page-bg:          #F5F5F5;
    --color-card-bg:          #FFFFFF;
    --color-sidebar-bg:       #232F3E;
    --color-sidebar-border:   #37475A;
    --color-sidebar-hover:    rgba(255, 255, 255, 0.08);
    --color-sidebar-active:   rgba(255, 80, 0, 0.15);
    --color-sidebar-text:     #CCCCCC;
    --color-sidebar-text-active: #FF5000;

    /* ─── Borders ─── */
    --color-border:           #EBEBEB;
    --color-border-light:     #F1F5F9;
    --color-border-dark:      #CBD5E1;

    /* ─── Text ─── */
    --color-text-primary:     #0F1111;
    --color-text-secondary:   #565959;
    --color-text-muted:       #64748B;
    --color-text-placeholder: #94A3B8;
    --color-text-inverse:     #FFFFFF;

    /* ─── Shadows ─── */
    --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:    0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg:    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl:    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-ring:  0 0 0 3px var(--color-primary-ring);
    --shadow-amazon: 0 2px 5px 0 rgba(0,0,0,0.1);

    /* ─── Border Radius ─── */
    --radius-xs:    4px;
    --radius-sm:    6px;
    --radius-md:    8px;
    --radius-lg:    12px;
    --radius-xl:    16px;
    --radius-2xl:   20px;
    --radius-full:  9999px;

    /* ─── Spacing Scale (4px base) ─── */
    --space-0:   0;
    --space-1:   4px;
    --space-2:   8px;
    --space-3:   12px;
    --space-4:   16px;
    --space-5:   20px;
    --space-6:   24px;
    --space-8:   32px;
    --space-10:  40px;
    --space-12:  48px;

    /* ─── Typography Scale ─── */
    --text-xs:     11px;
    --text-sm:     13px;
    --text-base:   14px;
    --text-md:     15px;
    --text-lg:     18px;
    --text-xl:     20px;
    --text-2xl:    24px;
    --text-3xl:    30px;

    /* ─── Font Weights ─── */
    --font-normal:    400;
    --font-medium:    500;
    --font-semibold:  600;
    --font-bold:      700;

    /* ─── Transitions ─── */
    --transition-fast:   0.1s ease;
    --transition-base:   0.15s ease;
    --transition-slow:   0.25s ease;
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   2. Base Reset & Typography
   ============================================================ */
*, *::before, *::after {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--color-page-bg);
    color: var(--color-text-primary);
    font-size: var(--text-base);
    line-height: 1.5;
    margin: 0;
}

/* Typography helpers */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }

.font-normal   { font-weight: var(--font-normal); }
.font-medium   { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold     { font-weight: var(--font-bold); }

.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.tabular-nums { font-variant-numeric: tabular-nums; }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   3. Spacing Utilities
   ============================================================ */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* ============================================================
   4. Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb { 
    background: var(--color-gray-300); 
    border-radius: var(--radius-full); 
}
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--color-gray-300) var(--color-gray-100); }

/* ============================================================
   5. Sidebar Navigation — Amazon Style
   ============================================================ */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 7px 10px 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #8B95A1;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    position: relative;
    margin-bottom: 1px;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.07);
    color: #E2E8F0;
}

.sidebar-link:hover svg,
.sidebar-link:hover i {
    color: #E2E8F0;
}

.sidebar-link.active {
    background: rgba(255,80,0,0.13);
    color: #FF5000;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #FF5000;
}

.sidebar-link.active svg,
.sidebar-link.active i {
    color: #FF5000;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 5px 2px;
    opacity: 1;
}

.sidebar-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
    padding: 14px 10px 3px;
    user-select: none;
}

/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 38px;
    padding: 0 var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--shadow-ring);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

/* Size variants */
.btn-xs { height: 28px; padding: 0 var(--space-2); font-size: var(--text-xs); }
.btn-sm { height: 32px; padding: 0 var(--space-3); font-size: var(--text-xs); }
.btn-lg { height: 44px; padding: 0 var(--space-5); font-size: var(--text-md); }
.btn-xl { height: 50px; padding: 0 var(--space-6); font-size: var(--text-md); }

/* Primary — Taobao Orange */
.btn-primary {
    background: #FF5000;
    color: #ffffff;
    border-color: #CC3300;
}
.btn-primary:hover:not(:disabled) {
    background: #CC3300;
    border-color: #AA2200;
}
.btn-primary:active:not(:disabled) {
    background: #AA2200;
    border-color: #881100;
}

/* Secondary — Outlined */
.btn-secondary {
    background: linear-gradient(to bottom, #F7F8F8, #E7E9EC);
    color: #111111;
    border-color: #ADB1B8;
}
.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(to bottom, #E7E9EC, #D8D9DA);
}

/* Ghost — Neutral */
.btn-ghost {
    background: var(--color-white);
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--color-gray-50);
    border-color: var(--color-border-dark);
}

/* Subtle — No border */
.btn-subtle {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: transparent;
}
.btn-subtle:hover:not(:disabled) {
    background: var(--color-gray-100);
    color: var(--color-text-primary);
}

/* Success */
.btn-success {
    background: var(--color-success);
    color: #ffffff;
    border-color: var(--color-success);
}
.btn-success:hover:not(:disabled) {
    background: var(--color-success-hover);
    border-color: var(--color-success-hover);
}

/* Danger */
.btn-danger {
    background: var(--color-error);
    color: #ffffff;
    border-color: var(--color-error);
}
.btn-danger:hover:not(:disabled) {
    background: var(--color-error-hover);
    border-color: var(--color-error-hover);
}

/* Warning */
.btn-warning {
    background: #FF5000;
    color: #ffffff;
    border-color: #CC3300;
}
.btn-warning:hover:not(:disabled) {
    background: #CC3300;
}

/* Icon-only button */
.btn-icon {
    width: 38px;
    padding: 0;
}
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-lg { width: 44px; }

/* Loading state */
.btn.loading {
    color: transparent !important;
    pointer-events: none;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   7. Cards
   ============================================================ */
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.card-title {
    font-size: var(--text-md);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.card-body {
    padding: var(--space-5);
}

.card-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border-light);
    background: var(--color-gray-50);
}

/* Card variants */
.card-hover {
    transition: all var(--transition-base);
}
.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-clickable {
    cursor: pointer;
    transition: all var(--transition-base);
}
.card-clickable:hover {
    border-color: var(--color-border-dark);
    box-shadow: var(--shadow-md);
}
.card-clickable:active {
    transform: scale(0.99);
}

/* Stat card */
.stat-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-card-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-top: var(--space-3);
}
.stat-card-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-1);
}

/* ============================================================
   8. Form Inputs
   ============================================================ */
.form-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-label-required::after {
    content: ' *';
    color: var(--color-error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 40px;
    padding: 0 var(--space-3);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    transition: all var(--transition-base);
}

.form-input:hover:not(:disabled):not(:focus),
.form-select:hover:not(:disabled):not(:focus),
.form-textarea:hover:not(:disabled):not(:focus) {
    border-color: var(--color-border-dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-ring);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-placeholder);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background: var(--color-gray-50);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.form-textarea {
    height: auto;
    min-height: 100px;
    padding: var(--space-3);
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Input sizes */
.form-input-sm,
.form-select-sm { height: 34px; font-size: var(--text-xs); }
.form-input-lg,
.form-select-lg { height: 46px; font-size: var(--text-md); }

/* Input states */
.form-input-error,
.form-select-error,
.form-textarea-error {
    border-color: var(--color-error);
}
.form-input-error:focus,
.form-select-error:focus,
.form-textarea-error:focus {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input-success,
.form-select-success {
    border-color: var(--color-success);
}
.form-input-success:focus,
.form-select-success:focus {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Helper text */
.form-helper {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}
.form-error {
    font-size: var(--text-xs);
    color: var(--color-error-text);
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Input group */
.input-group {
    display: flex;
}
.input-group .form-input {
    border-radius: 0;
}
.input-group .form-input:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.input-group .form-input:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.input-group .btn {
    border-radius: 0;
}
.input-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Global focus override */
input:focus:not([class]),
input.border:focus,
select:focus:not([class]),
textarea:focus:not([class]) {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-ring) !important;
}

/* ============================================================
   9. Data Tables
   ============================================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table thead th {
    padding: var(--space-3) var(--space-4);
    background: var(--color-gray-50);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: left;
    white-space: nowrap;
}

.table tbody td {
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover td {
    background: var(--color-gray-50);
}

/* Sortable headers */
.table th.sortable {
    cursor: pointer;
    user-select: none;
}
.table th.sortable:hover {
    background: var(--color-gray-100);
}
.table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--color-gray-400);
    opacity: 0.5;
}
.table th.sorted-asc::after {
    border-top: none;
    border-bottom: 4px solid var(--color-primary);
    opacity: 1;
}
.table th.sorted-desc::after {
    border-top: 4px solid var(--color-primary);
    opacity: 1;
}

/* Table striped */
.table-striped tbody tr:nth-child(even) td {
    background: var(--color-gray-50);
}

/* Table bordered */
.table-bordered td,
.table-bordered th {
    border: 1px solid var(--color-border);
}

/* Compact table */
.table-compact th,
.table-compact td {
    padding: var(--space-2) var(--space-3);
}

/* ============================================================
   10. Status Badges
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    line-height: 1.4;
}

/* Badge variants */
.badge-success,
.badge-active,
.badge-approved,
.badge-delivered,
.badge-completed,
.badge-paid {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.badge-warning,
.badge-pending,
.badge-under_review {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.badge-error,
.badge-danger,
.badge-rejected,
.badge-cancelled,
.badge-failed {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}

.badge-info,
.badge-processing,
.badge-shipped {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.badge-neutral,
.badge-draft,
.badge-inactive {
    background: var(--color-gray-100);
    color: var(--color-text-muted);
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-brand {
    background: var(--color-brand-light);
    color: var(--color-brand);
}

/* Badge with dot */
.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Pill badge */
.badge-pill {
    border-radius: var(--radius-full);
    padding: 2px 8px;
}

/* ============================================================
   11. Page Header
   ============================================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.page-header-content {}

.page-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: 1.3;
    margin: 0;
}

.page-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* ============================================================
   12. Loading & Animations
   ============================================================ */

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spinner-rotate 0.6s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* Pulse dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse-animation 2s infinite;
}
@keyframes pulse-animation {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Toast animations */
@keyframes toast-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}
.toast-enter { animation: toast-slide-in 0.25s ease forwards; }
.toast-exit  { animation: toast-slide-out 0.25s ease forwards; }

/* Fade in up */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fade-in-up 0.3s ease forwards;
}

/* ============================================================
   13. Micro-interactions
   ============================================================ */

/* Hover lift */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hover scale */
.hover-scale {
    transition: transform var(--transition-base);
}
.hover-scale:hover {
    transform: scale(1.02);
}

/* Click shrink */
.click-shrink:active {
    transform: scale(0.98);
}

/* Focus ring */
.focus-ring:focus-visible {
    outline: none;
    box-shadow: var(--shadow-ring);
}

/* ============================================================
   14. Store-specific — Amazon Product Components
   ============================================================ */

/* Amazon Search Bar */
.amazon-search {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    max-width: 850px;
}
.amazon-search-category {
    background: #E6E6E6;
    border: none;
    padding: 0 12px;
    height: 40px;
    font-size: 13px;
    color: #555555;
    cursor: pointer;
    border-right: 1px solid #CDCDCD;
    min-width: 60px;
}
.amazon-search-category:focus {
    outline: none;
    background: #D6D6D6;
}
.amazon-search-input {
    flex: 1;
    border: none;
    padding: 0 12px;
    height: 40px;
    font-size: 15px;
    color: #0F1111;
    background: transparent;
}
.amazon-search-input:focus {
    outline: none;
}
.amazon-search-input::placeholder {
    color: #9CA3AF;
}
.amazon-search-btn {
    background: #232F3E;
    border: none;
    width: 45px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.amazon-search-btn:hover {
    background: #37475A;
}
.amazon-search-btn svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
}

/* Amazon Product Card */
.amazon-product-card {
    background: #ffffff;
    border: 1px solid #EBEBEB;
    border-radius: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}
.amazon-product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.amazon-product-card:hover .amazon-product-title {
    color: #C7511F;
}
.amazon-product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #ffffff;
    margin-bottom: 8px;
}
.amazon-product-title {
    font-size: 13px;
    line-height: 19px;
    color: #0F1111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    transition: color 0.15s;
}
.amazon-product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}
.amazon-stars {
    color: #FF5000;
    font-size: 14px;
    letter-spacing: -1px;
}
.amazon-rating-count {
    font-size: 12px;
    color: #007185;
}
.amazon-product-price {
    font-size: 19px;
    font-weight: 400;
    color: #0F1111;
    margin-top: 4px;
}
.amazon-product-price .currency {
    font-size: 13px;
    vertical-align: top;
}
.amazon-product-price .fraction {
    font-size: 13px;
}
.amazon-original-price {
    font-size: 12px;
    color: #565959;
    text-decoration: line-through;
    margin-left: 6px;
}
.amazon-prime-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
}
.amazon-prime-logo {
    background: linear-gradient(to right, #00A8E1, #007185);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 14px;
}
.amazon-delivery {
    font-size: 12px;
    color: #565959;
    margin-top: 4px;
}
.amazon-delivery strong {
    color: #0F1111;
}
.amazon-deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #CC0C39;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
}
.amazon-sponsored {
    font-size: 11px;
    color: #565959;
    margin-top: 8px;
}

/* Amazon Deal Card */
.amazon-deal-card {
    background: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.amazon-deal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.amazon-deal-badge {
    background: #CC0C39;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 2px;
}
.amazon-deal-title {
    font-size: 21px;
    font-weight: 700;
    color: #0F1111;
}
.amazon-deal-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.amazon-countdown {
    display: flex;
    gap: 4px;
}
.amazon-countdown-box {
    background: #232F3E;
    color: #ffffff;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    min-width: 28px;
    text-align: center;
}
.amazon-progress-bar {
    width: 100%;
    height: 20px;
    background: #E6E6E6;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.amazon-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5000, #FF7840);
    border-radius: 12px;
}
.amazon-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: #0F1111;
    white-space: nowrap;
}

/* Amazon Section Card */
.amazon-section {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
}
.amazon-section-title {
    font-size: 21px;
    font-weight: 700;
    color: #0F1111;
    margin-bottom: 16px;
}
.amazon-see-more {
    font-size: 14px;
    color: #007185;
    cursor: pointer;
}
.amazon-see-more:hover {
    color: #C7511F;
    text-decoration: underline;
}

/* Amazon Category Card */
.amazon-category-card {
    background: #ffffff;
    padding: 20px;
}
.amazon-category-title {
    font-size: 17px;
    font-weight: 700;
    color: #0F1111;
    margin-bottom: 16px;
}
.amazon-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.amazon-category-item {
    text-align: center;
}
.amazon-category-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
}
.amazon-category-item span {
    font-size: 12px;
    color: #0F1111;
}

/* Amazon Hero Banner */
.amazon-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
}
.amazon-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}
.amazon-hero-content {
    position: absolute;
    bottom: 20%;
    left: 5%;
    max-width: 400px;
}
.amazon-hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #0F1111;
    margin-bottom: 8px;
}
.amazon-hero-subtitle {
    font-size: 14px;
    color: #565959;
    margin-bottom: 16px;
}

/* Amazon Add to Cart Button */
.amazon-add-to-cart {
    width: 100%;
    padding: 8px 16px;
    background: #FF5000;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}
.amazon-add-to-cart:hover {
    background: #CC3300;
}

/* Amazon Buy Now Button */
.amazon-buy-now {
    width: 100%;
    padding: 8px 16px;
    background: #CC3300;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}
.amazon-buy-now:hover {
    background: #AA2200;
}

/* Amazon Wishlist Button */
.amazon-wishlist {
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(to bottom, #F7F8F8, #E7E9EC);
    border: 1px solid #ADB1B8;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #0F1111;
    cursor: pointer;
    transition: all 0.2s;
}
.amazon-wishlist:hover {
    background: linear-gradient(to bottom, #E7E9EC, #D8D9DA);
}

/* Amazon Prime Check */
.amazon-prime-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #F5F5F5;
    border-radius: 8px;
    margin: 12px 0;
}
.amazon-prime-icon {
    width: 50px;
    height: 30px;
}
.amazon-prime-text {
    font-size: 13px;
    color: #565959;
}
.amazon-prime-text strong {
    color: #0F1111;
}

/* Amazon Cart Sidebar */
.amazon-cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
}
.amazon-cart-sidebar.open {
    right: 0;
}
.amazon-cart-header {
    padding: 16px;
    background: #232F3E;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.amazon-cart-items {
    padding: 16px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.amazon-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #EBEBEB;
}
.amazon-cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}
.amazon-cart-item-info {
    flex: 1;
}
.amazon-cart-item-title {
    font-size: 13px;
    color: #0F1111;
    line-height: 18px;
}
.amazon-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #0F1111;
    margin-top: 4px;
}
.amazon-cart-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #EBEBEB;
}
.amazon-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: #0F1111;
    margin-bottom: 12px;
}

/* Amazon Tooltip */
.amazon-tooltip {
    position: relative;
}
.amazon-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #131921;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
}
.amazon-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Amazon Nav Dropdown */
.amazon-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #DDDDDD;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 250px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}
.amazon-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.amazon-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #EBEBEB;
}
.amazon-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #0F1111;
    text-decoration: none;
    transition: background 0.15s;
}
.amazon-dropdown-item:hover {
    background: #F5F5F5;
}
.amazon-dropdown-item svg {
    width: 18px;
    height: 18px;
    color: #565959;
}

/* Amazon Filter Sidebar */
.amazon-filter-section {
    padding: 12px 0;
    border-bottom: 1px solid #EBEBEB;
}
.amazon-filter-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F1111;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.amazon-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
}
.amazon-filter-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #ADB1B8;
    border-radius: 2px;
}
.amazon-filter-checkbox:checked {
    background: #FF5000;
    border-color: #FF5000;
}
.amazon-filter-label {
    font-size: 13px;
    color: #0F1111;
}

/* Amazon Breadcrumb */
.amazon-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
    font-size: 13px;
    overflow-x: auto;
}
.amazon-breadcrumb a {
    color: #007185;
    text-decoration: none;
    white-space: nowrap;
}
.amazon-breadcrumb a:hover {
    text-decoration: underline;
}
.amazon-breadcrumb span {
    color: #565959;
}
.amazon-breadcrumb .separator {
    color: #565959;
}

/* Amazon Review Stars */
.amazon-review-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}
.amazon-star {
    color: #FF5000;
    font-size: 16px;
}
.amazon-star.empty {
    color: #E0E0E0;
}
.amazon-review-link {
    font-size: 13px;
    color: #007185;
    margin-left: 4px;
}
.amazon-review-link:hover {
    color: #C7511F;
    text-decoration: underline;
}

/* Search Bar */
.store-search {
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    background: var(--color-white);
    transition: box-shadow var(--transition-base);
}
.store-search:focus-within {
    box-shadow: var(--shadow-ring);
}
.store-search-btn {
    background: var(--color-primary);
    border: none;
    color: white;
    padding: 0 var(--space-5);
    height: 42px;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: background var(--transition-base);
}
.store-search-btn:hover { background: var(--color-primary-hover); }

/* Product card */
.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    text-decoration: none;
    display: block;
}
.product-card:hover {
    border-color: var(--color-border-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Price */
.price-main { color: #B12704; font-weight: var(--font-bold); }
.price-original { 
    color: var(--color-text-placeholder); 
    text-decoration: line-through; 
    font-size: var(--text-xs); 
}

/* Discount badge */
.discount-badge {
    display: inline-block;
    background: var(--color-brand);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

/* Trust badge */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--color-success-text);
    background: var(--color-success-bg);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

/* Star rating */
.star-filled { color: #FF5000; }
.star-empty  { color: var(--color-gray-200); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-5);
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    background: var(--color-gray-100);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}
.empty-state-title {
    font-size: var(--text-md);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}
.empty-state-text {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-4) 0;
}

/* Avatar */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
    color: var(--color-text-inverse);
    background: linear-gradient(135deg, #232F3E, #37475A);
    flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: var(--text-xs); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--text-md); }
.avatar-xl { width: 64px; height: 64px; font-size: var(--text-lg); }

/* Quick actions grid */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-2);
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
}
.quick-action:hover {
    background: var(--color-gray-50);
    transform: translateY(-2px);
}
.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-2);
}
.quick-action-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    text-align: center;
}

/* ============================================================
   15. Enhanced Micro-interactions & Polish
   ============================================================ */

/* Smooth page transitions */
.page-transition {
    animation: pageEnter 0.35s ease-out forwards;
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card entrance animation */
.card-enter {
    animation: cardEnter 0.4s ease-out forwards;
}
@keyframes cardEnter {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Staggered list animations */
.stagger-enter > * {
    opacity: 0;
    transform: translateY(10px);
    animation: staggerItem 0.3s ease-out forwards;
}
.stagger-enter > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-enter > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-enter > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-enter > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-enter > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-enter > *:nth-child(6) { animation-delay: 0.3s; }
@keyframes staggerItem {
    to { opacity: 1; transform: translateY(0); }
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-dark {
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Improved modal backdrop */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

/* Enhanced dropdown shadows */
.dropdown-shadow {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Smooth number counter */
.number-counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease-out;
}

/* Progress bar animation */
.progress-bar {
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar-fill {
    background: linear-gradient(90deg, var(--color-primary), var(--color-brand));
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification dot pulse */
.notification-dot {
    position: relative;
}
.notification-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Enhanced focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Smooth image loading */
.img-loading {
    background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

/* Better link underline animation */
.link-underline {
    position: relative;
    text-decoration: none;
}
.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.25s ease;
}
.link-underline:hover::after {
    width: 100%;
}

/* Tooltip base */
.tooltip {
    position: relative;
}
.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    padding: 6px 12px;
    background: var(--color-gray-900);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Status indicator with animation */
.status-online {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    display: inline-block;
    animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Gradient border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-brand));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Floating label input */
.floating-label {
    position: relative;
}
.floating-label input,
.floating-label textarea {
    padding-top: 24px;
}
.floating-label label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: var(--text-sm);
    color: var(--color-text-placeholder);
    transition: all 0.2s ease;
    pointer-events: none;
}
.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: 8px;
    transform: translateY(0);
    font-size: var(--text-xs);
    color: var(--color-primary);
}

/* Responsive text utilities */
@media (max-width: 640px) {
    .text-responsive-lg { font-size: var(--text-lg); }
    .text-responsive-xl { font-size: var(--text-xl); }
    .text-responsive-2xl { font-size: var(--text-xl); }
}
@media (min-width: 641px) {
    .text-responsive-lg { font-size: var(--text-xl); }
    .text-responsive-xl { font-size: var(--text-2xl); }
    .text-responsive-2xl { font-size: var(--text-3xl); }
}

/* Print styles */
@media print {
    .no-print { display: none !important; }
    .sidebar-link, nav, footer, .back-to-top { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   16. White Text on White BG Fixes
   ============================================================ */

/* Global fix: Ensure all body content has dark text */
body {
    color: #0F1111;
}

/* Main content areas - always dark text */
main, main *, .main-content, .main-content *,
.card, .card *,
.bg-white, .bg-white *,
.bg-slate-50, .bg-slate-50 *,
.bg-gray-50, .bg-gray-50 *,
.bg-gray-100, .bg-gray-100 *,
.bg-white\/80, .bg-white\/80 * {
    color: inherit;
}

/* Reset headings and important text to dark on light backgrounds */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.bg-slate-50 h1, .bg-slate-50 h2, .bg-slate-50 h3, .bg-slate-50 h4, .bg-slate-50 h5, .bg-slate-50 h6,
.bg-gray-50 h1, .bg-gray-50 h2, .bg-gray-50 h3, .bg-gray-50 h4, .bg-gray-50 h5, .bg-gray-50 h6,
.bg-gray-100 h1, .bg-gray-100 h2, .bg-gray-100 h3, .bg-gray-100 h4, .bg-gray-100 h5, .bg-gray-100 h6,
main h1, main h2, main h3, main h4, main h5, main h6 {
    color: #0F1111 !important;
}

/* Body text on light backgrounds */
.card p, .card li, .card td, .card th,
.bg-white p, .bg-white li, .bg-white td, .bg-white th,
.bg-slate-50 p, .bg-slate-50 li, .bg-slate-50 td, .bg-slate-50 th,
.bg-gray-50 p, .bg-gray-50 li, .bg-gray-50 td, .bg-gray-50 th,
.bg-gray-100 p, .bg-gray-100 li, .bg-gray-100 td, .bg-gray-100 th,
main p, main li, main td, main th {
    color: #565959;
}

/* Links on light backgrounds */
.card a, .bg-white a, .bg-slate-50 a, .bg-gray-50 a, .bg-gray-100 a, main a {
    color: #007185;
}

.card a:hover, .bg-white a:hover, .bg-slate-50 a:hover, .bg-gray-50 a:hover, .bg-gray-100 a:hover, main a:hover {
    color: #C7511F;
}

/* Ensure dark text on light backgrounds */
.card, .card-body, .card-header, .card-footer {
    color: #0F1111;
}

.card-title {
    color: #0F1111 !important;
}

.card p, .card span, .card li, .card td, .card th {
    color: #565959;
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #0F1111;
}

/* Form elements on light backgrounds */
.form-label {
    color: #565959;
}

.form-input, .form-select, .form-textarea {
    color: #0F1111;
    background: #ffffff;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #9CA3AF;
}

/* Table text colors */
.table {
    color: #0F1111;
}

.table thead th {
    color: #565959 !important;
}

.table tbody td {
    color: #565959 !important;
}

/* Stat cards */
.stat-card {
    color: #0F1111;
}

.stat-card-value {
    color: #0F1111 !important;
}

.stat-card-label {
    color: #565959 !important;
}

/* Empty states */
.empty-state {
    color: #0F1111;
}

.empty-state-title {
    color: #0F1111 !important;
}

.empty-state-text {
    color: #565959 !important;
}

/* Page headers on light backgrounds */
.page-title {
    color: #0F1111 !important;
}

.page-subtitle {
    color: #565959 !important;
}

/* Modal content */
.modal-content, .modal-body {
    color: #0F1111;
    background: #ffffff;
}

/* Dropdown menus */
.dropdown-menu, .dropdown-content {
    color: #0F1111;
    background: #ffffff;
}

.dropdown-menu a, .dropdown-content a {
    color: #0F1111;
}

.dropdown-menu a:hover, .dropdown-content a:hover {
    color: #007185;
    background: #F3F4F6;
}

/* Badge text - ensure readable */
.badge {
    color: #0F1111;
}

.badge-success { color: #065F46; }
.badge-warning { color: #92400E; }
.badge-error { color: #991B1B; }
.badge-info { color: #1E40AF; }
.badge-neutral { color: #475569; }
.badge-primary { color: #B36B00; }

/* Quick action labels */
.quick-action-label {
    color: #565959 !important;
}

/* Fix specific Tailwind overrides */
.bg-white, .bg-slate-50, .bg-gray-50, .bg-gray-100 {
    color: #0F1111;
}

.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.bg-slate-50 h1, .bg-slate-50 h2, .bg-slate-50 h3, .bg-slate-50 h4, .bg-slate-50 h5, .bg-slate-50 h6,
.bg-gray-50 h1, .bg-gray-50 h2, .bg-gray-50 h3, .bg-gray-50 h4, .bg-gray-50 h5, .bg-gray-50 h6,
.bg-gray-100 h1, .bg-gray-100 h2, .bg-gray-100 h3, .bg-gray-100 h4, .bg-gray-100 h5, .bg-gray-100 h6 {
    color: #0F1111 !important;
}

.bg-white p, .bg-white span:not(.badge), .bg-white div,
.bg-slate-50 p, .bg-slate-50 span:not(.badge), .bg-slate-50 div,
.bg-gray-50 p, .bg-gray-50 span:not(.badge), .bg-gray-50 div,
.bg-gray-100 p, .bg-gray-100 span:not(.badge), .bg-gray-100 div {
    color: #565959;
}

/* Preserve white text on dark backgrounds */
.bg-\[\#131921\], .bg-\[\#232F3E\], .bg-\[\#37475A\] {
    color: #ffffff;
}

.bg-\[\#131921\] p, .bg-\[\#131921\] span, .bg-\[\#131921\] div,
.bg-\[\#232F3E\] p, .bg-\[\#232F3E\] span, .bg-\[\#232F3E\] div,
.bg-\[\#37475A\] p, .bg-\[\#37475A\] span, .bg-\[\#37475A\] div {
    color: #ffffff;
}

/* Sidebar always has light text */
aside, aside *, .sidebar, .sidebar *,
#sidebar, #sidebar *, #mobile-sidebar, #mobile-sidebar * {
    color: inherit;
}

.sidebar-link {
    color: #8B95A1 !important;
}

.sidebar-link:hover {
    color: #E2E8F0 !important;
}

.sidebar-link.active {
    color: #FF5000 !important;
}

/* Buttons with white text on colored backgrounds should keep white text */
.btn-primary, .btn-danger, .btn-success,
button.bg-\[\#FF5000\], button.bg-\[\#CC3300\],
button.bg-red-500, button.bg-red-600, button.bg-red-700,
button.bg-green-500, button.bg-green-600, button.bg-green-700,
button.bg-blue-500, button.bg-blue-600, button.bg-blue-700,
button.bg-indigo-500, button.bg-indigo-600, button.bg-indigo-700,
button.bg-purple-500, button.bg-purple-600, button.bg-purple-700,
button.bg-orange-500, button.bg-orange-600, button.bg-orange-700,
button.bg-amber-500, button.bg-amber-600, button.bg-amber-700,
a.bg-red-500, a.bg-red-600, a.bg-red-700,
a.bg-green-500, a.bg-green-600, a.bg-green-700,
a.bg-blue-500, a.bg-blue-600, a.bg-blue-700,
a.bg-indigo-500, a.bg-indigo-600, a.bg-indigo-700,
a.bg-purple-500, a.bg-purple-600, a.bg-purple-700,
a.bg-orange-500, a.bg-orange-600, a.bg-orange-700,
a.bg-amber-500, a.bg-amber-600, a.bg-amber-700 {
    color: #ffffff !important;
}

/* Gradient backgrounds with white text */
.bg-gradient-to-br, .bg-gradient-to-r, .bg-gradient-to-l,
.bg-gradient-to-t, .bg-gradient-to-b,
.bg-gradient-to-br *, .bg-gradient-to-r *, .bg-gradient-to-l *,
.bg-gradient-to-t *, .bg-gradient-to-b * {
    color: inherit;
}

/* Footer dark section */
footer.bg-\[\#232F3E\], footer.bg-\[\#232F3E\] * {
    color: inherit;
}

footer.bg-\[\#232F3E\] h1, footer.bg-\[\#232F3E\] h2, 
footer.bg-\[\#232F3E\] h3, footer.bg-\[\#232F3E\] h4,
footer.bg-\[\#232F3E\] h5, footer.bg-\[\#232F3E\] h6 {
    color: #ffffff !important;
}

footer.bg-\[\#232F3E\] p, footer.bg-\[\#232F3E\] li {
    color: #CCCCCC;
}

footer.bg-\[\#232F3E\] a {
    color: #CCCCCC;
}

footer.bg-\[\#232F3E\] a:hover {
    color: #FF5000;
}

/* ============================================================
   17. Amazon Design System — Global Consistency Layer
   Ensures every component, regardless of which Tailwind
   utility it uses, conforms to the Amazon visual language.
   ============================================================ */

/* ── Page background ── */
body {
    background-color: #F5F5F5;
    color: #0F1111;
}

/* ── Section / page wrapper cards ── */
.page-section {
    background: #fff;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 5px 0 rgba(213,217,217,0.5);
}

/* ── Amazon-style divider ── */
.amazon-divider {
    border: none;
    border-top: 1px solid #EBEBEB;
    margin: 16px 0;
}

/* ── Data table Amazon consistency ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table thead th {
    background: #F5F5F5;
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #565959;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #EBEBEB;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #F0F0F0;
    color: #0F1111;
    vertical-align: middle;
}
.data-table tbody tr:hover {
    background: #F9F9F9;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Amazon KPI card (dashboard stat boxes) ── */
.amazon-kpi {
    background: #fff;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.15s;
}
.amazon-kpi:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.amazon-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.amazon-kpi-icon.orange  { background: #FFF8E6; color: #B36B00; }
.amazon-kpi-icon.teal    { background: #E6F7FA; color: #007185; }
.amazon-kpi-icon.green   { background: #E6F7F3; color: #067D62; }
.amazon-kpi-icon.red     { background: #FEF2F2; color: #CC0C39; }
.amazon-kpi-icon.navy    { background: rgba(35,47,62,0.1); color: #232F3E; }
.amazon-kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #0F1111;
    line-height: 1.2;
}
.amazon-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #565959;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}
.amazon-kpi-change {
    font-size: 12px;
    margin-top: 6px;
}
.amazon-kpi-change.up   { color: #067D62; }
.amazon-kpi-change.down { color: #CC0C39; }

/* ── Amazon-style empty state ── */
.amazon-empty {
    text-align: center;
    padding: 48px 24px;
    color: #565959;
}
.amazon-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ADB1B8;
}
.amazon-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0F1111;
    margin-bottom: 8px;
}

/* ── Amazon search bar ── */
.amazon-search {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.amazon-search:focus-within {
    border-color: #FF5000;
    box-shadow: 0 0 0 3px rgba(255, 80, 0, 0.15);
}
.amazon-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    color: #0F1111;
    background: transparent;
}
.amazon-search-btn {
    padding: 10px 16px;
    background: #FF5000;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.amazon-search-btn:hover { background: #CC3300; }

/* ── Pagination ── */
.amazon-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    margin-top: 16px;
}
.amazon-page-btn {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #D5D9D9;
    border-radius: 4px;
    font-size: 13px;
    color: #007185;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.amazon-page-btn:hover {
    background: #FFF1EB;
    border-color: #FF5000;
    color: #0F1111;
}
.amazon-page-btn.active {
    background: #FF5000;
    border-color: #CC3300;
    color: #ffffff;
    font-weight: 700;
    pointer-events: none;
}
.amazon-page-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Filter pills / tag chips ── */
.amazon-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #FFF1EB;
    border: 1px solid #FFBBA0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #CC3300;
}
.amazon-chip.teal {
    background: #E6F7FA;
    border-color: #B3E7EF;
    color: #005D6A;
}
.amazon-chip.green {
    background: #E6F7F3;
    border-color: #CDEFEA;
    color: #055D4B;
}
.amazon-chip.red {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B71C2C;
}
