/* ===========================================================
   Ticketing Portal (design v2)
   Public ticket submission form — full page styles
   Source design: docs/designv2.html
   =========================================================== */

:root {
  /* Brand */
  --gold: var(--brand, #ffc400);
  --gold-deep: var(--brand-dark, #e0a100);
  --gold-soft: #fff4cf;
  --ink: var(--brand-ink, #16150f);
  --ink-2: #2b2a23;

  /* Neutrals (warm) */
  --bg: #f5f3ec;
  --bg-2: #efece2;
  --card: #ffffff;
  --line: #e7e3d8;
  --line-2: #efece4;
  --muted: #82806f;
  --muted-2: #a7a596;

  /* Status */
  --green: #1f8a52;
  --green-soft: #e3f3ea;
  --amber: #c87b07;
  --amber-soft: #fbf0d8;
  --red: #c43d2f;
  --red-soft: #fae4e0;
  --blue: #2563c9;

  /* Form */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 24px;
  --field-bg: #faf9f5;
  --field-border: #e4e0d4;

  /* Type */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;

  --shadow-card: 0 1px 2px rgba(20,18,10,0.04), 0 18px 44px -22px rgba(20,18,10,0.22);
  --shadow-pop: 0 24px 60px -20px rgba(20,18,10,0.4);

  --dur: 0.42s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { text-decoration: none; }

::selection { background: var(--gold); color: var(--brand-on); }

/* Scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #d8d4c7; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #c6c2b3; background-clip: content-box; }

/* ===================== App shell ===================== */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255,196,0,0.10), transparent 60%),
    var(--bg);
}

/* ===================== Top bar ===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: var(--ink);
  border-bottom: 2px solid var(--gold);
}
.topbar-left { display: flex; align-items: center; gap: 18px; }
.topbar-divider { width: 1px; height: 26px; background: rgba(255,255,255,0.18); }
.portal-name { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.portal-name b { color: var(--brand-light); font-weight: 700; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 17px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  border: 1px solid rgba(255,255,255,0.22); background: transparent; color: #fff;
  transition: background .2s, border-color .2s, transform .15s;
}
.tb-btn:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.tb-btn.solid { background: var(--gold); color: var(--brand-on); border-color: var(--brand-light); }
.tb-btn.solid:hover { background: #ffcf2b; }
.tb-btn svg { width: 17px; height: 17px; }

/* ===================== Brand wordmark ===================== */
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 7px; padding: 7px 14px 9px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.logo .word {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic; font-size: 26px; line-height: 0.9;
  color: var(--ink); letter-spacing: -0.03em; position: relative; padding-bottom: 4px;
}
.logo .word::after {
  content: ""; position: absolute; left: 0; right: 2px; bottom: 0; height: 3.5px;
  background: var(--gold); border-radius: 2px;
}

/* ===================== Layout ===================== */
.stage { flex: 1; display: flex; justify-content: center; padding: clamp(20px, 3.5vw, 44px) clamp(16px, 4vw, 48px) 64px; }
.shell {
  width: 100%; max-width: 1180px;
  display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start;
}

/* ===================== Left rail ===================== */
.rail {
  position: sticky; top: 96px;
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: 28px 26px; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.rail::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(380px 200px at 110% -10%, rgba(255,196,0,0.22), transparent 65%);
  pointer-events: none;
}
.rail-head { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.rail-kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-light); font-weight: 700; }
.rail h2 { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 23px; margin: 0 0 4px; letter-spacing: -0.01em; }
.rail .sub { position: relative; color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.5; margin-bottom: 24px; }

/* Steps progress */
.steps { position: relative; display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.step-item { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 13px; transition: background .25s; position: relative; }
.step-item.active { background: rgba(255,255,255,0.07); }
.step-dot {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  border: 1.5px solid transparent; transition: all .3s var(--ease);
}
.step-item.active .step-dot { background: var(--gold); color: var(--brand-on); }
.step-item.done .step-dot { background: rgba(255,196,0,0.16); color: var(--brand-light); border-color: rgba(255,196,0,0.4); }
.step-dot svg { width: 15px; height: 15px; }
.step-text .t { font-size: 14.5px; font-weight: 600; color: rgba(255,255,255,0.92); }
.step-text .d { font-size: 12.5px; color: rgba(255,255,255,0.45); }
.step-connector { position: absolute; left: 27px; top: 44px; width: 1.5px; height: 14px; background: rgba(255,255,255,0.12); }

/* Live summary */
.summary { position: relative; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; }
.summary-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight: 700; margin-bottom: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 7px 0; font-size: 13.5px; }
.summary-row .k { color: rgba(255,255,255,0.55); }
.summary-row .v { color: #fff; font-weight: 600; text-align: right; max-width: 60%; }
.summary-row .v.empty { color: rgba(255,255,255,0.3); font-weight: 500; }

.eta {
  position: relative; margin-top: 18px; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 12px;
}
.eta .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(255,196,0,0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,196,0,0.5);} 70% { box-shadow: 0 0 0 9px rgba(255,196,0,0);} 100% { box-shadow: 0 0 0 0 rgba(255,196,0,0);} }
.eta .label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight: 700; }
.eta .val { font-size: 14px; font-weight: 600; color: #fff; }

.rail-foot { position: relative; margin-top: 20px; display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,0.55); font-size: 12.5px; }
.rail-foot svg { width: 15px; height: 15px; color: var(--brand-light); flex: none; }

/* ===================== Main panel ===================== */
.panel {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); border: 1px solid var(--line-2);
  overflow: hidden; min-height: 560px; display: flex; flex-direction: column;
}
.panel-body { padding: clamp(24px, 3vw, 40px); flex: 1; position: relative; }

.step-head { margin-bottom: 26px; }
.step-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }
.step-head .eyebrow .num { background: var(--ink); color: var(--brand-light); width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; }
.step-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 33px); margin: 0 0 7px; letter-spacing: -0.02em; line-height: 1.05; }
.step-head p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 52ch; line-height: 1.5; }

/* Wizard steps */
.wizard-step[hidden] { display: none; }

/* Step transition */
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.enter { transform: translateY(16px); opacity: 0.001; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.enter.back { transform: translateY(-16px); }
.enter.in { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .enter { opacity: 1; transform: none; transition: none; } }
.reveal { animation: stepIn var(--dur) var(--ease) both; }

/* ===================== Combobox (DB picker) ===================== */
.combo { position: relative; }
.combo-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-radius: var(--radius-sm); border: 1.5px solid var(--field-border);
  background: var(--field-bg); font-size: 15px; color: var(--ink); text-align: left;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.combo-btn:hover:not(:disabled) { border-color: #d4cfbf; }
.combo.open .combo-btn { border-color: var(--gold-deep); background: #fff; box-shadow: 0 0 0 3.5px rgba(255,196,0,0.22); }
.combo.invalid .combo-btn { border-color: var(--red); background: #fff; }
.combo.disabled .combo-btn { opacity: 0.55; cursor: not-allowed; background: var(--bg-2); }
.combo-val { display: flex; align-items: center; gap: 11px; min-width: 0; }
.combo-val .ph { color: var(--muted-2); }
.combo-val > span:not(.combo-ic) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--gold-soft); color: var(--ink); display: grid; place-items: center; }
.combo-ic svg { width: 16px; height: 16px; }
.combo-ic.sm { width: 26px; height: 26px; }
.combo-caret { flex: none; color: var(--muted); display: grid; place-items: center; transition: transform .22s var(--ease); }
.combo-caret svg { width: 16px; height: 16px; transform: rotate(90deg); }
.combo.open .combo-caret { transform: rotate(90deg); }

.combo-panel {
  position: fixed; z-index: 1000;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); overflow: hidden; animation: comboIn .18s var(--ease);
}
@keyframes comboIn { from { transform: translateY(-6px); } to { transform: none; } }
.combo-search { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.combo-search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.combo-search input { border: none; outline: none; background: none; font-size: 14.5px; width: 100%; color: var(--ink); }
.combo-list { max-height: 268px; overflow-y: auto; padding: 6px; }
.combo-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.combo-opt {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border: none; background: none; border-radius: 10px; font-size: 14.5px; color: var(--ink-2); text-align: left;
}
.combo-opt-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt.hi { background: var(--field-bg); }
.combo-opt.sel { color: var(--ink); font-weight: 600; }
.combo-opt.sel .combo-ic { background: var(--gold); }
.combo-opt .check-ic { flex: none; width: 15px; height: 15px; color: var(--gold-deep); }

/* Routing note */
.route-note {
  margin-top: 20px; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius); background: var(--gold-soft);
  border: 1px solid rgba(224,161,0,0.3); font-size: 14.5px; color: var(--ink-2);
}
.route-note b { color: var(--ink); }
.route-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--brand-light); display: grid; place-items: center; }
.route-ic svg { width: 16px; height: 16px; }

/* ===================== Fields ===================== */
.field-grid { display: grid; gap: 16px; }
.field-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.field-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.span-2 { grid-column: span 2; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.field label .req { color: var(--red); }
.field .hint { font-size: 12px; color: var(--muted-2); }
.control {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--field-border); background: var(--field-bg);
  font-size: 15px; color: var(--ink); transition: border-color .18s, box-shadow .18s, background .18s;
}
.control::placeholder { color: var(--muted-2); }
.control:hover { border-color: #d4cfbf; }
.control:focus { outline: none; border-color: var(--gold-deep); background: #fff; box-shadow: 0 0 0 3.5px rgba(255,196,0,0.22); }
textarea.control { resize: vertical; min-height: 120px; line-height: 1.55; }
select.control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2382806f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; cursor: pointer; }
.field.invalid .control { border-color: var(--red); background: #fff; }
.field.invalid .combo-btn { border-color: var(--red); background: #fff; }
.field-error { font-size: 12px; color: var(--red); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.field-error svg { width: 13px; height: 13px; flex: none; }
.char-count { font-size: 12px; color: var(--muted-2); text-align: right; }
.char-count.warn { color: var(--amber); font-weight: 600; }
.char-count.ok { color: var(--green); }
.count-row { display: flex; justify-content: flex-start; gap: 10px; }
#recip-empty { font-size: 13px; color: var(--muted-2); font-style: italic; }

/* Additional recipients */
.recip-box { border: 1.5px dashed var(--field-border); border-radius: var(--radius); padding: 16px; background: var(--field-bg); }
.recip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.recip-head .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.recip-head .lbl svg { width: 16px; height: 16px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--field-border); background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; transition: all .18s; }
.link-btn:hover { border-color: var(--gold-deep); background: var(--gold-soft); }
.link-btn svg { width: 15px; height: 15px; }
.recip-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.recip-item { display: flex; gap: 8px; align-items: center; }
.recip-item .control { flex: 1; }
.icon-btn { flex: none; width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1.5px solid var(--field-border); background: #fff; color: var(--muted); display: grid; place-items: center; transition: all .18s; }
.icon-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.icon-btn svg { width: 17px; height: 17px; }

/* ===================== Priority ===================== */
.section-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 9px; display: block; }
.section-label .opt { color: var(--muted-2); font-weight: 500; }
.priority-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.prio {
  text-align: left; border: 1.5px solid var(--field-border); background: var(--field-bg);
  border-radius: var(--radius); padding: 14px; transition: all .2s var(--ease); position: relative;
}
.prio:hover { transform: translateY(-2px); }
.prio .dot { width: 11px; height: 11px; border-radius: 50%; margin-bottom: 10px; }
.prio .name { font-weight: 700; font-size: 14.5px; }
.prio .sla { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.prio.sel { background: #fff; border-color: currentColor; box-shadow: 0 0 0 3px var(--prio-soft); }
.prio.low { --pc: var(--green); --prio-soft: rgba(31,138,82,0.18); }
.prio.medium { --pc: var(--amber); --prio-soft: rgba(200,123,7,0.16); }
.prio.high { --pc: #d2691e; --prio-soft: rgba(210,105,30,0.16); }
.prio.urgent { --pc: var(--red); --prio-soft: rgba(196,61,47,0.16); }
.prio.sel { color: var(--pc); }
.prio .dot { background: var(--pc); }
.prio .name, .prio.sel .sla { color: var(--ink); }
.prio.sel .name { color: var(--pc); }

.sla-banner { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 11px; font-size: 14px; transition: all .3s; }
.sla-banner svg { width: 18px; height: 18px; flex: none; }
.sla-banner .strong { font-weight: 700; }
.sla-banner .msg { color: var(--ink-2); }

/* ===================== Attachments ===================== */
.dropzone {
  border: 2px dashed var(--field-border); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; background: var(--field-bg);
  transition: all .22s var(--ease); cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold-deep); background: var(--gold-soft); }
.dropzone .up-ic { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold-deep); transition: transform .22s; }
.dropzone.drag .up-ic { transform: translateY(-4px) scale(1.06); }
.dropzone .up-ic svg { width: 24px; height: 24px; }
.dropzone .t { font-weight: 700; font-size: 16px; }
.dropzone .d { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.dropzone .formats { font-size: 12px; color: var(--muted-2); margin-top: 10px; }
.file-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.file-chip { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; animation: stepIn .3s var(--ease); }
.file-chip .thumb { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); font-size: 10px; font-weight: 800; overflow: hidden; flex: none; }
.file-chip .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-chip .meta { flex: 1; min-width: 0; }
.file-chip .fn { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip .fs { font-size: 12px; color: var(--muted); }
.file-chip .icon-btn { width: 34px; height: 34px; }
.file-chip .icon-btn svg { width: 15px; height: 15px; }

/* ===================== Footer / nav ===================== */
.panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px clamp(24px, 3vw, 40px); border-top: 1px solid var(--line-2); background: #fdfcf9;
}
.panel-foot-right { display: flex; align-items: center; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; border: 1.5px solid transparent; transition: all .18s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: #cfcabb; background: var(--bg-2); }
.btn.ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-on); }
.btn.primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(0,0,0,0.5); }
.btn.gold { background: var(--gold); color: var(--brand-on); }
.btn.gold:hover { background: #ffcf2b; transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(224,161,0,0.7); }
.btn.gold:disabled, .btn.gold.disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.foot-progress { font-size: 13px; color: var(--muted); font-weight: 500; }
.foot-progress b { color: var(--ink); }

/* ===================== Review ===================== */
.review-card { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.review-card .rc-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: var(--field-bg); border-bottom: 1px solid var(--line); }
.review-card .rc-head .t { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.review-card .rc-head .t svg { width: 17px; height: 17px; color: var(--gold-deep); }
.review-card .edit { font-size: 13px; font-weight: 600; color: var(--blue); background: none; border: none; padding: 4px 6px; }
.review-card .edit:hover { text-decoration: underline; }
.review-card .edit:disabled { color: var(--muted-2); cursor: not-allowed; text-decoration: none; }
.consent input:disabled { cursor: not-allowed; opacity: 0.5; }
.review-body { padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.rb-item .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.rb-item .v { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.rb-item.full { grid-column: span 2; }
.rb-item .v.muted { color: var(--muted-2); font-weight: 500; font-style: italic; }
.rb-item .v .prio-dot { width: 9px; height: 9px; border-radius: 9px; display: inline-block; margin-right: 7px; }

.consent { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; background: var(--field-bg); border: 1.5px solid var(--field-border); border-radius: var(--radius); margin-top: 4px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold-deep); flex: none; }
.consent label { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

/* ===================== Success ===================== */
.success { text-align: center; padding: 30px 24px 10px; position: relative; }
.success .check-ring {
  width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%;
  background: var(--green-soft); display: grid; place-items: center; position: relative;
}
.success .check-ring svg { width: 44px; height: 44px; color: var(--green); }
.success .check-ring::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ring 1.4s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(1.25); opacity: 0; } }
.success h1 { font-family: var(--font-display); font-weight: 600; font-size: 32px; margin: 0 0 8px; letter-spacing: -0.02em; }
.success p { color: var(--muted); font-size: 16px; margin: 0 auto 26px; max-width: 44ch; line-height: 1.55; }
.success p b { color: var(--ink); }
.ticket-id {
  display: inline-flex; align-items: center; gap: 14px; padding: 16px 22px; border-radius: 16px;
  background: var(--ink); color: #fff; margin-bottom: 28px;
}
.ticket-id .tk-meta { text-align: left; }
.ticket-id .tk-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight: 700; }
.ticket-id .tk-num { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--brand-light); letter-spacing: 0.02em; }
.ticket-id .copy { width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,0.1); border: none; color: #fff; display: grid; place-items: center; transition: background .18s; }
.ticket-id .copy:hover { background: rgba(255,255,255,0.2); }
.ticket-id .copy svg { width: 16px; height: 16px; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.success-meta { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }
.success-meta .sm { text-align: center; }
.success-meta .sm .k { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.success-meta .sm .v { font-weight: 700; font-size: 15px; }
.success-meta .sm .v.amber { color: var(--amber); }

/* Confetti */
.confetti { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; opacity: 0.9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(620px) rotate(540deg); opacity: 0; } }

/* Spinner */
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== Page footer ===================== */
.page-foot {
  padding: 18px clamp(18px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line);
}

/* ===================== SweetAlert custom ===================== */
/* White text for brand-colored SweetAlert buttons (bg comes from confirm/cancelButtonColor) */
.swal-confirm-dark { color: var(--brand-on, #fff) !important; }
.swal-desc-check {
  border-radius: 18px !important;
  padding: 28px 28px 22px !important;
  max-width: 420px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.13) !important;
  font-family: var(--font-body) !important;
}
.swal-desc-actions { gap: 10px !important; margin-top: 20px !important; }
.swal-desc-check .swal2-confirm,
.swal-desc-check .swal2-cancel {
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  letter-spacing: .01em !important;
}
.swal-desc-check .swal2-cancel { color: var(--brand-on, #fff) !important; }

/* ===================== Responsive ===================== */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  /* On stacked layouts, show the form first and drop the summary rail below it */
  .panel { order: 1; }
  .rail { position: static; order: 2; }
  .priority-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .field-grid.cols-2, .field-grid.cols-3 { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .file-list, .review-body { grid-template-columns: 1fr; }
  .rb-item.full { grid-column: auto; }
  .portal-name { font-size: 16px; }
  .tb-btn .hide-sm { display: none; }
  .panel-foot { flex-wrap: wrap; }
  .foot-progress { display: none; }
}

/* ===================== Saved-identity chip ===================== */
.ident-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; margin-bottom: 18px;
  background: var(--gold-soft); border: 1.5px solid #f0dca0;
  border-radius: var(--radius-sm);
}
.ident-chip .ident-ic {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: var(--brand-on);
}
.ident-chip .ident-ic svg { width: 15px; height: 15px; }
.ident-chip .ident-text { font-size: 13px; color: var(--ink-2); line-height: 1.35; flex: 1 1 auto; min-width: 0; }
.ident-chip .ident-meta { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ident-chip .ident-meta b { color: var(--ink); font-weight: 700; }
.ident-clear {
  flex: none; border: none; background: transparent;
  color: var(--gold-deep); font-weight: 700; font-size: 12.5px;
  padding: 4px 6px; border-radius: 8px; text-decoration: underline;
}
.ident-clear:hover { background: rgba(224,161,0,0.12); }

/* ===================== Voice dictation ===================== */
.field.has-mic { position: relative; }
.field.has-mic .mic-btn {
  position: absolute; top: 0; right: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 1.5px solid var(--field-border); background: #fff;
  color: var(--ink-2); font-weight: 600; font-size: 12px; transition: all .16s;
}
.field.has-mic .mic-btn:hover { border-color: var(--gold-deep); background: var(--gold-soft); }
.field.has-mic .mic-btn svg { width: 14px; height: 14px; }
.mic-btn.listening { border-color: var(--red); background: var(--red-soft); color: var(--red); animation: micpulse 1.3s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196,61,47,0.45); } 60% { box-shadow: 0 0 0 7px rgba(196,61,47,0); } }
