/* ============================================================
   FreeTicket — public.css  (shared for Register + TicketCheck)
   Font:   theo cấu hình Branding:Font — biến --font-sans do Views/Shared/_FontHead.cshtml sinh ra
           (mặc định Be Vietnam Pro; BTCTCT cấu hình Hoa Binh Sans tự host trong /fonts)
   Tokens: theo bản Next.js của khách (docs/HIEN-TRANG-BTCTCT-NEXTJS.md mục 8)
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Blues */
    --blue-950: #062a47;
    --blue-900: #034a7f;
    --blue-800: #075b98;
    --blue-700: #0d6baa;
    --blue-100: #dceef9;
    --blue-50:  #eff8fd;

    /* Gold */
    --gold:      #d7a449;
    --gold-soft: #fff4d8;

    /* Neutrals */
    --ink:     #17212b;
    --muted:   #667482;
    --line:    #dce3e9;
    --surface: #ffffff;
    --canvas:  #f3f6f8;

    /* Semantic */
    --success:      #087a55;
    --success-soft: #e8f7f1;
    --danger:       #bd342d;
    --danger-soft:  #fff0ef;
    --warning:      #9b6500;
    --warning-soft: #fff7df;

    /* Navy (TicketCheck dark theme) */
    --navy-950: #071d2e;
    --navy-900: #0a2b43;

    /* Radius */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;

    /* Shadow */
    --shadow:    0 14px 38px rgba(8, 44, 72, .08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
    --focus:     0 0 0 4px rgba(3, 74, 127, .14);

    /* Aliases for backward compat */
    --museum-blue:       var(--blue-900);
    --museum-blue-dark:  var(--blue-950);
    --museum-blue-light: var(--blue-50);
    --museum-gold:       var(--gold);
    --museum-gold-dark:  #8b5e2a;
    --museum-gold-light: var(--gold-soft);
    --bg-primary:        var(--canvas);
    --bg-white:          var(--surface);
    --text-primary:      var(--ink);
    --text-muted:        var(--muted);
    --border:            var(--line);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Reset trên xóa margin:auto mặc định của <dialog> → hộp thoại (hủy vé, xem ảnh…) dính góc trên trái thay vì giữa trang */
dialog { margin: auto; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans, 'Segoe UI', Roboto, Arial, sans-serif);
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Public Header ─────────────────────────────────────────── */
.pub-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(220, 227, 233, .9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.pub-header__inner {
    min-height: 76px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 0 20px;
    max-width: 1180px; margin: 0 auto;
}
.pub-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.pub-brand img {
    height: 50px; width: auto; object-fit: contain;
    border-radius: 50%;
    background: #ece7de;
    border: 1px solid rgba(3, 74, 127, .15);
    padding: 3px;
}
.pub-brand-copy {
    padding-left: 14px;
    border-left: 1px solid var(--line);
}
/* Logo ngang (Branding:LogoWide) — đã có tên bảo tàng → ẩn logo vuông + chữ */
.pub-brand .pub-brand__wide {
    height: 60px; width: auto; max-width: min(62vw, 340px); object-fit: contain;
    padding: 0; border: 0; border-radius: 0; background: none;
}
.pub-brand--wide .pub-brand__mark,
.pub-brand--wide .pub-brand-copy { display: none; }
.pub-brand-copy strong { display: block; color: var(--blue-950); font-size: .95rem; line-height: 1.25; }
.pub-brand-copy span   { display: block; color: var(--muted);    font-size: .75rem; margin-top: 2px; }
.pub-header-actions { display: flex; align-items: center; gap: 8px; }
.pub-support-link {
    padding: 7px 11px; color: var(--blue-900); border-radius: 8px;
    font-size: .8rem; font-weight: 700; text-decoration: none;
}
.pub-support-link:hover { background: var(--blue-50); }
.locale { display: flex; align-items: center; padding: 3px; background: #eef2f5; border-radius: 9px; }
.locale button {
    min-width: 38px; height: 32px; padding: 0 9px;
    border: 0; border-radius: 7px;
    color: var(--muted); background: transparent;
    font-size: .8rem; font-weight: 700;
}
.locale button.active { color: #fff; background: var(--blue-900); }

/* Backward-compat header classes */
.pub-header__logo   { height: 48px; width: auto; }
.pub-header__title  { font-size: 1rem; font-weight: 700; color: var(--blue-950); }
.pub-header__sub    { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    position: relative; overflow: hidden;
    padding: 44px 0 68px;
    color: white;
    background:
        radial-gradient(circle at 88% 0%, rgba(215, 164, 73, .22), transparent 32%),
        linear-gradient(125deg, var(--blue-950), var(--blue-900) 66%, #0b6098);
}
.hero::after {
    position: absolute; right: -100px; bottom: -210px;
    width: 470px; height: 470px;
    border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; content: '';
    box-shadow: 0 0 0 52px rgba(255,255,255,.035), 0 0 0 104px rgba(255,255,255,.025);
}
.eyebrow {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 10px; color: #c9e6f7;
    font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.eyebrow::before { width: 26px; height: 2px; background: var(--gold); content: ''; }
.hero h1 {
    max-width: 760px; margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.13; letter-spacing: -.025em;
}
.hero p { max-width: 700px; margin: 13px 0 0; color: #d8ebf6; font-size: 1rem; line-height: 1.65; }

/* ── Progress Card (Wizard Steps) ─────────────────────────── */
/* Dính ngay dưới header khi cuộn → khách luôn thấy đang ở bước nào.
   --pub-header-h: chiều cao header thật (trang đăng ký đo lại bằng JS; đây là giá trị dự phòng) */
:root { --pub-header-h: 77px; }
/* Trình duyệt cuộn tới ô đang nhập / phần báo lỗi chừa chỗ cho header + thanh 3 bước (JS đo lại cho đúng) */
:root:has(.progress-wrap) { scroll-padding-top: calc(var(--pub-header-h) + 84px); }
.progress-wrap {
    position: sticky; top: var(--pub-header-h); z-index: 20;
    margin-top: -35px; padding-bottom: 0;
    pointer-events: none;                 /* vùng trong suốt quanh thẻ không chặn bấm nội dung bên dưới */
    transition: top .22s ease;
}
.progress-wrap .progress-card { pointer-events: auto; }
/* Đang dính: nối liền header (bỏ bo góc trên; viền trên trong suốt thay vì bỏ — giữ nguyên chiều cao, nội dung
   bên dưới không giật), đổ bóng tách khỏi nội dung */
.progress-wrap.is-stuck .progress-card {
    border-top-color: transparent; border-top-left-radius: 0; border-top-right-radius: 0;
    box-shadow: 0 10px 22px rgba(7, 29, 46, .13);
}
/* Điện thoại (trang đăng ký): cuộn xuống thì ẩn header, thanh 3 bước lên sát mép trên; cuộn lên hiện lại
   (JS trang đăng ký gắn class pub-header-hidden). Header + thanh chiếm ~1/6 màn hình điện thoại */
.pub-header { transition: transform .22s ease; }
html.pub-header-hidden .pub-header { transform: translateY(-100%); }
html.pub-header-hidden .progress-wrap { top: 0; }
@media (prefers-reduced-motion: reduce) {
    .pub-header, .progress-wrap { transition: none; }
}
.progress-card {
    display: grid; grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; box-shadow: var(--shadow);
}
.progress-step {
    position: relative;
    display: flex; align-items: center; min-height: 72px; padding: 14px 22px; gap: 12px;
}
.progress-step + .progress-step { border-left: 1px solid var(--line); }
.step-number {
    display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center;
    color: var(--muted); background: #eef2f5; border-radius: 50%;
    font-size: .85rem; font-weight: 700;
}
.progress-step.active .step-number { color: white; background: var(--blue-900); box-shadow: 0 0 0 5px var(--blue-100); }
.progress-step.done   .step-number { color: white; background: var(--success); }
.step-text strong { display: block; font-size: .94rem; color: var(--ink); }
.progress-step:not(.active):not(.done) .step-text strong { color: var(--muted); }
.progress-step.active .step-text strong { color: var(--blue-900); }
.step-text small  { display: block; color: var(--muted); font-size: .78rem; margin-top: 1px; }
.step-label--short { display: none; }

/* Backward-compat wizard classes */
.wizard-steps { display: none; } /* replaced by .progress-wrap / .progress-card */

/* ── Page Grid (form + aside) ──────────────────────────────── */
.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start; gap: 26px;
    padding-block: 30px 56px;
}
.form-column { display: grid; gap: 22px; min-width: 0; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(8, 44, 72, .045);
    overflow: hidden;
}
.card--highlight { border-color: var(--blue-900); }

/* Backward-compat card sub-classes */
.card__header { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.card__title  { font-size: 1.1rem; font-weight: 700; color: var(--blue-950); }
.card__body   { padding: 24px; }

/* Section card (used in form-column sections) */
.section-card { padding: 28px; scroll-margin-top: 100px; }
.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.section-icon {
    display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center;
    color: var(--blue-900); background: var(--blue-50);
    border: 1px solid var(--blue-100); border-radius: 12px;
}
.section-icon svg { width: 21px; height: 21px; }
.section-heading h2 { margin: 0; color: var(--blue-950); font-size: 1.25rem; line-height: 1.3; }
.section-heading p  { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.subheading { margin: 26px 0 12px; color: var(--blue-950); font-size: .95rem; font-weight: 600; }

/* ── Summary Aside ─────────────────────────────────────────── */
/* Dính dưới header + thanh 3 bước. Khung cao hơn màn hình thì phần dưới (nút Hoàn tất) hiện khi cuộn tới cuối form.
   Không cho cuộn bên trong khung: laptop 1366×768 khung chỉ còn ~460px, nút Hoàn tất bị giấu trong vùng cuộn */
.summary { position: sticky; top: calc(var(--pub-header-h) + 88px); overflow: hidden; }
.summary-head {
    padding: 22px 22px 17px; color: white;
    background: linear-gradient(135deg, var(--blue-950), var(--blue-900));
}
.summary-head p  { margin: 0 0 4px; color: #bcdced; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.summary-head h2 { margin: 0; font-size: 1.25rem; color: white; }

.ticket-preview {
    position: relative; margin: 18px 18px 0; padding: 17px;
    background: #fbfdff; border: 1px solid var(--line); border-radius: 13px;
}
.ticket-preview::before,
.ticket-preview::after {
    position: absolute; top: 79px; width: 15px; height: 15px;
    border-radius: 50%; background: white; border: 1px solid var(--line); content: '';
}
.ticket-preview::before { left: -9px;  border-left: 0; }
.ticket-preview::after  { right: -9px; border-right: 0; }

.ticket-type {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding-bottom: 14px; border-bottom: 1px dashed #cbd4dc; gap: 12px;
}
.ticket-type span   { color: var(--muted); font-size: .76rem; }
.ticket-type strong { display: block; margin-top: 2px; color: var(--blue-950); font-size: .96rem; }
.price { color: var(--blue-900); font-size: 1.1rem; font-weight: 700; white-space: nowrap; }

.summary-rows { display: grid; gap: 11px; margin-top: 15px; }
.summary-row  { display: flex; justify-content: space-between; gap: 16px; font-size: .82rem; }
.summary-row span   { color: var(--muted); }
.summary-row strong { max-width: 60%; color: #2f3b47; text-align: right; }

.summary-body { padding: 18px; }
.completion {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; color: #40505e; font-size: .82rem; font-weight: 600;
}
.progress-line { height: 7px; overflow: hidden; margin-bottom: 17px; background: #e8edf1; border-radius: 999px; }
.progress-line span {
    display: block; width: 0%; height: 100%;
    background: linear-gradient(90deg, var(--blue-900), #2b90c7);
    border-radius: inherit; transition: width .3s ease;
}
.agreement-list { display: grid; gap: 12px; margin-bottom: 16px; }
.check-row { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 9px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue-900); }
.check-row span  { color: #53616d; font-size: .79rem; line-height: 1.5; }
.submit-help { margin: 9px 0 0; color: var(--muted); font-size: .73rem; text-align: center; }

/* ── Category Choice Cards ─────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* label là ô của lưới (đã cao bằng ô cùng hàng) → flex để khung viền .choice-content giãn theo, các ô cùng hàng cao bằng nhau */
.choice-card { position: relative; display: flex; cursor: pointer; }
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-content {
    display: flex; flex: 1 1 auto; min-height: 78px; align-items: flex-start; gap: 12px; padding: 15px;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: white; transition: .18s ease;
}
.choice-content:hover { border-color: #8cb8d3; background: #fbfdff; }
.choice-card input:focus-visible + .choice-content { box-shadow: var(--focus); }
.choice-card input:checked + .choice-content {
    border-color: var(--blue-900); background: var(--blue-50);
    box-shadow: inset 0 0 0 1px var(--blue-900);
}
.radio-ui {
    display: grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center;
    margin-top: 2px; border: 1.5px solid #aab5bf; border-radius: 50%; background: white;
}
.choice-card input:checked + .choice-content .radio-ui { border-color: var(--blue-900); }
.choice-card input:checked + .choice-content .radio-ui::after {
    width: 10px; height: 10px; border-radius: 50%; background: var(--blue-900); content: '';
}
.choice-copy strong { display: block; font-size: .94rem; line-height: 1.35; }
.choice-copy span   { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }

/* ── Slot Grid ─────────────────────────────────────────────── */
/* New style (matches demo) */
.slots {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
}
.slot {
    min-height: 68px; padding: 10px 8px;
    color: var(--ink); background: white;
    border: 1px solid var(--line); border-radius: 10px;
    text-align: left; transition: .16s ease; cursor: pointer;
}
.slot:hover:not(:disabled) { border-color: var(--blue-900); background: #fbfdff; }
.slot:focus-visible { outline: none; box-shadow: var(--focus); }
.slot.selected {
    color: var(--blue-950); border-color: var(--blue-900); background: var(--blue-50);
    box-shadow: inset 0 0 0 1px var(--blue-900);
}
.slot:disabled { color: #8b969f; background: #f2f4f5; border-style: dashed; cursor: not-allowed; opacity: .85; }
.slot.limited .slot-status { color: var(--warning); }
.slot-time   { display: block; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.slot-status {
    display: flex; align-items: center; gap: 5px;
    margin-top: 4px; color: var(--success); font-size: .7rem;
}
.slot:disabled .slot-status { color: #7b8790; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.dot.limited { background: var(--warning); }
.dot.full    { background: #a5afb8; }

.slot-heading {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 0 0 10px;
}
.slot-heading strong { font-size: .875rem; }
.legend { display: flex; flex-wrap: wrap; gap: 11px; color: var(--muted); font-size: .72rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

.slots-empty {
    display: grid; min-height: 145px; place-items: center; padding: 20px;
    color: var(--muted); background: #f8fafb;
    border: 1px dashed #cbd4dc; border-radius: 12px;
    text-align: center; font-size: .85rem;
}
.slots-empty svg { width: 26px; height: 26px; margin: 0 auto 7px; color: #91a0ab; }
/* display:grid ở trên ghi đè thuộc tính hidden của trình duyệt → khung "Chọn ngày..." hiện cùng danh sách khung giờ */
.slots-empty[hidden] { display: none; }
/* Nút cài ứng dụng (PWA) ẩn tới khi trình duyệt cho cài — thắng mọi .btn { display: inline-flex } */
[data-pwa-install][hidden] { display: none !important; }
.pwa-help { margin: 10px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; text-align: center; }

/* Old slot-grid (backward compat) */
.slot-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.slot-item { padding: 14px 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); text-align: center; cursor: pointer; transition: all .18s; background: var(--bg-white); }
.slot-item:hover:not(.sold-out):not(.closed) { border-color: var(--blue-900); background: var(--blue-50); }
.slot-item.selected { border-color: var(--blue-900); background: var(--blue-900); color: #fff; }
.slot-item.limited  { border-color: #f59e0b; }
.slot-item.sold-out { opacity: .5; cursor: not-allowed; background: #f1f5f9; }
.slot-item.closed   { opacity: .4; cursor: not-allowed; }
.slot-item__time    { font-weight: 700; font-size: .9rem; }
.slot-item__status  { font-size: .7rem; margin-top: 4px; }
.badge-available { color: var(--success); }
.badge-limited   { color: var(--warning); }
.badge-soldout   { color: var(--danger); }

/* ── Form Elements ─────────────────────────────────────────── */
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 19px; }
.field.full { grid-column: 1 / -1; }
.field label,
.field-label { display: block; margin-bottom: 7px; color: #344250; font-size: .875rem; font-weight: 600; }
.required { color: var(--danger); }

.form-group  { margin-bottom: 20px; }
.form-label  { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; color: var(--ink); }
.form-label .req { color: var(--danger); margin-left: 2px; }

/* control = modern form input (from demo) */
.control,
.form-control {
    width: 100%; height: 48px; padding: 0 14px;
    color: var(--ink); background: white;
    border: 1px solid #cbd4dc; border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    font-family: inherit; font-size: .9rem;
}
.control::placeholder,
.form-control::placeholder { color: #98a3ad; }
.control:hover,
.form-control:hover { border-color: #98a8b5; }
.control:focus,
.form-control:focus { border-color: var(--blue-900); box-shadow: var(--focus); }
.control:disabled,
.form-control:disabled { color: #586570; background: #edf2f5; cursor: not-allowed; }
.control[aria-invalid="true"],
.form-control.error { border-color: var(--danger); background: #fffafa; }
.form-control.valid { border-color: var(--success); }

select.control, select.form-control { height: 48px; padding: 0 14px; }

/* Ô ngày cố định dd/mm/yyyy (js/date-dmy.js): ô chữ + biểu tượng lịch; ô ngày gốc trong suốt phủ lên biểu tượng
   (chạm vào mở bộ chọn ngày của máy) */
.date-dmy { position: relative; }
.date-dmy__text { padding-right: 48px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.date-dmy__icon {
    position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center;
    width: 48px; height: 100%; color: var(--blue-900); pointer-events: none;
}
.date-dmy__icon svg { width: 20px; height: 20px; }
.date-dmy__native {
    position: absolute; top: 0; right: 0; width: 48px; height: 100%; margin: 0; padding: 0;
    border: 0; opacity: 0; cursor: pointer; font-size: 16px;   /* ≥16px: iOS không phóng to trang khi chạm */
}
/* Chrome / Edge: nút mở lịch của ô gốc phủ kín vùng biểu tượng */
.date-dmy__native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; cursor: pointer; }
.date-dmy__hint.is-ok   { color: var(--success); font-weight: 600; }
.date-dmy__hint.is-warn { color: var(--danger); font-weight: 600; }
textarea.control, textarea.form-control { height: auto; padding: 12px 14px; resize: vertical; }

.help, .form-hint  { margin: 6px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.error, .form-error { display: none; margin: 6px 0 0; color: var(--danger); font-size: .78rem; font-weight: 600; }
.error.show { display: block; }

.email-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn,
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 18px;
    border: 1px solid transparent; border-radius: 10px;
    font-family: inherit; font-size: .9rem; font-weight: 700;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform .15s, box-shadow .15s, background .15s;
    user-select: none;
}
.btn:hover, .button:hover { transform: translateY(-1px); }
.btn:active, .button:active { transform: translateY(0); }
.btn:focus-visible, .button:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled, .button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.btn-primary, .button-primary { color: white; background: var(--blue-900); box-shadow: 0 8px 20px rgba(3,74,127,.2); }
.btn-primary:hover:not(:disabled), .button-primary:hover { background: var(--blue-950); }
.btn-gold    { background: var(--gold); color: #fff; }
.btn-gold:hover:not(:disabled) { background: #b88930; }
.btn-outline, .button-outline { color: var(--blue-900); background: white; border-color: #8ab3cc; }
.btn-outline:hover:not(:disabled), .button-outline:hover { background: var(--blue-50); }
.btn-ghost, .button-quiet { background: white; color: #536270; border-color: var(--line); }
.btn-ghost:hover:not(:disabled), .button-quiet:hover { background: var(--canvas); }
.btn-lg   { padding: 0 28px; font-size: 1rem; min-height: 52px; }
.btn-sm   { padding: 0 12px; font-size: .8rem; min-height: 36px; }
.btn-full { width: 100%; }

/* ── Notices / Alerts ──────────────────────────────────────── */
.notice {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px;
    border-radius: 11px; font-size: .84rem; line-height: 1.55;
}
.notice svg { flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; }
.notice-info    { color: #174e70; background: var(--blue-50); border: 1px solid #c8e4f4; }
.notice-warning { color: #704f08; background: #fff8e7; border: 1px solid #ecdba9; }

.alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: .875rem; display: flex; gap: 10px; align-items: flex-start;
}
.alert-info    { background: var(--blue-50); color: var(--blue-950); border: 1px solid #bfdbfe; }
.alert-warning { background: var(--gold-soft); color: #704f08; border: 1px solid #fde68a; }
.alert-danger  { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--success-soft); color: #166534; border: 1px solid #bbf7d0; }

/* ── Document Upload ───────────────────────────────────────── */
.document-box { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.document-box h3      { margin: 0 0 3px; font-size: .96rem; }
.document-box > p     { margin: 0 0 15px; color: var(--muted); font-size: .82rem; }
.document-options     { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.compact-choice { position: relative; display: block; }
.compact-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.compact-choice span {
    display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px;
    padding: 10px; border: 1px solid var(--line); border-radius: 10px;
    text-align: center; font-size: .83rem; font-weight: 600; cursor: pointer;
    transition: .15s;
}
.compact-choice input:checked + span {
    color: var(--blue-900); background: var(--blue-50);
    border-color: var(--blue-900); box-shadow: inset 0 0 0 1px var(--blue-900);
}
.compact-choice input:focus-visible + span { box-shadow: var(--focus); }

.upload-area {
    display: none; margin-top: 12px; padding: 18px;
    background: #f8fafb; border: 1px dashed #aab8c3; border-radius: 11px; text-align: center;
    cursor: pointer; transition: all .2s;
}
.upload-area.visible,
.upload-area.drag-over { display: block; }
.upload-area.drag-over { border-color: var(--blue-900); background: var(--blue-50); }
.upload-area:hover     { border-color: var(--blue-900); background: var(--blue-50); }
.upload-area input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-trigger {
    display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 14px;
    color: var(--blue-900); background: white;
    border: 1px solid #92b6cd; border-radius: 9px;
    font-size: .84rem; font-weight: 700; cursor: pointer;
}
.file-name { margin: 8px 0 0; color: var(--muted); font-size: .77rem; }

/* Old upload-area style (area always visible, click to upload) */
.upload-area.open { display: block; border-style: dashed; border-color: var(--border); }
.upload-area__icon  { font-size: 2.5rem; margin-bottom: 8px; }
.upload-area__text  { font-size: .875rem; color: var(--muted); }
.upload-area__skip  { margin-top: 12px; font-size: .8rem; }

/* ── Consent Checkboxes ────────────────────────────────────── */
.consent-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line); margin-bottom: 8px; transition: border-color .15s;
}
.consent-item:has(input:checked) { border-color: var(--blue-900); background: var(--blue-50); }
.consent-item input[type=checkbox] { margin-top: 2px; accent-color: var(--blue-900); }

/* ── Verified Email ────────────────────────────────────────── */
.verified {
    display: none; align-items: center; gap: 8px;
    margin-top: 9px; color: var(--success); font-size: .83rem; font-weight: 600;
}
.verified.show { display: flex; }
.verified svg { width: 17px; height: 17px; }

/* ── Skeleton Loading ──────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.4s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-wave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Toast Notification (SHARED — also used by TicketCheck) ── */
#toast-container {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    min-width: 260px; max-width: 360px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: .875rem; font-weight: 500;
    animation: toast-in .25s ease;
    display: flex; align-items: center; gap: 10px;
}
.toast.success { background: var(--success-soft); border-left: 4px solid #22c55e; color: #166534; }
.toast.error   { background: var(--danger-soft);  border-left: 4px solid #ef4444; color: #991b1b; }
.toast.info    { background: var(--blue-50);       border-left: 4px solid var(--blue-900); color: var(--blue-950); }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Result / Status Banner (SHARED) ──────────────────────── */
.result-banner,
.status-banner {
    padding: 22px 16px; border-radius: var(--radius-md);
    text-align: center; font-size: 1.3rem; font-weight: 700;
    transition: background .25s;
}
.result-banner.green,  .status-banner.green  { background: #bbf7d0; color: #166534; }
.result-banner.yellow, .status-banner.yellow { background: #fef9c3; color: #854d0e; }
.result-banner.red,    .status-banner.red    { background: #fee2e2; color: #991b1b; }

/* ── Info Table (SHARED) ───────────────────────────────────── */
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.info-table td:first-child { color: var(--muted); width: 45%; }
.info-table td:last-child  { font-weight: 600; }

/* ── Stats (SHARED — Register + TicketCheck) ───────────────── */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
    padding: 16px 12px; border-radius: var(--radius-md);
    text-align: center; font-weight: 700;
    border: 1.5px solid transparent;
    background: white; border-color: var(--line);
}
.stat-card.green  { background: #f0fdf4; border-color: #86efac; }
.stat-card.yellow { background: #fefce8; border-color: #fde047; }
.stat-card.red    { background: #fef2f2; border-color: #fca5a5; }
.stat-card__num { font-size: 2rem; line-height: 1; }
.stat-card__lbl { font-size: .75rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
.stat-card.green  .stat-card__num { color: var(--success); }
.stat-card.yellow .stat-card__num { color: var(--warning); }
.stat-card.red    .stat-card__num { color: var(--danger); }

/* ── Doc Button (SHARED) ───────────────────────────────────── */
.doc-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px; border-radius: 20px;
    border: 1.5px solid var(--blue-900); color: var(--blue-900);
    font-size: .8rem; font-weight: 600; background: transparent; cursor: pointer;
    transition: all .15s;
}
.doc-btn:hover { background: var(--blue-900); color: #fff; }

/* ── Reason Select (SHARED) ────────────────────────────────── */
.reason-select {
    width: 100%; padding: 12px 14px; margin-bottom: 12px;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .9rem;
    background: var(--surface); color: var(--ink);
    outline: none;
}
.reason-select:focus { border-color: var(--blue-900); box-shadow: var(--focus); }

/* ── Fill Bar (slot progress) ──────────────────────────────── */
.fill-bar { height: 7px; overflow: hidden; background: #e8edf1; border-radius: 999px; }
.fill-bar__inner {
    height: 100%; background: var(--blue-900); border-radius: inherit;
    transition: width .3s ease;
}
.fill-bar__inner.warning { background: var(--warning); }
.fill-bar__inner.full    { background: var(--danger); }

/* ── Admin Table ────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th, .data-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { background: #f8fafc; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table-wrap { overflow-x: auto; }

/* ── Badge ─────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-issued    { background: #dbeafe; color: #1e40af; }
.badge-used      { background: #d1fae5; color: #065f46; }
.badge-rejected  { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: #f1f5f9; color: #475569; }
.badge-expired   { background: #f1f5f9; color: #64748b; }
.badge-review    { background: #fef9c3; color: #854d0e; }
.badge-hold      { background: #ede9fe; color: #6d28d9; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.page-btn {
    padding: 6px 12px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line); font-size: .8rem;
    background: var(--surface); color: var(--ink); cursor: pointer;
    text-decoration: none; transition: all .15s;
}
.page-btn:hover, .page-btn.active { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── reCAPTCHA ─────────────────────────────────────────────── */
.grecaptcha-badge { visibility: hidden !important; }
.recaptcha-notice { font-size: .7rem; color: var(--muted); text-align: center; margin-top: 8px; }
.recaptcha-notice a { color: var(--muted); text-decoration: underline; }

/* ── Footer ────────────────────────────────────────────────── */
/* Gọn 1 dòng như trang mua vé: "© năm Tên bảo tàng | Developed by …" (trước đây cao ~78px, kèm địa chỉ + điện thoại) */
.pub-footer,
.footer {
    text-align: center; padding: 12px 16px;
    font-size: .75rem; line-height: 1.5; color: var(--muted);
    border-top: 1px solid var(--line); background: #eef2f5;
}
.pub-footer__sep { margin: 0 6px; }
.pub-footer a { color: var(--blue-900); font-weight: 600; text-decoration: none; }
.pub-footer a:hover, .pub-footer a:focus-visible { text-decoration: underline; }
/* Điện thoại hẹp: không đủ 1 dòng → dòng "Developed by" xuống dưới, bỏ dấu | (tránh | treo cuối dòng) */
@media (max-width: 420px) {
    .pub-footer__sep { display: none; }
    .pub-footer a { display: block; }
}

/* ── Resend Ticket ──────────────────────────────────────────── */
.resend-hero {
    min-height: calc(100vh - 130px); padding: 42px 0 64px;   /* 130 ≈ header (67–77px) + footer gọn (43–63px) */
    background:
        radial-gradient(circle at 85% 10%, rgba(215, 164, 73, .14), transparent 28%),
        linear-gradient(180deg, #edf7fc 0, var(--canvas) 360px);
}
.resend-shell { max-width: 720px; }
.resend-back {
    display: inline-flex; margin-bottom: 16px; color: var(--blue-900);
    font-size: .86rem; font-weight: 700; text-decoration: none;
}
.resend-back:hover { text-decoration: underline; }
.resend-card { padding: 30px; overflow: visible; }
.resend-card__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.resend-card__head .eyebrow { margin-bottom: 5px; color: var(--blue-800); font-size: .73rem; }
.resend-card__head h1 { margin: 0; color: var(--blue-950); font-size: 1.65rem; line-height: 1.25; }
.resend-card__head p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: .9rem; }
.resend-icon {
    display: grid; flex: 0 0 50px; width: 50px; height: 50px; place-items: center;
    color: white; background: linear-gradient(135deg, var(--blue-950), var(--blue-800));
    border-radius: 14px; box-shadow: 0 8px 20px rgba(3,74,127,.18);
}
.resend-icon svg { width: 25px; height: 25px; }
.resend-form { display: grid; gap: 18px; }
.resend-result { margin-bottom: 22px; }
.resend-result > span { font-size: 1.2rem; font-weight: 700; }
.resend-result p { margin: 3px 0 0; font-size: .82rem; }
.resend-error { display: block; margin-top: 5px; color: var(--danger); font-size: .78rem; font-weight: 600; }
.resend-error:empty, .resend-validation:empty { display: none; }
.resend-validation { padding: 10px 12px; color: #991b1b; background: var(--danger-soft); border-radius: 8px; font-size: .82rem; }
.resend-validation ul { margin: 0; padding-left: 18px; }
.resend-privacy { margin-top: 2px; }

/* ── Offline Banner ────────────────────────────────────────── */
.offline-banner {
    position: fixed; z-index: 80; top: 0; right: 0; left: 0; display: none;
    min-height: 36px; align-items: center; justify-content: center;
    gap: 8px; padding: 7px 16px; color: white; background: var(--danger);
    font-size: .78rem; font-weight: 700; text-align: center;
}
.offline-banner.show { display: flex; }

/* ── Vé điện tử (Register/Success) ─────────────────────────────
   Một tấm vé: đầu vé (bảo tàng) · thân (QR + thông tin) · đường xé · chân (lưu ý).
   Bản in: chỉ còn tấm vé, nằm gọn nửa trang A4 (xem @media print ngay bên dưới). */
.ticket-page {
    padding: 32px 0 56px;
    background: linear-gradient(180deg, #edf7fc 0, var(--canvas) 320px);
}
.ticket-page .container { max-width: 760px; }

.ticket-success {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 18px; padding: 16px 18px;
    background: var(--success-soft); border: 1px solid #b7e4d0; border-radius: var(--radius-md);
    color: #0b5a40;
}
.ticket-success__icon {
    flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: 50%; background: var(--success); color: #fff;
}
.ticket-success__icon svg { width: 22px; height: 22px; }
.ticket-success h1 { margin: 0; font-size: 1.15rem; color: #0b5a40; }
.ticket-success p  { margin: 2px 0 0; font-size: .88rem; color: #24644d; }
.ticket-page > .container > .alert { margin-bottom: 18px; }

.ticket {
    --ticket-cut: var(--canvas);          /* màu nền khoét 2 bên đường xé */
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow);
}

.ticket__head {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 22px; color: #fff;
    background: linear-gradient(135deg, var(--blue-950), var(--blue-900));
    border-bottom: 3px solid var(--gold);
}
.ticket__logo {
    flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain;
    border-radius: 50%; background: #fff; padding: 3px;
}
.ticket__museum { flex: 1; min-width: 0; }
.ticket__museum strong { display: block; font-size: 1rem; letter-spacing: .02em; text-transform: uppercase; }
.ticket__museum span   { display: block; margin-top: 2px; color: #bcdced; font-size: .76rem; }
.ticket__kind { text-align: right; line-height: 1.25; }
.ticket__kind span   { display: block; color: #bcdced; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ticket__kind strong { display: block; color: var(--gold); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }

.ticket__body {
    display: grid; grid-template-columns: 216px 1fr; gap: 26px; align-items: center;
    padding: 24px 26px 22px;
}
.ticket__qr { position: relative; text-align: center; }
.ticket__qr img {
    width: 200px; height: 200px; margin: 0 auto;
    padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    image-rendering: pixelated;
}
.ticket__code {
    margin-top: 10px; color: var(--blue-950);
    font-family: Consolas, 'Courier New', monospace; font-size: 1.12rem; font-weight: 700; letter-spacing: .08em;
}
.ticket__code-hint { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.ticket__void {
    position: absolute; top: 86px; left: 50%; transform: translateX(-50%) rotate(-12deg);
    padding: 4px 12px; border: 2px solid var(--danger); border-radius: 6px;
    background: rgba(255,255,255,.92); color: var(--danger);
    font-size: .82rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; text-transform: uppercase;
}
.ticket--void .ticket__qr img { opacity: .25; }

.ticket__info { display: grid; gap: 14px; margin: 0; }
.ticket__info dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ticket__info dd { margin: 2px 0 0; color: var(--ink); font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }
.ticket__info dd small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.ticket__when {
    display: grid; grid-template-columns: 1fr auto; gap: 16px;
    padding: 12px 14px; background: var(--blue-50); border: 1px solid #c8e4f4; border-radius: var(--radius-md);
}
.ticket__when dd { color: var(--blue-950); font-size: 1.12rem; }
.ticket__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.ticket-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.ticket-status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ''; }
.ticket-status--ok     { color: var(--success); background: var(--success-soft); }
.ticket-status--warn   { color: var(--warning); background: var(--warning-soft); }
.ticket-status--danger { color: var(--danger);  background: var(--danger-soft); }
.ticket-status--muted  { color: var(--muted);   background: var(--canvas); }

/* Đường xé: gạch đứt + 2 vết khoét tròn hai mép */
.ticket__tear { position: relative; height: 0; margin: 0 22px; border-top: 2px dashed #cbd4dc; }
.ticket__tear::before,
.ticket__tear::after {
    position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--ticket-cut); border: 1px solid var(--line); content: '';
}
.ticket__tear::before { left: -35px; }
.ticket__tear::after  { right: -35px; }

.ticket__foot { padding: 16px 26px 18px; }
.ticket__rules {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px;
    margin: 0; padding: 0; list-style: none;
    color: #3d4a56; font-size: .8rem; line-height: 1.45;
}
.ticket__rules li { position: relative; padding-left: 14px; }
.ticket__rules li::before { position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); content: ''; }
.ticket__meta {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
    margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line);
    color: var(--muted); font-size: .72rem;
}

.ticket-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.ticket-actions svg { width: 18px; height: 18px; }
.ticket-tip { margin: 12px 0 0; color: var(--muted); font-size: .8rem; text-align: center; }

@media (max-width: 640px) {
    .ticket-page { padding: 18px 0 40px; }
    .ticket__head { padding: 14px 16px; gap: 10px; }
    .ticket__logo { flex-basis: 40px; width: 40px; height: 40px; }
    .ticket__museum strong { font-size: .86rem; }
    .ticket__museum span { display: none; }
    .ticket__body { grid-template-columns: 1fr; gap: 18px; padding: 20px 16px; }
    .ticket__qr img { width: min(240px, 72vw); height: auto; aspect-ratio: 1; }
    .ticket__void { top: 40%; }
    .ticket__tear { margin: 0 16px; }
    .ticket__tear::before { left: -29px; }
    .ticket__tear::after  { right: -29px; }
    .ticket__foot { padding: 14px 16px 16px; }
    .ticket__rules { grid-template-columns: 1fr; }
    .ticket-actions .btn { flex: 1 1 100%; }
}

/* Bản in / Lưu PDF: chỉ in tấm vé, 1 trang A4, giữ màu đầu vé */
@media print {
    @page { size: A4 portrait; margin: 12mm; }
    body.page-ticket { min-height: 0; background: #fff !important; }
    body.page-ticket .pub-header,
    body.page-ticket .pub-footer,
    body.page-ticket #toast-container,
    body.page-ticket .no-print { display: none !important; }
    .ticket-page { padding: 0; background: none; }
    .ticket-page .container { width: 100%; max-width: 172mm; margin: 0 auto; }
    .ticket {
        --ticket-cut: #fff;
        box-shadow: none; border-color: #b9c4cd;
        break-inside: avoid; page-break-inside: avoid;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    /* Khổ in hẹp hơn 720px có thể kích hoạt bố cục điện thoại → ép lại 2 cột */
    .ticket__body  { grid-template-columns: 216px 1fr; gap: 24px; padding: 20px 24px; }
    .ticket__qr img { width: 200px; height: 200px; }
    .ticket__museum span { display: block; }
    .ticket__rules { grid-template-columns: 1fr 1fr; }
    .ticket__tear::before { left: -35px; }
    .ticket__tear::after  { right: -35px; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
    .page-grid { grid-template-columns: 1fr; }
    .summary { position: static; }
    .summary .ticket-preview { display: none; }
    .summary-head { padding-bottom: 20px; }
    .summary-body { display: grid; grid-template-columns: 1fr 290px; gap: 22px; align-items: center; }
    .agreement-list { margin: 0; }
}
@media (max-width: 720px) {
    .container { width: min(100% - 28px, 1180px); }
    .pub-header__inner { min-height: 66px; }
    .pub-brand img { height: 42px; }
    .pub-brand .pub-brand__wide { height: 50px; }
    .pub-brand-copy { display: none; }
    .pub-support-link { padding-inline: 7px; font-size: .74rem; }
    .hero { padding: 34px 0 58px; }
    .hero p { font-size: .9rem; }
    /* Điện thoại: 3 bước trên 1 hàng gọn (~50px) để dính dưới header không chiếm nhiều màn hình;
       tên bước rút gọn (bản đầy đủ vẫn còn cho trình đọc màn hình) */
    :root { --pub-header-h: 67px; }
    .progress-wrap { margin-top: -30px; }
    .progress-card { border-radius: 14px; }
    .progress-step { min-height: 50px; padding: 8px 10px; gap: 8px; }
    .step-number { flex-basis: 26px; width: 26px; height: 26px; font-size: .78rem; }
    .progress-step.active .step-number { box-shadow: 0 0 0 3px var(--blue-100); }
    .step-text strong { font-size: .82rem; line-height: 1.25; }
    .step-text small { display: none; }
    .step-label {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0,0,0,0); white-space: nowrap;
    }
    .step-label--short { display: inline; }
    .page-grid { padding-top: 20px; }
    .section-card { padding: 21px 17px; }
    .section-heading { margin-bottom: 20px; }
    .category-grid, .field-grid, .document-options { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .email-row { grid-template-columns: 1fr; }
    .email-row .btn { width: 100%; }
    .slots { grid-template-columns: repeat(2, 1fr); }
    .summary-body { display: block; }
    .agreement-list { margin-bottom: 16px; }
    .card__body { padding: 16px; }
    .resend-hero { padding: 28px 0 42px; }
    .resend-card { padding: 22px 17px; }
    .resend-card__head { gap: 12px; }
    .resend-icon { flex-basis: 44px; width: 44px; height: 44px; }
}
@media (max-width: 640px) {
    .pub-main { padding: 20px 14px 48px; }
    .stats-row { gap: 8px; }
    .stat-card__num { font-size: 1.6rem; }
}
@media (max-width: 420px) {
    .container { width: min(100% - 20px, 1180px); }
    .hero h1 { font-size: 1.8rem; }
    .locale { display: none; }
    .resend-card__head h1 { font-size: 1.4rem; }
    .slots { gap: 7px; }
    .slot-time { font-size: .78rem; }
    .stats-row { grid-template-columns: repeat(3,1fr); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
