/* ============================================================
   ML52 — Theme System
   Single theme: Warm with Neutral teal accents
   ============================================================ */

/* === Transition smoothing === */
body, .sidebar, .main-content, .stat-card, .report-item, .card,
.doc-item, .content-report-group, .upload-area, .progress-bar,
.report-section, .filter-btn, .btn, .app-layout, .sidebar nav a,
.toast, .modal-content, .feature-card, .price-card {
    transition: background-color 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease;
}


/* ============================================================
   ML52 Brand Theme — Warm layout with Neutral teal accents
   ============================================================ */
body[data-theme="warm"] {
    --bg: #fefcf8;
    --bg-card: #ffffff;
    --bg-hover: #f5f0e8;
    --border: #e8e0d4;
    --text: #2d2418;
    --text-dim: #8a7e6e;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(45,36,24,0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Nunito', 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.8;
}

/* Gradient buttons blending warm amber with teal */
body[data-theme="warm"] .btn {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
}
body[data-theme="warm"] .btn:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%);
}
body[data-theme="warm"] .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
body[data-theme="warm"] .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}
body[data-theme="warm"] .btn-danger {
    background: var(--danger);
}

/* Active nav with teal accent */
body[data-theme="warm"] .sidebar nav a.active {
    border-color: #0d9488;
    color: #0d9488;
    background: rgba(13,148,136,0.06);
    font-weight: 600;
    border-right: none;
}

/* Stat card accent values */
body[data-theme="warm"] .stat-card .value.accent {
    color: #0d9488;
}

/* Status badges */
body[data-theme="warm"] .status-researching,
body[data-theme="warm"] .status-synthesizing,
body[data-theme="warm"] .status-generating {
    background: rgba(13,148,136,0.12);
    color: #0d9488;
}

/* Progress bar with gradient */
body[data-theme="warm"] .progress-fill {
    background: linear-gradient(90deg, #0d9488, #0891b2);
}

/* Filter buttons active */
body[data-theme="warm"] .filter-btn.active {
    background: #0d9488;
    border-color: #0d9488;
    color: #fff;
}

/* Featured price card */
body[data-theme="warm"] .price-card.featured {
    border-color: #0d9488;
}

/* Upload area hover */
body[data-theme="warm"] .upload-area:hover {
    border-color: #0d9488;
}

/* Toast accents */
body[data-theme="warm"] .toast.success {
    border-color: #16a34a;
}

/* Links */
body[data-theme="warm"] a {
    color: #0d9488;
}
body[data-theme="warm"] a:hover {
    color: #0f766e;
}

/* --- Layout overrides (from original warm theme) --- */

body[data-theme="warm"] .app-layout {
    grid-template-columns: 250px 1fr;
}

body[data-theme="warm"] .sidebar {
    background: var(--bg-card);
    margin: 12px;
    margin-right: 0;
    border-radius: 16px;
    border: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 20px 0;
}

body[data-theme="warm"] .sidebar .logo {
    font-size: 20px;
    padding: 0 20px;
    margin-bottom: 28px;
}

body[data-theme="warm"] .sidebar nav a {
    padding: 10px 20px;
    font-size: 14px;
    margin: 2px 8px;
    border-radius: 10px;
    border-right: none;
}

body[data-theme="warm"] .sidebar nav a:hover {
    background: var(--bg-hover);
}

body[data-theme="warm"] .main-content {
    padding: 24px 32px;
    max-width: 1200px;
}

body[data-theme="warm"] .main-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

body[data-theme="warm"] .stats-grid {
    gap: 16px;
    margin-bottom: 28px;
}

body[data-theme="warm"] .stat-card {
    padding: 20px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

body[data-theme="warm"] .stat-card .label {
    font-size: 12px;
    font-weight: 500;
}

body[data-theme="warm"] .stat-card .value {
    font-size: 32px;
    font-weight: 700;
}

body[data-theme="warm"] .report-item {
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
}

body[data-theme="warm"] .report-section {
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow);
}

body[data-theme="warm"] .card {
    border-radius: 14px;
    box-shadow: var(--shadow);
}

body[data-theme="warm"] .status {
    border-radius: 20px;
    padding: 4px 14px;
}

body[data-theme="warm"] .filter-btn {
    border-radius: 20px;
    padding: 7px 16px;
}

body[data-theme="warm"] .upload-area {
    border: 2px dotted var(--border);
    border-radius: 16px;
    padding: 44px;
}

body[data-theme="warm"] .doc-item {
    border-radius: 10px;
    padding: 14px 18px;
}

body[data-theme="warm"] .content-report-group {
    border-radius: 14px;
    box-shadow: var(--shadow);
}

body[data-theme="warm"] .content-item {
    border-radius: 10px;
}

body[data-theme="warm"] .progress-track {
    border-radius: 6px;
    height: 8px;
}

body[data-theme="warm"] .toast {
    border-radius: 12px;
}

body[data-theme="warm"] input,
body[data-theme="warm"] select,
body[data-theme="warm"] textarea {
    border-radius: 10px;
}

body[data-theme="warm"] .user-info {
    margin: 0 8px;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 12px;
}

/* Warm Mobile — bottom tab bar with warm rounded style */
@media (max-width: 768px) {
    body[data-theme="warm"] .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    body[data-theme="warm"] .sidebar {
        position: fixed;
        bottom: 10px;
        left: 10px;
        right: 10px;
        margin: 0;
        flex-direction: row;
        border-radius: 20px;
        padding: 4px 8px;
        z-index: 100;
        background: var(--bg-card);
        box-shadow: 0 4px 20px rgba(45, 36, 24, 0.12), 0 0 0 1px var(--border);
    }
    body[data-theme="warm"] .sidebar .logo {
        display: none;
    }
    body[data-theme="warm"] .sidebar nav {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    body[data-theme="warm"] .sidebar nav a {
        flex: 1;
        text-align: center;
        padding: 10px 4px;
        font-size: 11px;
        border-radius: 14px;
        margin: 2px;
        justify-content: center;
    }
    body[data-theme="warm"] .sidebar nav a.active {
        background: rgba(13, 148, 136, 0.1);
    }
    body[data-theme="warm"] .sidebar .user-info {
        display: none;
    }
    body[data-theme="warm"] .main-content {
        padding: 16px;
        padding-bottom: 80px;
    }
    body[data-theme="warm"] .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
