*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink:         #0f1117;
  --ink-2:       #3a3d4a;
  --ink-3:       #7a7f8e;
  --paper:       #f5f4f0;
  --paper-2:     #eceae3;
  --accent:      #c8472a;
  --accent-2:    #e8603f;
  --green:       #2a7a4f;
  --green-bg:    #d4f0e2;
  --green-text:  #1a5c34;
  --yellow-bg:   #fdf0d0;
  --yellow-text: #7a5000;
  --red-bg:      #fde8e4;
  --red-text:    #8a1a0a;
  --blue-bg:     #e8f1fb;
  --blue-text:   #1a4070;
  --border:      rgba(15,17,23,.10);
  --radius:      12px;
  --radius-lg:   20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

/* ── TOPBAR ─────────────────────── */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.topbar-logo {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: .65rem;
  color: #fff;
}

.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
}

.topbar-sub {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  margin-left: .25rem;
}

.topbar-admin {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.15);
  padding: .3rem .9rem;
  border-radius: 20px;
  transition: all .2s;
}

.topbar-admin:hover {
  color: #fff;
  border-color: rgba(255,255,255,.4);
}

/* ── WRAPPER ────────────────────── */
.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

/* ── BREADCRUMB ─────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--ink-3);
  margin-bottom: 1.75rem;
}

.breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
  transition: color .15s;
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb-sep {
  opacity: .4;
}

/* ── PAGE HEADER ────────────────── */
.page-header {
  margin-bottom: 2rem;
}

.page-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .4rem;
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  margin-bottom: .5rem;
}

.page-desc {
  font-size: .88rem;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 520px;
}

/* ── MAIN GRID ──────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

/* ── CARD ───────────────────────── */
.card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card + .card {
  margin-top: 1.25rem;
}

.card-pad {
  padding: 1.75rem;
}

/* ── TEXT HELPERS ───────────────── */
.sec-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .3rem;
}

.sec-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: .2rem;
}

.sec-sub {
  font-size: .83rem;
  color: var(--ink-3);
}

.sec-sub-gap {
  margin-bottom: 1.5rem;
}

/* ── FOLIO STRIP ─────────────────── */
.folio-strip {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.folio-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 110% 50%, rgba(200,71,42,.3) 0%, transparent 60%);
  pointer-events: none;
}

.folio-strip-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: .25rem;
}

.folio-strip-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: .04em;
  line-height: 1;
  word-break: break-word;
}

.folio-strip-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
}

/* ── BADGES ─────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .7rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-green {
  background: var(--green-bg);
  color: var(--green-text);
}

.badge-yellow {
  background: var(--yellow-bg);
  color: var(--yellow-text);
}

.badge-red {
  background: var(--red-bg);
  color: var(--red-text);
}

.badge-blue {
  background: var(--blue-bg);
  color: var(--blue-text);
}

.badge-gray {
  background: var(--paper-2);
  color: var(--ink-3);
  border: 1px solid var(--border);
}

.badge-white {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.18);
}

.badge-small {
  font-size: .7rem;
}

/* ── WIZARD ─────────────────────── */
.wizard-wrap {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--paper-2);
}

.wizard {
  display: flex;
  align-items: center;
  position: relative;
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.wiz-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .78rem;
  transition: all .2s;
}

.wiz-dot.done {
  background: var(--green);
  color: #fff;
}

.wiz-dot.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(200,71,42,.18);
}

.wiz-dot.pending {
  background: var(--paper-2);
  color: var(--ink-3);
  border: 2px solid var(--border);
}

.wiz-label {
  font-size: .72rem;
  color: var(--ink-3);
  white-space: nowrap;
  text-align: center;
  max-width: 72px;
  line-height: 1.3;
}

.wiz-label.done {
  color: var(--green);
  font-weight: 500;
}

.wiz-label.active {
  color: var(--ink);
  font-weight: 600;
}

.wizard-line {
  flex: 1;
  height: 2px;
  background: var(--paper-2);
  margin: 0 4px;
  margin-bottom: 18px;
  min-width: 24px;
}

.wizard-line.done {
  background: var(--green);
}

/* ── INFO GRID ───────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
}

.info-block {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.info-block-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .4rem;
}

.info-block-value {
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
}

.info-break {
  font-size: .82rem;
  word-break: break-all;
}

.info-block-sub {
  font-size: .78rem;
  color: var(--ink-3);
  margin-top: .15rem;
}

.info-block-full {
  grid-column: 1 / -1;
}

.info-block-highlight {
  border-color: #f0d080;
  background: var(--yellow-bg);
}

.info-block-highlight .info-block-label {
  color: var(--yellow-text);
}

.info-block-highlight .info-block-value {
  color: var(--yellow-text);
}

.info-block-success {
  border-color: #8fd4aa;
  background: var(--green-bg);
}

.info-block-label-success {
  color: var(--green-text);
}

.info-block-value-tag {
  color: var(--green-text);
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  letter-spacing: .04em;
}

/* ── COMMENT BLOCK ───────────────── */
.comment-block {
  margin: 0 1.75rem 1.5rem;
  background: var(--blue-bg);
  border: 1.5px solid #b0cef0;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  font-size: .84rem;
  color: var(--blue-text);
  line-height: 1.6;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.comment-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── NEXT STEPS ──────────────────── */
.next-steps {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid var(--paper-2);
}

.next-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 1rem;
}

.next-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.next-item {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: .84rem;
  color: var(--ink-3);
  line-height: 1.55;
}

.next-item-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  color: var(--ink-3);
  flex-shrink: 0;
  margin-top: .1rem;
}

.next-item-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.next-help {
  font-size: .78rem;
  color: var(--ink-3);
  margin-top: .6rem;
}

/* ── BUTTONS ─────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 42px;
  padding: 0 1.25rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.btn-outline {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--ink-2);
}

.btn-outline:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-lg {
  height: 46px;
  padding: 0 1.75rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .92rem;
}

/* ── ALERTS ──────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  font-size: .83rem;
  line-height: 1.6;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.alert:last-child {
  margin-bottom: 0;
}

.alert-err {
  background: var(--red-bg);
  border: 1.5px solid #f0b8b0;
  color: var(--red-text);
}

.alert-info {
  background: var(--blue-bg);
  border: 1.5px solid #b0cef0;
  color: var(--blue-text);
}

.alert-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.alert-gap-top {
  margin-top: 1.25rem;
}

/* ── SIDEBAR ─────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.info-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
}

.info-card-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .5rem;
}

.info-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .85rem;
}

.info-card-title-small {
  margin-bottom: .5rem;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.sidebar-note {
  font-size: .75rem;
  color: var(--ink-3);
  margin-top: .85rem;
  line-height: 1.5;
}

.sidebar-text {
  font-size: .82rem;
  color: var(--ink-3);
  line-height: 1.55;
}

.sidebar-text-gap {
  margin-bottom: .9rem;
}

.divider {
  height: 1px;
  background: var(--paper-2);
  margin: 1rem 0;
}

/* ── TIMELINE ────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-item {
  display: flex;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--paper-2);
}

.tl-item:first-child {
  padding-top: 0;
}

.tl-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tl-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .7rem;
  color: var(--ink-3);
  flex-shrink: 0;
}

.tl-title {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .1rem;
}

.tl-desc {
  font-size: .76rem;
  color: var(--ink-3);
  line-height: 1.5;
}

/* ── LOGIN FORM ───────────────────── */
.login-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}

.login-field label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-2);
}

.login-field input {
  height: 42px;
  padding: 0 .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color .18s;
}

.login-field input:focus {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15,17,23,.06);
}

.login-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── MINI PROGRESS ────────────────── */
.mini-progress {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.mini-progress-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.mini-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 700;
}

.mini-dot.done {
  background: var(--green);
  color: #fff;
}

.mini-dot.active {
  background: var(--accent);
  color: #fff;
}

.mini-dot.pending {
  background: var(--paper-2);
  color: var(--ink-3);
  border: 1.5px solid var(--border);
}

.mini-label {
  font-size: .78rem;
  color: var(--ink-3);
}

.mini-label-active {
  font-weight: 600;
  color: var(--ink);
}

/* ── FOOTER ─────────────────────── */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  font-size: .78rem;
  color: var(--ink-3);
}

/* ── RESPONSIVE ─────────────────── */
@media (max-width: 860px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrapper {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .topbar-sub {
    display: none;
  }

  .card-pad,
  .wizard-wrap,
  .info-grid,
  .next-steps,
  .folio-strip,
  .info-card {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .login-actions {
    flex-direction: column;
  }

  .login-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .folio-strip-right {
    width: 100%;
    align-items: flex-start;
  }
}