/* v33: صفت hidden همیشه پنهان کند (کلاس‌هایی مثل .btn مقدار display دارند) */
[hidden] { display: none !important; }
/* gc-ui.css — v30 — تم مشترک سایت عمومی و نوبت‌دهی (مطابق طرح تأییدشده) */
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ground: #F5F3EE; --surface: #FFFFFF; --ink: #14171F; --ink-2: #3F4553; --muted: #5B6170; --faint: #9AA0AC;
  --line: #E6E2D9; --navy: #102A5C; --navy-2: #0A1C40; --navy-soft: #EEF2FA; --navy-text: #C9D3E8;
  --gold: #F2C46D; --gold-deep: #9A6512; --gold-soft: #F5EEDD;
  --green: #1F8A5B; --green-soft: #EAF6EF; --red: #B42318; --red-soft: #FDECEA;
  --r-lg: 24px; --r-md: 16px; --r-sm: 12px;
  --shadow: 0 20px 40px -22px rgba(16, 42, 92, 0.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: "Vazirmatn", Tahoma, sans-serif; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-2); }
button { font-family: inherit; }
.ico { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .wrap { padding: 0 48px; } }

/* هدر */
.topbar { border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; display: block; filter: drop-shadow(0 4px 8px rgba(16,42,92,.18)); }
.brand-name { font-weight: 800; font-size: 16px; line-height: 1.4; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: none; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
@media (min-width: 900px) { .nav { display: flex; } }

/* دکمه‌ها */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: var(--r-md); border: 0; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; text-align: center; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { color: #fff; background: var(--navy-2); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { color: var(--navy); }
.btn-soft { background: var(--navy-soft); color: var(--navy); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid #F1C9C4; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: var(--r-sm); }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--navy); cursor: pointer; }
.spin { width: 18px; height: 18px; border-radius: 999px; border: 2px solid currentColor; border-top-color: transparent; animation: gcspin .7s linear infinite; }
@keyframes gcspin { to { transform: rotate(360deg); } }

/* کارت‌ها */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card-navy { background: var(--navy); color: #fff; border: 0; box-shadow: var(--shadow); }
.icon-tile { width: 52px; height: 52px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile-navy { background: var(--navy-soft); color: var(--navy); }
.tile-gold { background: var(--gold-soft); color: var(--gold-deep); }
.tile-glass { background: rgba(255,255,255,.10); color: var(--gold); }
.tile-green { background: var(--green-soft); color: var(--green); }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--gold-deep); }
.h1 { margin: 0; font-size: clamp(28px, 5vw, 52px); line-height: 1.4; font-weight: 800; }
.h2 { margin: 0; font-size: clamp(22px, 3vw, 34px); font-weight: 800; line-height: 1.5; }
.h3 { margin: 0; font-size: 19px; font-weight: 800; }
.lead { margin: 0; font-size: clamp(15px, 1.6vw, 19px); color: #4A5060; }
.muted { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); }
.badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.b-green { background: var(--green-soft); color: #17693F; }
.b-red { background: var(--red-soft); color: var(--red); }
.b-navy { background: var(--navy-soft); color: var(--navy); }
.b-gold { background: var(--gold-soft); color: var(--gold-deep); }

/* فرم‌ها */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.input, select.input { height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 16px; font-family: inherit; font-size: 16px; color: var(--ink); width: 100%; }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(16,42,92,.12); }
.input.ltr { direction: ltr; text-align: left; letter-spacing: 1px; }
.otp { direction: ltr; text-align: center; font-size: 26px; letter-spacing: 12px; font-weight: 800; }
.err { color: var(--red); font-size: 14px; font-weight: 500; min-height: 22px; }
.ok-msg { color: var(--green); font-size: 14px; font-weight: 500; }

/* انتخاب روز / ساعت / خدمت */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 10px 16px; border-radius: var(--r-sm); background: var(--ground); border: 2px solid transparent; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--navy); color: #fff; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
/* v33: رنگ‌بندی تقویم — آزاد: آبی روشن | انتخاب/رزرو: سبز | تکمیل: صورتی | تعطیل: خاکستری */
:root { --cal-free: #EAF3FF; --cal-free-line: #8FB4EA; --cal-free-ink: #0F3A7A;
        --cal-pick: #1F8A5B; --cal-mine: #D9F2E3; --cal-mine-line: #1F8A5B;
        --cal-full: #FCE4EE; --cal-full-line: #F2A3C1; --cal-full-ink: #A3164F;
        --cal-closed: #ECEAE5; }
.day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; border-radius: var(--r-sm); background: var(--cal-free); border: 1.5px solid var(--cal-free-line); cursor: pointer; color: var(--cal-free-ink); }
.day small { font-size: 12px; color: inherit; opacity: .8; }
.day b { font-size: 17px; font-weight: 800; }
.day em { font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1.2; }
.day.full { background: var(--cal-full); border-color: var(--cal-full-line); color: var(--cal-full-ink); }
.day.on { background: var(--cal-pick); border-color: var(--cal-pick); color: #fff; }
.day.on small { color: #fff; }
.day:disabled { background: var(--cal-closed); border: 1.5px dashed #C9C5BC; color: var(--faint); cursor: not-allowed; }
.day:disabled b { text-decoration: line-through; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { padding: 10px 0; text-align: center; border-radius: var(--r-sm); border: 1.5px solid var(--cal-free-line); background: var(--cal-free); font-size: 15px; font-weight: 600; cursor: pointer; color: var(--cal-free-ink); display: flex; flex-direction: column; align-items: center; line-height: 1.4; }
.slot small { font-size: 11px; color: inherit; opacity: .85; font-weight: 500; }
.slot.on { border: 2px solid var(--cal-pick); background: var(--cal-pick); color: #fff; font-weight: 800; }
.slot.full:not(.on), .slot:disabled { border-color: var(--cal-full-line); background: var(--cal-full); color: var(--cal-full-ink); cursor: not-allowed; }
.slot.mine, .slot.mine:disabled { border: 2px solid var(--cal-mine-line); background: var(--cal-mine); color: #17693F; font-weight: 800; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.sw.free { background: var(--cal-free); border: 1.5px solid var(--cal-free-line); }
.sw.pick { background: var(--cal-pick); }
.sw.mine { background: var(--cal-mine); border: 2px solid var(--cal-mine-line); }
.sw.full { background: var(--cal-full); border: 1.5px solid var(--cal-full-line); }
.sw.closed { background: var(--cal-closed); border: 1.5px dashed #C9C5BC; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.svc { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; text-align: right; color: var(--ink); }
.svc.on { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); font-weight: 700; }

/* جدول گزارش */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
table.gc { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.gc th { background: var(--navy-soft); color: var(--navy); font-weight: 700; text-align: right; padding: 12px 14px; white-space: nowrap; }
table.gc td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.gc tr.cancelled td { color: var(--faint); text-decoration: line-through; }

/* پیام شناور */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 14px; font-weight: 500; transition: transform .25s ease; z-index: 100; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }

.footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }
.fade-in { animation: gcfade .25s ease; }
@keyframes gcfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media print {
  .no-print, .topbar, .footer, .toast { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .table-wrap { border: 0; overflow: visible; }
  table.gc { min-width: 0; font-size: 10pt; }
  table.gc th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.gc td, table.gc th { padding: 6px 8px; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* v40: لیست کشویی چندانتخابی با Chip (gc-multiselect.js) */
.ms { position: relative; }
.ms-field { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 6px 12px; border: 1.5px solid var(--line, #E3DDD0); border-radius: var(--r-sm, 12px); background: #fff; cursor: pointer; }
.ms.open .ms-field, .ms-field:focus-visible { border-color: var(--navy, #0F2A5C); outline: 2px solid rgba(15,42,92,.15); }
.ms-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ms-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 999px; background: #E8F0FE; color: #0F2A5C; font-size: 14px; font-weight: 700; line-height: 1.5; }
.ms-x { width: 22px; height: 22px; min-height: 22px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(15,42,92,.14); color: #0F2A5C; font-size: 12px; line-height: 22px; cursor: pointer; }
.ms-x:hover { background: #B42318; color: #fff; }
.ms-ph { color: #8A8F99; font-size: 15px; }
.ms-caret { color: #6B6F78; font-size: 14px; transition: transform .15s; }
.ms.open .ms-caret { transform: rotate(180deg); }
.ms-panel { position: absolute; z-index: 60; inset-inline: 0; top: calc(100% + 6px); background: #fff; border: 1.5px solid var(--navy, #0F2A5C); border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(10,28,64,.4); overflow: hidden; }
.ms-panel[hidden] { display: none; }
.ms-tools { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #F4F6FB; font-size: 12.5px; color: #4B5060; }
.ms-clear { border: 0; background: none; color: #B42318; font-family: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; padding: 4px 6px; min-height: 0; margin: 0; }
.ms-list { max-height: 260px; overflow: auto; padding: 4px; }
.ms-opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.ms-opt:hover { background: #F4F6FB; }
.ms-opt.on { background: #E8F0FE; color: #0F2A5C; font-weight: 700; }
.ms-opt input { width: 18px; height: 18px; margin: 0; accent-color: #0F2A5C; }
.ms-empty { padding: 16px; text-align: center; color: #6B6F78; }
.svc-sum { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #F4F6FB; font-size: 14px; color: #14171F; line-height: 1.9; }
.svc-sum b { color: #0F2A5C; }
.svc.on { position: relative; }
.svc[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; left: 8px; font-size: 13px; font-weight: 800; }
