/* ===== NAFAS APP STYLES ===== */
/* Matches landing page design tokens */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Kufi+Arabic:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --emerald: #0D6B58;
    --emerald-deep: #064E3B;
    --emerald-light: #10B981;
    --gold: #D4A853;
    --gold-soft: #F5E6C8;
    --cream: #FEFCF6;
    --charcoal: #1A1A2E;
    --slate: #4A5568;
    --mist: #E8F0EC;
    --red: #DC2626;
    --red-soft: #FEE2E2;
}

body {
    font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    direction: rtl;
    min-height: 100vh;
}

/* ===== LAYOUT ===== */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(13,107,88,0.1);
    margin-bottom: 1.5rem;
}

.app-logo {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald-deep);
    text-decoration: none;
}

.app-logo span {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 500;
    display: block;
    letter-spacing: 0.1em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-reset {
    background: none;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: var(--red-soft);
}

/* ===== VIEWS (shown/hidden) ===== */
.view { display: none; flex: 1; }
.view.active { display: flex; flex-direction: column; }

/* ===== ONBOARDING ===== */
.onboarding-header {
    text-align: center;
    padding: 2rem 0;
}

.onboarding-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.onboarding-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.5rem;
}

.onboarding-subtitle {
    font-size: 0.95rem;
    color: var(--slate);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--mist);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: var(--charcoal);
    direction: rtl;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--emerald);
}

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

.form-input::placeholder, .form-textarea::placeholder {
    color: #B0B8C4;
}

/* ===== BUTTONS ===== */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6,78,59,0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 0.85rem;
    background: white;
    color: var(--emerald-deep);
    border: 2px solid var(--emerald);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--mist);
}

.btn-gold {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--gold), #C4943A);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,168,83,0.4);
}

/* ===== DASHBOARD ===== */
.dashboard-greeting {
    text-align: center;
    padding: 1.5rem 0;
}

.greeting-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.greeting-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.25rem;
}

.greeting-sub {
    font-size: 0.9rem;
    color: var(--slate);
}

/* Progress Bar */
.progress-section {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(13,107,88,0.08);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
}

.progress-count {
    font-size: 0.8rem;
    color: var(--emerald);
    font-weight: 600;
}

.progress-bar {
    height: 10px;
    background: var(--mist);
    border-radius: 10px;
    overflow: hidden;
    direction: ltr;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-deep), var(--emerald-light));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Day Cards */
.days-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.day-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 14px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.day-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.day-card.current {
    border-color: var(--emerald);
    background: linear-gradient(135deg, rgba(13,107,88,0.04), rgba(16,185,129,0.04));
}

.day-card.completed {
    border-color: var(--emerald-light);
    background: rgba(16,185,129,0.06);
}

.day-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.day-card.locked:hover {
    transform: none;
    box-shadow: none;
}

/* Time-locked days: visible but not accessible yet */
.day-card.time-locked {
    opacity: 0.65;
    cursor: default;
    border-color: var(--mist);
    background: rgba(120, 113, 108, 0.04);
}

.day-card.time-locked:hover {
    transform: none;
    box-shadow: none;
}

.day-card.time-locked .day-status {
    color: var(--slate);
    font-size: 0.78rem;
    font-weight: 500;
}

.day-card.time-locked .day-arrow {
    color: var(--slate);
    font-size: 0.9rem;
}

/* ===== EXERCISE NUDGE OVERLAY ===== */
.exercise-nudge-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.exercise-nudge-overlay.show {
    opacity: 1;
}

.exercise-nudge-card {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 2rem 1.5rem 2.5rem;
    width: 100%;
    max-width: 480px;
    text-align: center;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}

.exercise-nudge-overlay.show .exercise-nudge-card {
    transform: translateY(0);
}

.exercise-nudge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.exercise-nudge-message {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    direction: rtl;
}

.exercise-nudge-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exercise-nudge-edit {
    background: var(--emerald);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}

.exercise-nudge-edit:active {
    opacity: 0.85;
}

.exercise-nudge-dismiss {
    background: none;
    color: var(--slate);
    border: 1px solid var(--mist);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}

.exercise-nudge-dismiss:active {
    opacity: 0.7;
}

.day-number {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.day-card.current .day-number {
    background: var(--emerald);
    color: white;
}

.day-card.completed .day-number {
    background: var(--emerald-light);
    color: white;
}

.day-card.locked .day-number {
    background: var(--mist);
    color: var(--slate);
}

.day-info {
    flex: 1;
}

.day-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.2rem;
}

.day-status {
    font-size: 0.8rem;
    color: var(--slate);
}

.day-card.current .day-status {
    color: var(--emerald);
    font-weight: 600;
}

.day-card.completed .day-status {
    color: var(--emerald-light);
}

.day-arrow {
    font-size: 1.2rem;
    color: var(--slate);
}

.day-card.current .day-arrow {
    color: var(--emerald);
}

.day-card.completed .day-arrow {
    color: var(--emerald-light);
}

/* Motivation card */
.motivation-card {
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.motivation-label {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.motivation-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
}

/* ===== DAY VIEW ===== */
.day-view-header {
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    margin: -1rem -1rem 0;
    padding: 2rem 1.5rem;
    color: white;
    border-radius: 0 0 24px 24px;
    text-align: center;
    position: relative;
}

.back-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.25);
}

.day-view-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.day-view-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
}

.day-view-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.day-content {
    padding: 1.5rem 0;
    flex: 1;
}

.day-intro {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--slate);
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border-right: 4px solid var(--gold);
}

/* Lesson sections */
.lesson-section {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(13,107,88,0.06);
}

.lesson-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lesson-content {
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--charcoal);
}

.lesson-content strong {
    color: var(--emerald-deep);
}

.lesson-content em {
    color: var(--emerald);
    font-style: normal;
    font-weight: 600;
}

/* Tip card */
.tip-section {
    background: var(--gold-soft);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(212,168,83,0.2);
}

.tip-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.tip-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--slate);
}

/* Exercise section */
.exercise-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border: 2px solid var(--emerald);
}

.exercise-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.exercise-badge {
    background: var(--emerald);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.exercise-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emerald-deep);
}

.exercise-description {
    font-size: 0.88rem;
    color: var(--slate);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.exercise-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 12px;
}

.exercise-group-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mist);
}

.exercise-field {
    margin-bottom: 0.75rem;
}

.exercise-field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.3rem;
}

.exercise-input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--mist);
    border-radius: 10px;
    font-size: 0.88rem;
    font-family: inherit;
    background: white;
    color: var(--charcoal);
    direction: rtl;
    transition: border-color 0.2s;
}

.exercise-input:focus {
    outline: none;
    border-color: var(--emerald);
}

.exercise-input::placeholder {
    color: #C0C8D0;
    font-size: 0.82rem;
}

/* Reflection */
.reflection-section {
    background: linear-gradient(135deg, rgba(13,107,88,0.06), rgba(16,185,129,0.04));
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--emerald);
}

.reflection-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.5rem;
}

.reflection-content {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--slate);
}

/* Complete day button area (legacy - kept for compat) */
.day-actions {
    padding: 0;
    display: none;
}

/* ===== LESSON TRACK (progress bar inside day view) ===== */
.lesson-track {
    background: white;
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0 0.75rem;
    border: 1px solid rgba(13,107,88,0.08);
}

.lesson-track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.lesson-track-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--emerald);
}

.lesson-resume-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold);
    background: var(--gold-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.lesson-track-bar {
    height: 6px;
    background: var(--mist);
    border-radius: 6px;
    overflow: hidden;
    direction: ltr;
}

.lesson-track-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-deep), var(--emerald-light));
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* ===== LESSON STAGE (one card shown at a time) ===== */
.lesson-stage {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 200px;
}

/* Card base */
.lesson-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(13,107,88,0.07);
    margin-bottom: 0.5rem;
}

.lesson-card.card-tip {
    background: var(--gold-soft);
    border-color: rgba(212,168,83,0.2);
}

.lesson-card.card-exercise {
    border: 2px solid var(--emerald);
    margin-top: 0;
}

.lesson-card.card-reflection {
    background: linear-gradient(135deg, rgba(13,107,88,0.05), rgba(16,185,129,0.03));
    border-right: 4px solid var(--emerald);
}

.lesson-card.card-intro {
    background: white;
    border-right: 4px solid var(--gold);
}

.lesson-card.card-video {
    background: #fff9f9;
    border-right: 4px solid #c0392b;
    padding: 1.25rem;
}

.video-intro {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--charcoal);
    margin-bottom: 1rem;
    font-weight: 500;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-bottom: 0.75rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: none;
}

.video-note {
    font-size: 0.8rem;
    color: var(--slate);
    text-align: center;
    margin-top: 0.25rem;
}

/* Slide animations (RTL-aware: next comes from left, prev from right) */
@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes cardPulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.018); }
    100% { transform: scale(1); }
}

.lesson-card.anim-next {
    animation: slideFromLeft 0.28s ease forwards;
}

.lesson-card.anim-prev {
    animation: slideFromRight 0.28s ease forwards;
}

.lesson-card.anim-complete {
    animation: cardPulse 0.4s ease;
}

/* Lesson card type labels */
.lesson-card-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--emerald);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.lesson-card.card-tip .lesson-card-type {
    color: #8B6914;
}

.lesson-card.card-exercise .lesson-card-type {
    color: var(--emerald-deep);
    opacity: 1;
}

/* ===== LESSON FOOTER (nav buttons) ===== */
.lesson-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0 1.5rem;
    align-items: center;
}

.lesson-btn-prev {
    flex: 0 0 auto;
    padding: 0.75rem 1.1rem;
    background: white;
    color: var(--emerald-deep);
    border: 2px solid var(--emerald);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.lesson-btn-prev:hover:not(:disabled) {
    background: var(--mist);
}

.lesson-btn-prev:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lesson-btn-next {
    flex: 1;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.lesson-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6,78,59,0.25);
}

.lesson-btn-next.btn-complete {
    background: linear-gradient(135deg, var(--gold), #C4943A);
}

.lesson-btn-next.btn-complete:hover {
    box-shadow: 0 4px 12px rgba(212,168,83,0.35);
}

.lesson-btn-next.btn-done {
    background: var(--mist);
    color: var(--slate);
    cursor: not-allowed;
}

.lesson-btn-next.btn-done:hover {
    transform: none;
    box-shadow: none;
}

/* ===== AUDIO TOGGLE BUTTON ===== */
.btn-audio-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1;
}

.btn-audio-toggle:hover {
    background: var(--mist);
}

.btn-audio-toggle.muted {
    opacity: 0.5;
}

/* ===== AUDIO PLAYER BAR ===== */
.audio-player-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    border-radius: 12px;
    margin-top: auto;
    margin-bottom: 1rem;
}

.audio-player-bar.no-voice {
    background: var(--mist);
    border: 1px dashed var(--slate);
}

.audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--emerald-deep);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.audio-play-btn:hover {
    transform: scale(1.05);
}

.audio-play-btn.playing {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.audio-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-player-bar.no-voice .audio-title {
    color: var(--slate);
}

.audio-progress {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-top: 0.35rem;
    overflow: hidden;
}

.audio-player-bar.no-voice .audio-progress {
    display: none;
}

.audio-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s;
}

.audio-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
    min-width: 35px;
    text-align: left;
}

.audio-player-bar.no-voice .audio-time {
    color: var(--slate);
}

/* RTL-friendly: flip progress bar direction */
.audio-player-bar {
    direction: ltr;
}

.audio-player-bar .audio-progress-fill {
    direction: rtl;
}

/* Read text indicator */
.read-text-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--slate);
    padding: 0.75rem;
    background: var(--mist);
    border-radius: 8px;
    margin-top: auto;
    margin-bottom: 1rem;
}

.read-text-indicator svg {
    width: 18px;
    height: 18px;
    fill: var(--slate);
}

/* ===== DAY SUMMARY VIEW ===== */
.day-summary-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.day-summary-anim {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes popIn {
    from { transform: scale(0.4) rotate(-10deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);    opacity: 1; }
}

.day-summary-title {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.5rem;
}

.day-summary-subtitle {
    font-size: 1rem;
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.day-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.day-summary-card {
    background: white;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(13,107,88,0.08);
}

.day-summary-card-num {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--emerald);
}

.day-summary-card-label {
    font-size: 0.75rem;
    color: var(--slate);
    margin-top: 0.2rem;
}

.day-summary-quote {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--emerald-deep);
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(13,107,88,0.06), rgba(16,185,129,0.04));
    border-radius: 12px;
    border-right: 4px solid var(--emerald);
    width: 100%;
}

/* ===== DAY 1 FEEDBACK SURVEY ===== */
.day-feedback-survey {
    width: 100%;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(13,107,88,0.10);
    padding: 1.25rem 1.25rem 1rem;
    margin-bottom: 1.5rem;
    text-align: right;
    direction: rtl;
}

.feedback-survey-title {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 1.1rem;
    text-align: center;
}

.feedback-question {
    margin-bottom: 1rem;
}

.feedback-q-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 0.5rem;
}

.feedback-optional {
    font-weight: 400;
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Star rating */
.feedback-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.4rem;
    font-size: 2rem;
    cursor: pointer;
}

.feedback-star {
    color: #d1d5db;
    transition: color 0.15s, transform 0.1s;
    user-select: none;
    line-height: 1;
}

.feedback-star:hover,
.feedback-star.active {
    color: #f59e0b;
}

.feedback-star:hover {
    transform: scale(1.2);
}

/* Yes/No */
.feedback-yesno {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.feedback-yn-btn {
    flex: 1;
    max-width: 120px;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1.5px solid rgba(13,107,88,0.20);
    background: white;
    color: var(--slate);
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.feedback-yn-btn.selected-yes {
    background: rgba(16,185,129,0.12);
    border-color: var(--emerald);
    color: var(--emerald-deep);
}

.feedback-yn-btn.selected-no {
    background: rgba(239,68,68,0.08);
    border-color: #ef4444;
    color: #b91c1c;
}

/* Textarea */
.feedback-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1.5px solid rgba(13,107,88,0.15);
    padding: 0.65rem 0.8rem;
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 0.88rem;
    color: var(--charcoal);
    background: #f9fafb;
    resize: none;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.feedback-textarea:focus {
    border-color: var(--emerald);
    background: white;
}

/* Actions */
.feedback-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.feedback-submit-btn {
    font-size: 0.95rem !important;
    padding: 0.75rem !important;
}

.feedback-skip-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.25rem;
    text-align: center;
    text-decoration: underline;
    width: 100%;
}

.feedback-skip-btn:hover {
    color: var(--slate);
}

/* Thank you state */
.feedback-thankyou {
    text-align: center;
    padding: 1rem 0 0.5rem;
}

.feedback-thankyou-icon {
    font-size: 2.5rem;
    margin-bottom: 0.4rem;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.feedback-thankyou-text {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--emerald-deep);
}

/* ===== COMPLETION VIEW ===== */
.completion-view {
    text-align: center;
    padding: 3rem 1rem;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.completion-title {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.5rem;
}

.completion-subtitle {
    font-size: 1rem;
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.completion-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.completion-stat {
    background: white;
    border-radius: 14px;
    padding: 1.25rem;
    border: 1px solid rgba(13,107,88,0.08);
}

.completion-stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--emerald);
}

.completion-stat-label {
    font-size: 0.8rem;
    color: var(--slate);
    margin-top: 0.25rem;
}

.completion-quote {
    font-family: 'Noto Kufi Arabic', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--emerald-deep);
    margin: 2rem 0;
    line-height: 1.6;
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    flex-direction: column;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--mist);
    border-top-color: var(--emerald);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 0.9rem;
    color: var(--slate);
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--charcoal);
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    z-index: 1000;
    transition: transform 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: var(--red);
}

.toast.success {
    background: var(--emerald);
}

/* ===== QUIT TRACKER ===== */
.tracker-section {
    margin-bottom: 1.25rem;
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tracker-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
}

.tracker-subtitle {
    font-size: 0.75rem;
    color: var(--slate);
}

/* Smoke-free counter (large) */
.smokefree-counter {
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    border-radius: 20px;
    padding: 2rem 1.5rem;
    color: white;
    text-align: center;
    margin-bottom: 1.25rem;
}

.smokefree-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.smokefree-label {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Stats grid for tracker */
.tracker-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tracker-stat {
    background: white;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(13,107,88,0.08);
}

.tracker-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tracker-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--emerald);
}

.tracker-stat-value.gold {
    color: var(--gold);
}

.tracker-stat-label {
    font-size: 0.75rem;
    color: var(--slate);
    margin-top: 0.15rem;
}

/* Health timeline */
.health-timeline {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(13,107,88,0.08);
    margin-bottom: 1.25rem;
}

.health-timeline-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-milestone {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--mist);
}

.health-milestone:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.health-milestone:first-child {
    padding-top: 0;
}

.milestone-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.milestone-check.achieved {
    background: var(--emerald-light);
    color: white;
}

.milestone-check.pending {
    background: var(--mist);
    color: var(--slate);
}

.milestone-check.current {
    background: var(--gold);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.milestone-text {
    flex: 1;
}

.milestone-time {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--emerald);
    margin-bottom: 0.15rem;
}

.milestone-desc {
    font-size: 0.82rem;
    color: var(--charcoal);
    line-height: 1.5;
}

/* Quit date setup form */
.quit-setup {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--gold);
    margin-bottom: 1.25rem;
}

.quit-setup-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--emerald-deep);
    margin-bottom: 0.5rem;
    text-align: center;
}

.quit-setup-sub {
    font-size: 0.85rem;
    color: var(--slate);
    text-align: center;
    margin-bottom: 1.25rem;
}

.quit-setup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quit-date-input {
    padding: 0.85rem 1rem;
    border: 2px solid var(--mist);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: var(--charcoal);
    direction: rtl;
    text-align: center;
}

.quit-date-input:focus {
    outline: none;
    border-color: var(--emerald);
}

/* Navigation between dashboard and tracker */
.dashboard-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.nav-tab {
    flex: 1;
    padding: 0.75rem;
    background: white;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--slate);
}

.nav-tab.active {
    border-color: var(--emerald);
    color: var(--emerald-deep);
    background: rgba(13,107,88,0.04);
}

.nav-tab:hover:not(.active) {
    background: var(--mist);
}

/* Tracker greeting */
.tracker-greeting {
    text-align: center;
    padding: 1rem 0;
}

.tracker-greeting-emoji {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.tracker-greeting-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--emerald-deep);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .app-container {
        padding: 0.75rem;
    }

    .day-view-header {
        margin: -0.75rem -0.75rem 0;
        padding: 1.5rem 1rem;
    }

    .completion-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .smokefree-number {
        font-size: 3rem;
    }

    .tracker-stats {
        gap: 0.5rem;
    }

    .tracker-stat {
        padding: 0.75rem;
    }

    .tracker-stat-value {
        font-size: 1.2rem;
    }
}

/* ===== ONBOARDING WIZARD ===== */
.wizard-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding-bottom: 1rem;
}

.wizard-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: wizardSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.slide-out {
    animation: wizardSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wizardSlideIn {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes wizardSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(28px); }
}

/* Step header */
.wizard-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0 0.75rem;
    gap: 0.75rem;
}

.wizard-progress-dots {
    display: flex;
    gap: 6px;
    flex: 1;
}

.wizard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mist);
    transition: all 0.3s ease;
}
.wizard-dot.active {
    width: 22px;
    border-radius: 4px;
    background: var(--emerald);
}
.wizard-dot.done {
    background: var(--emerald-light);
}

.wizard-skip-btn {
    background: none;
    border: none;
    color: var(--slate);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: color 0.2s;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wizard-skip-btn:hover { color: var(--charcoal); }

/* Question card */
.wizard-card {
    background: white;
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(13,107,88,0.08);
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.wizard-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.wizard-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--emerald-deep);
    line-height: 1.45;
    margin-bottom: 0.25rem;
    text-align: center;
}

.wizard-question-sub {
    font-size: 0.85rem;
    color: var(--slate);
    text-align: center;
    margin-bottom: 1.25rem;
}

/* Name step specific */
.wizard-name-input-wrap {
    margin-top: 1rem;
}

.wizard-name-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--mist);
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    background: var(--cream);
    color: var(--charcoal);
    direction: rtl;
    text-align: center;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}
.wizard-name-input:focus {
    outline: none;
    border-color: var(--emerald);
}

/* Option buttons */
.wizard-options {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.wizard-options.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.wizard-option-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: var(--cream);
    border: 2px solid var(--mist);
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: right;
    direction: rtl;
    justify-content: flex-start;
}

.wizard-option-btn .opt-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1;
}

.wizard-option-btn:hover {
    border-color: var(--emerald-light);
    background: var(--mist);
    transform: translateY(-1px);
}

.wizard-option-btn.selected {
    border-color: var(--emerald);
    background: linear-gradient(135deg, rgba(13,107,88,0.08), rgba(16,185,129,0.06));
    color: var(--emerald-deep);
}

.wizard-option-btn.selected::after {
    content: '✓';
    margin-right: auto;
    color: var(--emerald);
    font-weight: 800;
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* ===== PROFILE ICON BTN ===== */
.btn-profile-icon {
    background: none;
    border: 1px solid rgba(13,107,88,0.2);
    color: var(--emerald-deep);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.btn-profile-icon:hover {
    background: var(--mist);
    border-color: var(--emerald);
}

/* ===== PROFILE PANEL ===== */
.profile-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.profile-panel {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUpPanel 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpPanel {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.profile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mist);
    position: sticky;
    top: 0;
    background: white;
    border-radius: 20px 20px 0 0;
}

.profile-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--emerald-deep);
}

.profile-panel-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--slate);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.profile-panel-close:hover { background: var(--mist); }

.profile-panel-body {
    padding: 1.5rem;
}

/* Profile edit row */
.profile-edit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--mist);
}
.profile-edit-row:last-child { border-bottom: none; }

.profile-edit-label {
    font-size: 0.82rem;
    color: var(--slate);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.profile-edit-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--charcoal);
}

.profile-edit-change-btn {
    background: none;
    border: 1px solid var(--emerald);
    color: var(--emerald);
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.profile-edit-change-btn:hover {
    background: var(--mist);
}

/* ===== PERSONALIZED DAY INTRO BANNER ===== */
.personalized-banner {
    background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
    color: white;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.personalized-banner-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.personalized-banner-text {
    flex: 1;
}

.personalized-banner-text strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.75;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

/* ===== FAMILY STAR BADGE ===== */
.family-star-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--gold-soft);
    color: #8B6914;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.4rem;
}

/* ===== CIGARETTE INGREDIENTS MODULE ===== */

/* Dashboard banner */
.ingredients-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #1A0A0A, #3B0000);
    border-radius: 16px;
    border: 1px solid rgba(220,38,38,0.3);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.ingredients-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220,38,38,0.2);
}

.ingredients-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.ingredients-banner-body {
    flex: 1;
}

.ingredients-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
}

.ingredients-banner-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
}

.ingredients-banner-arrow {
    font-size: 1.2rem;
    color: var(--red);
    font-weight: 700;
}

/* Ingredients intro */
.ingredients-intro {
    background: var(--red-soft);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--charcoal);
    line-height: 1.6;
}

.ingredients-intro strong {
    color: var(--red);
}

/* Ingredients list */
.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.ingredient-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ingredient-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-color: var(--red);
}

.ingredient-card.seen {
    background: rgba(16,185,129,0.04);
    border-color: rgba(16,185,129,0.2);
}

.ingredient-card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mist);
    border-radius: 10px;
}

.ingredient-card.seen .ingredient-card-icon {
    background: rgba(16,185,129,0.1);
}

.ingredient-card-body {
    flex: 1;
}

.ingredient-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.2rem;
}

.ingredient-card-tagline {
    font-size: 0.78rem;
    color: var(--red);
    font-weight: 500;
}

.ingredient-card.seen .ingredient-card-tagline {
    color: var(--emerald);
}

.ingredient-card-status {
    font-size: 1.1rem;
    color: var(--slate);
    font-weight: 700;
}

.ingredient-card.seen .ingredient-card-status {
    color: var(--emerald-light);
}

/* Ingredient detail card */
.ingredient-detail-card {
    padding: 1.25rem \!important;
}

.ingredient-tagline-badge {
    display: inline-block;
    background: var(--red-soft);
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.ingredient-description {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 1.25rem;
}

.ingredient-description strong {
    color: var(--charcoal);
    font-weight: 700;
}

/* Responsive YouTube embed */
.ingredient-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: #000;
}

.ingredient-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video placeholder (when URL not set yet) */
.ingredient-video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ingredient-video-placeholder-icon {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.3);
}

.ingredient-video-placeholder-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

/* Health impact callout */
.ingredient-health-impact {
    background: var(--red-soft);
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.ingredient-health-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ingredient-health-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #7f1d1d;
    line-height: 1.5;
}

/* ===== SOS FLOATING BUTTON ===== */
.sos-float-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 1.25rem; /* RTL: left side = visual right in LTR, but since dir=rtl, left is the end side */
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(5,150,105,0.45), 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-family: 'Noto Kufi Arabic', sans-serif;
    min-width: 64px;
}
.sos-float-btn:active {
    transform: scale(0.94);
    box-shadow: 0 2px 10px rgba(5,150,105,0.35);
}
.sos-float-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.sos-float-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* Pulse animation for extra attention */
@keyframes sosPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(5,150,105,0.45), 0 2px 8px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 4px 28px rgba(5,150,105,0.7), 0 2px 14px rgba(0,0,0,0.2); }
}
.sos-float-btn {
    animation: sosPulse 3s ease-in-out infinite;
}

/* ===== SOS OVERLAY ===== */
.sos-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    background: rgba(6, 78, 59, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.sos-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.sos-panel {
    background: var(--cream);
    width: 100%;
    max-width: 600px;
    border-radius: 24px 24px 0 0;
    padding: 1.5rem 1.25rem 2.5rem;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 92vh;
    overflow-y: auto;
    direction: rtl;
}
.sos-overlay.open .sos-panel {
    transform: translateY(0);
}

.sos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}
.sos-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--emerald-deep);
}
.sos-close-btn {
    background: rgba(0,0,0,0.07);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
    color: var(--slate);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.sos-close-btn:hover {
    background: rgba(0,0,0,0.12);
}

.sos-subtitle {
    font-size: 0.9rem;
    color: var(--slate);
    margin-bottom: 1.25rem;
}

/* ===== SOS TABS ===== */
.sos-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    background: var(--mist);
    border-radius: 12px;
    padding: 0.3rem;
}
.sos-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 0.55rem 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'Noto Kufi Arabic', sans-serif;
    white-space: nowrap;
}
.sos-tab.active {
    background: white;
    color: var(--emerald);
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

/* ===== SOS PANES ===== */
.sos-pane {
    display: none;
    animation: sosFadeIn 0.22s ease;
}
.sos-pane.active {
    display: block;
}
@keyframes sosFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BREATHING PANE ===== */
.breathing-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0 1rem;
}

.breathing-outer-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(16,185,129,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 4s ease-in-out, background 1s ease;
    flex-shrink: 0;
}
.breathing-outer-ring.inhale {
    transform: scale(1.25);
    background: rgba(16,185,129,0.22);
    transition: transform 4s ease-in-out, background 1s ease;
}
.breathing-outer-ring.hold {
    transform: scale(1.25);
    background: rgba(16,185,129,0.28);
    transition: transform 0.3s ease, background 0.5s ease;
}
.breathing-outer-ring.exhale {
    transform: scale(1);
    background: rgba(16,185,129,0.1);
    transition: transform 8s ease-in-out, background 2s ease;
}

.breathing-ball {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    box-shadow: 0 4px 20px rgba(16,185,129,0.4);
}
.breathing-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}
.breathing-count {
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255,255,255,0.9);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.breathing-phase {
    font-size: 1rem;
    font-weight: 700;
    color: var(--emerald-deep);
    text-align: center;
}
.breathing-hint {
    font-size: 0.8rem;
    color: var(--slate);
    text-align: center;
}

/* ===== DISTRACTION TIMER PANE ===== */
.distract-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0 1rem;
}

.distract-timer-ring {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}
.distract-svg {
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
}
.distract-track {
    fill: none;
    stroke: var(--mist);
    stroke-width: 8;
}
.distract-fill {
    fill: none;
    stroke: var(--emerald-light);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s linear;
}
.distract-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.distract-time {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--emerald-deep);
    font-variant-numeric: tabular-nums;
}

.distract-msg {
    font-size: 1rem;
    font-weight: 700;
    color: var(--charcoal);
    text-align: center;
    min-height: 2.5rem;
    transition: opacity 0.4s ease;
}
.distract-hint {
    font-size: 0.8rem;
    color: var(--slate);
    text-align: center;
}

/* ===== QUOTE PANE ===== */
.quote-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding: 0.5rem 0 1rem;
    text-align: center;
}
.quote-icon-big {
    font-size: 2.5rem;
}
.quote-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.7;
    padding: 0 0.5rem;
}
.quote-source {
    font-size: 0.82rem;
    color: var(--emerald);
    font-weight: 600;
}

/* ===== CALL PANE ===== */
.call-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 0.5rem 0 1rem;
    text-align: center;
}
.call-icon-big {
    font-size: 3rem;
}
.call-msg {
    font-size: 1rem;
    font-weight: 700;
    color: var(--charcoal);
}
.call-hint {
    font-size: 0.85rem;
    color: var(--slate);
    line-height: 1.6;
}
.sos-call-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: 'Noto Kufi Arabic', sans-serif;
}
.sos-call-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.call-suggestion {
    font-size: 0.82rem;
    color: var(--slate);
    font-style: italic;
    padding: 0.6rem 1rem;
    background: var(--mist);
    border-radius: 10px;
    width: 100%;
}

/* ===== SHARED SOS ACTION BUTTON ===== */
.sos-action-btn {
    background: var(--mist);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--emerald-deep);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: 'Noto Kufi Arabic', sans-serif;
}
.sos-action-btn:active {
    transform: scale(0.97);
    background: rgba(16,185,129,0.15);
}
