:root {
  --ink: #000000;
  --muted: #66615a;
  --line: #e6ded2;
  --surface: #ffffff;
  --soft: #fff9e8;
  --brand: #cb7e31;
  --brand-dark: #8b4f18;
  --brand-pale: #fff0c5;
  --brand-yellow: #eeb931;
  --success: #000000;
  --success-pale: #eeb931;
  --warning: #8b4f18;
  --warning-pale: #fff2d0;
  --danger: #b42318;
  --danger-pale: #fff0ee;
  --shadow: 0 24px 70px rgba(38, 29, 19, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f5f1e9; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(138deg, rgba(238,185,49,.24) 0 11rem, transparent 11rem),
    linear-gradient(318deg, rgba(203,126,49,.08) 0 16rem, transparent 16rem),
    #f8f6f1;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
.brand-logo { width: 174px; height: auto; display: block; }
.brand-context { padding-left: 16px; border-left: 1px solid #cfc7bb; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 4px; display: grid; place-items: center;
  color: #000; background: var(--brand-yellow); box-shadow: 8px 8px 0 rgba(0,0,0,.08);
}
.brand-mark svg, .status-seal svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.language-switch { display: flex; padding: 3px; border: 1px solid #cfc7bb; border-radius: 4px; background: rgba(255,255,255,.86); }
.language-switch button { border: 0; border-radius: 2px; padding: 7px 11px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; }
.language-switch button.active { color: #000; background: var(--brand-yellow); font-weight: 800; }

.main-content { width: min(620px, calc(100% - 32px)); margin: 30px auto 0; flex: 1; }
.intro { text-align: center; margin-bottom: 28px; }
.eyebrow { color: var(--brand-dark); font-size: 12px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.intro h1 { margin: 12px 0 10px; font-size: clamp(29px, 6vw, 42px); line-height: 1.18; letter-spacing: -.035em; }
.intro p { max-width: 550px; margin: 0 auto; color: var(--muted); line-height: 1.7; font-size: 15px; }
.card { border: 1px solid rgba(0,0,0,.13); border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.flow-card { padding: 30px; }
.steps { display: flex; align-items: center; margin: 0 0 30px; }
.step { display: flex; align-items: center; gap: 8px; color: #91a29f; }
.step span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #cbd9d6; border-radius: 50%; font-size: 12px; font-style: normal; font-weight: 800; }
.step em { font-size: 12px; font-style: normal; font-weight: 700; }
.step.active { color: #000; }
.step.active span { color: #000; border-color: #000; background: var(--brand-yellow); }
.step-line { height: 1px; flex: 1; margin: 0 10px; background: var(--line); }
.field-group { padding: 0; margin: 0 0 20px; border: 0; }
.field-group legend, .form-field > span { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 750; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 650; transition: .18s ease; }
.segmented input:checked + span { color: #000; border-color: #000; background: var(--brand-yellow); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.form-field { display: block; margin-bottom: 20px; }
.form-field input, .form-field select, .settings-grid input, .settings-grid select, .settings-grid textarea, .admin-search {
  width: 100%; min-height: 50px; padding: 12px 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; outline: 0; background: #fff; transition: .18s ease;
}
.form-field input:focus, .settings-grid input:focus, .settings-grid select:focus, .settings-grid textarea:focus, .admin-search:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(238,185,49,.24); background: #fff; }
.form-field small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-field .document-type-help { padding-left: 9px; border-left: 2px solid rgba(238,185,49,.8); color: #4f4a42; font-size: 12px; }
.verification-hint { margin-top: 12px; padding: 11px 12px; border: 1px solid #eadfca; border-radius: 5px; color: #5d5549; background: #fffaf0; font-size: 12px; line-height: 1.6; }
.verification-hint strong { display: block; margin-bottom: 2px; color: #332d25; font-size: 12px; }
.verification-hint span { display: block; }
.primary-button {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 18px; border: 1px solid #000; border-radius: 4px; color: #000; text-decoration: none; background: var(--brand-yellow); box-shadow: 7px 7px 0 rgba(0,0,0,.12); cursor: pointer; font-weight: 850; transition: .18s ease;
}
.primary-button:hover { transform: translate(-1px,-1px); box-shadow: 9px 9px 0 rgba(0,0,0,.14); }
.primary-button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-button svg, .staff-banner svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.primary-button.success { color: #fff; background: #000; }
.text-button { width: 100%; margin-top: 12px; padding: 10px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; }
.notice { margin-bottom: 20px; padding: 12px 14px; border-radius: 12px; color: var(--danger); background: var(--danger-pale); font-size: 13px; line-height: 1.55; }
.notice.warning { color: var(--warning); background: var(--warning-pale); }
.notice.success { color: var(--success); background: var(--success-pale); }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.section-heading h2 { margin: 0 0 4px; font-size: 18px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mini-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 3px; color: #000; background: var(--brand-yellow); }
.mini-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.info-list { margin: 0 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--soft); }
.info-row { min-height: 48px; display: grid; grid-template-columns: minmax(120px, 1fr) 1.2fr; align-items: center; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--muted); font-size: 12px; }
.info-row dd { margin: 0; text-align: right; word-break: break-word; font-size: 13px; font-weight: 750; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.6; cursor: pointer; }
.consent-row input { width: 17px; height: 17px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--brand); }
.footer-security span, .footer-support { text-wrap: balance; }

.receipt-card { overflow: hidden; border: 2px solid #000; }
.receipt-status { position: relative; overflow: hidden; padding: 34px 26px 36px; text-align: center; background: #f2eee7; }
.receipt-status::after { display: none; }
.receipt-status.success { color: #000; background: var(--brand-yellow); }
.receipt-status.success::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 620 390'%3E%3Cpath d='M70 205 L225 330 L555 55' fill='none' stroke='%23fff' stroke-opacity='.28' stroke-width='54' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.receipt-status.error { background: linear-gradient(180deg, #fff0ee, #fff); }
.status-live-row { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 8px 13px; border: 1px solid #000; border-radius: 999px; color: #fff; background: #000; box-shadow: 4px 4px 0 rgba(0,0,0,.13); }
.status-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-yellow); box-shadow: 0 0 0 4px rgba(238,185,49,.2); }
.status-seal { position: relative; z-index: 1; width: 80px; height: 80px; display: grid; place-items: center; margin: 0 auto 16px; border: 2px solid #000; border-radius: 50%; color: #000; background: #fff; box-shadow: 8px 8px 0 rgba(0,0,0,.13); }
.success .status-seal { color: #000; background: #fff; }
.error .status-seal { color: var(--danger); }
.status-seal svg { width: 47px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: square; stroke-linejoin: miter; }
.status-kicker { color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.receipt-status h1 { position: relative; z-index: 1; margin: 7px 0 5px; font-size: 40px; line-height: 1.08; letter-spacing: -.035em; }
.receipt-status p { position: relative; z-index: 1; margin: 0; color: rgba(0,0,0,.7); font-size: 16px; font-weight: 750; letter-spacing: .05em; }
.status-participant { position: relative; z-index: 1; width: min(360px, calc(100% - 24px)); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin: 22px auto 0; padding: 11px 15px; border: 2px solid #000; border-radius: 4px; text-align: left; background: #fff; box-shadow: 6px 6px 0 rgba(0,0,0,.15); }
.status-participant span { color: #6d655b; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.status-participant strong { min-width: 0; overflow-wrap: anywhere; text-align: right; color: #000; font-size: 22px; line-height: 1.2; }
.staff-banner { display: flex; align-items: center; justify-content: flex-start; gap: 20px; margin: 0; padding: 23px 27px 24px; border: 0; border-top: 5px solid var(--brand-yellow); border-radius: 0; color: #fff; background: #000; }
.staff-check { width: 60px; height: 60px; flex: 0 0 auto; display: grid; place-items: center; margin: 0; border: 2px solid var(--brand-yellow); border-radius: 50%; color: #000; background: var(--brand-yellow); box-shadow: 0 0 0 6px rgba(238,185,49,.16); }
.staff-check svg { width: 35px; height: 35px; padding: 2px; border: 0; stroke: #000; stroke-width: 3.4; stroke-linecap: square; stroke-linejoin: miter; }
.staff-banner-copy { min-width: 0; }
.staff-banner small { display: block; margin-bottom: 7px; color: var(--brand-yellow); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.staff-banner strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; font-size: 19px; line-height: 1.25; letter-spacing: .01em; }
.staff-banner strong > span { display: inline; margin: 0; font-size: inherit; font-weight: 900; letter-spacing: inherit; }
#staff-valid-label { color: var(--brand-yellow); }
#staff-ready-subtitle { display: block; margin-top: 7px; color: #d7d1c8; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.receipt-heading { padding: 28px 28px 0; }
.receipt-info { margin: 0 28px 20px; }
.receipt-code { margin: 0 28px 22px; padding: 16px; text-align: center; border: 1px dashed #8f867b; border-radius: 4px; background: #fff9e8; }
.receipt-code span, .receipt-code strong { display: block; }
.receipt-code span { color: var(--muted); font-size: 10px; }
.receipt-code strong { margin-top: 6px; font-size: 20px; letter-spacing: .12em; }
.receipt-card > .primary-button, .receipt-card > .text-button { width: calc(100% - 56px); margin-left: 28px; margin-right: 28px; }
.document-button { margin-bottom: 14px; color: #fff; background: #000; box-shadow: 7px 7px 0 rgba(238,185,49,.55); }
.document-button svg { color: var(--brand-yellow); }
.pickup-instruction { margin: 0 28px 10px; padding: 15px; text-align: center; color: #000; border: 1px solid #000; border-radius: 4px; background: var(--brand-yellow); }
.pickup-instruction strong, .pickup-instruction span { display: block; }
.pickup-instruction span { margin-top: 4px; font-size: 11px; }
.site-footer { width: min(620px, calc(100% - 32px)); margin: 18px auto 22px; color: #77716a; font-size: 11px; }
.footer-shell {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.35fr) 1px minmax(0, .85fr); align-items: center; gap: 17px;
  padding: 13px 3px 0; border-top: 1px solid rgba(0,0,0,.13); border-radius: 0;
  background: transparent; box-shadow: none;
}
.footer-shell::before { content: ''; position: absolute; top: -1px; left: 0; width: 38px; height: 2px; background: rgba(238,185,49,.72); }
.footer-security { min-width: 0; display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.footer-security svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 0; color: #a3762a; fill: none; stroke: currentColor; stroke-width: 1.7; }
.footer-divider { width: 1px; height: 100%; min-height: 30px; background: rgba(0,0,0,.12); }
.footer-support { min-width: 0; color: #8a847d; line-height: 1.5; }
.site-footer a { color: var(--brand-dark); }

/* Embedded signing */
.embedded-sign-body { min-height: 100vh; overflow: hidden; background: #f5f1e9; }
.embedded-sign-shell { height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.embedded-sign-header {
  min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(11px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 11px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(38,29,19,.07); z-index: 2;
}
.embedded-sign-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.embedded-sign-brand > .embedded-back { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 3px; color: #000; background: var(--brand-yellow); font-size: 28px; line-height: 1; }
.embedded-brand-logo { width: 112px; height: auto; display: block; }
.embedded-sign-brand strong, .embedded-sign-brand small { display: block; }
.embedded-sign-brand strong { font-size: 15px; }
.embedded-sign-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.embedded-sign-main { min-height: 0; position: relative; background: #fff; }
.embedded-sign-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.embedded-sign-loading, .embedded-sign-error {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px; text-align: center; background: #f8f6f1;
}
.embedded-sign-loading strong { margin-top: 16px; font-size: 17px; }
.embedded-sign-loading small { margin-top: 7px; color: var(--muted); line-height: 1.6; }
.loading-spinner { width: 34px; height: 34px; border: 3px solid #e6ded2; border-top-color: var(--brand-yellow); border-radius: 50%; animation: signing-spin .8s linear infinite; }
.embedded-sign-error strong { color: var(--danger); font-size: 18px; }
.embedded-sign-error p { max-width: 520px; margin: 10px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.embedded-sign-error .primary-button { max-width: 320px; }
.embedded-sign-footer {
  width: 100%; margin: 0; padding: 8px max(16px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; justify-content: center; gap: 12px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; font-size: 10px;
}
@keyframes signing-spin { to { transform: rotate(360deg); } }

/* Admin */
.admin-shell { width: min(1480px, calc(100% - 56px)); margin: 24px auto 72px; }
.admin-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 18px; padding: 20px 24px; border: 1px solid #e3dbcf; border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 14px 38px rgba(38,29,19,.07); }
.admin-title { display: flex; align-items: center; gap: 26px; }
.admin-brand-logo { width: 172px; height: auto; padding-right: 26px; border-right: 1px solid #d9d0c4; }
.admin-eyebrow { margin-bottom: 6px; color: var(--brand-dark); font-size: 12px; font-weight: 850; letter-spacing: .14em; }
.admin-header h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; }
.admin-header p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.admin-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.environment-badge { min-height: 44px; display: inline-flex; align-items: center; padding: 9px 14px; border: 1px solid #d9d0c2; border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.72); font-size: 13px; font-weight: 750; }
.environment-badge.test { color: #7a5310; border-color: #e5c87c; background: #fff6d9; }
.environment-badge.production { color: #215b43; border-color: #b9d7ca; background: #edf8f3; }
.ghost-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border: 1px solid #d8d0c4; border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.94); cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 750; transition: .16s ease; }
.ghost-button:hover { border-color: #b88720; background: #fffaf0; }
.ghost-button:disabled { opacity: .42; cursor: not-allowed; }
.admin-nav { position: sticky; top: 10px; z-index: 10; display: flex; gap: 6px; margin: 0 0 34px; padding: 7px; overflow-x: auto; border: 1px solid #ded5c8; border-radius: 12px; background: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(38,29,19,.08); backdrop-filter: blur(14px); }
.admin-nav-button { min-width: max-content; padding: 12px 22px; border: 1px solid transparent; border-radius: 7px; color: #5e5952; background: transparent; cursor: pointer; font-size: 14px; font-weight: 750; transition: .16s ease; }
.admin-nav-button:hover { color: #000; background: #faf7f1; }
.admin-nav-button.active { color: #000; border-color: #c99a22; background: var(--brand-yellow); box-shadow: 0 4px 12px rgba(170,118,0,.17); }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-shell .section-heading { margin-bottom: 24px; padding-left: 17px; border-left: 4px solid var(--brand-yellow); }
.admin-shell .section-heading > div > span, .admin-shell .section-heading > span, .admin-shell .card-heading > div > span { display: block; margin-bottom: 7px; color: var(--brand-dark); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.admin-shell .section-heading h2 { margin: 0 0 6px; font-size: 30px; line-height: 1.16; letter-spacing: -.025em; }
.admin-shell .section-heading p { font-size: 14px; line-height: 1.6; }
.section-heading-row { align-items: flex-end; justify-content: space-between; }
.admin-grid, .overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.overview-grid { margin-top: 22px; }
.admin-card { min-width: 0; padding: 28px; border: 1px solid #e1d8cc; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 16px 48px rgba(38,29,19,.07); }
.admin-card.full { grid-column: 1 / -1; }
.admin-card h2, .admin-card h3 { margin: 0; }
.admin-card h3 { font-size: 21px; }
.admin-card > p { margin: 14px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.card-heading { min-height: 44px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-heading > small, .card-heading > strong { color: var(--muted); font-size: 13px; }
.summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.summary-item { min-height: 120px; padding: 21px 20px; text-align: left; border: 1px solid #e0d7ca; border-radius: 12px; color: inherit; background: rgba(255,255,255,.96); cursor: pointer; transition: .16s ease; }
.summary-item:hover { transform: translateY(-2px); border-color: var(--brand-yellow); box-shadow: 0 10px 24px rgba(38,29,19,.08); }
.summary-item span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.summary-item strong { display: block; margin: 11px 0 7px; font-size: 34px; line-height: 1; }
.summary-item small { color: #827b72; font-size: 11px; }
.summary-item.danger strong { color: var(--danger); }
.progress-card { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(140deg, #fff 0 65%, #fff7df 65%); }
.progress-card h3 { font-size: 46px; letter-spacing: -.04em; }
.progress-card .card-heading > strong { padding-top: 27px; font-size: 15px; }
.progress-track { width: 100%; height: 12px; margin-top: 26px; overflow: hidden; border-radius: 999px; background: #eee9e1; }
.progress-track span { display: block; width: 0; height: 100%; background: #000; transition: width .35s ease; }
.progress-card > p { margin-bottom: 0; }
.launch-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.launch-check { min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #eee8df; border-radius: 9px; background: #fbfaf8; }
.check-indicator { width: 10px; height: 10px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: #c0b9af; box-shadow: 0 0 0 4px rgba(192,185,175,.16); }
.launch-check.pass .check-indicator { background: #29815d; box-shadow: 0 0 0 4px rgba(41,129,93,.13); }
.launch-check.warn .check-indicator { background: var(--brand-yellow); box-shadow: 0 0 0 4px rgba(238,185,49,.2); }
.launch-check.fail .check-indicator { background: var(--danger); box-shadow: 0 0 0 4px rgba(180,35,24,.12); }
.launch-check strong, .launch-check small { display: block; }
.launch-check strong { margin-bottom: 4px; font-size: 13px; }
.launch-check small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.text-action, .table-action { padding: 0; border: 0; color: var(--brand-dark); background: transparent; cursor: pointer; font-size: 13px; font-weight: 750; }
.activity-list { margin-top: 15px; }
.activity-item { min-height: 74px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid #eee8df; }
.activity-item:last-child { border-bottom: 0; }
.activity-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px; color: #000; background: var(--brand-yellow); font-size: 15px; font-weight: 850; }
.activity-copy { min-width: 0; }
.activity-copy strong, .activity-copy span, .activity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy strong { font-size: 14px; }
.activity-copy span, .activity-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.activity-copy .activity-error { color: var(--danger); }
.activity-status { text-align: right; }
.activity-status small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.empty-state { margin: 22px 0; color: #817a71; text-align: center; font-size: 13px; }
.participant-card { padding: 0; overflow: hidden; }
.participant-toolbar { display: grid; grid-template-columns: minmax(360px,1fr) 210px 130px; align-items: end; gap: 14px; padding: 24px 24px 16px; }
.search-field { display: block; }
.compact-field { display: block; color: #5e5952; font-size: 12px; font-weight: 750; }
.compact-field span { display: block; margin-bottom: 7px; }
.compact-field select, .compact-field input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #ded5c9; border-radius: 8px; color: var(--ink); background: #fff; font-size: 14px; outline: 0; }
.compact-field select:focus, .compact-field input:focus { border-color: #b88720; box-shadow: 0 0 0 4px rgba(238,185,49,.18); }
.advanced-filter-panel { display: grid; grid-template-columns: repeat(4, minmax(145px,1fr)); align-items: end; gap: 14px; padding: 0 24px 22px; border-bottom: 1px solid #eee8df; }
.filter-reset-button { min-height: 48px; border: 1px dashed #c9bdad; border-radius: 8px; color: #5f5a53; background: #faf8f4; cursor: pointer; font-size: 13px; font-weight: 750; }
.filter-reset-button:hover { color: #000; border-color: #000; }
.admin-search { min-height: 48px; border-radius: 8px; font-size: 14px; }
.table-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; color: var(--muted); font-size: 13px; }
.table-summary span { color: #000; font-weight: 750; }
.admin-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 1240px; }
.admin-table th, .admin-table td { padding: 16px 15px; border-bottom: 1px solid #eee8df; text-align: left; font-size: 13px; line-height: 1.5; vertical-align: middle; }
.admin-table tbody tr { min-height: 64px; transition: background .15s ease; }
.admin-table tbody tr:nth-child(even) { background: #fdfcf9; }
.admin-table tbody tr:hover { background: #fff8e7; }
.admin-table th { color: #5f5a53; background: #f7f4ee; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.admin-table td small { color: var(--muted); line-height: 1.6; }
.table-empty { padding: 36px; color: var(--muted); text-align: center; }
.receipt-code-cell { font-variant-numeric: tabular-nums; font-size: 12px; }
.status-pill { display: inline-flex; padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: #eef1f0; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-pill.completed, .status-pill.signed { color: #174f39; border-color: #c9e5d7; background: #e5f4ed; }
.status-pill.signing, .status-pill.creating { color: #72500d; border-color: #eedb9c; background: #fff2c9; }
.status-pill.integration_error, .status-pill.terminated, .status-pill.expired, .status-pill.revoked { color: var(--danger); background: var(--danger-pale); }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; padding: 20px; color: var(--muted); font-size: 13px; background: #fbfaf7; }
.page-numbers { display: flex; gap: 4px; }
.page-numbers button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; cursor: pointer; font-size: 13px; }
.page-numbers button.active { color: #000; border-color: #000; background: var(--brand-yellow); font-weight: 800; }
.page-jump { display: flex; align-items: center; gap: 5px; margin-left: 8px; }
.page-jump input { width: 62px; height: 40px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; text-align: center; font-size: 13px; }
.page-jump button { height: 40px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; font-size: 12px; }
.settings-card { padding: 32px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 22px; }
.settings-grid label { display: block; font-size: 13px; font-weight: 750; }
.settings-grid label > span { display: block; margin-bottom: 9px; }
.settings-grid input, .settings-grid select { min-height: 52px; border-radius: 8px; font-size: 14px; }
.settings-grid .wide { grid-column: 1 / -1; }
.settings-grid textarea { min-height: 100px; resize: vertical; }
.settings-group-title { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 -2px; padding: 15px 0 11px; border-bottom: 1px solid var(--line); }
.settings-group-title:first-child { margin-top: -8px; }
.settings-group-title strong { font-size: 18px; }
.settings-group-title span { color: var(--muted); font-size: 12px; }
.privacy-setting-note { display: flex; align-items: flex-start; gap: 14px; padding: 15px 17px; border-left: 4px solid var(--brand-yellow); border-radius: 0 8px 8px 0; background: #fffaf0; }
.privacy-setting-note strong { flex: 0 0 auto; font-size: 12px; }
.privacy-setting-note span { color: var(--muted); font-size: 11px; line-height: 1.65; }
.fadada-connection-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 18px; border: 1px solid #e3d9c8; border-radius: 9px; background: linear-gradient(100deg, #fffaf0, #fff); }
.fadada-connection-panel strong, .fadada-connection-panel span { display: block; }
.fadada-connection-panel strong { font-size: 13px; }
.fadada-connection-panel strong::before { content: ''; width: 9px; height: 9px; display: inline-block; margin-right: 9px; border-radius: 50%; background: #b9b1a7; box-shadow: 0 0 0 4px rgba(185,177,167,.16); }
.fadada-connection-panel strong.configured::before { background: #29815d; box-shadow: 0 0 0 4px rgba(41,129,93,.13); }
.fadada-connection-panel span { margin: 5px 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.fadada-connection-panel .ghost-button { flex: 0 0 auto; }
.settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 8px; }
.settings-actions small { color: var(--muted); font-size: 12px; }
.settings-actions .primary-button { width: 210px; }
.custom-mapping-editor { padding: 19px; border: 1px solid var(--line); border-radius: 9px; background: #faf8f4; }
.mapping-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.mapping-heading strong, .mapping-heading span { display: block; }
.mapping-heading strong { font-size: 14px; }
.mapping-heading span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.custom-mapping-row { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: end; gap: 9px; margin-top: 9px; }
.custom-mapping-row label span { font-size: 11px; }
.mapping-arrow { padding-bottom: 17px; color: var(--muted); font-size: 11px; }
.mapping-remove { min-height: 52px; padding: 8px 11px; border: 0; color: var(--danger); background: transparent; cursor: pointer; font-size: 12px; }
.file-drop { display: block; padding: 34px 22px; text-align: center; border: 1px dashed #d4b66e; border-radius: 9px; background: #fffaf0; cursor: pointer; }
.file-drop input { display: none; }
.file-drop strong, .file-drop span { display: block; }
.file-drop strong { font-size: 15px; }
.file-drop span { margin-top: 8px; color: var(--muted); font-size: 12px; }
.template-builder { margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #faf8f4; }
.template-builder > div strong, .template-builder > div span { display: block; }
.template-builder > div strong { font-size: 14px; }
.template-builder > div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.template-builder label { display: block; margin: 15px 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.template-builder label span { display: block; margin-bottom: 5px; }
.template-builder input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.import-report { margin-top: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.import-report.success { border-top: 4px solid #29815d; }
.import-report.warning { border-top: 4px solid var(--brand-yellow); }
.import-report.error { padding: 12px; color: var(--danger); background: var(--danger-pale); font-size: 11px; }
.import-report-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px; border-bottom: 1px solid var(--line); }
.import-report-heading strong { font-size: 12px; }
.import-report-heading span { color: var(--muted); font-size: 9px; }
.import-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.import-stat-grid div { padding: 11px; text-align: center; border-right: 1px solid #eee8df; border-bottom: 1px solid #eee8df; }
.import-stat-grid div:nth-child(3n) { border-right: 0; }
.import-stat-grid strong, .import-stat-grid span { display: block; }
.import-stat-grid strong { font-size: 17px; }
.import-stat-grid span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.import-fields, .import-errors { padding: 12px 13px; }
.import-fields > strong, .import-errors > strong { display: block; margin-bottom: 8px; font-size: 10px; }
.import-fields div { display: flex; flex-wrap: wrap; gap: 5px; }
.import-fields span { padding: 4px 7px; border-radius: 999px; background: #fff2c9; font-size: 9px; }
.import-errors { color: var(--danger); background: var(--danger-pale); }
.import-errors p { margin: 4px 0; font-size: 9px; }
.qr-panel { display: flex; align-items: center; gap: 22px; }
.qr-panel img { width: 176px; height: 176px; border: 1px solid var(--line); border-radius: 9px; }
.qr-url { word-break: break-all; color: var(--brand-dark); font-size: 13px; }
.audit-list { max-width: 900px; margin: 0 auto; }
.audit-item { min-height: 58px; display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid #eee8df; }
.audit-item:last-child { border-bottom: 0; }
.audit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-yellow); box-shadow: 0 0 0 4px rgba(238,185,49,.14); }
.audit-item strong, .audit-item small { display: block; }
.audit-item strong { font-size: 13px; }
.audit-item small, .audit-item time { margin-top: 4px; color: var(--muted); font-size: 11px; }
.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; }
.login-wrap { width: min(460px, calc(100% - 32px)); margin: 10vh auto; }
.login-wrap .card { padding: 38px; border-radius: 14px; }
.login-brand-logo { width: 220px; height: auto; margin-bottom: 28px; }
.login-wrap h1 { margin: 0 0 10px; font-size: 30px; letter-spacing: -.025em; }
.login-wrap p { margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.65; }

@media (max-width: 1020px) {
  .admin-shell { width: calc(100% - 32px); }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .participant-toolbar { grid-template-columns: 1fr 160px; }
  .search-field { grid-column: 1 / -1; }
  .advanced-filter-panel { grid-template-columns: repeat(2, minmax(120px,1fr)); }
}

@media (max-width: 760px) {
  .site-header { width: calc(100% - 28px); padding: 16px 0; }
  .brand-logo { width: 137px; }
  .brand-context { display: none; }
  .brand-mark { width: 39px; height: 39px; border-radius: 3px; }
  .main-content { margin-top: 22px; }
  .intro { text-align: left; }
  .intro h1 { font-size: 29px; }
  .intro p { font-size: 13px; }
  .flow-card { padding: 22px 18px; border-radius: 6px; }
  .step em { display: none; }
  .receipt-card { border-radius: 6px; }
  .receipt-status { padding: 25px 18px 28px; }
  .receipt-status h1 { font-size: 36px; }
  .status-participant { width: 100%; margin-top: 19px; padding: 10px 13px; }
  .status-participant strong { font-size: 20px; }
  .staff-banner { padding: 18px; gap: 13px; }
  .staff-check { width: 44px; height: 44px; }
  .staff-banner strong { font-size: 17px; }
  .receipt-heading { padding: 24px 20px 0; }
  .receipt-info, .receipt-code, .pickup-instruction { margin-left: 20px; margin-right: 20px; }
  .receipt-card > .primary-button, .receipt-card > .text-button { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
  .site-footer { width: calc(100% - 32px); margin-top: 16px; }
  .footer-shell { grid-template-columns: 1fr; gap: 9px; padding: 12px 0 0; }
  .footer-divider { width: 100%; height: 1px; min-height: 0; }
  .info-row { grid-template-columns: 1fr 1.15fr; }
  .admin-shell { width: calc(100% - 20px); margin-top: 8px; }
  .admin-header { align-items: flex-start; flex-direction: column; gap: 16px; padding: 17px; border-radius: 12px; }
  .admin-title { width: 100%; align-items: center; gap: 13px; }
  .admin-brand-logo { width: 122px; padding: 0 13px 0 0; border-right: 1px solid #cfc7bb; border-bottom: 0; }
  .admin-header h1 { font-size: 23px; }
  .admin-header p { display: none; }
  .admin-header-actions { width: 100%; justify-content: flex-start; }
  .environment-badge { margin-right: auto; }
  .admin-nav { top: 4px; margin-bottom: 24px; padding: 5px; border-radius: 9px; }
  .admin-nav-button { padding: 10px 15px; font-size: 13px; }
  .section-heading-row { align-items: flex-start; }
  .admin-shell .section-heading { margin-bottom: 20px; padding-left: 13px; }
  .admin-shell .section-heading h2 { font-size: 24px; }
  .admin-shell .section-heading p { font-size: 13px; }
  .admin-grid, .overview-grid, .settings-grid { grid-template-columns: 1fr; }
  .admin-card.full, .settings-grid .wide { grid-column: auto; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .summary-item { padding: 13px; }
  .summary-item strong { font-size: 24px; }
  .overview-grid { margin-top: 12px; }
  .admin-card { padding: 20px; border-radius: 11px; }
  .launch-checks { grid-template-columns: 1fr; }
  .activity-item { grid-template-columns: 32px minmax(0,1fr); }
  .activity-avatar { width: 32px; height: 32px; }
  .activity-status { grid-column: 2; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .activity-status small { margin: 0 0 0 8px; }
  .participant-toolbar { grid-template-columns: 1fr 1fr; padding: 17px; }
  .search-field { grid-column: 1 / -1; }
  .advanced-filter-panel { grid-template-columns: 1fr 1fr; padding: 0 17px 17px; }
  .table-summary { padding: 14px 17px; }
  .table-summary small { display: none; }
  .pagination { gap: 5px; }
  .pagination > #first-page, .pagination > #last-page { display: none; }
  .page-jump { width: 100%; justify-content: center; margin: 4px 0 0; }
  .settings-group-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .mapping-heading { align-items: flex-start; }
  .custom-mapping-row { grid-template-columns: 1fr auto; }
  .custom-mapping-row .mapping-arrow { display: none; }
  .custom-mapping-row label { grid-column: 1; }
  .mapping-remove { grid-column: 2; grid-row: 1 / span 2; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-actions .primary-button { width: 100%; }
  .fadada-connection-panel { align-items: stretch; flex-direction: column; }
  .fadada-connection-panel .ghost-button { width: 100%; }
  .qr-panel { align-items: flex-start; flex-direction: column; }
  .qr-panel img { width: 150px; height: 150px; }
  .audit-item { grid-template-columns: 12px minmax(0,1fr); padding: 8px 0; }
  .audit-item time { grid-column: 2; margin-top: -4px; }
  .embedded-sign-header { min-height: 60px; }
  .embedded-brand-logo { width: 92px; }
  .embedded-sign-brand small { display: none; }
  .embedded-sign-footer { justify-content: space-between; }
  .login-wrap { margin-top: 7vh; }
  .login-wrap .card { padding: 28px 22px; }
  .login-wrap h1 { font-size: 26px; }
}
