/* ================================================================
   style.css  —  combined stylesheet
   1. CSS Variables, Reset & Base Layout  (frontend.css)
   2. Product List & Commission Blocks    (frontend.css)
   3. Component Styles                    (components.css)
   ================================================================ */
:root {
    /* Primary Colors */
    --primary: #ff6b35;
    --primary-dark: #f7931e;
    --primary-light: #ff8c42;
    --primary-gradient: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    
    /* Secondary Colors */
    --secondary: #667eea;
    --secondary-dark: #764ba2;
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Background */
    --bg-primary: linear-gradient(135deg, #fff5f0 0%, #ffe8d9 100%);
    --bg-card: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}
/* ==================== BASE RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
/* ==================== LAYOUT SYSTEM ==================== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-xl);
}
/* ==================== NAVIGATION SYSTEM ==================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-gradient);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}
.nav-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.back-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}
.nav-title {
    color: white;
    font-size: var(--font-size-lg);
    font-weight: 700;
}
.nav-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-sm);
    font-weight: 500;
}
/* ==================== HEADER SYSTEM ==================== */
.header {
    background: var(--primary-gradient);
    color: white;
    padding: var(--space-xl) var(--space-lg) calc(var(--space-xl) + 0.5rem);
    position: relative;
    overflow: hidden;
}
.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
.header-content {
    position: relative;
    z-index: 1;
}
.greeting {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.date-info {
    font-size: var(--font-size-sm);
    opacity: 0.95;
    font-weight: 500;
}
/* ==================== CARD SYSTEM ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
/* Card Variants */
.card-primary {
    background: var(--primary-gradient);
    color: white;
}
.card-secondary {
    background: var(--secondary-gradient);
    color: white;
}
.card-gradient {
    position: relative;
    overflow: hidden;
}
.card-gradient::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
/* ==================== GRID SYSTEM ==================== */
.grid {
    display: grid;
    gap: var(--space-md);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(150px, 2fr)); }
@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
/* ==================== STAT CARD SYSTEM ==================== */
.stat-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border-left: 4px solid transparent;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card.primary { border-left-color: var(--primary); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: var(--space-sm);
}
.stat-label {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    font-weight: 500;
}
/* ==================== BUTTON SYSTEM ==================== */
.btn {
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    text-decoration: none;
    font-family: inherit;
}
.main-btn {padding: 7px;}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}
/* Button Variants */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}
.btn-secondary {
    background: white;
    color: var(--primary);
}
.btn-secondary:hover:not(:disabled) {
    background: #fff5f0;
}
.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
}
.btn-danger {
    background: white;
    color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
    background: var(--danger-light);
}
/* Button Sizes */
.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
}
.btn-lg {
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--font-size-lg);
}
/* Icon Button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}
/* ==================== FORM SYSTEM ==================== */
.form-group {
    margin-bottom: var(--space-lg);
}
.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-input,
.form-select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: var(--transition-base);
    background: white;
}
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.form-input:disabled {
    background: var(--gray-50);
    color: var(--gray-400);
    cursor: not-allowed;
}
.input-wrapper {
    position: relative;
}
.input-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--gray-400);
    pointer-events: none;
}
.input-wrapper .form-input {
    padding-left: calc(var(--space-md) * 3);
}
.form-hint {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-top: var(--space-xs);
}
/* ==================== BADGE & STATUS SYSTEM ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success {
    background: var(--success-light);
    color: #065f46;
}
.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}
.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}
.badge-info {
    background: #dbeafe;
    color: #1e40af;
}
/* Status Badge (larger variant) */
.status-badge {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
}
/* ==================== ALERT SYSTEM ==================== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 2px solid #dcfce7;
}
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid var(--danger-light);
}
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 2px solid var(--warning-light);
}
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 2px solid #dbeafe;
}
.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}
/* ==================== MODAL SYSTEM ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}
.modal {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}
.modal-header {
    padding: var(--space-lg);
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    z-index: 1;
}
.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.modal-close {
    background: var(--danger-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--danger);
    font-size: 1.25rem;
    font-weight: 700;
}
.modal-close:hover {
    background: #fecaca;
    transform: rotate(90deg);
}
.modal-body {
    padding: var(--space-lg);
}
.modal-footer {
    padding: var(--space-lg);
    border-top: 2px solid var(--gray-100);
    display: flex;
    gap: var(--space-md);
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}
/* ==================== PROGRESS SYSTEM ==================== */
.progress-bar-container {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}
/* ==================== LIST SYSTEM ==================== */
.list {
    display: flex;
    gap: var(--space-md);margin-bottom: 10px;
}
.list-item {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 2px solid transparent;
}
.list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gray-200);
}
/* ==================== TABLE SYSTEM ==================== */
.table-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-shadow: var(--shadow-md);
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    background: var(--gray-100);
    padding: var(--space-md);
    text-align: left;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}
.table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-100);
}
.table tr:hover {
    background: var(--gray-50);
}
.table tr:last-child td {
    border-bottom: none;
}
/* ==================== UTILITY CLASSES ==================== */
/* Spacing */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.p-0 { padding: 0; }
.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }
/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gray { color: var(--gray-500); }
/* Display */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }
.gap-4 { gap: var(--space-xl); }
/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }
/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideDown { animation: slideDown 0.3s ease; }
.animate-slideUp { animation: slideUp 0.3s ease; }
.animate-scaleIn { animation: scaleIn 0.3s ease; }
.animate-pulse { animation: pulse 2s infinite; }
/* ==================== RESPONSIVE UTILITIES ==================== */
@media (max-width: 768px) {
    :root {
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.375rem;
    }
    
    .hide-mobile { display: none; }
}
@media (min-width: 769px) {
    .hide-desktop { display: none; }
}
/* ==================== PRINT STYLES ==================== */
@media print {
    .no-print {
        display: none !important;
    }
}
/* Add Shop Form Modal - Centered */
.add-shop-form {
   position: fixed;
    bottom: 100px;
    right: 20px;
    background: white;
    padding: 24px;
    border-radius: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    display: none;
}
/* Show modal when active */
.add-shop-form.active {
    display: block;
}
/* Overlay */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}
.sheet-overlay.active {
    display: block;
}
.form-group:has(#shopLat),
.form-group:has(#shopLng) {
    display: none;
}
/* Form Header */
.add-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}
.add-form-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}
.add-form-title span:first-child {
    font-size: 24px;
}
.close-btn {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.close-btn:hover {
    background: #e5e7eb;
    color: var#ff6b35(--primary);
}
/* Form Elements */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.input-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}
/* Save Button */
.save-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}
.save-btn:active {
    transform: translateY(0);
}
/* Mobile Responsive */
@media (max-width: 640px) {
    .add-shop-form {
        width: 95%;
        max-height: 90vh;
        padding: 20px;
    }
    
    .add-form-title {
        font-size: 18px;
    }
}
/* ==================== PRODUCT LIST & COMMISSION ==================== */
/* ── Product list ── */
.product-list {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: .875rem 1rem;
    margin-top: 7px;
}
.product-top {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-bottom: .625rem;
}
.product-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.icon-chili  { background: #FAECE7; }
.icon-bean   { background: #EAF3DE; }
.icon-coffee { background: #FAEEDA; }
.icon-tea    { background: #E1F5EE; }
.icon-salt   { background: #F1EFE8; }
.icon-box    { background: #E6F1FB; }
.product-info { flex: 1; min-width: 0; }
.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-subtext {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}
/* Status badges */
.product-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}
.badge-done     { background: #d1fae5; color: #065f46; }
.badge-progress { background: #fef3c7; color: #92400e; }
.badge-behind   { background: #fee2e2; color: #991b1b; }
/* Progress bar */
.progress-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .625rem;
}
.progress-track {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s ease;
}
.fill-done { background: #10b981; }
.fill-mid  { background: #f59e0b; }
.fill-low  { background: #ef4444; }
.progress-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 34px;
    text-align: right;
}
/* Footer pills */
.product-footer {
    display: flex;
    gap: .5rem;
}
.stat-pill {
    flex: 1;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: .375rem .5rem;
    text-align: center;
}
.stat-pill-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}
.stat-pill-val.earned { color: var(--success-dark); }
.stat-pill-val.muted  { color: var(--gray-400); }
.stat-pill-lbl {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 1px;
}
/* ── Commission breakdown ── */
.commission-card {
    background: var(--bg-card);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.commission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}
.comm-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.comm-name   { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.comm-detail { font-size: 11px; color: var(--gray-500); }
.comm-amount { font-size: 15px; font-weight: 700; color: var(--success-dark); }
.commission-total-row {
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-top: 1px solid var(--gray-200);
}
.total-lbl { font-size: 13px; font-weight: 600; color: var(--gray-600); }
.total-amt  { font-size: 16px; font-weight: 700; color: var(--gray-900); }
/* ==================== MAP, GPS & UI COMPONENTS ==================== */
#map {
    height: 100vh;
    width: 100%;
}
.gps-indicator {
    position: absolute;
    top: 160px;
    left: 20px;
    background: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--success);
}
.gps-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: pulse 1s infinite;
}
.gps-indicator.gps-active .gps-dot {
    background: var(--success);
}
.gps-indicator.gps-inactive .gps-dot {
    background: var(--danger);
}
/* FAB Buttons */
.fab-container {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
}
.fab-primary {
    background: var(--primary-gradient);
    color: white;
}
.fab-secondary {
    background: white;
    color: var(--primary);
}
.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.fab:active {
    transform: scale(0.95);
}
/* ==================== BOTTOM SHEET ==================== */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}
.bottom-sheet.active {
    transform: translateY(0);
}
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sheet-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    margin: var(--space-md) auto;
}
.sheet-content {
    padding: 0 var(--space-lg) var(--space-xl);
}
.shop-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}
.shop-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fff5f0, #ffe8d9);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.shop-info h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}
.shop-info p {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}
/* Quick Actions in Bottom Sheet */
.quick-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}
.quick-btn {
    flex: 1;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: white;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
}
.quick-btn:hover {
    border-color: var(--primary);
    background: #fff5f0;
}
.quick-btn.active {
    border-color: var(--primary);
    background: var(--primary-gradient);
    color: white;
}
.quick-btn .icon {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}
.quick-btn .label {
    font-size: var(--font-size-sm);
    font-weight: 600;
}
.sale-form,
.no-sale-form {
    display: none;
}
.sale-form.active,
.no-sale-form.active {
    display: block;
}
/* Sale Cards in Form */
.sale-cards {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}
.sale-card {
    flex: 1;
    min-width: 100px;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    text-align: center;
}
.sale-card div:first-child {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    margin-bottom: var(--space-xs);
}
.sale-card div:last-child {
    font-size: var(--font-size-lg);
    font-weight: 700;
}
/* ==================== DASHBOARD COMPONENTS ==================== */
.earnings-card {
    background: var(--primary-gradient);
    margin: -20px 20px 20px;
    padding: var(--space-lg);
    border-radius: var(--radius-2xl);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}
.earnings-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
.earnings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    position: relative;
    z-index: 1;
}
.earning-item h4 {
    font-size: var(--font-size-sm);
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.earning-item .amount {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1;
}
.earning-item .subtext {
    font-size: var(--font-size-xs);
    opacity: 0.85;
    margin-top: var(--space-xs);
}
/* ── PROGRESS CARD ── */
.progress-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 5px;
}
.ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.ring-wrap svg {
  transform: rotate(-90deg);
  width: 80px;
  height: 80px;
}
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}
.ring-fill.achieved { stroke: url(#ringGradGreen); }
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-pct {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.ring-sub {
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.5px;
  margin-top: 1px;
}
.progress-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.meta-key {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.meta-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
}
.meta-val.success { color: var(--success); }
.meta-val.warn { color: var(--warning); }
.target-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  align-self: flex-start;
}
/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.product-header {
    align-items: center;
    justify-content: space-between;
}
.product-left{display: flex;justify-content: space-between;align-items: center;}
.product-status {
    display: block;
    font-size: var(--font-size-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-weight: 600;
}
.status-completed {
    background: var(--success-light);
    color: #065f46;
    
}
.status-pending {
    background: var(--warning-light);
    color: #92400e;
}
.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.after-target{  font-size: 10px;
    font-weight: 600;
    color: var(--ink);}
.product-progress {
    margin-bottom: var(--space-md);
}
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-top: var(--space-sm);
}
/* Today's Summary */
.today-summary {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}
.summary-item {
    text-align: center;
}
.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}
.summary-label {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}
/* ==================== SALES HISTORY COMPONENTS ==================== */
.search-filter-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}
.search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}
.search-input-wrapper {
    position: relative;
}
.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--gray-400);
}
.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) * 3);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.filter-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-select,
.date-input {
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
}
.filter-select:focus,
.date-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.filter-toggle-btn {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-md);
    min-height: 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--gray-50);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    transition: var(--transition-base);
    text-align: left;
}
.filter-toggle-btn:hover,
.filter-toggle-btn[aria-expanded="true"] {
    border-color: var(--primary);
    background: #fff5f0;
}
.filter-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}
.filter-toggle-summary {
    flex: 1;
    min-width: 0;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-500);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.filter-toggle-summary:not(:empty) {
    color: var(--primary);
}
.filter-chevron::after {
    content: '▼';
    display: inline-block;
    font-size: 0.65rem;
    color: var(--gray-500);
    transition: transform 0.2s ease;
}
.filter-toggle-btn[aria-expanded="true"] .filter-chevron::after {
    transform: rotate(180deg);
}
.filter-panel {
    overflow: hidden;
}
.filter-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}
.filter-action-btn {
    flex: 1;
    min-height: 48px;
}
.quick-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-bottom: 0;
}
.quick-filters::-webkit-scrollbar {
    display: none;
}
.quick-filter-btn {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-md);
    min-height: 40px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.quick-filter-btn:hover {
    border-color: var(--primary);
    background: #fff5f0;
}
.quick-filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}
/* Sale List Item */
.sale-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 2px solid transparent;
}
.sale-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gray-200);
}
.sale-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}
.sale-shop-info {
    flex: 1;
    min-width: 0;
}
.shop-name {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}
.sale-datetime {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.sale-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}
.detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.detail-label {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.detail-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
}
.detail-value.highlight {
    color: var(--primary);
}
.sale-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 2px solid var(--gray-100);
}
.action-btn {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}
.btn-view {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
}
.btn-view:hover {
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    box-shadow: var(--shadow-sm);
}
.btn-edit {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}
.btn-edit:hover {
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
    box-shadow: var(--shadow-sm);
}
/* ==================== AUTH PAGES ==================== */
.logo-section {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.logo-circle {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
    animation: float 3s ease-in-out infinite;
}
.logo-icon {
    font-size: 2.5rem;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.logo-section h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}
.logo-section p {
    font-size: var(--font-size-base);
    color: var(--gray-500);
}
.footer-text {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}
.footer-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
}
.footer-text a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
/* ==================== RESPONSIVE OVERRIDES ==================== */
/* Sales history page */
.sales-history-page {
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
}
.sales-table-wrapper {
    position: relative;
}
@media (max-width: 768px) {
    .sales-table-wrapper {
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-lg);
    }
    .sales-table-wrapper .table {
        width: 100%;
        table-layout: auto;
    }
    .sales-table-wrapper .table th,
    .sales-table-wrapper .table td {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-sm);
        white-space: nowrap;
    }
    .sales-table-wrapper .table td:nth-child(2) {
        white-space: normal;
        min-width: 100px;
        max-width: 140px;
    }
}
@media (max-width: 768px) {
    .progress-wrapper {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .earnings-grid {
        gap: var(--space-md);
    }
    
    .sale-details {
        grid-template-columns: 1fr;
    }
    .search-filter-section {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
    }
    .search-row {
        margin-bottom: var(--space-sm);
    }
    .search-input,
    .filter-select,
    .date-input {
        min-height: 48px;
        font-size: 16px;
    }
    .filter-toggle-btn {
        display: flex;
    }
    .filter-panel {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
    }
    .filter-panel.is-open {
        max-height: 520px;
        opacity: 1;
        margin-top: var(--space-md);
    }
    .filter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    .filter-row > .filter-group:first-child {
        grid-column: 1 / -1;
    }
    .filter-actions {
        flex-direction: column;
    }
    .quick-filters {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}
@media (min-width: 769px) {
    .quick-filters {
        flex-wrap: wrap;
        overflow-x: visible;
        margin-top: var(--space-md);
        padding-top: var(--space-md);
        border-top: 2px solid var(--gray-100);
    }
    .filter-panel {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: var(--space-md);
        margin-top: var(--space-md);
        padding-top: var(--space-md);
        border-top: 2px solid var(--gray-100);
    }
    .filter-panel .filter-row {
        flex: 1 1 320px;
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-md);
        align-items: flex-end;
    }
    .filter-panel .filter-group {
        flex: 1 1 140px;
        min-width: 140px;
    }
    .filter-panel .filter-group-dates {
        flex: 1 1 130px;
        min-width: 130px;
    }
    .filter-actions {
        flex: 0 0 auto;
        margin-top: 0;
        flex-direction: row;
    }
    .filter-action-btn {
        flex: 0 1 auto;
        min-width: 100px;
    }
}
@media (max-width: 480px) {
    .quick-actions,
    .sale-actions {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    
    .modal {
        margin: var(--space-sm);
    }
}
/* ==================== DASHBOARD PAGE ==================== */
/* Live Earnings Card */
.earnings-month-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    opacity: 0.78;
    font-weight: 600;
    margin-bottom: 4px;
}
.earnings-month-amount {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}
.earnings-today-chip {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 14px;
    padding: 9px 13px;
    text-align: right;
    min-width: 88px;
    backdrop-filter: blur(4px);
}
.earnings-today-label {
    font-size: 0.62rem;
    opacity: 0.78;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 3px;
}
.earnings-today-amount {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}
.earnings-today-sheets {
    font-size: 0.68rem;
    opacity: 0.82;
    margin-top: 2px;
}
.earnings-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.1rem;
}
/* Sheet Target Progress (inside earnings card) */
.sheet-target-section {
    margin-bottom: 0.9rem;
}
.sheet-target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.77rem;
    font-weight: 700;
    opacity: 0.96;
    margin-bottom: 7px;
}
.sheet-progress-track {
    height: 10px;
    background: rgba(255,255,255,0.22);
    border-radius: 9999px;
    overflow: hidden;
}
.sheet-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.7));
    border-radius: 9999px;
    transition: width 0.5s ease;
}
.sheet-target-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    opacity: 0.82;
    margin-top: 5px;
}
.sheet-target-remaining {
    font-weight: 700;
}
/* Bonus row inside earnings card */
.earnings-bonus-row {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.earnings-bonus-label {
    font-size: 0.68rem;
    opacity: 0.78;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.earnings-bonus-value {
    font-weight: 700;
    font-size: 0.82rem;
}
/* Wallet Shortcut Card */
.wallet-shortcut-card {
    padding: 1.1rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(139,92,246,0.08) 100%);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.wallet-shortcut-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wallet-shortcut-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wallet-shortcut-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.wallet-shortcut-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-600);
    font-weight: 700;
    margin-bottom: 2px;
}
.wallet-shortcut-balance {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
}
.wallet-shortcut-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.wallet-withdraw-btn {
    font-size: 0.73rem;
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(99,102,241,0.2);
}
.wallet-pending-label {
    font-size: 0.65rem;
    color: #b45309;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}
/* Substitution card */
.substitution-card {
    padding: 1rem;
}
.substitution-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.substitution-row {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}
/* Product-wise Progress */
.target-section {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-xl);
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
/* Bonus alert override */
.alert-bonus {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}
/* Today's Summary — km item */
.summary-km-item {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.06) 100%);
    border: 1.5px dashed rgba(99,102,241,0.2);
    border-radius: 14px;
    padding: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: inset 0 1px 2px rgba(99,102,241,0.05);
}
.summary-km-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.summary-km-value {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0;
}
.summary-km-label {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-top: 2px;
}
/* Sheet Collection Modal */
.collection-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    animation: fadeIn 0.25s ease;
}
.collection-modal-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.35s ease;
}
.collection-modal-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 1.25rem 1.5rem;
    border-radius: 1.5rem 1.5rem 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.collection-modal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.collection-modal-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
}
.collection-modal-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    margin-top: 2px;
}
.collection-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.collection-modal-date-bar {
    padding: 0.75rem 1.5rem;
    background: #f5f3ff;
    border-bottom: 1px solid #ede9fe;
}
.collection-modal-date-text {
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 600;
}
.collection-form-body {
    padding: 1.25rem 1.5rem;
}
.collection-product-row {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
}
.collection-product-row.has-value {
    background: #f5f3ff;
    border-color: #c4b5fd;
}
.collection-product-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.collection-product-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
}
.collection-updated-badge {
    background: #ede9fe;
    color: #6366f1;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
}
.collection-inputs-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.collection-input-group {
    flex: 1;
}
.collection-input-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}
.collection-qty-input {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    padding: 0.6rem;
}
.collection-note-input {
    font-size: 0.85rem;
    padding: 0.6rem;
}
.collection-total-bar {
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.collection-total-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}
.collection-total-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #6366f1;
}
.collection-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 2px solid var(--gray-100);
    display: flex;
    gap: 0.75rem;
}
.collection-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}
.collection-empty-icon {
    font-size: 2rem;
}
.collection-empty-text {
    margin-top: 0.5rem;
}
/* ==================== WALLET PAGE ==================== */
:root {
    --wallet-primary: #6366f1;
    --wallet-secondary: #8b5cf6;
    --wallet-success: #10b981;
    --wallet-warning: #f59e0b;
    --wallet-danger: #ef4444;
}
.wallet-page-body {
    background: #f8fafc;
    padding-top: 70px;
    padding-bottom: 30px;
}
.wallet-card {
    background: var(--primary-gradient);
    border-radius: 24px;
    padding: var(--space-lg);
    color: white;
    box-shadow: 0 12px 30px rgba(99,102,241,0.3);
    position: relative;
    overflow: hidden;
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
}
.wallet-card::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -60px;
    right: -60px;
    pointer-events: none;
}
.wallet-card::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -40px;
    left: -30px;
    pointer-events: none;
}
.wallet-balance-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    font-weight: 600;
    margin-bottom: 6px;
}
.wallet-balance-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--space-md);
}
.wallet-blocked-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239,68,68,0.18);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.wallet-pending-alert {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}
.wallet-pending-alert i {
    color: var(--wallet-warning);
    font-size: 1.25rem;
    margin-top: 1px;
}
.wallet-pending-content {
    flex: 1;
    font-size: 0.8rem;
    color: var(--gray-700);
    line-height: 1.4;
}
.wallet-pending-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}
.wallet-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wallet-section-title i {
    font-size: 1.1rem;
    color: var(--wallet-primary);
}
.history-card {
    background: white;
    border-radius: 16px;
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
    transition: var(--transition-base);
}
.history-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.history-card.pending  { border-left-color: var(--wallet-warning); }
.history-card.approved { border-left-color: var(--wallet-success); }
.history-card.rejected { border-left-color: var(--wallet-danger); }
.history-details { flex: 1; }
.history-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
}
.history-date {
    font-size: 0.72rem;
    color: var(--gray-500);
}
.history-note {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 4px;
    font-style: italic;
    line-height: 1.3;
}
.history-admin-note {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 600;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.3;
}
.history-status-chip {
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-pending-chip  { background: #fffbeb; color: #b45309; }
.status-approved-chip { background: #ecfdf5; color: #047857; }
.status-rejected-chip { background: #fef2f2; color: #b91c1c; }
.wallet-empty-state {
    text-align: center;
    padding: 40px var(--space-md);
    color: var(--gray-500);
}
.wallet-empty-state i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: var(--space-sm);
}
.wallet-empty-state p {
    font-size: 0.85rem;
}
/* Withdrawal Bottom Sheet */
.quick-amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: var(--space-lg);
}
.quick-amount-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 10px 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}
.quick-amount-btn:hover {
    border-color: var(--wallet-primary);
    color: var(--wallet-primary);
    background: #f5f3ff;
}
.quick-amount-btn.active {
    background: var(--wallet-primary);
    border-color: var(--wallet-primary);
    color: white;
}
.withdrawal-sheet-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.withdrawal-sheet-title i {
    color: var(--wallet-primary);
}
.withdrawal-sheet-subtitle {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.withdrawal-sheet-bottom {
    border-radius: 28px 28px 0 0;
}
.withdrawal-sheet-handle {
    width: 46px;
    height: 5px;
    background: #e2e8f0;
    margin-top: 14px;
    margin-bottom: 20px;
}
.withdrawal-quick-label {
    color: var(--gray-600);
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.withdrawal-amount-input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition-fast);
}
.withdrawal-amount-warning {
    color: var(--wallet-danger);
    font-size: 0.72rem;
    margin-top: 4px;
    display: none;
    font-weight: 600;
}
.withdrawal-note-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition-fast);
    resize: none;
    font-family: inherit;
}
.withdrawal-form-actions {
    display: flex;
    gap: 12px;
}
.withdrawal-cancel-btn {
    flex: 1;
    padding: 14px;
    border-radius: 16px;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 700;
}
.withdrawal-submit-btn {
    flex: 2;
    padding: 14px;
    border-radius: 16px;
    background: var(--primary-gradient);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}
/* Nav icon right (wallet page top nav) */
.nav-icon-right {
    color: white;
    font-size: 1.3rem;
}
/* Collection modal footer button widths */
.collection-modal-footer .btn-cancel  { flex: 1; }
.collection-modal-footer .btn-save    { flex: 2; background: linear-gradient(135deg,#6366f1,#8b5cf6); box-shadow: 0 4px 16px rgba(99,102,241,0.35); }