/* تم A — Verdana Health */
[data-theme="verdana"] {
    --bg: #0f172a;
    --panel: #1e293b;
    --panel2: #334155;
    --accent: #10b981;
    --accent-strong: #059669;
    --accent-soft: rgba(16, 185, 129, 0.14);
    --accent-alt: #34d399;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --input-bg: rgba(0, 0, 0, 0.22);
    --select-option-bg: #1e293b;
    --color-scheme: dark;
    --success: #10b981;
    --warning: #d4b86a;
    --danger: #e07d7d;
    --radius: 10px;
    --gauge-color: #10b981;
    --sidebar-active-border: rgba(16, 185, 129, 0.35);
}

/* تم B — Glass Health */
[data-theme="glass"] {
    --bg: #1a1f2e;
    --panel: rgba(255, 255, 255, 0.06);
    --panel2: rgba(255, 255, 255, 0.03);
    --accent: #a78bfa;
    --accent-strong: #8b5cf6;
    --accent-soft: rgba(167, 139, 250, 0.16);
    --accent-alt: #22d3ee;
    --text: #eef2ff;
    --muted: #a5b4c8;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --input-bg: rgba(0, 0, 0, 0.25);
    --select-option-bg: #1a1f2e;
    --color-scheme: dark;
    --success: #6bc9a0;
    --warning: #d4b86a;
    --danger: #e07d7d;
    --radius: 18px;
    --gauge-color: #a78bfa;
    --sidebar-active-border: rgba(167, 139, 250, 0.4);
}

[data-theme="glass"] .glass-card {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.06);
}

[data-theme="glass"] .app-sidebar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(26, 31, 46, 0.85);
}

[data-theme="glass"] body.app-body {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(167, 139, 250, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
        var(--bg);
}

/* تم C — Soft Wellness (روشن) */
[data-theme="wellness"] {
    --bg: #f0f4f8;
    --panel: #ffffff;
    --panel2: #f8fafc;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, 0.14);
    --accent-alt: #86efac;
    --text: #1e293b;
    --muted: #64748b;
    --line: rgba(0, 0, 0, 0.07);
    --line-strong: rgba(0, 0, 0, 0.11);
    --input-bg: #ffffff;
    --select-option-bg: #ffffff;
    --color-scheme: light;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --radius: 16px;
    --gauge-color: #38bdf8;
    --sidebar-active-border: rgba(56, 189, 248, 0.35);
}

[data-theme="wellness"] .glass-card {
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="wellness"] .sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="wellness"] .sidebar-user {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="wellness"] .form-control:focus {
    background: #fff;
}

[data-theme="wellness"] .btn-accent {
    color: #fff;
}

[data-theme="wellness"] .sidebar-toggle,
[data-theme="wellness"] .sidebar-close {
    background: var(--panel);
    color: var(--text);
}

/* تم D — Midnight Violet */
[data-theme="midnight"] {
    --bg: #101722;
    --panel: #161d2b;
    --panel2: #1c2438;
    --accent: #6366f1;
    --accent-strong: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.16);
    --accent-alt: #ec4899;
    --text: #eef2ff;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --input-bg: rgba(0, 0, 0, 0.28);
    --select-option-bg: #161d2b;
    --color-scheme: dark;
    --success: #6bc9a0;
    --warning: #d4b86a;
    --danger: #e07d7d;
    --radius: 20px;
    --gauge-color: #6366f1;
    --sidebar-active-border: rgba(99, 102, 241, 0.4);
}

[data-theme="midnight"] body.app-body {
    background:
        radial-gradient(ellipse at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 45%),
        var(--bg);
}

[data-theme="midnight"] .fab-quick-add {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

[data-theme="midnight"] .fab-now {
    background: linear-gradient(135deg, #f59e0b, #eab308);
}

[data-theme="midnight"] .btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

/* پیش‌نمایش کارت تم در تنظیمات */
.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.theme-option {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s;
}

.theme-option:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.theme-option.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-preview {
    height: 100px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.theme-preview-bar {
    height: 8px;
    border-radius: 999px;
    width: 60%;
}

.theme-preview-dots {
    display: flex;
    gap: 6px;
}

.theme-preview-dots span {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

.theme-option-body {
    padding: 14px 16px;
    background: var(--panel);
    border-top: 1px solid var(--line);
}

.theme-option-title {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-option-desc {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
}

.theme-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: none;
    place-items: center;
    font-size: 0.85rem;
    z-index: 2;
}

.theme-option.selected .theme-check {
    display: grid;
}

.theme-option-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.theme-action-btn {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
}

.theme-action-btn:hover {
    background: rgba(0,0,0,0.55);
    color: #fff;
}

.badge-custom {
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.color-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-input-wrap .form-control-color {
    width: 48px;
    height: 38px;
    padding: 2px;
    flex-shrink: 0;
}

.color-hex-input {
    font-family: Consolas, monospace;
    direction: ltr;
    text-align: center;
}
