/* ── FONTS ── */
body, button, input, select, textarea { font-family: Inter, sans-serif; }
html[lang="he"] body, html[lang="he"] button, html[lang="he"] input,
html[lang="he"] select, html[lang="he"] textarea { font-family: 'Alexandria', sans-serif; }
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input,
html[lang="ar"] select, html[lang="ar"] textarea { font-family: 'Amiri', 'Alexandria', serif; }
h1, h2, h3, .font-display, .font-serif-title { font-family: 'Playfair Display', serif; }
html[lang="he"] h1, html[lang="he"] h2, html[lang="he"] h3,
html[lang="he"] .font-display, html[lang="he"] .font-serif-title { font-family: 'Alexandria', sans-serif; font-weight: 700; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .font-display, html[lang="ar"] .font-serif-title { font-family: 'Amiri', serif; font-weight: 700; }

html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #faf9f5; }
::-webkit-scrollbar-thumb { background: #193b20; border-radius: 4px; }

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal; font-style: normal; font-size: 24px;
    line-height: 1; letter-spacing: normal; text-transform: none;
    display: inline-block; white-space: nowrap; word-wrap: normal;
    direction: ltr; -webkit-font-smoothing: antialiased;
}

.brand-doodle-bg-light { background-color: #faf9f5; position: relative; }
.brand-doodle-bg-light::before {
    content: ''; position: absolute; inset: 0;
    background-image: url('../assets/falafel_najla_doodle_lighter.png');
    background-size: 420px; background-repeat: repeat;
    opacity: 0.45; pointer-events: none; z-index: 0;
}
.brand-doodle-bg-dark { background-color: #193b20; position: relative; }
.brand-doodle-bg-dark::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background-image: url('../assets/falafel_najla_doodle_dark.png');
    background-size: 380px; background-repeat: repeat;
    opacity: 0.15; pointer-events: none; z-index: 0;
}
.card-shadow { box-shadow: 0 4px 20px rgba(3,54,33,0.06), 0 1px 3px rgba(3,54,33,0.08); }
.card-shadow:hover { box-shadow: 0 12px 32px rgba(3,54,33,0.14), 0 2px 6px rgba(3,54,33,0.1); }
.nav-shadow { box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 4px 20px rgba(0,0,0,0.25); }
.account-container { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; position: relative; z-index: 10; }
.auth-card {
    background: #ffffff; border-radius: 2rem; padding: 2.5rem 2rem;
    box-shadow: 0 8px 40px rgba(3,54,33,0.10), 0 2px 8px rgba(3,54,33,0.06);
    max-width: 440px; margin: 2rem auto; position: relative; overflow: hidden;
}
.auth-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: #193b20;
}
.auth-tabs { display: flex; background: #efeded; border-radius: 999px; padding: 4px; margin-bottom: 1.75rem; gap: 4px; }
.auth-tab { flex: 1; padding: 0.6rem 1rem; border-radius: 999px; border: none; font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; background: transparent; color: #414943; }
.auth-tab.active { background: #193b20; color: #ffffff; box-shadow: 0 2px 8px rgba(3,54,33,0.25); }
.auth-tab:not(.active):hover { background: rgba(25,59,32,0.08); color: #193b20; }
.account-input { width: 100%; padding: 0.8rem 1rem; border: 1.5px solid #c1c9c1; border-radius: 0.875rem; font-size: 0.9rem; background: #faf9f5; color: #1b1c1c; transition: border-color 0.2s ease, box-shadow 0.2s ease; outline: none; box-sizing: border-box; }
.account-input:focus { border-color: #193b20; box-shadow: 0 0 0 3px rgba(25,59,32,0.1); background: #ffffff; }
.account-input::placeholder { color: #717972; }
.input-label { display: block; font-size: 0.75rem; font-weight: 700; color: #193b20; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.btn-primary { width: 100%; padding: 0.9rem 1.5rem; background: #193b20; color: #ffffff; border: none; border-radius: 999px; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-primary:hover { background: #0f2514; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(3,54,33,0.3); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary { padding: 0.65rem 1.25rem; background: transparent; color: #193b20; border: 1.5px solid #c1c9c1; border-radius: 999px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-secondary:hover { border-color: #193b20; background: rgba(25,59,32,0.06); }
.btn-danger { padding: 0.65rem 1.25rem; background: transparent; color: #ba1a1a; border: 1.5px solid #ba1a1a; border-radius: 999px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-danger:hover { background: #ba1a1a; color: #fff; }
.btn-gold { padding: 0.65rem 1.25rem; background: #b59410; color: #3d2c00; border: none; border-radius: 999px; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-gold:hover { background: #d4af37; box-shadow: 0 4px 16px rgba(180,148,16,0.35); }
.btn-icon { padding: 0; background: transparent; border: none; cursor: pointer; display: inline-flex; align-items: center; color: #717972; transition: color 0.2s; }
.btn-icon:hover { color: #193b20; }
.status-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.status-pending    { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.status-preparing  { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.status-ready      { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.status-out_for_delivery { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.status-completed  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.status-cancelled  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.tracking-stepper { display: flex; align-items: flex-start; gap: 0; margin: 1.5rem 0; overflow-x: auto; padding: 0.25rem 0 0.75rem; scrollbar-width: none; }
.tracking-stepper::-webkit-scrollbar { display: none; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 72px; position: relative; }
.step-item:not(:last-child)::after { content: ''; position: absolute; top: 20px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: #c1c9c1; z-index: 0; }
html[dir="rtl"] .step-item:not(:last-child)::after { left: calc(-50% + 20px); right: calc(50% + 20px); }
.step-item.done::after   { background: #193b20; }
.step-item.active::after { background: linear-gradient(90deg, #193b20, #c1c9c1); }
html[dir="rtl"] .step-item.active::after { background: linear-gradient(270deg, #193b20, #c1c9c1); }
.step-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2.5px solid #c1c9c1; background: #ffffff; position: relative; z-index: 1; transition: all 0.3s ease; flex-shrink: 0; }
.step-circle span { font-size: 18px !important; color: #c1c9c1; transition: color 0.3s; }
.step-item.done   .step-circle { background: #193b20; border-color: #193b20; }
.step-item.done   .step-circle span { color: #ffffff; }
.step-item.active .step-circle { background: #b59410; border-color: #b59410; }
.step-item.active .step-circle span { color: #ffffff; }
.step-item.cancelled .step-circle { background: #fee2e2; border-color: #ba1a1a; }
.step-item.cancelled .step-circle span { color: #ba1a1a; }
.step-label { margin-top: 0.5rem; font-size: 0.63rem; font-weight: 600; color: #717972; text-align: center; line-height: 1.3; max-width: 64px; transition: color 0.3s; }
.step-item.active .step-label { color: #193b20; font-weight: 700; }
.step-item.done   .step-label { color: #193b20; }
@keyframes step-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(181,148,16,0.2); } 50% { box-shadow: 0 0 0 8px rgba(181,148,16,0.1); } }
.step-item.active .step-circle { animation: step-pulse 2s ease infinite; }
.order-card { background: #ffffff; border-radius: 1.25rem; border: 1px solid #e4e2e2; overflow: hidden; transition: all 0.25s ease; margin-bottom: 1rem; }
.order-card:hover { box-shadow: 0 8px 28px rgba(3,54,33,0.1); border-color: #c1c9c1; }
.order-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; cursor: pointer; gap: 0.75rem; user-select: none; }
.order-card-body { border-top: 1px solid #f5f3f3; padding: 1rem 1.25rem; display: none; }
.order-card.expanded .order-card-body { display: block; }
.order-card.expanded .expand-icon { transform: rotate(180deg); }
.expand-icon { transition: transform 0.3s ease; color: #717972; }
.section-tabs { display: flex; border-bottom: 2px solid #e4e2e2; margin-bottom: 1.5rem; gap: 0; overflow-x: auto; scrollbar-width: none; }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tab { padding: 0.75rem 1.25rem; border: none; background: transparent; font-size: 0.875rem; font-weight: 600; color: #717972; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s ease; display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.section-tab.active { color: #193b20; border-bottom-color: #193b20; }
.section-tab:not(.active):hover { color: #193b20; background: rgba(25,59,32,0.04); }
.profile-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: #ffffff; border-radius: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 4px 16px rgba(3,54,33,0.07); position: relative; overflow: hidden; }
.profile-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #193b20, #b59410); }
.profile-avatar { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, #193b20, #2a5c33); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(3,54,33,0.25); }
.profile-avatar span { color: #ffffff; font-size: 28px !important; }
@keyframes skeleton-pulse { 0%,100%{opacity:.45}50%{opacity:1} }
.skeleton { animation: skeleton-pulse 1.4s ease infinite; background: #e4e2e2; border-radius: 6px; }
#toast, #acct-toast {
    position: fixed !important;
    bottom: 3rem !important;
    left: 50% !important;
    transform: translate(-50%, 20px) scale(0.95) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s cubic-bezier(.4,0,.2,1) !important;
    z-index: 9999 !important;
    max-width: 90vw !important;
    box-sizing: border-box !important;
}
#toast.show, #acct-toast.show {
    transform: translate(-50%, 0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
.empty-state { text-align: center; padding: 3rem 1.5rem; color: #717972; }
.empty-state-icon { width: 80px; height: 80px; border-radius: 50%; background: #f5f3f3; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.empty-state-icon span { font-size: 36px !important; color: #c1c9c1; }
.acct-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.acct-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.acct-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: 90%; max-width: 480px; max-height: 85vh; overflow-y: auto; background: #ffffff; border-radius: 1.5rem; z-index: 910; opacity: 0; pointer-events: none; transition: all 0.25s ease; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.acct-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.tracking-card { background: #ffffff; border-radius: 1.5rem; overflow: hidden; box-shadow: 0 8px 32px rgba(3,54,33,0.1); position: relative; border: 1px solid rgba(25,59,32,0.15); }
.tracking-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: #193b20; }
.item-row { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #f5f3f3; font-size: 0.8125rem; gap: 0.75rem; }
.item-row:last-child { border-bottom: none; }
.item-name { color: #1b1c1c; font-weight: 500; }
.item-qty { color: #193b20; font-weight: 700; background: #f5f3f3; border-radius: 999px; padding: 0.1rem 0.5rem; font-size: 0.72rem; }
.item-price { color: #7c5800; font-weight: 700; white-space: nowrap; }
html.no-transition, html.no-transition *, html.no-transition *::before, html.no-transition *::after { transition: none !important; }
@media (max-width: 640px) {
    .auth-card { padding: 1.75rem 1.25rem; margin: 1rem auto; border-radius: 1.5rem; }
    .account-container { padding: 1.25rem 0.75rem; }
    .profile-header { padding: 1rem; border-radius: 1.25rem; }
    .section-tab { padding: 0.75rem 0.875rem; font-size: 0.8rem; }
}
