/*
 * «مِقَص» — مكوّنات تطبيقَي الويب (الحلاق ثم الزبون) مأخوذة من الأنماط المضمّنة في
 * تصميم Claude Design (تطبيق الحلاق.dc.html) ومحوّلة إلى classes. كل لون من متغيّرات
 * organic.css؛ الاتجاه بخصائص منطقية ليعمل RTL و LTR.
 */
[x-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
button { font: inherit; }
.muted { color: var(--color-neutral-700); }
.spacer { flex: 1; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ── الحاوية: شاشة جوال بعرض أقصى 480px على الكمبيوتر ── */
.app { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin-inline: auto; display: flex; flex-direction: column; background: var(--color-bg); position: relative; }
.app-main { flex: 1; display: flex; flex-direction: column; }
@media (min-width: 520px) { body { background: var(--color-surface); } .app { box-shadow: var(--shadow-lg); } }
.scr { animation: scrIn .22s ease both; padding: 16px 20px 24px; }
.scr-fill { flex: 1; display: flex; flex-direction: column; }

/* ── رأس الشاشات الفرعية: زر رجوع + عنوان ── */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.topbar h4 { margin: 0; font-size: 21px; }
.back-btn { width: 42px; height: 42px; flex: none; border-radius: 999px; border: 1px solid var(--color-divider); background: var(--color-surface); color: var(--color-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.back-btn:hover { color: var(--color-text); background: var(--color-neutral-300); }
[dir="ltr"] .flip { transform: scaleX(-1); }
.page-title { margin: 0 0 14px; font-size: 22px; }

/* ── الصورة الرمزية بالحرف الأول ── */
.avatar { width: 46px; height: 46px; flex: none; border-radius: 999px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 800; font-size: 19px; color: var(--color-bg); background: var(--color-accent); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 54px; height: 54px; font-size: 21px; }
.avatar-xl { width: 70px; height: 70px; font-size: 27px; background: var(--color-accent-700); }

/* ── لوحة اليوم: الرأس الداكن والمؤشرات ── */
.hdr-dark { padding: 18px 20px 20px; background: var(--color-accent-800); color: var(--color-bg); border-radius: 0 0 30px 30px; }
.hdr-row { display: flex; align-items: center; gap: 12px; }
.hdr-hello { font-size: 12.5px; opacity: .85; }
.hdr-name { font-family: var(--font-heading); font-weight: 800; font-size: 20px; line-height: 1.25; }
.open-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: none; cursor: pointer; font-size: 12.5px; font-weight: 700; background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.open-toggle .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--color-accent-2-600); }
.open-toggle.is-off { background: var(--color-neutral-200); color: var(--color-neutral-800); }
.open-toggle.is-off .dot { background: var(--color-neutral-500); }
.kpis { display: flex; gap: 10px; margin-top: 18px; }
.kpi { flex: 1; background: rgba(245, 234, 216, .14); border-radius: 20px; padding: 13px 10px; text-align: center; }
.kpi-v { font-family: var(--font-heading); font-weight: 800; font-size: 21px; line-height: 1.1; }
.kpi-k { font-size: 10.5px; opacity: .85; margin-top: 3px; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.sec-head h4 { margin: 0; font-size: 20px; }
.sec-head h5 { margin: 0; font-size: 16px; }
.sec-head .muted { font-size: 12px; }

/* ── الخط الزمني لمواعيد اليوم ── */
.appt { display: flex; gap: 12px; align-items: stretch; padding: 0 0 10px; color: inherit; text-decoration: none; }
.appt:hover { color: inherit; }
.appt-time { width: 54px; flex: none; padding-top: 14px; font-size: 13px; font-weight: 700; color: var(--color-neutral-700); }
.appt-rail { width: 2px; flex: none; background: var(--color-divider); position: relative; display: flex; justify-content: center; }
.appt-rail::after { content: ""; position: absolute; top: 16px; width: 13px; height: 13px; border-radius: 999px; background: var(--color-neutral-500); border: 3px solid var(--color-bg); }
.appt-card { flex: 1; min-width: 0; padding: 13px 15px; border-radius: 22px; background: var(--color-surface); border: 1.5px solid transparent; }
.appt-top { display: flex; align-items: center; gap: 8px; }
.appt-client { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--color-text); }
.appt-meta { display: block; font-size: 12.5px; color: var(--color-neutral-700); margin-top: 3px; }
.appt.is-next .appt-card { background: var(--color-accent-100); border-color: var(--color-accent); }
.appt.is-next .appt-time { color: var(--color-accent-800); }
.appt.is-next .appt-rail::after { background: var(--color-accent); }
.appt.is-done .appt-time { color: var(--color-neutral-600); }
.appt.is-done .appt-rail::after { background: var(--color-accent-2-600); }
.appt.is-off .appt-card { opacity: .7; }

/* ── شارات الحالة: نص + لون، لا لون وحده ── */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--color-surface); color: var(--color-neutral-800); }
.pill-ok { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.pill-next { background: var(--color-accent-100); color: var(--color-accent-800); }
.pill-busy { background: var(--color-accent-200); color: var(--color-accent-800); }
.pill-neutral { background: var(--color-neutral-200); color: var(--color-neutral-800); }

/* ── بطاقات وتلميحات ── */
.tip { display: flex; gap: 11px; align-items: center; padding: 15px; border-radius: 22px; background: var(--color-accent-2-200); color: var(--color-accent-2-800); font-size: 12.5px; line-height: 1.7; }
.tip-warn { background: var(--color-accent-100); color: var(--color-accent-800); }
.bcard { padding: 17px; border-radius: 26px; background: var(--color-surface); }
.bcard-sm { padding: 16px; }
.rows { margin-top: 14px; display: flex; flex-direction: column; gap: 1px; }
.rows > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--color-divider); }
.rows .k { color: var(--color-neutral-700); }
.rows .v { font-weight: 700; text-align: end; }
.round-btn { width: 40px; height: 40px; flex: none; border-radius: 999px; background: var(--color-accent-2-600); color: var(--color-bg); display: flex; align-items: center; justify-content: center; }
.round-btn:hover { color: var(--color-bg); background: var(--color-accent-2-700); }
.empty { padding: 26px 18px; border-radius: 24px; background: var(--color-surface); text-align: center; font-size: 13px; color: var(--color-neutral-700); }

/* ── مسار الحالة (4 خطوات) ── */
.tl-step { display: flex; gap: 13px; align-items: stretch; }
.tl-mark { width: 26px; flex: none; display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 26px; height: 26px; flex: none; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--color-neutral-300); color: var(--color-neutral-700); font-size: 13px; font-weight: 700; }
.tl-line { flex: 1; width: 2px; min-height: 18px; background: var(--color-neutral-300); }
.tl-body { flex: 1; padding-bottom: 16px; }
.tl-title { font-size: 14px; font-weight: 700; color: var(--color-neutral-600); }
.tl-time { font-size: 11.5px; color: var(--color-neutral-700); margin-top: 2px; }
.tl-step.is-done .tl-dot, .tl-step.is-done .tl-line { background: var(--color-accent-2-600); color: var(--color-bg); }
.tl-step.is-active .tl-dot { background: var(--color-accent); color: var(--color-bg); }
.tl-step.is-done .tl-title, .tl-step.is-active .tl-title { color: var(--color-text); }

/* ── شريط الأيام ── */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day { flex: none; width: 52px; padding: 11px 0; border-radius: 20px; border: 1.5px solid transparent; background: var(--color-surface); color: var(--color-text); text-align: center; text-decoration: none; position: relative; }
.day:hover { color: var(--color-text); border-color: var(--color-divider); }
.day .n { display: block; font-size: 11.5px; opacity: .8; }
.day .d { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 18px; line-height: 1.3; }
.day .c { position: absolute; top: 5px; inset-inline-end: 7px; width: 7px; height: 7px; border-radius: 999px; background: var(--color-accent); }
.day.is-on { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.day.is-on .c { background: var(--color-bg); }
.day.is-rest { opacity: .55; }

/* ── مفتاح تشغيل (ON = المقبض يمينًا في الاتجاهين كما في التصميم) ── */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: none; padding: 0; cursor: pointer; text-align: start; color: var(--color-text); }
.switch-row .t { display: block; font-size: 15px; font-weight: 700; }
.switch-row .s { display: block; font-size: 12px; color: var(--color-neutral-700); margin-top: 2px; }
.switch { direction: ltr; width: 52px; height: 30px; flex: none; border-radius: 999px; padding: 3px; display: flex; justify-content: flex-start; background: var(--color-neutral-300); transition: background .2s; }
.switch::after { content: ""; width: 24px; height: 24px; border-radius: 999px; background: var(--color-bg); box-shadow: var(--shadow-sm); }
.switch.is-on { background: var(--color-accent); justify-content: flex-end; }
.switch-card { display: flex; padding: 16px; border-radius: 24px; background: var(--color-surface); }

/* ── شبكة الفترات ── */
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.slot { width: 100%; padding: 12px 0; border-radius: 18px; border: 1.5px solid transparent; font-size: 13px; font-weight: 700; text-align: center; cursor: pointer; color: var(--color-text); text-decoration: none; display: block; }
.slot small { display: block; font-size: 10.5px; font-weight: 500; opacity: .85; margin-top: 2px; }
.slot-booked { background: var(--color-accent-200); color: var(--color-accent-800); }
.slot-free { background: var(--color-surface); border-color: var(--color-divider); }
.slot-closed { background: var(--color-neutral-300); color: var(--color-neutral-700); }
.slot[disabled] { cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 11.5px; color: var(--color-neutral-700); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }

/* ── الشرائح (اختيار واحد) ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--color-divider); background: var(--color-bg); color: var(--color-text); font-size: 12.5px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.chip:hover { color: var(--color-text); border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.chip.is-on, .chip:has(input:checked) { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.chip:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.chips-fill .chip { flex: 1; padding: 10px 0; }

/* ── الحقول ── */
.stack { display: flex; flex-direction: column; gap: 13px; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1; min-width: 0; }
.input-lg { min-height: 48px; font-size: 15px; }
.input-md { min-height: 46px; }
.on-surface { background: var(--color-bg); }
.center { text-align: center; }
.field-error { font-size: 12px; color: var(--color-accent-700); margin-top: 5px; }
.hint { font-size: 11.5px; line-height: 1.8; color: var(--color-neutral-700); margin-top: 14px; }
.btn-lg { min-height: 54px; font-size: 16px; }
.btn-md { min-height: 48px; }

/* ── قوائم البطاقات (الخدمات، العملاء، البلاغات) ── */
.list { display: flex; flex-direction: column; gap: 10px; }
.row-card { display: flex; align-items: center; gap: 12px; padding: 14px 15px; border-radius: 24px; background: var(--color-surface); }
.row-card .main { flex: 1; min-width: 0; }
.row-card .t { font-size: 14.5px; font-weight: 700; }
.row-card .s { font-size: 12px; color: var(--color-neutral-700); margin-top: 2px; }
.row-card.is-off { opacity: .6; }
.price { font-family: var(--font-heading); font-weight: 800; font-size: 17px; white-space: nowrap; }
.price small { font-size: 11px; font-weight: 500; }
.icon-btn { width: 34px; height: 34px; flex: none; border-radius: 999px; border: none; background: var(--color-bg); color: var(--color-accent-700); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--color-accent-100); }
.dashed-card { margin-top: 18px; padding: 16px; border-radius: 26px; background: var(--color-accent-100); border: 1.5px dashed var(--color-accent-400); }
.dashed-card h5 { margin: 0 0 12px; font-size: 16px; color: var(--color-accent-800); }

/* ── العروض ── */
.offer-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 26px; background: var(--color-accent); color: var(--color-bg); }
.offer-card.alt { background: var(--color-accent-2-700); }
.offer-card.is-off { background: var(--color-neutral-300); color: var(--color-neutral-800); }
.offer-big { flex: none; font-family: var(--font-heading); font-weight: 800; font-size: 30px; line-height: 1; }
.offer-card .t { font-size: 14.5px; font-weight: 700; }
.offer-card .s { font-size: 11.5px; opacity: .85; margin-top: 3px; }
.offer-btn { padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(245, 234, 216, .5); background: transparent; color: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.offer-card.is-off .offer-btn { border-color: var(--color-neutral-500); }

/* ── بطاقة الولاء (معاينة الزبون) ── */
.loyalty-card { border-radius: 26px; padding: 17px; background: var(--color-accent-2-700); color: var(--color-bg); }
.loyalty-card .head { display: flex; justify-content: space-between; align-items: baseline; }
.loyalty-card .head b { font-family: var(--font-heading); font-weight: 800; font-size: 17px; }
.loyalty-dots { display: flex; gap: 6px; margin-top: 12px; }
.loyalty-dots span { flex: 1; height: 9px; border-radius: 999px; background: rgba(245, 234, 216, .3); }
.loyalty-dots span.on { background: var(--color-bg); }
.range-row { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
input[type="range"] { width: 100%; accent-color: var(--color-accent); }

/* ── البحث وتقدّم العملاء ── */
.search { display: flex; align-items: center; gap: 9px; padding: 0 15px; min-height: 48px; border-radius: 999px; border: 1px solid var(--color-divider); background: var(--color-surface); }
.search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-size: 14px; color: var(--color-text); }
.progress-row { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.progress { flex: 1; height: 7px; border-radius: 999px; background: var(--color-neutral-300); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--color-accent-2-600); }

/* ── التقارير ── */
.chart { display: flex; align-items: flex-end; gap: 9px; height: 150px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; font-size: 11px; color: var(--color-neutral-700); }
.bar b { font-weight: 700; }
.bar i { width: 100%; min-height: 3px; border-radius: 10px 10px 4px 4px; background: var(--color-accent-300); }
.bar.is-max i { background: var(--color-accent); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.metric { padding: 15px; border-radius: 24px; background: var(--color-surface); }
.metric .v { font-family: var(--font-heading); font-weight: 800; font-size: 24px; line-height: 1; }
.metric .k { font-size: 11.5px; color: var(--color-neutral-700); margin-top: 5px; }
.metric-neutral { background: var(--color-neutral-200); color: var(--color-neutral-900); }
.metric-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.metric-ok { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.income-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 17px; border-radius: 26px; background: var(--color-accent-800); color: var(--color-bg); }
.income-card .v { font-family: var(--font-heading); font-weight: 800; font-size: 30px; line-height: 1.2; margin-top: 4px; }

/* ── البلاغات ── */
.complaint { padding: 15px; border-radius: 24px; background: var(--color-surface); border-inline-start: 4px solid var(--color-accent); }
.complaint.is-rejected { border-inline-start-color: var(--color-neutral-500); }
.complaint.is-accepted { border-inline-start-color: var(--color-accent-2-600); }
.complaint .top { display: flex; align-items: center; gap: 10px; }
.complaint .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.complaint .s { font-size: 12px; color: var(--color-neutral-700); margin-top: 4px; }
.complaint p { margin: 9px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--color-neutral-800); }

/* ── حسابي ── */
.profile-head { padding: 22px 20px 24px; background: var(--color-surface); border-radius: 0 0 30px 30px; }
.stat3 { display: flex; gap: 10px; margin-top: 16px; }
.stat3 > div { flex: 1; background: var(--color-bg); border-radius: 18px; padding: 12px 8px; text-align: center; }
.stat3 .v { font-family: var(--font-heading); font-weight: 800; font-size: 19px; line-height: 1.1; }
.stat3 .k { font-size: 10.5px; color: var(--color-neutral-700); margin-top: 3px; }
.links { padding: 18px 20px 0; display: flex; flex-direction: column; gap: 2px; }
.link-row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 15px 4px; background: none; border: 0; border-bottom: 1px solid var(--color-divider); color: var(--color-text); text-decoration: none; text-align: start; cursor: pointer; }
.link-row:hover { color: var(--color-text); background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.link-glyph { width: 38px; height: 38px; flex: none; border-radius: 999px; background: var(--color-accent-100); color: var(--color-accent-800); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 800; font-size: 15px; }
.link-row .label { flex: 1; font-size: 14.5px; font-weight: 700; }
.logout-btn { width: 100%; margin-top: 18px; padding: 15px; border-radius: 999px; border: 1px solid var(--color-accent-300); background: var(--color-accent-100); color: var(--color-accent-800); font-size: 14.5px; font-weight: 700; cursor: pointer; }

/* ── إنشاء الملف ── */
.steps { display: flex; gap: 7px; margin-bottom: 18px; }
.steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--color-neutral-300); }
.steps span.on { background: var(--color-accent); }
.photo-row { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.photo-slot { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--color-surface); border: 1.5px dashed var(--color-neutral-400); color: var(--color-neutral-700); font-size: 11.5px; font-weight: 700; cursor: pointer; text-align: center; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot.circle { width: 88px; height: 88px; flex: none; border-radius: 999px; }
.photo-slot.rounded { height: 58px; border-radius: 16px; }
.photo-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* ── الدخول ── */
.auth { flex: 1; display: flex; flex-direction: column; padding: 26px 22px 30px; background: linear-gradient(180deg, var(--color-accent-200) 0%, var(--color-bg) 46%); animation: scrIn .22s ease both; }
.auth-brand { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding-bottom: 14px; }
.brand-mark { width: 96px; height: 96px; border-radius: 999px; background: var(--color-accent); color: var(--color-bg); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.brand-name { font-family: var(--font-heading); font-weight: 800; font-size: 40px; margin-top: 14px; line-height: 1; }
.phone-row { display: flex; gap: 8px; align-items: center; }
.phone-prefix { min-height: 48px; display: flex; align-items: center; padding: 0 14px; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; direction: ltr; }
.otp-cells { position: relative; display: flex; gap: 8px; justify-content: center; direction: ltr; }
.otp-cells span { width: 46px; height: 60px; border-radius: 18px; background: var(--color-surface); border: 1.5px solid var(--color-divider); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 26px; }
.otp-cells span.is-active { border-color: var(--color-accent); }
.otp-cells input { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; }
.terms { font-size: 11.5px; line-height: 1.7; color: var(--color-neutral-700); text-align: center; margin: 2px 0 0; }

/* ── التنبيه المؤقت والشريط السفلي ── */
.toast { position: fixed; z-index: 40; bottom: calc(78px + env(safe-area-inset-bottom)); inset-inline: max(18px, calc(50% - 222px)); padding: 14px 16px; border-radius: 20px; background: var(--color-neutral-900); color: var(--color-neutral-100); font-size: 13.5px; font-weight: 600; text-align: center; box-shadow: var(--shadow-lg); animation: sheetIn .2s ease both; }
.toast.is-error { background: var(--color-accent-800); }
.bnav { position: sticky; bottom: 0; z-index: 20; display: flex; background: var(--color-surface); border-top: 1px solid var(--color-divider); padding: 7px 6px calc(5px + env(safe-area-inset-bottom)); }
.bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--color-neutral-700); text-decoration: none; font-size: 11px; font-weight: 500; }
.bnav a span { padding: 5px 18px; border-radius: 999px; display: flex; }
.bnav a.is-on { color: var(--color-accent-800); font-weight: 700; }
.bnav a.is-on span { background: var(--color-accent-200); }

/* ── ماسح QR ── */
.scanner { border-radius: 26px; overflow: hidden; background: var(--color-neutral-900); min-height: 260px; }
.scanner video { border-radius: 26px; }
