@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Cairo:wght@300;400;500;600;700&family=Indie+Flower&display=swap');

:root {
    --primary: #6C5CE7;
    --primary-light: #EDE9FF;
    --primary-glow: rgba(108, 92, 231, 0.3);
    --secondary: #00CEC9;
    --accent: #FDCB6E;
    --success: #00B894;
    --danger: #FF6B6B;
    --bg-color: #F0F2F8;
    --surface: #FFFFFF;
    --surface-hover: #F8F7FF;
    --text-main: #2D3436;
    --text-muted: #94A3B8;
    --border-color: rgba(108, 92, 231, 0.12);
    --border-radius: 20px;
    --shadow-sm: 0 2px 12px rgba(108, 92, 231, 0.08);
    --shadow-md: 0 8px 32px rgba(108, 92, 231, 0.12);
    --shadow-lg: 0 16px 48px rgba(108, 92, 231, 0.18);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --gradient: linear-gradient(135deg, #6C5CE7, #A29BFE);
    --gradient-accent: linear-gradient(135deg, #00CEC9, #81ECEC);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

[data-theme="dark"] {
    --primary: #A29BFE;
    --primary-light: #2D2654;
    --primary-glow: rgba(162, 155, 254, 0.25);
    --secondary: #81ECEC;
    --accent: #FFEAA7;
    --bg-color: #0F0F1A;
    --surface: #1A1A2E;
    --surface-hover: #232340;
    --text-main: #E2E8F0;
    --text-muted: #7F8EA3;
    --border-color: rgba(162, 155, 254, 0.15);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(26, 26, 46, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --gradient: linear-gradient(135deg, #6C5CE7, #A29BFE);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 90px;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

html[dir="rtl"] body { font-family: var(--font-ar); }

/* Utilities */
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }
.separator { border: none; border-top: 1px solid var(--border-color); margin: 20px 0; }
.flex { display: flex; } .flex-1 { flex: 1; } .gap-2 { gap: 8px; } .align-center { align-items: center; }
.w-full { width: 100%; }

/* ── Header ── */
.app-header {
    position: fixed; top: 0; left: 0; right: 0; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--glass-border);
    transition: background 0.4s ease;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 26px; }
.logo-text {
    font-family: 'Indie Flower', cursive; font-size: 26px; font-weight: 800;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-slogan {
    font-size: 10px; font-weight: 500; color: var(--text-muted); 
    opacity: 0.8; letter-spacing: 0.5px; margin-top: -2px;
}
.header-actions { display: flex; gap: 8px; }
.icon-btn {
    background: transparent; border: none; color: var(--primary); font-weight: 600;
    cursor: pointer; padding: 10px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; transition: all 0.25s ease;
    font-size: 14px;
}
.icon-btn:hover { background: var(--primary-light); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.95); }

/* Tooltip Styles */
.tooltip { position: relative; }
.tooltip::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: var(--surface);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -38px;
}
[data-theme="dark"] .tooltip::after {
    background: var(--primary);
    color: #fff;
}

/* ── Main Content ── */
.app-main { padding: 84px 20px 20px; max-width: 560px; margin: 0 auto; }
.view { display: none; }
.view.active-view { display: block; animation: viewEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes viewEnter {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.view-title {
    font-family: var(--font-heading); font-size: 26px; font-weight: 700; margin-bottom: 20px;
}

/* View header with back button */
.view-header-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 8px;
}
html[dir="rtl"] .view-header-row svg { transform: scaleX(-1); }

/* Entries list in detail views */
.entries-list { display: flex; flex-direction: column; gap: 10px; }
.entry-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color); transition: all 0.2s;
}
.entry-card:hover { transform: translateX(4px); }
html[dir="rtl"] .entry-card:hover { transform: translateX(-4px); }
.entry-card-icon {
    width: 40px; height: 40px; border-radius: 18px; display: flex;
    align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.entry-card-icon.milk-entry { background: #EDE9FF; color: #6C5CE7; }
.entry-card-icon.weight-entry { background: #E0FFF4; color: #00B894; }
.entry-card-icon.milestone-entry { background: #FFF8E1; color: #F39C12; }
.milestone-entry { 
    display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .entry-card-icon.milk-entry { background: #2D2654; }
[data-theme="dark"] .entry-card-icon.weight-entry { background: #1A3A2E; }
[data-theme="dark"] .entry-card-icon.milestone-entry { background: #3A2E1A; }
.entry-card-body { flex: 1; }
.entry-card-body strong { font-size: 15px; display: block; }
.entry-card-body span { font-size: 12px; color: var(--text-muted); }
.entry-card-time { font-size: 11px; font-weight: 600; color: var(--text-muted); }

.add-entry-toggle { text-align: center; }
/* ── Glass Card ── */
.glass-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.glass-card:hover { box-shadow: var(--shadow-md); }

/* ── Dashboard Profile Header ── */
.profile-header { margin-bottom: 20px; }
.profile-header h2 {
    font-family: var(--font-heading); font-size: 18px; color: var(--text-muted);
    font-weight: 500; margin-bottom: 14px;
}
.baby-info { display: flex; align-items: center; gap: 16px; }
.baby-avatar {
    font-size: 36px; width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient); box-shadow: 0 4px 20px var(--primary-glow);
    position: relative;
}
.baby-avatar::after {
    content: ''; position: absolute; inset: -3px; border-radius: 50%;
    background: var(--gradient); z-index: -1; opacity: 0.3; filter: blur(8px);
}
.baby-info strong { font-family: var(--font-heading); font-size: 22px; }

/* ── Date Navigator ── */
.date-navigator {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-radius: 16px; margin-bottom: 24px;
    background: var(--surface); box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
.date-navigator strong { font-size: 15px; font-weight: 600; }
.baby-info p {
    font-size: 11px; margin-top: 4px; font-style: italic; line-height: 1.3;
    color: var(--primary); opacity: 0.9;
}
/* ── Quick Action Cards ── */
.quick-actions {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px;
}
.action-card {
    background: var(--surface); border-radius: 18px; padding: 16px 8px;
    text-align: center; box-shadow: var(--shadow-sm); cursor: pointer;
    border: 1px solid var(--border-color); transition: all 0.3s ease;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.action-card:active { transform: scale(0.96); }
.action-icon {
    width: 48px; height: 48px; border-radius: 20px; display: flex;
    align-items: center; justify-content: center;
}
.action-icon.milk-bg { background: #E8F0FE; color: #5B9BD5; }
.action-icon.weight-bg { background: #E0FFF4; color: #00B894; }
.action-icon.milestone-bg { background: #FFF8E1; color: #F39C12; }
.action-icon.sleep-bg { background: #F3E5F5; color: #9C27B0; }
.action-icon img, .baby-avatar img {
    width: 100%; height: 100%; object-fit: contain; border-radius: inherit;
}
.action-icon .img-icon { padding: 8px; }
.baby-avatar img { object-fit: cover; }
[data-theme="dark"] .action-icon.milk-bg { background: #1E2D42; color: #7BB8E8; }
[data-theme="dark"] .action-icon.weight-bg { background: #252830; color: #A8B2BC; }
[data-theme="dark"] .action-icon.milestone-bg { background: #3A2E1A; color: #FDCB6E; }
.action-value {
    font-family: var(--font-heading); font-weight: 800; font-size: 17px;
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.action-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Dashboard Section Cards ── */
.dash-section { margin-bottom: 16px; }
.dash-section-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.dash-section-icon {
    width: 32px; height: 32px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; font-size: 16px;
}
.dash-section-title {
    font-family: var(--font-heading); font-size: 15px; font-weight: 700;
}

/* Milestone tracker card */
.milestone-tracker { padding: 16px; }
.milestone-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.milestone-item:last-child { border-bottom: none; }
.milestone-item .mi-icon {
    width: 36px; height: 36px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 18px;
    background: #FFF8E1; flex-shrink: 0;
}
[data-theme="dark"] .milestone-item .mi-icon { background: #3A2E1A; }
.milestone-item label { flex: 1; cursor: pointer; }
.milestone-item label strong { display: block; font-size: 14px; }

/* Medicine tracker card */
.med-tracker { padding: 16px; }
.med-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.med-item:last-child { border-bottom: none; }
.med-item .med-icon-wrap {
    width: 36px; height: 36px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 16px;
    background: #F0E6FF; flex-shrink: 0;
}
[data-theme="dark"] .med-item .med-icon-wrap { background: #2D2654; }
.med-item label { flex: 1; cursor: pointer; }
.med-item label strong { display: block; font-size: 14px; }
.med-item label span { font-size: 12px; color: var(--text-muted); }

/* Vaccine info card */
.vaccine-card {
    display: flex; align-items: center; gap: 14px; padding: 16px;
    margin-bottom: 16px;
}
.vaccine-icon {
    width: 42px; height: 42px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center;
    background: #FFEAEA; font-size: 20px; flex-shrink: 0;
}
[data-theme="dark"] .vaccine-icon { background: #3A1A1A; }

/* ── Progress Bars & Goals ── */
.goal-container { margin-bottom: 16px; }
.goal-header {
    display: flex; justify-content: space-between; margin-bottom: 10px;
    font-size: 13px; font-weight: 600;
}
.progress-bar {
    width: 100%; height: 10px; background: var(--primary-light);
    border-radius: 5px; overflow: hidden; position: relative;
}
.progress-fill {
    height: 100%; background: var(--gradient); width: 0%;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 5px; position: relative;
}
.progress-fill::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 100% { left: 100%; } }

.extended-goals { padding: 16px; margin-bottom: 16px; }
.ext-goal-item { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ext-goal-item:last-child { margin-bottom: 0; }

/* Custom Checkbox */
.ext-goal-item input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; width: 26px; height: 26px;
    border: 2px solid var(--border-color); border-radius: 8px; cursor: pointer;
    position: relative; transition: all 0.25s ease; flex-shrink: 0;
    background: var(--surface);
}
.ext-goal-item input[type="checkbox"]:checked {
    background: var(--gradient); border-color: var(--primary);
}
.ext-goal-item input[type="checkbox"]:checked::after {
    content: '✓'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); color: #fff; font-size: 14px; font-weight: 700;
}
.ext-goal-item label { flex: 1; cursor: pointer; display: flex; flex-direction: column; }
.goal-icon { font-size: 20px; width: 26px; text-align: center; }

/* ── Stats Grid ── */
.stats-grid { display: grid; gap: 14px; }
.stat-card {
    background: var(--surface); border-radius: var(--border-radius);
    padding: 20px 14px; text-align: center; box-shadow: var(--shadow-sm);
    cursor: pointer; transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card:active { transform: scale(0.97); }
.stat-icon { font-size: 34px; margin-bottom: 10px; }
.stat-value {
    display: block; font-family: var(--font-heading); font-weight: 800;
    font-size: 20px; background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── Forms ── */
.entry-form .form-group { margin-bottom: 20px; }
.form-group label, .dynamic-list-header label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px;
    color: var(--text-main); letter-spacing: 0.3px;
}
.form-group input, .form-group textarea, .form-select,
.dynamic-list-row input, .dynamic-list-row select {
    width: 100%; padding: 14px 16px; border: 2px solid var(--border-color);
    border-radius: 14px; font-size: 15px; font-family: inherit;
    background: var(--surface); color: var(--text-main); transition: all 0.25s ease;
}
.form-group input:focus, .form-group textarea:focus, .form-select:focus,
.dynamic-list-row input:focus, .dynamic-list-row select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

input, textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Dynamic Lists */
.dynamic-list-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-bottom: 12px; background: var(--bg-color); padding: 14px;
    border-radius: 16px; border: 1px solid var(--border-color);
}
.dynamic-list-row input.med-name { flex: 1 1 100%; }
.dynamic-list-row input.med-dose { flex: 1 1 30%; }
.dynamic-list-row select.med-freq { flex: 2 1 40%; }
.dynamic-list-row input.mile-val { flex: 1 1 auto; }
.btn-remove {
    background: var(--danger); color: white; border: none; border-radius: 12px;
    width: 40px; height: 40px; font-weight: bold; cursor: pointer;
    font-size: 18px; flex-shrink: 0; transition: all 0.2s;
}
.btn-remove:hover { opacity: 0.85; transform: scale(1.05); }

/* ── Buttons ── */
.btn-primary {
    width: 100%; padding: 16px; background: var(--gradient); color: #FFF;
    border: none; border-radius: 16px; font-size: 16px; font-weight: 700;
    font-family: var(--font-heading); cursor: pointer;
    box-shadow: 0 4px 20px var(--primary-glow); transition: all 0.3s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--primary-glow); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    width: 100%; padding: 16px; background: var(--primary-light); color: var(--primary);
    border: none; border-radius: 16px; font-size: 15px; font-weight: 600;
    font-family: var(--font-heading); cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--surface-hover); }
.btn-small { padding: 10px 18px; font-size: 13px; width: auto; border-radius: 12px; }
.btn-danger {
    width: 100%; padding: 16px; background: rgba(255,107,107,0.1); color: var(--danger);
    border: none; border-radius: 16px; font-size: 15px; font-weight: 700;
    font-family: var(--font-heading); cursor: pointer; transition: all 0.2s;
}
.btn-danger:hover { background: rgba(255,107,107,0.2); }
.btn-text {
    background: none; border: none; color: var(--text-muted);
    font-weight: 500; cursor: pointer; padding: 10px;
}

/* ── Timeline ── */
.section-title { font-family: var(--font-heading); font-size: 18px; margin-bottom: 16px; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
    display: flex; align-items: center; padding: 14px;
    background: var(--surface); border-radius: 16px;
    box-shadow: var(--shadow-sm); gap: 14px;
    border: 1px solid var(--border-color); transition: all 0.2s;
}
.timeline-item:hover { transform: translateX(4px); }
html[dir="rtl"] .timeline-item:hover { transform: translateX(-4px); }
.timeline-icon {
    width: 42px; height: 42px; border-radius: 14px;
    background: var(--primary-light); display: flex;
    align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.timeline-content { flex: 1; }
.timeline-title { font-weight: 600; font-size: 15px; display: block; }
.timeline-desc { font-size: 12px; color: var(--text-muted); }
.timeline-time { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.empty-state {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
    background: var(--surface); border-radius: var(--border-radius);
    border: 1px solid var(--border-color); font-size: 14px;
}

/* ── Bottom Nav ── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 72px;
    display: flex; justify-content: space-around; align-items: center;
    z-index: 100; padding-bottom: env(safe-area-inset-bottom);
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: var(--glass-border);
}
.nav-item {
    background: none; border: none; display: flex; flex-direction: column;
    align-items: center; gap: 4px; color: var(--text-muted);
    font-size: 11px; font-weight: 500; cursor: pointer; width: 64px;
    transition: all 0.25s ease; position: relative;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-icon-text { font-size: 20px; line-height: 22px; }
.nav-item.active { color: var(--primary); }
.nav-icon-wrap { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.nav-icon-wrap img { width: 100%; height: 100%; object-fit: contain; }
.nav-item.active::after {
    content: ''; position: absolute; top: -2px; width: 24px; height: 3px;
    background: var(--gradient); border-radius: 0 0 3px 3px;
}

/* ── Modals ── */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    z-index: 500; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes modalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    width: 100%; max-width: 400px; padding: 24px;
    background: var(--surface); border-radius: 24px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-color);
    animation: modalContentIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-family: var(--font-heading); font-size: 20px; margin: 0; }
@keyframes modalContentIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-content h3 { font-family: var(--font-heading); margin-bottom: 8px; }
.modal-content p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ══════════════════════════════════════════
   WIZARD MODAL (Onboarding & Settings)
   ══════════════════════════════════════════ */
.wizard-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px);
    z-index: 300; align-items: center; justify-content: center; padding: 16px;
}
.wizard-overlay.active { display: flex; animation: modalIn 0.3s ease; }

.wizard-modal {
    width: 100%; max-width: 420px; max-height: 90vh;
    background: var(--surface); border-radius: 28px;
    box-shadow: var(--shadow-lg); overflow: hidden;
    display: flex; flex-direction: column;
    animation: modalContentIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid var(--border-color);
}

.wizard-header {
    padding: 20px 20px 0; display: flex; align-items: center; justify-content: space-between;
}
.wizard-close {
    background: var(--bg-color); border: none; width: 36px; height: 36px;
    border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.wizard-close:hover { background: var(--primary-light); color: var(--primary); }

/* Step Dots */
.wizard-dots {
    display: flex; gap: 8px; align-items: center; justify-content: center;
    padding: 16px 20px 8px;
}
.wizard-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--border-color); transition: all 0.35s ease;
}
.wizard-dot.active {
    width: 28px; border-radius: 5px; background: var(--gradient);
}
.wizard-dot.done { background: var(--primary); }

/* Progress */
.wizard-progress {
    height: 3px; background: var(--primary-light); margin: 0 20px;
    border-radius: 2px; overflow: hidden;
}
.wizard-progress-fill {
    height: 100%; background: var(--gradient); width: 0%;
    transition: width 0.4s ease; border-radius: 2px;
}

/* Steps Container */
.wizard-body {
    flex: 1; overflow-y: auto; overflow-x: hidden; position: relative;
    padding: 0;
}
.wizard-step {
    display: none; padding: 24px 24px 16px;
    animation: stepIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wizard-step.active { display: block; }

@keyframes stepIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes stepInReverse {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
.wizard-step.slide-back { animation: stepInReverse 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

.step-icon-wrap { width: 64px; height: 64px; margin-bottom: 16px; }
.step-icon-wrap img { width: 100%; height: 100%; object-fit: contain; }
.wizard-step h3 {
    font-family: var(--font-heading); font-size: 22px; font-weight: 700;
    margin-bottom: 6px;
}
.wizard-step p.step-desc {
    color: var(--text-muted); font-size: 14px; margin-bottom: 20px; line-height: 1.5;
}

/* Wizard Footer */
.wizard-footer {
    padding: 16px 24px 20px; display: flex; gap: 12px;
    border-top: 1px solid var(--border-color);
}
.wizard-footer .btn-back {
    flex: 0 0 auto; padding: 14px 20px; background: var(--bg-color); color: var(--text-main);
    border: none; border-radius: 14px; font-size: 15px; font-weight: 600;
    font-family: var(--font-heading); cursor: pointer; transition: all 0.2s;
}
.wizard-footer .btn-back:hover { background: var(--primary-light); }
.wizard-footer .btn-next {
    flex: 1; padding: 14px; background: var(--gradient); color: #FFF;
    border: none; border-radius: 14px; font-size: 15px; font-weight: 700;
    font-family: var(--font-heading); cursor: pointer;
    box-shadow: 0 4px 16px var(--primary-glow); transition: all 0.25s ease;
}
.wizard-footer .btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--primary-glow); }
.wizard-footer .btn-next:active { transform: scale(0.98); }

/* Wizard form elements */
.wizard-step .form-group { margin-bottom: 18px; }
.wizard-step .form-group:last-child { margin-bottom: 0; }
.wizard-step .quote-box {
    background: var(--primary-light); padding: 20px; border-radius: 16px;
    margin-bottom: 16px; font-style: italic; color: var(--primary);
    border-left: 4px solid var(--primary); font-size: 15px; line-height: 1.6;
}
html[dir="rtl"] .wizard-step .quote-box { border-left: none; border-right: 4px solid var(--primary); }

/* ── Install Banner ── */
.install-banner {
    position: fixed; bottom: 84px; left: 16px; right: 16px; z-index: 150;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; gap: 12px; border-radius: 18px;
    background: var(--surface); box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}
.install-info { flex: 1; display: flex; flex-direction: column; }
.install-info strong { font-size: 14px; }
.install-info span { font-size: 12px; color: var(--text-muted); }
/* ── Overview Styles ── */
.overview-grid { display: grid; gap: 16px; padding: 4px 0; }
.trend-card {
    background: var(--surface); border-radius: 20px; padding: 20px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
}
.trend-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.trend-icon {
    width: 40px; height: 40px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 20px;
}
.trend-title { font-weight: 700; font-size: 16px; }
.trend-stats { display: flex; justify-content: space-between; align-items: flex-end; }
.trend-val { font-size: 24px; font-weight: 800; font-family: var(--font-heading); color: var(--primary); }
.trend-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.trend-bar-bg { height: 8px; background: var(--border-color); border-radius: 4px; margin-top: 12px; overflow: hidden; }
.trend-bar-fill { height: 100%; background: var(--gradient); border-radius: 4px; transition: width 0.5s ease; }

/* ── Chart Styles ── */
.filter-bar { padding: 12px 16px; margin-bottom: 20px; }
.chart-card { padding: 16px; border-radius: 20px; }
.chart-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-muted); }
.overview-charts-container canvas { width: 100% !important; height: 180px !important; }
