:root {
  --un-blue: #1a4f7a;
  --un-blue-deep: #0f3558;
  --un-navy: #061833;
  --un-navy-soft: #0a2545;
  --un-sky: #e8eef3;
  --un-mist: #f0f3f6;
  --un-line: #c8d2dc;
  --un-gold: #a89060;
  --ink: #121c28;
  --muted: #5a6776;
  --ok: #1f7a4c;
  --warn: #9a6b1f;
  --danger: #a33a32;
  --white: #ffffff;
  --sidebar: #071c36;
  --shadow: 0 16px 40px rgba(6, 24, 51, 0.1);
  --radius: 14px;
  --font-english: 'Orbitron', sans-serif;
  --font-cjk: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Orbitron', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Orbitron', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mark: 'Orbitron', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: #e6eaef;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.app-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--un-navy);
  color: white;
  box-shadow: var(--shadow);
  animation: rise 0.35s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseLine {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.fade-up {
  animation: fadeUp 0.55s ease both;
}

.fade-up-delay-1 {
  animation-delay: 0.08s;
}
.fade-up-delay-2 {
  animation-delay: 0.16s;
}
.fade-up-delay-3 {
  animation-delay: 0.24s;
}
/* ——— Shared brand ——— */
.brand-lockup,
.gateway-brand,
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup strong,
.gateway-brand strong,
.portal-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-lockup span,
.gateway-brand span,
.portal-brand span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.role-card {
  border: 1px solid var(--un-line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}

.role-card:hover {
  transform: translateY(-3px);
  border-color: var(--un-blue);
  box-shadow: var(--shadow);
}

.role-card small {
  display: block;
  color: var(--un-blue-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 8px;
}

.role-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.role-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* ——— Gateway (two sites) ——— */
.gateway,
.admin-entry {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.gateway-card,
.admin-entry-card {
  width: min(760px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--un-line);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.gateway-card h1,
.admin-entry-card h1 {
  margin: 22px 0 10px;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.gateway-card h1 em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--un-blue);
  font-size: 0.55em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
}

.gateway-card > p,
.admin-entry-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.gateway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gateway-tile {
  display: block;
  border-radius: 18px;
  padding: 22px 18px;
  border: 1px solid var(--un-line);
  transition: 0.2s ease;
  min-height: 168px;
}

.gateway-tile small {
  display: block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.gateway-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.gateway-tile span {
  display: block;
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.85;
}

.portal-tile {
  background: linear-gradient(160deg, #e7f6fc, #ffffff 55%);
  color: var(--un-navy);
}

.portal-tile small {
  color: var(--un-blue-deep);
}

.admin-tile {
  background: linear-gradient(160deg, #002b5c, #0a3d73);
  color: white;
  border-color: transparent;
}

.admin-tile small {
  color: #7fd0f0;
}

.gateway-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gateway-card footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

/* ——— Delegate Portal (United-style) ——— */
.portal-site {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(26, 79, 122, 0.16), transparent 60%),
    linear-gradient(180deg, #f5fafd 0%, #eef3f8 100%);
}

.portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 5vw;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(26, 79, 122, 0.15);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.portal-brand {
  color: var(--un-navy);
}

.portal-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-mark,
.status-lead .event-mark,
.login-form-head .event-mark {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.92em;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--un-navy);
  background: var(--un-mist);
  padding: 3px 10px;
  border-radius: 999px;
  vertical-align: baseline;
}

.event-chip {
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--un-navy);
  color: #b8c9d9;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-user {
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-exit {
  padding: 7px 12px;
}

.portal-subnav {
  display: flex;
  gap: 4px;
  padding: 10px 5vw;
  overflow-x: auto;
  border-bottom: 1px solid rgba(26, 79, 122, 0.12);
  background: rgba(255, 255, 255, 0.55);
}

.portal-subnav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.portal-subnav a.active,
.portal-subnav a:hover {
  background: rgba(26, 79, 122, 0.12);
  color: var(--un-navy);
  font-weight: 600;
}

.portal-main {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.portal-event-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(26, 79, 122, 0.15);
}

.portal-event-bar strong {
  display: block;
  color: var(--un-navy);
  font-family: var(--font-display);
}

.portal-event-bar span {
  color: var(--muted);
  font-size: 0.88rem;
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 5vw 28px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(26, 79, 122, 0.12);
}

.portal-footer .linkish {
  border: none;
  background: none;
  padding: 0;
  color: var(--un-blue-deep);
  cursor: pointer;
  font-weight: 600;
}

.status-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-heading h1,
.portal-page-head h1 {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--un-navy);
}

.status-kicker {
  margin: 0;
  color: var(--un-blue-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-lead code {
  font-family: var(--font-body);
  background: rgba(0, 43, 92, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--un-navy);
}

.status-hero {
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--un-line);
  background: white;
  box-shadow: 0 12px 36px rgba(0, 43, 92, 0.06);
}

.status-hero.tone-ok {
  background: linear-gradient(135deg, #edfaf3, #ffffff 55%);
}
.status-hero.tone-warn {
  background: linear-gradient(135deg, #fff8ef, #ffffff 55%);
}
.status-hero.tone-danger {
  background: linear-gradient(135deg, #fff1f0, #ffffff 55%);
}
.status-hero.tone-info {
  background: linear-gradient(135deg, #eaf6fc, #ffffff 55%);
}

.status-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--un-navy);
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.status-hero h2 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--un-navy);
}

.status-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(26, 79, 122, 0.15);
}

.status-hero-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.status-hero-meta strong {
  color: var(--un-navy);
  font-size: 0.95rem;
}

.status-next,
.status-panel {
  border-radius: 18px;
  border: 1px solid var(--un-line);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
}

.status-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(90deg, rgba(26, 79, 122, 0.08), rgba(255, 255, 255, 0.95));
}

.status-next small {
  color: var(--un-blue-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
}

.status-next h3 {
  margin: 6px 0;
  font-family: var(--font-display);
  color: var(--un-navy);
}

.status-next p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.status-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.status-panel-title h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--un-navy);
}

.status-panel-title span {
  color: var(--muted);
  font-size: 0.8rem;
}

.status-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
}

.st-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.st-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid var(--un-line);
  background: white;
  color: var(--muted);
  z-index: 1;
}

.st-line {
  width: 2px;
  flex: 1;
  min-height: 28px;
  background: var(--un-line);
  margin: 4px 0;
}

.st-body {
  padding-bottom: 18px;
}

.st-labels {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.st-labels strong {
  color: var(--un-navy);
}

.st-labels span {
  color: var(--muted);
  font-size: 0.85rem;
}

.st-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.st-done .st-node {
  background: var(--un-blue);
  border-color: var(--un-blue);
  color: white;
}

.st-done .st-line {
  background: rgba(26, 79, 122, 0.55);
}

.st-current .st-node {
  border-color: var(--un-blue);
  color: var(--un-blue);
  box-shadow: 0 0 0 4px rgba(26, 79, 122, 0.15);
}

.st-blocked .st-node {
  border-color: var(--danger);
  color: var(--danger);
}

.status-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-activity strong {
  color: var(--un-navy);
}

.status-activity p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-activity small {
  color: #8a9bb0;
}

.seat-result {
  display: flex;
  gap: 14px;
  align-items: center;
}

.seat-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #3d6f96, var(--un-navy));
  color: white;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.seat-flag {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 22%;
  box-shadow:
    0 0 0 2px #fff,
    0 8px 20px rgba(15, 45, 78, 0.22);
  background: #e8eef5;
}

/* Apple 风格连续圆角国旗（与组委端一致） */
.apple-flag {
  display: inline-block;
  border-radius: 22%;
  overflow: hidden;
  background: #e8e8ed;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.06);
}

.apple-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seat-status-apple {
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  box-shadow:
    0 0 0 2px #fff,
    0 8px 18px rgba(15, 45, 78, 0.18);
}

.seat-result h4 em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85em;
}

.seat-result h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.25rem;
}

.seat-result p {
  margin: 0;
  color: var(--muted);
}

.portal-page-head .back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--un-blue-deep);
  font-size: 0.9rem;
  font-weight: 600;
}

.inline-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.fee-num {
  margin: 4px 0 0;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 2rem;
}

.pay-panel {
  display: grid;
  gap: 18px;
}

.pay-methods {
  display: grid;
  gap: 10px;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1.5px solid var(--un-line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.pay-method:hover {
  border-color: var(--un-blue);
}

.pay-method.selected {
  border-color: currentColor;
  box-shadow: 0 0 0 3px rgba(6, 24, 51, 0.06);
}

.pay-method:disabled {
  opacity: 0.65;
  cursor: wait;
}

.pay-method-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  flex-shrink: 0;
}

.pay-wechat .pay-method-icon {
  background: #07c160;
}

.pay-alipay .pay-method-icon {
  background: #1677ff;
}

.pay-unionpay .pay-method-icon {
  background: #e60012;
}

.pay-wechat.selected {
  color: #07c160;
  background: #f0fbf4;
}

.pay-alipay.selected {
  color: #1677ff;
  background: #f2f7ff;
}

.pay-unionpay.selected {
  color: #e60012;
  background: #fff3f3;
}

.pay-method-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-method-copy strong {
  font-size: 1rem;
  color: var(--un-navy);
}

.pay-method-copy small {
  color: var(--muted);
  font-size: 0.8rem;
}

.pay-now-btn {
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
}

.pay-now-btn:disabled {
  opacity: 0.5;
}

.pay-pending-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8f0df;
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ——— Shell ——— */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--un-navy) 0%, #001f45 100%);
  color: white;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand-lockup {
  color: white;
  padding: 0 8px;
}

.sidebar .brand-lockup span {
  color: rgba(26, 79, 122, 0.85);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid transparent;
  transition: 0.18s ease;
}

.side-link:hover,
.side-link.active {
  background: rgba(26, 79, 122, 0.18);
  color: white;
  border-color: rgba(26, 79, 122, 0.35);
}

.side-link .code {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--un-blue);
  min-width: 2.4rem;
}

.side-meta {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.main {
  min-width: 0;
  padding: 22px 28px 40px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--un-navy);
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  background: var(--un-blue);
  color: white;
  font-weight: 600;
  transition: 0.18s ease;
}

.btn:hover {
  background: var(--un-blue-deep);
}

.btn.ghost {
  background: transparent;
  border-color: var(--un-line);
  color: var(--un-navy);
}

.btn.ghost:hover {
  border-color: var(--un-blue);
  color: var(--un-blue-deep);
}

.btn.gold {
  background: linear-gradient(135deg, #d4b483, var(--un-gold));
  color: var(--un-navy);
}

.btn.warn {
  background: #fff7ed;
  color: var(--warn);
  border-color: #f6d7a8;
}

.btn.danger {
  background: #fff1f0;
  color: var(--danger);
  border-color: #f3c1bd;
}

.btn.ok {
  background: #ecfdf3;
  color: var(--ok);
  border-color: #abefc6;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--un-line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 43, 92, 0.04);
}

.panel + .panel {
  margin-top: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--un-navy);
}

.panel-title span {
  color: var(--muted);
  font-size: 0.85rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--un-sky), white);
  border: 1px solid var(--un-line);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--un-navy);
  line-height: 1;
  margin: 8px 0 4px;
}

.stat small {
  color: var(--muted);
}

.stat .label {
  color: var(--un-blue-deep);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--un-line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(26, 79, 122, 0.25);
  border-color: var(--un-blue);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--un-line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e8f0f6;
}

th {
  background: var(--un-mist);
  color: var(--un-navy);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(26, 79, 122, 0.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-ok {
  background: #ecfdf3;
  color: var(--ok);
  border-color: #abefc6;
}
.badge-warn {
  background: #fff7ed;
  color: var(--warn);
  border-color: #f6d7a8;
}
.badge-danger {
  background: #fff1f0;
  color: var(--danger);
  border-color: #f3c1bd;
}
.badge-info {
  background: var(--un-sky);
  color: var(--un-blue-deep);
  border-color: #a8d8ef;
}
.badge-neutral {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #e5e7eb;
}

.progress-track {
  list-style: none;
  margin: 0;
  padding: 8px 4px 4px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.progress-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  opacity: 0.45;
}

.progress-step.done,
.progress-step.current {
  opacity: 1;
}

.progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  border: 2px solid var(--un-line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.progress-step.done .progress-dot {
  background: var(--un-blue);
  border-color: var(--un-blue);
  color: white;
}

.progress-step.current .progress-dot {
  border-color: var(--un-blue);
  color: var(--un-blue);
  box-shadow: 0 0 0 4px rgba(26, 79, 122, 0.15);
  animation: pulseLine 2s ease infinite;
}

.progress-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.progress-copy strong {
  font-size: 0.82rem;
  color: var(--un-navy);
}

.progress-copy small {
  color: var(--muted);
  font-size: 0.75rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
}

.timeline .dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--un-blue);
  box-shadow: 0 0 0 4px rgba(26, 79, 122, 0.15);
}

.timeline strong {
  display: block;
  color: var(--un-navy);
}

.timeline p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline small {
  color: #8a9bb0;
}

.upload-zone {
  border: 1.5px dashed #9ecce3;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, #f7fcff, white);
  transition: 0.18s ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--un-blue);
  background: var(--un-sky);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: #7ec8a3;
  background: #f3fbf6;
}

.upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--un-navy);
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.upload-zone strong {
  display: block;
  color: var(--un-navy);
  margin-bottom: 4px;
}

.upload-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.seat-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 8px 4px;
}

.seat-hero .flag-mark {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #3d6f96, var(--un-navy));
  color: white;
  font-family: var(--font-display);
  font-size: 1.4rem;
  box-shadow: var(--shadow);
}

.seat-hero h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--un-navy);
}

.seat-hero p {
  margin: 0;
  color: var(--muted);
}

.material-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.material-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--un-line);
  border-radius: 12px;
  background: white;
}

.material-item strong {
  display: block;
  color: var(--un-navy);
}

.material-item small {
  color: var(--muted);
}

.inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.empty-note {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 8px 0;
}

.assess-form {
  display: grid;
  gap: 18px;
}

.assess-q {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid rgba(15, 45, 78, 0.1);
}

.assess-q:first-of-type {
  border-top: none;
  padding-top: 0;
}

.assess-q label {
  font-weight: 600;
  color: var(--un-navy-soft, #1a4f7a);
}

.assess-q label small {
  font-weight: 400;
  color: var(--muted);
}

.assess-prompt {
  margin: 0;
  line-height: 1.55;
  color: #1c2b3a;
}

.assess-q textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  border-radius: 10px;
  border: 1px solid rgba(15, 45, 78, 0.18);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.5;
  background: #fff;
}

.assess-q textarea:disabled {
  background: #f3f6f9;
  color: #334155;
}

.demo-banner {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(26, 79, 122, 0.08);
  border: 1px solid rgba(26, 79, 122, 0.2);
  color: var(--un-navy-soft);
  font-size: 0.88rem;
}

/* ——— United-style Delegate Dashboard (screenshot layout) ——— */
.up-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: #e6eaef;
}

.up-scrim {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 43, 92, 0.28);
  z-index: 25;
}

.up-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 12px 14px;
  background: #f7fafc;
  border-right: 1px solid #d5e3ec;
  z-index: 30;
}

.up-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 2px;
  color: var(--un-navy);
}

.up-brand-mark {
  color: var(--un-blue);
  flex-shrink: 0;
}

.up-brand-word {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.up-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #d5e3ec;
  background: #fff;
  color: #8aa0b3;
}

.up-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--ink);
  font-size: 0.9rem;
}

.up-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: auto;
  padding: 4px 0;
}

.up-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #5b7085;
  border-left: 3px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 0.15s ease;
}

.up-nav-link:hover {
  background: rgba(26, 79, 122, 0.08);
  color: var(--un-navy);
}

.up-nav-link.active {
  background: rgba(26, 79, 122, 0.12);
  color: var(--un-navy);
  border-left-color: var(--un-blue);
  font-weight: 650;
}

.up-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d5e3ec;
}

.up-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--un-blue), var(--un-navy));
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.up-user-copy {
  min-width: 0;
  flex: 1;
}

.up-user-copy strong {
  display: block;
  color: var(--un-navy);
  font-size: 0.9rem;
}

.up-user-copy small {
  display: block;
  color: #7a8fa3;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.up-user-more {
  border: 1px solid #d5e3ec;
  background: #edf4f9;
  color: var(--un-navy);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 7px 9px;
  border-radius: 8px;
  white-space: nowrap;
}

.up-user-more:hover {
  border-color: var(--un-blue);
}

.up-stage {
  min-width: 0;
  padding: 16px 16px 28px;
}

.up-mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--un-navy);
}

.up-home {
  width: 100%;
  max-width: 1280px;
}

.up-bento.exact {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr 1.2fr;
  grid-template-areas:
    "profile todos apply"
    "guide community apply"
    "updates status faq"
    "prep prep prep";
  gap: 14px;
  align-items: stretch;
}

.c-profile { grid-area: profile; }
.c-todos { grid-area: todos; }
.c-apply { grid-area: apply; }
.c-guide { grid-area: guide; }
.c-community { grid-area: community; }
.c-updates { grid-area: updates; }
.c-status { grid-area: status; }
.c-faq { grid-area: faq; }
.c-prep { grid-area: prep; }

.up-card {
  background: #fff;
  border: 1px solid #d7e4ee;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 24px rgba(0, 43, 92, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.up-slash {
  margin: 0;
  color: #6b8499;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.up-profile-body {
  flex: 1;
}

.up-card-name {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--un-navy);
  line-height: 1.15;
}

.up-card-meta {
  margin: 0;
  color: #6b8499;
  font-size: 0.9rem;
}

.up-lead {
  margin: 0;
  color: #5a6f82;
  line-height: 1.55;
  font-size: 0.9rem;
}

.up-card-actions.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.up-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: 0.15s ease;
}

.up-btn.soft {
  background: #edf4f9;
  border-color: #d5e3ec;
  color: var(--un-navy);
}

.up-btn.soft:hover {
  border-color: var(--un-blue);
  background: #e5f4fb;
}

.up-btn.solid {
  background: var(--un-navy);
  color: #fff;
}

.up-btn.solid:hover {
  background: #0f3558;
}

.up-btn.dark {
  background: #0b1c2e;
  color: #fff;
}

.up-btn.dark:hover {
  background: #152a40;
}

.up-btn.full {
  width: 100%;
  margin-top: auto;
}

.up-btn .ico.play {
  font-size: 0.75rem;
}

.up-todo-boxes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.up-todo-boxes li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f8fb;
  border: 1px solid #e1ebf2;
}

.todo-box-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.todo-box-icon {
  color: var(--un-blue);
  font-size: 0.85rem;
}

.todo-box-title {
  color: var(--un-navy);
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-box-ext {
  color: #7a93a8;
  display: grid;
  place-items: center;
}

.todo-tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.todo-tag.incomplete {
  background: rgba(26, 79, 122, 0.12);
  color: var(--un-blue-deep);
  border-color: rgba(26, 79, 122, 0.25);
}

.todo-tag.done {
  background: #ecfdf3;
  color: var(--ok);
  border-color: #abefc6;
}

.todo-tag.locked {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.up-hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #1a4f7a 0%, #0f3558 45%, #061833 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 43, 92, 0.18);
  justify-content: flex-start;
  min-height: 420px;
  animation: heroIn 0.65s ease both;
}

.up-hero-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.05) 18px,
      rgba(255, 255, 255, 0.05) 19px
    );
  pointer-events: none;
}

.up-hero-card > *:not(.up-hero-pattern) {
  position: relative;
  z-index: 1;
}

.up-hero-card .up-slash {
  color: rgba(255, 255, 255, 0.85);
}

.up-hero-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  font-size: 0.95rem;
  max-width: 36ch;
}

.up-countdown-block {
  margin-top: auto;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.up-countdown-block span {
  font-size: 0.85rem;
  opacity: 0.9;
}

.up-countdown-block strong {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  font-weight: 700;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.up-community-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: end;
  margin-top: auto;
}

.up-socials {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.up-socials a {
  color: var(--un-blue-deep);
  font-weight: 700;
  font-size: 0.92rem;
}

.up-socials a:hover {
  text-decoration: underline;
}

.up-qr-panel {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d5e3ec;
  display: grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
}

.up-qr-panel img,
.up-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.up-text-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
}

.up-text-links a,
.up-text-links button {
  border: none;
  background: none;
  padding: 0;
  color: var(--un-blue-deep);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.up-text-links a:hover,
.up-text-links button:hover {
  text-decoration: underline;
}

.up-qr {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px solid var(--un-line);
  background: white;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
}

.up-qr.large {
  width: 220px;
  height: auto;
  margin: 0 auto 12px;
  padding: 12px;
}

.up-qr.large img {
  width: 196px;
  height: 196px;
}

.up-qr.large span {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.up-qr-inner {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, var(--un-navy) 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(var(--un-navy) 25%, transparent 25%) 0 0 / 12px 12px,
    var(--un-sky);
}

.up-community-page {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.up-socials.vertical {
  gap: 8px;
}

.up-faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.up-faq-list strong {
  display: block;
  color: var(--un-navy);
  margin-bottom: 6px;
}

.up-faq-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.up-todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.up-todo-list.dense {
  gap: 14px;
}

.up-todo-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
}

.todo-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--un-line);
  color: var(--muted);
  font-size: 0.72rem;
}

.todo-done .todo-mark {
  background: var(--un-blue);
  border-color: var(--un-blue);
  color: white;
}

.todo-body small {
  color: var(--muted);
  font-size: 0.8rem;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-row strong {
  color: var(--un-navy);
  font-size: 0.9rem;
}

.todo-row strong em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.todo-link {
  color: var(--un-blue-deep);
  font-weight: 700;
}

.up-subpage {
  width: min(820px, 100%);
  margin: 0 auto;
}

.up-subpage .back-link,
.status-heading .back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--un-blue-deep);
  font-size: 0.9rem;
  font-weight: 600;
}

.btn.compact {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
}

@media (max-width: 1100px) {
  .up-bento.exact {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "profile todos"
      "apply apply"
      "guide community"
      "updates status"
      "faq prep";
  }

  .up-hero-card {
    min-height: 280px;
  }
}

@media (max-width: 860px) {
  .up-shell {
    grid-template-columns: 1fr;
  }

  .up-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow);
  }

  .up-sidebar.open {
    transform: translateX(0);
  }

  .up-mobile-bar {
    display: flex;
  }

  .up-bento.exact {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "todos"
      "apply"
      "guide"
      "community"
      "updates"
      "status"
      "faq"
      "prep";
  }

  .up-community-page {
    grid-template-columns: 1fr;
  }

  .up-community-row {
    grid-template-columns: 1fr auto;
  }

  .up-stage {
    padding: 12px 12px 28px;
  }

  .form-grid,
  .status-hero-meta {
    grid-template-columns: 1fr;
  }

  .status-next {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ——— Login ——— */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(26, 79, 122, 0.2), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(0, 43, 92, 0.12), transparent 50%),
    #e6eaef;
}

.login-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #d5e3ec;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 43, 92, 0.12);
}

.login-brand {
  padding: 36px 32px;
  background: linear-gradient(155deg, #1a4f7a 0%, #0f3558 48%, #061833 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-brand .up-brand-mark {
  color: #fff;
}

.login-brand .up-slash {
  color: rgba(255, 255, 255, 0.8);
}

.login-brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.35;
}

.login-brand .login-slogan {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.98;
}

.login-slogan {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 0.95;
}

.login-brand > p {
  margin: 0;
  opacity: 0.92;
  line-height: 1.6;
  font-size: 0.95rem;
}

.login-points {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-points li {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
}

.login-form {
  position: relative;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 12px;
  background: var(--un-mist);
  gap: 4px;
}

.login-branch button {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.login-branch button.active {
  background: #fff;
  color: var(--un-navy);
  box-shadow: 0 4px 12px rgba(6, 24, 51, 0.08);
}

.login-ops-grid {
  display: grid;
  gap: 10px;
}

.login-ops-card {
  text-align: left;
  border: 1px solid var(--un-line);
  background: var(--un-mist);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.login-ops-card:hover {
  border-color: var(--un-blue);
}

.login-ops-card small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-ops-card strong {
  display: block;
  margin: 4px 0 6px;
  color: var(--un-navy);
  font-size: 1.1rem;
}

.login-ops-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.login-form-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.55rem;
}

.login-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  border-radius: 12px;
  padding: 12px 16px;
}

.login-demo {
  width: 100%;
  border-radius: 12px;
  padding: 11px 16px;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #f3c1bd;
  font-size: 0.88rem;
}

.login-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.login-hint a {
  color: var(--un-blue);
  font-weight: 700;
}

.login-foot {
  margin: 8px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #8aa0b3;
  font-size: 0.82rem;
}

.staff-gear {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(15, 45, 78, 0.42);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.staff-gear:hover,
.staff-gear:focus-visible {
  color: rgba(15, 45, 78, 0.92);
  outline: none;
}

.staff-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.staff-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 24, 51, 0.45);
  cursor: pointer;
}

.staff-card {
  position: relative;
  width: min(360px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 50px rgba(6, 24, 51, 0.28);
}

.staff-card h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--un-navy);
}

.staff-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pay-qr-box {
  margin: 16px 0 8px;
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 12px;
  border: 1px dashed var(--un-line);
  border-radius: 14px;
  background: #fff;
}

.pay-qr-box img {
  width: min(220px, 70vw);
  height: auto;
  border-radius: 8px;
}

.pay-qr-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.pay-qr-admin-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-qr-admin-col img {
  width: 100%;
  max-width: 200px;
  border-radius: 8px;
  border: 1px solid var(--un-line);
}

/* ——— Materials library ——— */
.materials-page {
  width: min(980px, 100%);
}

.mat-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  background: linear-gradient(120deg, rgba(26, 79, 122, 0.08), #fff 55%);
}

.mat-hero small {
  color: var(--un-blue-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
}

.mat-hero h2 {
  margin: 6px 0;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.45rem;
}

.mat-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 52ch;
}

.mat-stats {
  display: flex;
  gap: 10px;
}

.mat-stats div {
  min-width: 84px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--un-mist);
  border: 1px solid var(--un-line);
  text-align: center;
}

.mat-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--un-navy);
}

.mat-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.mat-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 2px;
}

.mat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mat-tabs button {
  border: 1px solid var(--un-line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}

.mat-tabs button.active,
.mat-tabs button:hover {
  background: rgba(26, 79, 122, 0.12);
  color: var(--un-navy);
  border-color: rgba(26, 79, 122, 0.35);
}

.mat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--un-line);
  background: #fff;
  color: #8aa0b3;
  min-width: min(260px, 100%);
}

.mat-search input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.mat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mat-card {
  background: #fff;
  border: 1px solid var(--un-line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(0, 43, 92, 0.04);
}

.mat-card.locked {
  opacity: 0.86;
  background: #f7fafc;
}

.mat-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.mat-format {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--un-navy);
  color: #b8c9d9;
}

.mat-cat {
  color: var(--un-blue-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.mat-card h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.15rem;
  line-height: 1.3;
}

.mat-en {
  margin: 0;
  color: #7a8fa3;
  font-size: 0.82rem;
}

.mat-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

.mat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #8aa0b3;
  font-size: 0.78rem;
}

.mat-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.mat-dl-note {
  color: #8aa0b3;
  font-size: 0.78rem;
}

.mat-lock {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef3f8;
  border: 1px dashed #c5dde9;
}

.mat-lock span {
  color: var(--un-navy);
  font-weight: 700;
  font-size: 0.85rem;
}

.mat-lock small {
  color: var(--muted);
}

@media (max-width: 860px) {
  .login-panel {
    grid-template-columns: 1fr;
  }

  .mat-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .mat-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Todos + schedule ——— */
.todos-page {
  width: min(860px, 100%);
}

.todo-section-head h2,
.schedule-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.25rem;
}

.todo-section-head p,
.schedule-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.schedule-panel.live {
  background: linear-gradient(135deg, rgba(26, 79, 122, 0.1), #fff 50%);
  border-color: rgba(26, 79, 122, 0.35);
}

.schedule-panel.preview {
  background: linear-gradient(135deg, rgba(0, 43, 92, 0.05), #fff 55%);
}

.schedule-day.is-today h3 {
  color: var(--un-navy);
}

.schedule-day h3 em {
  margin-left: 8px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--un-blue);
  color: #fff;
  vertical-align: middle;
}

.schedule-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.schedule-badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schedule-badge.on {
  background: var(--un-navy);
  color: #b8c9d9;
}

.schedule-badge.off {
  background: #eef3f8;
  color: #6b8499;
}

.schedule-days {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.schedule-day h3 {
  margin: 0 0 10px;
  color: var(--un-blue-deep);
  font-family: var(--font-english);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sch-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f8fb;
  border: 1px solid #e1ebf2;
}

.sch-item.sch-live {
  background: rgba(26, 79, 122, 0.12);
  border-color: rgba(26, 79, 122, 0.4);
  box-shadow: 0 0 0 3px rgba(26, 79, 122, 0.08);
}

.sch-item.sch-past {
  opacity: 0.55;
}

.sch-time strong {
  display: block;
  color: var(--un-navy);
  font-family: var(--font-english);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.sch-time span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.sch-live .sch-time span {
  color: var(--un-blue-deep);
}

.sch-body strong {
  display: block;
  color: var(--un-navy);
  font-size: 0.95rem;
}

.sch-body em {
  display: block;
  font-style: normal;
  color: #7a8fa3;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 2px;
}

.sch-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.todo-card-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f4f8fb;
  border: 1px solid #e1ebf2;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-list .todo-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12em auto;
}

.todo-list .todo-row-card strong {
  min-width: 0;
  color: var(--un-navy);
}

.todo-list .todo-tag {
  justify-self: stretch;
  width: auto;
  min-width: 0;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
  padding: 5px 14px;
  letter-spacing: 0.02em;
}

.todo-list .todo-link {
  justify-self: end;
  white-space: nowrap;
}

.todo-row-main {
  display: flex;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.todo-alert {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(26, 79, 122, 0.15);
  color: var(--un-blue-deep);
  font-weight: 800;
  flex-shrink: 0;
}

.todo-done .todo-alert {
  background: #ecfdf3;
  color: var(--ok);
}

.todo-row-copy {
  min-width: 0;
}

.todo-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.todo-row-title strong {
  color: var(--un-navy);
}

.todo-row-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.todo-row-copy small {
  color: #8aa0b3;
  font-size: 0.75rem;
}

.todo-done-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.extra-rec {
  margin-top: 10px;
}

@media (max-width: 720px) {
  .sch-item {
    grid-template-columns: 1fr;
  }

  .todo-row-card {
    flex-direction: column;
    align-items: stretch;
  }

  .todo-list .todo-row-card {
    grid-template-columns: minmax(0, 1fr) 11em auto;
    gap: 8px;
  }
}

/* ——— Entry pass + Gate ——— */
.pass-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pass-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pass-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pass-meta strong {
  color: var(--un-navy);
  font-size: 0.95rem;
  line-height: 1.35;
}

.pass-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: var(--un-mist);
  border: 1px solid var(--un-line);
}

.pass-qr {
  width: min(280px, 70vw);
  height: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pass-qr.skeleton {
  width: min(280px, 70vw);
  aspect-ratio: 1;
  background: #dfe5eb;
}

.pass-code {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--un-navy);
  letter-spacing: 0.04em;
}

.pass-checked {
  margin: 0;
  color: var(--ok);
  font-weight: 700;
  font-size: 0.9rem;
}

.pass-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gate-page {
  min-height: 100vh;
  background: #e6eaef;
  color: var(--ink);
}

.gate-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--un-line);
  color: var(--un-navy);
}

.gate-top-copy {
  flex: 1;
  min-width: 0;
}

.gate-top strong {
  display: block;
  font-family: var(--font-display);
}

.gate-top span {
  color: var(--muted);
  font-size: 0.78rem;
}

.gate-sync-pill {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.gate-sync-pill.ok {
  background: rgba(24, 128, 88, 0.12);
  color: #186858;
}

.gate-sync-pill.bad {
  background: rgba(168, 48, 48, 0.1);
  color: #a83030;
}

.gate-main {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 16px 14px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-main-wide {
  width: min(720px, 100%);
}

.gate-btn-lg {
  min-height: 48px;
  padding-inline: 20px;
  font-size: 1.05rem;
}

.gate-auto-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  user-select: none;
}

.gate-auto-resume input {
  width: 18px;
  height: 18px;
}

.gate-card {
  background: #fff;
  border: 1px solid var(--un-line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(6, 24, 51, 0.06);
}

.gate-card h1 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.6rem;
}

.gate-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.gate-camera {
  width: 100%;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1522;
}

.gate-camera.on {
  min-height: min(52vh, 420px);
}

.gate-camera video {
  width: 100% !important;
  border-radius: 12px;
}

@media (min-width: 900px) and (orientation: landscape) {
  .gate-main-wide {
    width: min(960px, 100%);
  }

  .gate-scan-card .gate-camera.on {
    min-height: min(58vh, 480px);
  }
}

@media (pointer: coarse) {
  .gate-actions .btn {
    min-height: 48px;
  }

  .gate-manual-row input {
    min-height: 48px;
    font-size: 16px;
  }
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gate-manual label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.gate-manual-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.gate-manual-row input {
  border: 1px solid var(--un-line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.gate-result {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--un-line);
}

.gate-result.ok {
  border-color: #9fd0b0;
  background: linear-gradient(180deg, #f3fbf6, #fff);
}

.gate-result.dup {
  border-color: #d4c08a;
  background: linear-gradient(180deg, #fff9ef, #fff);
}

.gate-result.bad {
  border-color: #e2b4b0;
  background: linear-gradient(180deg, #fff5f4, #fff);
}

.gate-result-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--un-blue-deep);
}

.gate-result h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.8rem;
}

.gate-dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.gate-dl div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--un-line);
}

.gate-dl dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.gate-dl dd {
  margin: 0;
  color: var(--un-navy);
  font-weight: 650;
}

.gate-foot {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.gate-foot code {
  font-family: var(--font-body);
  background: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--un-line);
}

.gate-history-title {
  margin: 0;
  font-family: var(--font-display);
  color: var(--un-navy);
  font-size: 1.1rem;
}

.gate-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-history li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--un-mist);
  border: 1px solid var(--un-line);
}

.gate-history strong {
  color: var(--un-navy);
}

.gate-history span {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 560px) {
  .pass-meta {
    grid-template-columns: 1fr;
  }
}

/* ——— PWA install ——— */
.install-page .install-hero {
  text-align: left;
}

.install-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 4px;
}

.install-steps h2,
.install-ok strong {
  display: block;
  margin: 0 0 10px;
  color: var(--un-navy);
  font-family: var(--font-display);
}

.install-steps ol {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--ink);
  line-height: 1.7;
}

.install-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.install-ok {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: #f3fbf6;
  border: 1px solid #9fd0b0;
}

.install-ok-text {
  color: var(--ok);
  font-weight: 700;
}

.install-features {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink);
  line-height: 1.7;
}

.install-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, #061833, #1a4f7a);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.install-banner strong {
  font-size: 1.05rem;
}

.install-banner span {
  font-size: 0.86rem;
  opacity: 0.88;
}

.pass-hint a {
  color: var(--un-blue-deep);
  font-weight: 700;
}


.sync-ok { color: #1f7a4d; }
.sync-bad { color: #b42318; }

/* ——— Seat reveal celebration ——— */
.seat-reveal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.seat-reveal[hidden] {
  display: none !important;
}

.seat-reveal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 22, 40, 0.62);
  backdrop-filter: blur(6px);
}

.seat-reveal-ribbons {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.seat-reveal .ribbon {
  position: absolute;
  top: -12vh;
  width: 10px;
  height: 46px;
  border-radius: 3px;
  opacity: 0.92;
  transform-origin: center top;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-name: ribbon-fall-c;
}

.seat-reveal .ribbon.r0 { background: #e74c3c; }
.seat-reveal .ribbon.r1 { background: #f1c40f; width: 8px; }
.seat-reveal .ribbon.r2 { background: #2ecc71; width: 12px; }
.seat-reveal .ribbon.r3 { background: #3498db; }
.seat-reveal .ribbon.r4 { background: #9b59b6; width: 7px; }
.seat-reveal .ribbon.r5 { background: #e67e22; width: 11px; }
.seat-reveal .ribbon.r6 { background: #1abc9c; }
.seat-reveal .ribbon.r7 { background: #ecf0f1; width: 9px; }

.seat-reveal .ribbon.drift-l { animation-name: ribbon-fall-l; }
.seat-reveal .ribbon.drift-r { animation-name: ribbon-fall-r; }

@keyframes ribbon-fall-c {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(12px, 120vh, 0) rotate(420deg); opacity: 0.75; }
}

@keyframes ribbon-fall-l {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(-90px, 120vh, 0) rotate(-480deg); opacity: 0.75; }
}

@keyframes ribbon-fall-r {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(96px, 120vh, 0) rotate(520deg); opacity: 0.75; }
}

.seat-reveal-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 36px 28px 28px;
  border-radius: 24px;
  background: linear-gradient(165deg, #ffffff 0%, #f3f7fb 100%);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: seat-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.seat-reveal.enter .seat-reveal-card {
  animation-name: seat-card-in;
}

@keyframes seat-card-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.seat-reveal-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5a7a96;
  font-weight: 600;
}

.seat-reveal-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: var(--un-navy, #0f2d4e);
}

.seat-reveal-committee {
  margin: 8px 0 0;
  color: #5a7a96;
  font-size: 0.95rem;
}

.seat-reveal-flag-wrap {
  margin: 22px auto 14px;
  width: 168px;
  height: 126px;
  display: grid;
  place-items: center;
  animation: seat-flag-pop 0.8s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes seat-flag-pop {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-12deg);
  }
  60% {
    transform: scale(1.08) rotate(3deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.seat-reveal-apple {
  width: 160px;
  height: 120px;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 6px rgba(15, 45, 78, 0.1),
    0 16px 36px rgba(15, 45, 78, 0.28);
}

.seat-reveal-flag.fallback {
  width: 160px;
  height: 120px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  border-radius: 22%;
  background: radial-gradient(circle at 30% 30%, #3d6f96, #0f2d4e);
}

.seat-reveal-country-zh {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--un-navy, #0f2d4e);
}

.seat-reveal-country-en {
  margin: 4px 0 0;
  color: #5a7a96;
  font-size: 0.95rem;
}

.seat-reveal-btn {
  margin-top: 22px;
  width: 100%;
}

.ops-brand-mark {
  color: var(--un-blue);
  flex-shrink: 0;
}

.ops-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26, 79, 122, 0.18), transparent 50%),
    linear-gradient(160deg, #071c36 0%, #0f3558 45%, #1a4f7a 100%);
}

.ops-login-card {
  width: min(720px, 100%);
  background: var(--white);
  border-radius: 12px;
  padding: 28px 28px 32px;
  box-shadow: 0 24px 60px rgba(6, 24, 51, 0.35);
}

.ops-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.ops-brand strong {
  display: block;
  font-size: 15px;
}

.ops-brand span,
.ops-side-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ops-login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--un-navy);
}

.ops-login-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.ops-role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ops-role-card {
  text-align: left;
  border: 1px solid var(--un-line);
  background: var(--un-sky);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.ops-role-card:hover {
  border-color: var(--un-blue);
  transform: translateY(-1px);
}

.ops-role-card small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ops-role-card strong {
  display: block;
  margin: 6px 0 8px;
  font-size: 18px;
  color: var(--un-navy);
}

.ops-role-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.ops-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.ops-sidebar {
  background: var(--sidebar);
  color: #d7e2ec;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 18px;
}

.ops-side-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ops-side-brand .ops-brand-mark {
  color: #8eb6d4;
}

.ops-side-brand strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.ops-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ops-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #b7c7d6;
}

.ops-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.ops-nav a.active {
  background: rgba(26, 79, 122, 0.85);
  color: #fff;
  font-weight: 600;
}

.ops-side-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.ops-side-foot p {
  margin: 0;
  font-size: 11px;
  color: #8aa0b4;
  padding: 0 6px;
}

.ops-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ops-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: var(--white);
  border-bottom: 1px solid var(--un-line);
}

.ops-topbar strong {
  display: block;
  font-size: 14px;
  color: var(--un-navy);
}

.ops-topbar span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.ops-role-pill {
  display: inline-flex !important;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--un-sky);
  color: var(--un-blue) !important;
  font-size: 12px !important;
  font-weight: 600;
  white-space: nowrap;
}

.ops-content {
  padding: 18px 22px 40px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.page-head h1 {
  margin: 0 0 4px;
  font-size: 24px;
  color: var(--un-navy);
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 52rem;
  line-height: 1.5;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-row.compact {
  grid-template-columns: repeat(3, minmax(120px, 180px));
}

.kpi {
  background: var(--white);
  border: 1px solid var(--un-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.kpi span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.kpi strong {
  font-size: 22px;
  color: var(--un-navy);
  font-variant-numeric: tabular-nums;
}

.panel {
  background: var(--white);
  border: 1px solid var(--un-line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-title h2 {
  margin: 0;
  font-size: 16px;
  color: var(--un-navy);
}

.panel-title span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--un-line);
  vertical-align: middle;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--un-sky);
  white-space: nowrap;
}

tbody tr:hover td {
  background: #f7fafc;
}

.cell-clip {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: none;
  background: var(--un-blue);
  color: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--un-blue-deep);
}

.btn.ghost {
  background: transparent;
  color: var(--un-blue);
  border: 1px solid var(--un-line);
}

.btn.ghost:hover {
  background: var(--un-sky);
}

.btn.ok {
  background: var(--ok);
  color: #fff;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.ops-layout .btn.ok,
.ops-layout .btn.danger,
.ops-layout .btn.ok:disabled,
.ops-layout .btn.danger:disabled {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.btn.gold {
  background: var(--un-gold);
  color: #1a1508;
}

.btn.compact {
  padding: 6px 10px;
  font-size: 12px;
  color: #d7e2ec;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.compact:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ok {
  background: #e5f5ec;
  color: var(--ok);
}

.badge-warn {
  background: #f8f0df;
  color: var(--warn);
}

.badge-danger {
  background: #f8e8e6;
  color: var(--danger);
}

.badge-info {
  background: #e4eef6;
  color: var(--info);
}

.badge-neutral {
  background: #eef1f4;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .field.full {
  grid-column: 1 / -1;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters .field {
  min-width: 180px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--un-line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
}

.field textarea {
  resize: vertical;
}

.upload-zone {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1.5px dashed var(--un-line);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  background: var(--un-sky);
}

.upload-zone.dragging,
.upload-zone.has-file {
  border-color: var(--un-blue);
  background: #e4edf5;
}

.upload-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--un-blue);
  color: #fff;
  font-weight: 700;
}

.upload-zone strong {
  display: block;
  font-size: 14px;
}

.upload-zone p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.timeline-list li {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--un-line);
}

.timeline-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-list strong {
  font-size: 13px;
}

.timeline-list span {
  font-size: 12px;
  color: var(--muted);
}

.ops-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--un-navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(6, 24, 51, 0.35);
  z-index: 50;
}

/* —— 学测批改：答卷全文 —— */
.assess-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 14px;
  align-items: start;
}

.paper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.paper-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--un-line);
  background: var(--un-sky);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.paper-item strong {
  font-size: 14px;
  color: var(--un-navy);
}

.paper-item span {
  font-size: 12px;
  color: var(--muted);
}

.paper-item.active {
  border-color: var(--un-blue);
  background: #e4edf5;
  box-shadow: inset 3px 0 0 var(--un-blue);
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.paper-body {
  border: 1px solid var(--un-line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px 16px;
  max-height: min(52vh, 520px);
  overflow: auto;
  margin-bottom: 14px;
}

.paper-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
}

.grade-box {
  display: grid;
  gap: 12px;
}


/* —— 席位分配：会场国旗墙 —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.seat-board {
  background: #f5f6f8;
}

.seat-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.seat-delegate-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}

.seat-delegate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.seat-delegate-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--un-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.seat-delegate-item:hover {
  border-color: rgba(26, 79, 122, 0.35);
}

.seat-delegate-item.active {
  border-color: var(--un-blue);
  background: #e8eef5;
  box-shadow: inset 3px 0 0 var(--un-blue);
}

.seat-delegate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.seat-delegate-item strong {
  font-size: 14px;
  color: var(--un-navy);
}

.seat-delegate-item small,
.seat-delegate-item span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .seat-split {
    grid-template-columns: 1fr;
  }

  .seat-delegate-panel {
    position: static;
    max-height: none;
    order: -1;
  }
}

.seat-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.seat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seat-tabs a,
.seat-tabs button {
  appearance: none;
  border: 1px solid var(--un-line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  min-width: 120px;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.seat-tabs a strong,
.seat-tabs button strong {
  display: block;
  font-size: 13px;
  color: var(--un-navy);
}

.seat-tabs a span,
.seat-tabs button span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.seat-tabs a.active,
.seat-tabs button.active {
  border-color: var(--un-blue);
  background: #e8eef5;
  box-shadow: inset 0 0 0 1px rgba(26, 79, 122, 0.2);
}

.seat-search input {
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--un-line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.seat-board-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}

.seat-flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
}

.seat-flag-card {
  appearance: none;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 16px;
  padding: 12px 8px 10px;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.seat-flag-card:hover {
  border-color: rgba(26, 79, 122, 0.25);
}

.seat-flag-card.is-taken {
  opacity: 0.72;
}

.seat-flag-card strong {
  font-size: 13px;
  color: var(--ink);
}

.seat-flag-card small {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
}

.seat-owner {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--un-blue);
  margin-top: 2px;
}

/* Apple 风格连续圆角国旗 */
.apple-flag {
  width: 56px;
  height: 42px;
  border-radius: 22%;
  overflow: hidden;
  background: #e8e8ed;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.06);
}

.apple-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seat-empty {
  grid-column: 1 / -1;
  margin: 8px 0;
}

tr.row-selected td {
  background: #e8f0f7 !important;
}

@media (max-width: 1100px) {
  .kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .assess-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .ops-layout {
    grid-template-columns: 1fr;
  }

  .ops-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .ops-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .ops-role-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}


.sync-ok { color: #7dce9a !important; }
.sync-bad { color: #f0a0a0 !important; }


.q-editor {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.q-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(0,0,0,0.15);
}
.q-card textarea,
.q-card input,
.q-card pre {
  width: 100%;
  font: inherit;
}
.q-card pre {
  white-space: pre-wrap;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
  color: #e8eef5;
}


/* 表格内幽灵按钮在浅色底上提高对比度 */
.table-wrap .btn.ghost {
  color: #1a3a5c;
  border-color: rgba(26, 58, 92, 0.35);
  background: #fff;
}
.table-wrap .btn.ghost:hover {
  background: #eef3f8;
  color: #0f2740;
}

.pay-method input{margin-right:10px}
.pay-method{display:flex;align-items:center;gap:8px;cursor:pointer}
.pay-jump{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;color:#1a3a5c}
.pay-jump h1{margin:8px 0 12px;font-size:1.6rem}
.ops-reader{max-width:420px;margin:0 auto 16px}

.fee-std-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.fee-std-form label {
  font-size: 13px;
  color: var(--un-navy);
}
.fee-amount-input {
  width: 120px;
  padding: 7px 10px;
  border: 1px solid var(--un-line);
  border-radius: 7px;
  font-size: 13px;
}
.fee-pending-box {
  background: #fff7ed;
  border: 1px solid #f6d7a8;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
}
.fee-pending-box p {
  margin: 0 0 8px;
}
.fee-row-pending {
  color: #b45309;
  font-size: 12px;
  margin-top: 4px;
}

.role-assign .btn {
  background: #eef3f8;
  color: #0f2740;
  border: 1px solid var(--un-line);
}

.role-assign .btn.role-on {
  background: var(--un-blue);
  color: #fff;
  border-color: transparent;
}

.ops-layout .role-assign .btn.role-on {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
