@import url('/shared/malayalam.css');
/* Visitor mobile view (layout from the approved mockups). Mobile-first. */
:root { --navy: #15365d; --blue: #2459d6; --ink: #172b46; --muted: #5a6d86; --line: #dfe7f1; --bg: #f3f7fc; --green: #12764f; --red: #b42f3c; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Anek Malayalam", Inter, "Segoe UI", Roboto, "Noto Sans Malayalam", "Nirmala UI", Arial, sans-serif; }
:lang(ml) body, body:lang(ml) { line-height: 1.6; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }
.page { max-width: 620px; margin: 0 auto; min-height: 100vh; background: #fff; box-shadow: 0 0 40px rgba(23,54,93,.06); display: flex; flex-direction: column; }
.top { background: linear-gradient(135deg, #15365d, #2468a7); color: #fff; padding: 20px 20px 26px; border-radius: 0 0 24px 24px; }
.top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.logo { width: 48px; height: 48px; border: 1.5px solid rgba(255,255,255,.7); border-radius: 50%; display: grid; place-items: center; font-weight: 850; font-size: 17px; flex-shrink: 0; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand h1 { font-size: 17px; line-height: 1.25; margin: 0; letter-spacing: .02em; text-transform: uppercase; }
.brand p { font-size: 12px; color: #dce9f8; margin: 4px 0 0; }
.lang { flex-shrink: 0; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.08); color: #fff; border-radius: 20px; padding: 7px 12px; font-family: inherit; font-weight: 700; font-size: 13px; line-height: 1; cursor: pointer; min-height: 36px; }
.top h2 { font-size: 24px; margin: 22px 0 7px; letter-spacing: -.02em; }
.top .intro { margin: 0; color: #dce9f8; font-size: 14px; line-height: 1.5; }
.steps { display: flex; gap: 6px; padding: 16px 22px 0; }
.steps span { flex: 1; height: 5px; border-radius: 4px; background: #e2e9f3; }
.steps span.on { background: var(--blue); }
.step-label { padding: 6px 22px 0; font-size: 12px; color: var(--muted); }
.content { padding: 18px 22px 24px; flex: 1; }
.card { border: 1px solid #d9e4f0; border-radius: 16px; padding: 20px; background: #f8fbff; }
.card-icon { width: 48px; height: 48px; border-radius: 14px; background: #e4eeff; color: var(--blue); display: grid; place-items: center; font-size: 24px; margin-bottom: 12px; }
.card h2 { font-size: 20px; margin: 0 0 8px; }
.card p { font-size: 14px; line-height: 1.55; color: #4f6580; margin: 0 0 14px; }
.why { font-size: 12.5px; color: var(--muted); background: #eef4fb; border-radius: 10px; padding: 10px 12px; line-height: 1.5; margin-bottom: 16px; }
.msg { margin-top: 14px; padding: 13px; border-radius: 11px; font-size: 14px; line-height: 1.5; }
.msg.error { background: #fff0f1; border: 1px solid #f1c5ca; color: #962531; }
.msg.ok { background: #ecf9f3; border: 1px solid #bfe9d6; color: #0f6544; }
.msg.info { background: #eef5ff; border: 1px solid #d3e3fb; color: #2d4f78; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #eef5ff; border: 1px solid #d3e3fb; border-radius: 12px; padding: 13px; color: #2d4f78; font-size: 13px; line-height: 1.45; margin-bottom: 18px; }
.notice .i { font-weight: 900; color: var(--blue); font-size: 17px; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.field { margin-bottom: 18px; }
input, select, textarea { font: inherit; font-size: 16px; width: 100%; border: 1px solid #c9d6e5; border-radius: 11px; padding: 13px 14px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: #4d86ee; box-shadow: 0 0 0 3px rgba(36,104,232,.14); outline: none; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 10px; }
.err { font-size: 13px; color: var(--red); margin-top: 6px; font-weight: 600; }
.primary { border: 0; width: 100%; border-radius: 12px; padding: 15px 16px; background: var(--blue); color: #fff; font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1.2; cursor: pointer; box-shadow: 0 7px 16px rgba(36,104,232,.2); min-height: 52px; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: not-allowed; }
.secondary { border: 1px solid #c9d6e5; background: #fff; color: var(--ink); border-radius: 11px; padding: 12px; font-family: inherit; font-weight: 750; font-size: 14px; line-height: 1.2; cursor: pointer; min-height: 46px; }
.link-btn { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 8px; min-height: 44px; }
.wide-btn { display: block; width: 100%; text-align: center; text-decoration: none; margin-top: 12px; }
.priority { border: 1px solid #d3e3fb; background: #f6f9ff; border-radius: 12px; padding: 14px; margin: 0 0 18px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin: 0; cursor: pointer; }
.check-row input { width: 22px; height: 22px; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--blue); }
.priority-reasons { margin-top: 12px; display: grid; gap: 10px; }
.priority-reasons .check-row { font-weight: 600; }
.priority .label { font-size: 14px; font-weight: 700; }
.hint.block { display: block; margin: 8px 0 0; line-height: 1.5; }
.type-badge { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 800; background: #fff3d6; color: #6b4a0e; }
.type-badge.C { background: #e3f4ec; color: #0f5a3d; }
.reissue-box { margin-top: 14px; border: 1px solid #f1c5ca; background: #fff7f8; border-radius: 14px; padding: 16px; }
.reissue-box h3 { margin: 0 0 6px; font-size: 17px; color: #7d1e29; }
.reissue-box p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #5b3a40; }
.reissue-confirm { margin-top: 12px; }
.type-badge.D { background: #e8ecfb; color: #283a8f; }
.revisit-box { margin-top: 14px; border: 1px solid #c8d1f3; background: #f6f8ff; border-radius: 14px; padding: 16px; }
.revisit-box h3 { margin: 0 0 6px; font-size: 17px; color: #283a8f; }
.revisit-box p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #3a4466; }
.pending-banner { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: #fff8e1; border: 1px solid #f0d58a; color: #5e4708; font-size: 14px; line-height: 1.5; }
.privacy { font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; margin: 12px 4px 0; }
.success { background: #edf9f3; border: 1px solid #c3eada; border-radius: 16px; padding: 16px; text-align: center; }
.check { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; background: #d3f3e4; color: #0f6544; display: grid; place-items: center; font-size: 24px; font-weight: 900; }
.success h2 { font-size: 20px; margin: 0 0 6px; color: #0f5a3d; }
.success p { font-size: 14px; line-height: 1.5; color: #3d6a58; margin: 0; }
.called-banner { background: #2459d6; color: #fff; border-radius: 16px; padding: 18px; text-align: center; font-size: 18px; font-weight: 800; line-height: 1.4; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(36,89,214,.15); } }
.token-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.token-top { padding: 16px; text-align: center; background: #f6f9ff; border-bottom: 1px solid var(--line); }
.token-top .small { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.token-num { font-size: 64px; line-height: 1.1; font-weight: 900; letter-spacing: -.04em; color: var(--navy); margin: 6px 0; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-block; background: #e6efff; color: #1f4fae; border-radius: 30px; padding: 7px 12px; font-size: 13px; font-weight: 800; }
.status-pill.called, .status-pill.serving { background: #2459d6; color: #fff; }
.status-pill.completed { background: #dcf5e9; color: #0f6544; }
.status-pill.cancelled, .status-pill.no_show { background: #fde8ea; color: #962531; }
.token-details { padding: 14px 16px; }
.detail { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #edf1f6; font-size: 14px; }
.detail:last-child { border-bottom: 0; }
.detail span:first-child { color: var(--muted); }
.detail strong { text-align: right; overflow-wrap: anywhere; }
.remarks-box { margin-top: 14px; border: 1px solid #cfe0f5; border-left: 5px solid var(--blue); background: #f7faff; border-radius: 12px; padding: 14px 16px; }
.remarks-box h3 { margin: 0 0 8px; font-size: 16px; color: var(--navy); }
.remarks-text { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.remarks-text.empty { color: var(--muted); font-size: 14px; }
.remarks-updated { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.remarks-box.fresh { animation: fresh 2.4s ease-out 1; }
@keyframes fresh { 0% { box-shadow: 0 0 0 6px rgba(36,89,214,.25); background: #e8f0ff; } 100% { box-shadow: none; } }
.wait-box { margin-top: 14px; background: #fff8e9; border: 1px solid #f1dfb0; border-radius: 12px; padding: 14px; }
.wait-title { font-size: 13px; color: #7a5513; }
.wait-time { font-size: 24px; font-weight: 850; color: #6b4a0e; margin-top: 3px; }
.wait-sub { font-size: 12px; color: #7d6538; margin-top: 5px; line-height: 1.45; }
.instructions { font-size: 13.5px; color: #3d5370; line-height: 1.5; margin: 14px 0 0; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.actions .wide { grid-column: 1 / -1; }
.updated { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }
.updated.offline { color: var(--red); font-weight: 600; }
.sim { margin-top: 16px; border: 1px dashed #c7a64a; background: #fffbea; border-radius: 12px; padding: 12px; font-size: 13px; }
.sim summary { cursor: pointer; font-weight: 700; color: #6b4a0e; }
.sim .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 10px 0; }
.sim input { padding: 8px; font-size: 13px; }
.sim .presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sim .presets button { font-size: 12px; padding: 6px 9px; border-radius: 8px; border: 1px solid #d8c27e; background: #fff; cursor: pointer; }
footer { text-align: center; border-top: 1px solid #edf1f6; padding: 16px 20px; color: #63768f; font-size: 12px; line-height: 1.5; }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); border-right-color: transparent; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 420px) { .content { padding: 16px; } .top { padding: 18px 16px 22px; } .token-num { font-size: 56px; } .steps, .step-label { padding-left: 16px; padding-right: 16px; } }
@media (prefers-reduced-motion: reduce) { .called-banner, .spinner, .remarks-box.fresh { animation: none; } }
@media print {
  body { background: #fff; } .page { box-shadow: none; }
  .top .intro, .top h2, .lang, .steps, .step-label, .actions, .updated, footer, .instructions, .sim, .reissue-box, .revisit-box, .pending-banner, #gateView, #formView, #closedView, #recoverView { display: none !important; }
  .token-card, .wait-box { break-inside: avoid; }
}
.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; }
/* Remote appointments (E-tokens) */
.card.left { text-align: left; }
.appt-links { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #d3e0ee; }
.appt-links .link-btn { margin-top: 4px; }
.field > .label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.chips button { flex: 0 0 auto; scroll-snap-align: start; min-width: 74px; min-height: 58px; border: 1px solid #c9d6e5; background: #fff; color: var(--ink); border-radius: 11px; padding: 7px 10px; font: inherit; font-size: 13px; line-height: 1.25; cursor: pointer; text-align: center; }
.chips button b { display: block; font-size: 17px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slots button { min-height: 52px; border: 1px solid #c9d6e5; background: #fff; color: var(--ink); border-radius: 11px; padding: 6px 8px; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; line-height: 1.2; }
.slots button small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.chips button[aria-checked="true"], .slots button[aria-checked="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.slots button[aria-checked="true"] small { color: #dce9ff; }
.slots button:disabled { background: #f1f4f8; color: #9aa9bb; cursor: not-allowed; }
.slots-empty { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.check-row.consent { font-weight: 600; font-size: 13.5px; line-height: 1.5; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.appt-ref { font-size: 40px; letter-spacing: .02em; overflow-wrap: anywhere; }
.status-pill.booked { background: #e6efff; color: #1f4fae; }
.status-pill.checked_in { background: #dcf5e9; color: #0f6544; }
.status-pill.expired { background: #fff3d6; color: #6b4a0e; }
.appt-notice { margin: 14px 0 0; }
.checkin-box { margin-top: 14px; }
.primary.danger { background: var(--red); box-shadow: none; }
.type-badge.E { background: #e6f4f6; color: #0e5560; }
.appt-list { margin-top: 18px; text-align: left; }
.appt-list h3 { font-size: 16px; margin: 0 0 8px; }
.appt-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.appt-list a { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid #d9e4f0; border-radius: 12px; padding: 12px 14px; background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; }
.appt-list a b { font-size: 15px; }
@media print { #bookView, #apptFindView, #checkinBox, #aActions, #rescheduleBox, #aCancelConfirm, .appt-links { display: none !important; } }
/* Live calling time, turn alerts, Register Number */
.wait-box.called { background: #e8f0ff; border-color: #b9cdf6; }
.wait-box.called .wait-title, .wait-box.called .wait-time { color: #1f4fae; }
.alerts-box { margin-top: 14px; border: 1px solid #d9e4f0; background: #fbfdff; border-radius: 14px; padding: 16px; }
.alerts-box h3 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
.alerts-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: #4f6580; }
.alerts-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.alerts-actions .wide { grid-column: 1 / -1; }
#soundBtn[aria-pressed="true"] { background: #e8f0ff; border-color: #9fbaf0; color: #1f4fae; }
.alerts-status { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: #2d4f78; }
.alerts-status:empty { display: none; }
.called-banner.flash { animation: flash 0.6s ease-in-out 4, pulse 1.6s ease-in-out infinite 2.4s; }
@keyframes flash { 50% { background: #f5b301; color: #1d1600; } }
.reg-edit { padding: 0 16px 12px; }
.reg-edit .link-btn { margin: 0; padding: 4px 0; min-height: 36px; font-size: 13px; }
.inline-row { display: flex; gap: 8px; }
.inline-row input { flex: 1; min-width: 0; }
.inline-row .secondary { flex: 0 0 auto; }
@media print { .alerts-box, .reg-edit { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .called-banner.flash { animation: none; } }
