/* KAIZEN Tracker CSS Styling - Premium Glassmorphism & Responsive */

/* CSS Reset & Variable Tokens */
:root {
    /* Fonts */
    --font-primary: 'Plus Jakarta Sans', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Dark Theme Palette (Default) */
    --bg-app: #0b0f19;
    --bg-card: rgba(22, 28, 45, 0.7);
    --bg-card-hover: rgba(26, 34, 54, 0.85);
    --bg-input: #0f172a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #3b82f6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-rgb: 59, 130, 246;
    
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* HSL Category Colors */
    --clr-quality: #60a5fa;       /* คุณภาพ (Quality) */
    --clr-safety: #34d399;        /* ความปลอดภัย (Safety) */
    --clr-cost: #fb923c;          /* ลดต้นทุน (Cost Reduction) */
    --clr-productivity: #c084fc;  /* การเพิ่มประสิทธิภาพ (Productivity) */
    --clr-environment: #2dd4bf;   /* สิ่งแวดล้อม (Environment) */
    --clr-other: #94a3b8;         /* อื่นๆ (Other) */
    
    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.4);
    --glass-blur: 16px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides */
[data-theme="light"] {
    --bg-app: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-focus: #1d4ed8;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.12);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Layout App Container */
.app-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Styling */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    animation: slideDown 0.6s ease;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.logo-area h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #3b82f6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-area p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Button & Icon Utilities */
.btn-icon {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    transform: scale(1.08);
    background: var(--bg-card-hover);
    border-color: var(--text-secondary);
}

/* Main Grid System */
.main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    flex: 1;
}

/* Card Styling */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

/* Form Styles */
#submission-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

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

input[type="text"],
select,
textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    transition: var(--transition);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Error states */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea,
.upload-dropzone.has-error {
    border-color: var(--danger) !important;
}

.error-msg {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
}

.form-group.has-error .error-msg {
    display: block;
    animation: shake 0.3s ease;
}

/* Category Chips Selector */
.category-chips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.category-chip {
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    padding: 14px 10px;
    cursor: pointer;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.category-chip input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.chip-color-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--text-muted);
    transition: var(--transition);
}

.chip-color-bar.quality { background-color: var(--clr-quality); }
.chip-color-bar.safety { background-color: var(--clr-safety); }
.chip-color-bar.cost { background-color: var(--clr-cost); }
.chip-color-bar.productivity { background-color: var(--clr-productivity); }
.chip-color-bar.environment { background-color: var(--clr-environment); }
.chip-color-bar.other { background-color: var(--clr-other); }

.chip-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.category-chip:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* Checked State for category chip */
.category-chip:has(input:checked) {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
}

.category-chip:has(input:checked) .chip-title {
    color: var(--text-primary);
}

.category-chip:has(input:checked) .chip-color-bar {
    height: 6px;
}

/* Image Upload Styling */
.image-upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.upload-box-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.badge {
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    display: inline-block;
}

.badge-before {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-after {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    background: var(--bg-input);
    border-radius: var(--border-radius-md);
    padding: 24px 16px;
    text-align: center;
    position: relative;
    cursor: pointer;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    overflow: hidden;
}

.upload-dropzone:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: var(--transition);
}

.dropzone-icon {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    transition: var(--transition);
}

.upload-dropzone:hover .dropzone-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.dropzone-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dropzone-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Image preview styles */
.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: var(--bg-input);
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: var(--transition);
}

.remove-btn:hover {
    transform: scale(1.1);
    background: #ef4444;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: #f87171;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn:active {
    transform: translateY(0);
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.feed-loader .spinner {
    width: 40px;
    height: 40px;
    border-color: var(--border-color);
    border-top-color: var(--primary);
    margin: 0 auto 16px;
}

/* Recent Feed styling */
.feed-header {
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.records-container {
    flex: 1;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.feed-loader, .feed-empty {
    margin: auto;
    text-align: center;
    padding: 40px 20px;
}

.feed-empty i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.feed-empty p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.feed-empty span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.records-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Feed item design */
.feed-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}

.feed-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.feed-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.feed-item-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.feed-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.feed-item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.feed-info-tag {
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-info-tag i {
    width: 14px;
    height: 14px;
}

.feed-tag-category {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
}

/* Color variations for tags based on category */
.tag-quality { background: rgba(96, 165, 250, 0.15); color: var(--clr-quality); }
.tag-safety { background: rgba(52, 211, 153, 0.15); color: var(--clr-safety); }
.tag-cost { background: rgba(251, 146, 60, 0.15); color: var(--clr-cost); }
.tag-productivity { background: rgba(192, 132, 252, 0.15); color: var(--clr-productivity); }
.tag-environment { background: rgba(45, 212, 191, 0.15); color: var(--clr-environment); }
.tag-other { background: rgba(148, 163, 184, 0.15); color: var(--clr-other); }

.feed-item-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.feed-img-pane {
    height: 90px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
}

.feed-img-pane img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-img-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
    color: white;
}

.feed-img-badge.before { background-color: rgba(239, 68, 68, 0.85); }
.feed-img-badge.after { background-color: rgba(16, 185, 129, 0.85); }

/* Footer styling */
.app-footer {
    text-align: center;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Toast Notification Styling */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    width: 320px;
    z-index: 100;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }

.toast-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Modal Lightbox */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 850px;
    z-index: 1001;
    overflow: hidden;
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
    transition: var(--transition);
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--bg-card-hover);
}

.modal-image-wrapper {
    display: flex;
    flex-direction: column;
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border-color);
}

.comparison-pane {
    position: relative;
    height: 350px;
    background: #000;
}

.comparison-pane img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-badge-wrapper {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

.modal-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-input);
}

.modal-details h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.modal-info-item {
    color: var(--text-secondary);
}

.modal-info-item strong {
    color: var(--text-primary);
}

.modal-desc-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-desc-item strong {
    font-size: 0.85rem;
}

.modal-desc-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    min-height: 60px;
}

/* Animations */
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Utility Hidden state */
.hidden {
    display: none !important;
}

/* Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-widget {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-widget:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
}

/* Custom gradients for widgets */
.stat-icon-wrapper.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}
.stat-icon-wrapper.orange {
    background: linear-gradient(135deg, #f97316, #c2410c);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}
.stat-icon-wrapper.teal {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.2);
}
.stat-icon-wrapper.purple {
    background: linear-gradient(135deg, #a855f7, #6b21a8);
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.2);
}

.stat-icon-wrapper i {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-container {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-container h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 12px;
        gap: 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    .form-row.two-cols {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .image-upload-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .comparison-container {
        grid-template-columns: 1fr;
    }
    
    .comparison-pane {
        height: 250px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .charts-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
