/**
 * LoyaltyProgram - Clean Light Theme
 * Modern, Simple, Professional
 * Version: 4.0 - Single Light Theme Only
 */

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   COLOR PALETTE - Light Only
   ============================================ */

:root {
    /* Primary Brand */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    
    /* Backgrounds */
    --bg-main: #f8f9fa;
    --bg-white: #ffffff;
    --bg-gray: #f1f3f5;
    --bg-hover: #e9ecef;
    
    /* Text */
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    /* Borders */
    --border: #dee2e6;
    --border-light: #e9ecef;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.main-content {
    flex: 1;
    padding: var(--space-8) 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-left: var(--space-8);
    flex: 1;
}

.navbar-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.navbar-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--primary-hover);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.navbar-btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.navbar-btn:hover {
    background: var(--bg-gray);
    border-color: var(--primary);
}

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

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

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.dashboard-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.dashboard-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
    transition: all 0.3s;
}

.dashboard-card:hover .dashboard-card-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.dashboard-card-icon svg {
    width: 32px;
    height: 32px;
}

.dashboard-card-icon.icon-add {
    background: linear-gradient(135deg, #10b981, #059669);
}

.dashboard-card-icon.icon-edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dashboard-card-icon.icon-view {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.dashboard-card-icon.icon-reports {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.dashboard-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.dashboard-card-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Info Cards */
.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
}

.info-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-2);
}

.info-card-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.0625rem;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.table thead {
    background: var(--bg-gray);
}

.table th {
    padding: var(--space-4);
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.table th a,
.table th .sort-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.table th a:hover,
.table th .sort-link:hover {
    color: var(--primary);
}

.table td {
    padding: var(--space-4);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: var(--bg-gray);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

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

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.points-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-gray);
    border: 1px solid var(--border);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.active {
    color: var(--success);
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-badge.inactive {
    color: var(--danger);
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.modern-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    background: var(--bg-white);
}

.modern-alert-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modern-alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-light);
    color: var(--success);
    flex-shrink: 0;
}

.modern-alert-message {
    font-weight: 600;
    color: var(--text-primary);
}

.modern-alert-success {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
}

.modern-alert-close {
    background: transparent;
    border: none;
    padding: 0.35rem;
    border-radius: 10px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modern-alert-close:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

/* ============================================
   DASHBOARD ACTIVITY
   ============================================ */

.activity-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-gray);
    border: 1px solid var(--border-light);
}

.activity-meta {
    flex: 1;
    min-width: 0;
}

.activity-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-points {
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.activity-points.positive {
    color: var(--success);
    background: var(--success-light);
}

.activity-points.negative {
    color: var(--danger);
    background: var(--danger-light);
}

.activity-subtitle,
.activity-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.activity-note {
    margin-top: 0.25rem;
}

.activity-balance {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: var(--space-6) 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-content a {
    color: var(--primary);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden { display: none !important; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-white { background: var(--bg-white); }
.bg-gray { background: var(--bg-gray); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* ============================================
   PAGE LAYOUT
   ============================================ */

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.form-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.form-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.form-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
}

.form-header-icon svg {
    width: 26px;
    height: 26px;
}

.form-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.form-card-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-grid.single-column {
    grid-template-columns: 1fr;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    min-height: 44px;
    appearance: none;
}

.form-input.no-icon,
.input-wrapper.no-icon .form-input {
    padding-left: 1rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.text-danger {
    color: #ef4444 !important;
    font-size: 0.85rem;
    margin-top: 0.35rem;
    display: block;
}

.form-input.input-validation-error,
.form-input.input-validation-error:focus {
    border-color: #fca5a5;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.form-actions .btn {
    min-width: 140px;
    min-height: 44px;
}

.form-actions.equal-width .btn {
    width: 180px;
}

.required {
    color: var(--danger);
}

.customer-info-wrapper {
    background: var(--bg-gray);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.customer-info-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.customer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.customer-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
}

.customer-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: block;
}

.customer-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.customer-not-found,
.customer-fixed-discount {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.customer-not-found {
    color: var(--danger);
}

.customer-fixed-discount {
    color: var(--success);
}

/* ============================================
   SEARCH & FILTERS
   ============================================ */

.search-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
    position: relative;
    max-width: 500px;
}

.search-icon-wrapper {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 620px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filters-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-container {
        padding: 0 var(--space-4);
    }
    
    .container {
        padding: 0 var(--space-4);
    }
    
    .card {
        padding: var(--space-4);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   MODAL BASE STYLES (Bootstrap-light)
   =================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.5rem auto;
    pointer-events: none;
    max-width: 520px;
    padding: 0 1rem;
}

.modal-dialog-centered {
    min-height: calc(100% - 3rem);
    display: flex;
    align-items: center;
}

.modal-content {
    pointer-events: auto;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.modal-header,
.modal-footer {
    border-color: var(--border-light);
    padding: 1rem 1.5rem;
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    gap: 0.75rem;
}

.modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.25rem 1.5rem;
}

.btn-close {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

.modal.fade .modal-dialog {
    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a;
    opacity: 0;
    z-index: 1050;
}

.modal-backdrop.show {
    opacity: 0.35;
}

.modal-open {
    overflow: hidden;
}

/* ===================================
   QR MODAL ALIGNMENT
   =================================== */
#qrCodeModal {
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    width: 100vw;
    left: 0;
    right: 0;
}

#qrCodeModal.show {
    display: flex !important;
}

#qrCodeModal .modal-dialog {
    margin: 0 auto !important;
    width: min(92vw, 460px);
    padding: 0;
}

#qrCodeModal .modal-content {
    width: 100%;
}

#qrCodeModal .modal-dialog-centered {
    min-height: auto;
}

/* ===================================
   CUSTOM CONFIRM MODAL
   =================================== */
#customConfirmModal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1200;
    padding: 1.5rem;
}

.confirm-modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem 2rem;
    width: 100%;
    max-width: 520px;
}

.confirm-modal-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.confirm-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.confirm-modal-buttons .btn {
    min-width: 120px;
}

@media (max-width: 576px) {
    .confirm-modal-content {
        padding: 1.5rem;
    }

    .confirm-modal-buttons {
        justify-content: stretch;
    }

    .confirm-modal-buttons .btn {
        flex: 1 1 auto;
    }
}

/* ===================================
   CUSTOMER DASHBOARD - MOBILE FIRST
   =================================== */
.customer-dashboard {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    background: var(--bg-gray);
    min-height: 100vh;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.dashboard-greeting {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.points-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.points-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.points-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.points-value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.points-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.discount-badge-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
}

.discount-icon {
    flex-shrink: 0;
}

.discount-value {
    font-size: 2rem;
    font-weight: 700;
}

.discount-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

.progress-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.progress-info {
    margin-bottom: 1rem;
}

.progress-text {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.progress-bar-modern {
    height: 40px;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    min-width: 60px;
}

.progress-text-inside {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-card.success {
    border-left-color: #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), #ffffff);
}

.info-card.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), #ffffff);
}

.info-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.info-card.success .info-icon {
    color: #10b981;
}

.info-card.warning .info-icon {
    color: #f59e0b;
}

.info-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.qr-action {
    margin-bottom: 1.5rem;
}

.qr-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.qr-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.qr-button:active {
    transform: translateY(0);
}

.qr-icon {
    flex-shrink: 0;
}

.history-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.section-icon {
    color: #6366f1;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.transaction-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.transaction-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.transaction-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.transaction-badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.transaction-breakdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.transaction-item.combined {
    border-color: rgba(99, 102, 241, 0.25);
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.08), #f8fafc);
}

.points-net {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--bg-gray);
}

.transaction-note {
    flex-basis: 100%;
    font-size: 0.85rem;
    background: #ffffff;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
}

.points-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}

.points-change.positive {
    color: #10b981;
}

.points-change.negative {
    color: #ef4444;
}

.points-change svg {
    width: 16px;
    height: 16px;
}

.balance-after {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.balance-after strong {
    color: var(--text-primary);
}

.history-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-icon {
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

.empty-state-page {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    margin: 2rem 0;
}

.empty-icon-large {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.empty-state-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state-page p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.qr-validity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d1fae5;
    color: #065f46;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

.qr-code-display {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px dashed #cbd5e1;
}

.qr-countdown {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
}

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

.countdown-header small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.countdown-time {
    font-weight: 700;
    font-size: 1rem;
    color: #10b981;
}

.countdown-time.text-warning {
    color: #f59e0b !important;
}

.countdown-time.text-danger {
    color: #ef4444 !important;
}

.progress-bar-qr {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-qr {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 1s linear;
}

.progress-fill-qr.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill-qr.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.error-icon {
    color: #ef4444;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .customer-dashboard {
        padding: 2rem;
    }

    .dashboard-greeting {
        font-size: 2.25rem;
    }

    .points-value {
        font-size: 5rem;
    }

    .transaction-item {
        padding: 1.25rem;
    }
}
