/* ResitLog - Modern Minimalist UI Styles */
/* Based on clean, soft UI design principles */

:root {
    /* Primary brand color - change these to rebrand */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    
    /* Accent colors for variety */
    --accent-1: #f97316;  /* Warm orange */
    --accent-2: #06b6d4;  /* Cyan */
    --accent-3: #10b981;  /* Emerald */
    
    /* Semantic colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Background colors - clean & minimal */
    --background: #ffffff;
    --surface: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-hover: #f1f5f9;
    
    /* Text colors */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    
    /* Border & dividers */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows - soft & subtle */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    
    /* Border radius - soft rounded corners */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Base styles */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--surface-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Clean page header with blob decoration */
.page-header {
    position: relative;
    overflow: hidden;
    background: var(--background);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
}

.page-header h1 {
    position: relative;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header p {
    position: relative;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Card styles - clean & flat */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

/* Button styles - soft & modern */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    letter-spacing: 0.01em;
}

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

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

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

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--text-tertiary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

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

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* Status badges - soft pastel */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-pending {
    background: #fef3c7;
    color: #b45309;
}

.badge-reviewing {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-verified {
    background: #d1fae5;
    color: #047857;
}

.badge-error {
    background: #fee2e2;
    color: #b91c1c;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Fade animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload zone styles */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: 64px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-secondary);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.8;
}

/* Receipt card styles */
.receipt-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.receipt-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}

.receipt-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--surface-secondary);
}

.receipt-content {
    padding: 20px;
}

.receipt-merchant {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.receipt-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.receipt-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 12px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Stats card */
.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Navigation */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}

nav a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Camera interface */
#camera-modal {
    background: #000;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 640px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 26px;
    }
    
    .receipt-thumbnail {
        height: 140px;
    }
    
    .upload-zone {
        padding: 48px 24px;
    }
}

/* Organic blob shapes */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
}

.blob-1 {
    background: var(--primary-light);
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
}

.blob-2 {
    background: rgba(249, 115, 22, 0.15);
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

/* Soft card hover effect */
.card-soft {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 24px;
    transition: all 0.3s ease;
}

.card-soft:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Progress bar */
.progress-bar {
    height: 6px;
    background: var(--surface-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* Soft input focus */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: var(--surface-secondary);
}
