/* BarberBot V3 – Design System + Accessibility (WCAG 2.1 AA / ת"י 5568) */
:root {
    --bg: #0f1419;
    --surface: #1a2230;
    --surface-hover: #232f42;
    --text: #f0f2f5;      /* מוגבר מ-#e8eaed לניגודיות 4.5:1 */
    --text-muted: #b0b8c1; /* מוגבר מ-#9aa0a6 לניגודיות 3:1 */
    --accent: #4fc3f7;
    --accent-dim: #29b6f6;
    --green: #66bb6a;
    --green-dim: #43a047;
    --red: #ef5350;
    --red-dim: #e53935;
    --yellow: #ffca28;
    --yellow-dim: #ffb300;
    --blue: #42a5f5;
    --blue-dim: #1e88e5;
    --today: #7c4dff;
    --today-dim: #651fff;
    --border: #2d3a4d;
    --radius: 12px;
}

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

/* ===== ACCESSIBILITY CORE (WCAG 2.1 AA) ===== */

/* Screen-reader-only announcer */
#sr-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus-visible: clear outline for keyboard users */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove focus ring for mouse users */
:focus:not(:focus-visible) { outline: none; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== END ACCESSIBILITY CORE ===== */

body {
    font-family: 'Heebo', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    padding: 24px;
}

.v2-container { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.v2-container.wide { max-width: 1000px; }
.container { max-width: 600px; margin: 0 auto; padding: 20px; }

/* טקסט מובלט – הוראות וסיכום שלב (למשתמש תמיד יידע איפה הוא) */
.v2-highlight-text {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 12px 16px !important;
    margin: 0 0 12px 0 !important;
    background: rgba(79, 195, 247, 0.12) !important;
    border: 1px solid rgba(79, 195, 247, 0.35) !important;
    border-radius: 10px !important;
    border-right-width: 4px !important;
    border-right-color: var(--accent) !important;
    color: var(--text) !important;
}

/* Buttons */
.v2-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 18px;
    min-height: 48px;      /* WCAG 2.5.5 – touch target */
    min-width: 48px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.v2-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent-dim);
    color: var(--text);
}

.v2-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--blue-dim));
    border: none;
    color: white;
}

.v2-btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-dim), var(--blue));
    border: none;
    color: white;
}

.v2-btn-hero {
    background: linear-gradient(135deg, var(--accent), var(--blue));
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.v2-btn-hero:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
    color: white;
}

/* Form inputs */
.v2-input {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}

.v2-input::placeholder { color: var(--text-muted); }
.v2-input:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}
.v2-input[aria-invalid="true"] {
    border-color: var(--red);
    outline-color: var(--red);
}

/* Login page – aliases for .btn, .login-form */
.btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 20px;
    min-height: 48px;
    min-width: 48px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--surface-hover); border-color: var(--accent-dim); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--blue-dim));
    border: none;
    color: white;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-dim), var(--blue)); color: white; }
.btn-secondary { background: transparent; border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface); }
.btn-hero {
    background: linear-gradient(135deg, var(--accent), var(--blue));
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-hero:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
    color: white;
}

.login-container { padding: 40px 0; }
.login-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 400px;
    margin: 0 auto;
}
.login-form h2 { margin-bottom: 24px; font-size: 1.5rem; }
.login-form #login-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.login-form #login-options .btn { width: 100%; text-align: center; }
.login-form input[type="text"],
.login-form input[type="tel"],
.login-form input[type="number"],
.login-form input[type="password"] {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 12px;
}
.login-form input::placeholder { color: var(--text-muted); }
.login-form input:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}
.login-form input[aria-invalid="true"] {
    border-color: var(--red);
}
.login-form small { color: var(--text-muted); }
.error-message { color: var(--red); margin-top: 12px; font-size: 0.9rem; }
.success-message { color: var(--green); margin-top: 12px; font-size: 0.9rem; }
.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--accent);
    color: var(--bg);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    z-index: 100;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* Toast overrides for dark theme — explicit positioning to defeat style.css conflict */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    bottom: auto;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
}
#toast-container > .toast { pointer-events: auto; }
@media (max-width: 768px) {
    #toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
}
.toast {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-right: 4px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transform: translateX(100%);
}
.toast.show { transform: translateX(0); }
.toast-message { color: var(--text); }
.toast-close { color: var(--text); opacity: 0.7; background: transparent; border: 0; font-size: 20px; cursor: pointer; }
.toast-close:hover { opacity: 1; }
.toast-success { border-right-color: var(--green); background: linear-gradient(90deg, rgba(102,187,106,0.10), var(--surface) 40%); }
.toast-error   { border-right-color: var(--red);   background: linear-gradient(90deg, rgba(239,83,80,0.10), var(--surface) 40%); }
.toast-warning { border-right-color: #ffb74d;      background: linear-gradient(90deg, rgba(255,183,77,0.10), var(--surface) 40%); }
.toast-info    { border-right-color: var(--accent);background: linear-gradient(90deg, rgba(79,195,247,0.10), var(--surface) 40%); }

/* App dialog (dark confirm/prompt) */
.app-dialog-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 10010; padding: 20px;
    opacity: 0; transition: opacity 0.2s;
}
.app-dialog-overlay.open { opacity: 1; }
.app-dialog {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 420px; width: 100%;
    display: flex; flex-direction: column;
    transform: translateY(-10px); transition: transform 0.2s;
}
.app-dialog-overlay.open .app-dialog { transform: translateY(0); }
.app-dialog-title {
    margin: 0; padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem; font-weight: 600;
}
.app-dialog-body {
    padding: 16px 20px; line-height: 1.5;
    color: var(--text);
}
.app-dialog-input {
    width: 100%; padding: 10px 12px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.95rem; font-family: inherit;
}
.app-dialog-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.app-dialog-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 12px 20px; border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
    border-radius: 0 0 12px 12px;
}
.app-dialog-btn {
    padding: 9px 18px; min-height: 40px;
    border-radius: 8px; cursor: pointer;
    font-size: 0.95rem; font-weight: 500; font-family: inherit;
    border: 1px solid var(--border); background: var(--surface-hover); color: var(--text);
    transition: filter 0.15s, background 0.15s;
}
.app-dialog-btn:hover { filter: brightness(1.15); }
.app-dialog-btn-cancel { background: transparent; }
.app-dialog-btn-primary { background: linear-gradient(135deg, var(--accent), var(--blue-dim, #1976d2)); border-color: var(--accent); color: #fff; }
.app-dialog-btn-danger { background: var(--red); border-color: var(--red); color: #fff; }

/* ========== Dashboard & Admin (from demo admin-dashboard-v2 / user-dashboard-v2) ========== */

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.header-actions { display: flex; gap: 10px; align-items: center; }

.admin-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--today), var(--today-dim));
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(124, 77, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(124, 77, 255, 0.4);
    color: white;
}

.points-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--today), var(--today-dim));
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(124, 77, 255, 0.3);
}

/* Welcome */
.welcome { font-size: 1.25rem; font-weight: 500; margin-bottom: 4px; }
.welcome-sub { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; }

/* Hero Card – admin (purple gradient) or user (surface) */
.hero-card {
    background: linear-gradient(135deg, var(--today), var(--today-dim));
    border: none;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(124, 77, 255, 0.35);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    border-radius: 0 16px 0 100%;
}

.hero-card .hero-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; }
.hero-card .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    margin-bottom: 16px;
}

.hero-card .hero-stats span { font-size: 1rem; opacity: 0.95; }
.hero-card .btn {
    background: rgba(255,255,255,0.9);
    color: #333;
    border: none;
}

.hero-card .btn:hover { background: white; border: none; }

/* Hero Card – user dashboard (surface style) */
.hero-card.surface {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(30, 40, 60, 0.95) 100%);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: none;
}

.hero-card.surface::before {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.15), transparent);
}

.hero-card.appointment .hero-date { font-size: 2rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.hero-card.appointment .hero-time { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.hero-card.appointment .hero-details { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.hero-card.appointment .hero-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-card.appointment .hero-status.approved { background: rgba(102, 187, 106, 0.25); color: var(--green); }
.hero-card.appointment .hero-status.pending { background: rgba(255, 202, 40, 0.25); color: var(--yellow); }

/* Hero card actions — primary "אשר הגעה" + secondary "הוסף ליומן" */
.hero-card.appointment .hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.hero-card.appointment .btn-confirm-primary,
.hero-card.appointment .btn-add-calendar {
    flex: 1 1 auto;
    min-width: 160px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.12s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
    box-sizing: border-box;
    line-height: 1.2;
    text-align: center;
}
.hero-card.appointment .btn-confirm-primary {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(67, 160, 71, 0.35);
}
.hero-card.appointment .btn-confirm-primary:hover,
.hero-card.appointment .btn-confirm-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.5);
    background: linear-gradient(135deg, #76d27a, #4caf50);
}
.hero-card.appointment .btn-add-calendar {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.hero-card.appointment .btn-add-calendar:hover,
.hero-card.appointment .btn-add-calendar:focus-visible {
    background: rgba(79, 195, 247, 0.12);
    transform: translateY(-1px);
}
@media (max-width: 480px) {
    .hero-card.appointment .btn-confirm-primary,
    .hero-card.appointment .btn-add-calendar { flex: 1 1 100%; }
}

.hero-card.cta { text-align: center; padding: 32px 24px; }
.hero-card.cta .hero-cta-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.hero-card.cta .hero-cta-sub { color: var(--text-muted); margin-bottom: 20px; }

/* Stats Strip */
.stats-strip { display: flex; gap: 12px; margin-bottom: 24px; }
.stat-item {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

.stat-item:hover {
    border-color: var(--accent-dim);
    transform: translateY(-1px);
}

.stat-item .num { font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.stat-item .label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.stat-item .progress-wrap {
    height: 4px;
    background: rgba(0,0,0,0.3);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.stat-item .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--today), var(--today-dim));
    border-radius: 2px;
    transition: width 0.3s;
}

/* Section Label */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

/* Quick Menu */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.quick-item:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.quick-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.quick-item p { font-size: 0.85rem; color: var(--text-muted); }
.quick-item.primary {
    grid-column: span 2;
    border: 2px solid var(--accent);
    background: rgba(79, 195, 247, 0.06);
}

/* More section */
.more-toggle {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    padding: 12px 20px;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: border-color 0.2s, color 0.2s;
}

.more-toggle:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

.more-items {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.more-items.open { display: grid; }

/* Dashboard/Admin footer */
.dash-footer,
footer.dash-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dash-footer a,
footer.dash-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.dash-footer a:hover,
footer.dash-footer a:hover { color: var(--accent); }

/* Admin container – wider for admin dashboard */
.admin-container { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.admin-container.wide { max-width: 1000px; }

/* ספינר טעינה גלובלי – לכל כפתור שמציג "שומר...", "שולח..." וכו' */
.btn-loading { position: relative; pointer-events: none; }
.btn-loading .btn-spinner { display: inline-block; width: 18px; height: 18px; margin-inline-start: 8px; vertical-align: middle; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: btn-spin 0.7s linear infinite; }
.btn-loading:not([style*="background"]) .btn-spinner { border-color: rgba(255,255,255,0.2); border-top-color: var(--text); }
@keyframes btn-spin { to { transform: rotate(360deg); } }
/* ספינר לאזור תוכן (LoadingManager.showSpinner) */
.spinner-container { text-align: center; padding: 24px; }
.spinner-container .spinner { display: inline-block; width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: btn-spin 0.8s linear infinite; margin-bottom: 12px; }
.spinner-message { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* Skeleton (dark theme) – דשבורד ו-booking */
.skeleton-loader { padding: 24px; }
.skeleton-line, .skeleton-circle {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
}
.skeleton-line { height: 16px; margin-bottom: 12px; }
.skeleton-circle { border-radius: 50%; }
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-loader .skeleton-line,
.skeleton-loader .skeleton-circle { animation: skeleton-shimmer 1.5s ease-in-out infinite; }

/* ===== ACCESSIBILITY ADDITIONS V3 ===== */

/* Error/field description text */
.field-error {
    color: var(--red);
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
}
.field-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
    display: block;
}

/* Labels */
label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}
label .required-mark {
    color: var(--red);
    margin-inline-start: 2px;
    aria-hidden: true;
}

/* Modal accessibility */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-backdrop[hidden] { display: none; }

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 480px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box:focus { outline: none; }

.modal-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.modal-close-btn:hover { color: var(--text); background: var(--surface-hover); }

/* Accessibility statement link in footer */
.a11y-footer-link {
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.82rem;
}
.a11y-footer-link:hover { color: var(--accent); }

/* External link indicator */
a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.75em;
    vertical-align: super;
}

/* High-contrast hover for links */
a:hover { text-decoration: underline; }

/* Quick-item and stat-item keyboard focus */
.quick-item:focus-visible,
.stat-item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* More-toggle min size */
.more-toggle {
    min-height: 48px;
}

/* ===== UX IMPROVEMENTS — UX_TASKS_FOR_DEV.md ===== */

/* P0-1: Login screen hierarchy */
.login-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}
.login-hint strong { color: var(--text); font-weight: 600; }
.btn-block .secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}
@media (max-width: 480px) {
    .btn-block .secondary-row { grid-template-columns: 1fr; }
}
.login-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.login-footer a:hover { color: var(--accent); text-decoration: underline; }

/* P0-2: Google button spinner */
.btn-google.is-loading {
    pointer-events: none;
    opacity: 0.85;
}
.btn-google .google-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #4285F4;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    margin-inline-end: 8px;
    vertical-align: middle;
}

/* P0-3: Booking stepper */
.booking-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 14px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 0 18px 0;
}
.booking-stepper .step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.booking-stepper .step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
}
.booking-stepper .step.done {
    color: var(--green, #66bb6a);
}
.booking-stepper .step.done .step-num {
    background: rgba(102, 187, 106, 0.15);
    border-color: var(--green, #66bb6a);
    color: var(--green, #66bb6a);
}
.booking-stepper .step.active {
    color: var(--accent);
    background: rgba(79, 195, 247, 0.12);
}
.booking-stepper .step.active .step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.booking-stepper .sep {
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 0.9rem;
}
@media (max-width: 480px) {
    .booking-stepper { gap: 2px; padding: 10px 6px; }
    .booking-stepper .step { font-size: 0.78rem; gap: 4px; padding: 4px 3px; }
    .booking-stepper .step .step-num { width: 20px; height: 20px; font-size: 0.72rem; }
    .booking-stepper .sep { font-size: 0.78rem; }
}

/* P1-4: Toast errorRich (3-line: title + cause + action) */
.toast-rich { display: flex; flex-direction: column; gap: 4px; }
.toast-rich .rich-title { font-weight: 700; color: var(--text); }
.toast-rich .rich-cause { color: var(--text-muted); font-size: 0.9rem; }
.toast-rich .rich-action { color: var(--accent); font-size: 0.9rem; font-weight: 500; }

/* Toast dedupe shake — when same toast is re-triggered while still visible */
@keyframes toast-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.toast.toast-shake { animation: toast-shake 0.35s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
    .toast.toast-shake { animation: none; }
}

/* P1-6: Landing CTA subtitle + glow */
.cta-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 12px;
    line-height: 1.6;
}
.cta-subtitle .check { color: var(--green, #66bb6a); margin-inline-end: 4px; }

/* P1-7: Real-time validation states */
.input-row { position: relative; display: block; margin-bottom: 14px; }
.input-row .input-status {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
[dir="rtl"] .input-row .input-status { left: 12px; right: auto; }
.input-row.valid .input-status { opacity: 1; color: var(--green, #66bb6a); }
.input-row.invalid .input-status { opacity: 1; color: var(--red); }
.input-row.valid input { border-color: var(--green, #66bb6a) !important; }
.input-row.invalid input { border-color: var(--red) !important; }

.pw-strength {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pw-strength-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0%;
    background: var(--red);
    border-radius: 3px;
    transition: width 0.25s, background 0.25s;
}
.pw-strength[data-level="1"] .pw-strength-fill { width: 33%; background: #ef5350; }
.pw-strength[data-level="2"] .pw-strength-fill { width: 66%; background: #ffa726; }
.pw-strength[data-level="3"] .pw-strength-fill { width: 100%; background: #66bb6a; }
.pw-strength-label { font-size: 0.8rem; color: var(--text-muted); }
.pw-strength[data-level="1"] .pw-strength-label { color: #ef5350; }
.pw-strength[data-level="2"] .pw-strength-label { color: #ffa726; }
.pw-strength[data-level="3"] .pw-strength-label { color: #66bb6a; }

/* P2-8: Button consistency — .btn-ghost (transparent text-only) */
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--accent); background: rgba(79, 195, 247, 0.08); }

/* P2-9: Empty state — global */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.85;
}
.empty-state .empty-title {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}
.empty-state .empty-msg {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 18px 0;
    line-height: 1.5;
}
.empty-state .empty-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--accent), var(--blue-dim));
    color: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    min-height: 48px;
    transition: transform 0.15s, box-shadow 0.2s;
}
.empty-state .empty-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 195, 247, 0.35);
    color: #fff;
    text-decoration: none;
}

/* ===== Waitlist (רשימת המתנה) — design system ===== */
.waitlist-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-right: 4px solid var(--accent);
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.waitlist-card.success {
    border-right-color: var(--green, #66bb6a);
}
.waitlist-card .waitlist-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.waitlist-card.success .waitlist-eyebrow { color: var(--green, #66bb6a); }
.waitlist-card .waitlist-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px 0;
    line-height: 1.4;
}
.waitlist-card .waitlist-msg {
    margin: 0 0 14px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}
.waitlist-card .waitlist-msg strong { color: var(--text); }
.waitlist-card .waitlist-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.waitlist-card .waitlist-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--accent), var(--blue-dim, #1976d2));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    min-height: 48px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.waitlist-card .waitlist-cta:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 195, 247, 0.35);
}
.waitlist-card .waitlist-cta:disabled { opacity: 0.65; cursor: not-allowed; }
.waitlist-card .waitlist-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 48px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.waitlist-card .waitlist-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--accent-dim);
    color: var(--accent);
}
.waitlist-card .waitlist-secondary.danger { color: #ef5350; }
.waitlist-card .waitlist-secondary.danger:hover { color: #fff; background: #ef5350; border-color: #ef5350; }
.waitlist-card .waitlist-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 8px 0 14px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.waitlist-card .waitlist-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.waitlist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.waitlist-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-right: 4px solid var(--yellow, #ffca28);
    border-radius: 10px;
    padding: 14px 16px;
}
.waitlist-item h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}
.waitlist-item .waitlist-item-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}
.waitlist-item .waitlist-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
@media (max-width: 480px) {
    .waitlist-card { padding: 16px; }
    .waitlist-card .waitlist-actions { flex-direction: column; }
    .waitlist-card .waitlist-cta,
    .waitlist-card .waitlist-secondary { width: 100%; }
}

/* ===== END ACCESSIBILITY ADDITIONS V3 ===== */
