:root {
  --ink: #18342c;
  --ink-soft: #476158;
  --paper: #f5f0e4;
  --paper-bright: #fffdf7;
  --forest: #0b665c;
  --forest-dark: #07463f;
  --sun: #e9b83f;
  --coral: #df5b3f;
  --coral-dark: #a93426;
  --line: rgba(24, 52, 44, 0.17);
  --shadow: 0 24px 70px rgba(30, 49, 41, 0.13);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(24, 52, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 52, 44, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.82;
  pointer-events: none;
}

.ambient-one {
  width: 38vw;
  height: 38vw;
  min-width: 340px;
  min-height: 340px;
  right: -13vw;
  top: -12vw;
  background: radial-gradient(circle at 40% 40%, rgba(233, 184, 63, 0.48), rgba(233, 184, 63, 0));
}

.ambient-two {
  width: 44vw;
  height: 44vw;
  min-width: 380px;
  min-height: 380px;
  left: -17vw;
  bottom: -20vw;
  background: radial-gradient(circle at 50% 50%, rgba(11, 102, 92, 0.25), rgba(11, 102, 92, 0));
}

[hidden] { display: none !important; }

.paper-card {
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid rgba(24, 52, 44, 0.13);
  box-shadow: var(--shadow);
}

.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(430px, 0.9fr);
  align-items: center;
  gap: 9vw;
  max-width: 1180px;
  padding: 7vh 5vw;
  margin: 0 auto;
}

.login-mark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  transform: rotate(-5deg);
  filter: drop-shadow(0 28px 30px rgba(24, 52, 44, 0.16));
}

.login-mark span {
  aspect-ratio: 0.84;
  display: grid;
  place-items: center;
  color: var(--paper-bright);
  font: 700 clamp(4rem, 8vw, 7.5rem)/1 Georgia, serif;
  border: 7px solid var(--paper);
}

.login-mark span:nth-child(1) { background: var(--forest); transform: translateY(9%); }
.login-mark span:nth-child(2) { background: var(--sun); color: var(--ink); transform: translateY(-7%); }
.login-mark span:nth-child(3) { background: var(--coral); transform: translateY(4%); }

.login-card {
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 4px 34px 4px 34px;
  animation: rise 520ms ease-out both;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }

.login-card h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 36rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 1.5rem 0 2rem;
}

.stack-form, .upload-form { display: grid; gap: 1rem; }

label { display: grid; gap: 0.45rem; font-weight: 700; }
label > span { font-size: 0.86rem; }
label small { color: var(--ink-soft); font-weight: 400; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.82rem 0.9rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--forest);
  background: white;
  box-shadow: 0 0 0 3px rgba(11, 102, 92, 0.13);
}

textarea { resize: vertical; line-height: 1.5; }

.primary-button, .danger-button {
  border: 0;
  border-radius: 5px;
  padding: 0.92rem 1.2rem;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button { background: var(--forest); box-shadow: 0 9px 20px rgba(11, 102, 92, 0.22); }
.danger-button { background: var(--coral-dark); box-shadow: 0 9px 20px rgba(169, 52, 38, 0.2); }
.primary-button:hover, .danger-button:hover { transform: translateY(-2px); }
.primary-button:disabled, .danger-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.form-error { min-height: 1.2em; margin: 0; color: var(--coral-dark); font-size: 0.86rem; }

.app-shell { min-height: 100vh; }

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.8rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 240, 228, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-button {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.brand-stamp {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 2px 13px 2px 13px;
  font: 700 0.9rem Georgia, serif;
  letter-spacing: 0.08em;
}

.brand-button strong { display: block; font: 700 1.25rem Georgia, serif; }
.brand-button small, .identity small { display: block; color: var(--ink-soft); font-size: 0.7rem; }
.topbar-actions { display: flex; align-items: center; gap: 1.2rem; }
.identity { text-align: right; }
.identity strong { display: block; font-size: 0.86rem; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.status-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.status-pill.online span { background: #2e9b63; box-shadow: 0 0 0 4px rgba(46, 155, 99, 0.13); }
.status-pill.offline span { background: var(--coral); box-shadow: 0 0 0 4px rgba(223, 91, 63, 0.12); }

.ghost-button, .back-button, .icon-button, .warning-banner button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.back-button { margin-bottom: 1.2rem; background: transparent; }
.icon-button { padding: 0.45rem 0.65rem; font-size: 1rem; }

.warning-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: #633c07;
  background: #ffe7a8;
  border-bottom: 1px solid rgba(99, 60, 7, 0.2);
  font-size: 0.82rem;
}

.warning-banner code { background: rgba(255,255,255,0.5); padding: 0.15rem 0.3rem; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 4rem);
}

.conversation-column { min-width: 0; }
.panel-view { animation: rise 330ms ease-out both; }

.app-shell.formular-active > .workspace {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1500px;
  gap: 0;
  padding-top: clamp(1.5rem, 3vw, 3rem);
}

.app-shell.formular-active .activity-column { display: none; }
.formular-heading { max-width: 980px; }
.formular-heading > p:last-child { max-width: 820px; }

.agent-message {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 1.2rem;
  align-items: start;
  max-width: 760px;
  margin-bottom: 2.2rem;
}

.agent-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 2px 18px 2px 18px;
  font: 700 1.8rem Georgia, serif;
}

.message-meta { margin: 0 0 0.35rem; color: var(--forest); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
.agent-message h2, .section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.02; letter-spacing: -0.035em; }
.agent-message p:last-child, .section-heading > p:last-child { color: var(--ink-soft); line-height: 1.6; }

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

.action-card {
  min-height: 190px;
  position: relative;
  display: grid;
  align-content: end;
  gap: 0.5rem;
  padding: 1.4rem;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 3px 22px 3px 22px;
  background: rgba(255, 253, 247, 0.82);
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(30, 49, 41, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.action-card:hover { transform: translateY(-5px) rotate(-0.4deg); border-color: var(--forest); box-shadow: 0 20px 42px rgba(30, 49, 41, 0.12); }
.action-card:nth-child(2), .action-card:nth-child(4) { transform: translateY(14px); }
.action-card:nth-child(2):hover, .action-card:nth-child(4):hover { transform: translateY(9px) rotate(0.4deg); }
.action-card strong { max-width: 85%; font: 700 1.35rem Georgia, serif; }
.action-card small { max-width: 82%; color: var(--ink-soft); line-height: 1.45; }
.action-number { position: absolute; top: 1rem; left: 1.2rem; color: var(--forest); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; }
.action-arrow { position: absolute; right: 1.2rem; bottom: 1.2rem; font-size: 1.7rem; color: var(--forest); }
.danger-card .action-number, .danger-card .action-arrow { color: var(--coral-dark); }
.application-card { background: linear-gradient(145deg, rgba(255,253,247,0.94), rgba(233,184,63,0.13)); }
.application-card .action-number, .application-card .action-arrow { color: #8d6500; }
.billing-card { background: linear-gradient(145deg, rgba(255,253,247,0.94), rgba(11,102,92,0.13)); }
.billing-card .action-number, .billing-card .action-arrow { color: var(--forest-dark); }
.student-create-card { background: linear-gradient(145deg, rgba(255,253,247,0.96), rgba(46,155,99,0.14)); }
.student-create-card .action-number, .student-create-card .action-arrow { color: #17683f; }

.section-heading { margin-bottom: 1.7rem; max-width: 800px; }
.section-heading > p:last-child { max-width: 650px; }
.upload-form, .cancel-form { padding: clamp(1.2rem, 3vw, 2.2rem); border-radius: 3px 24px 3px 24px; }

.drop-zone {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  text-align: center;
  border: 2px dashed rgba(11, 102, 92, 0.35);
  border-radius: 3px 20px 3px 20px;
  background: rgba(11, 102, 92, 0.045);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.drop-zone:hover { background: rgba(11, 102, 92, 0.08); border-color: var(--forest); }
.drop-zone input, .compact-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); font: 700 2rem/1 Georgia, serif; }
.drop-zone small, .compact-upload small { color: var(--ink-soft); }

.compact-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line);
  cursor: pointer;
}

.file-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.file-chip { padding: 0.4rem 0.65rem; border-radius: 99px; background: #e6ede8; font-size: 0.72rem; }
.process-note { display: grid; gap: 0.25rem; padding: 0.9rem 1rem; border-left: 5px solid var(--sun); background: rgba(233,184,63,0.14); }
.process-note span { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.subject-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.65rem; }
.subject-preview span { display: grid; gap: 0.2rem; padding: 0.8rem; background: rgba(11,102,92,0.07); border: 1px solid var(--line); }
.subject-preview small { color: var(--ink-soft); }

.search-box { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; margin-bottom: 1.2rem; }
.search-box button { border: 0; border-radius: 5px; padding: 0 1.25rem; color: white; background: var(--forest); font-weight: 800; cursor: pointer; }

.result-list { display: grid; gap: 0.65rem; }
.result-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(90px, 0.7fr)) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.72);
}
.result-row strong { font-family: Georgia, serif; }
.result-row small { color: var(--ink-soft); }
.result-row button { border: 1px solid var(--line); background: white; padding: 0.5rem 0.7rem; border-radius: 4px; cursor: pointer; }
.result-row button.danger-link { color: var(--coral-dark); border-color: rgba(169,52,38,0.3); }
.result-row button:disabled { opacity: 0.45; cursor: not-allowed; }

.empty-state { color: var(--ink-soft); font-size: 0.85rem; padding: 1rem 0; }
.detail-drawer { margin-top: 1.5rem; padding: 1.4rem; border-left: 6px solid var(--sun); background: rgba(255,253,247,0.9); box-shadow: var(--shadow); }
.detail-drawer h3 { margin: 0 0 1rem; font-size: 1.8rem; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.8rem; }
.detail-grid div { padding: 0.7rem; background: rgba(24,52,44,0.04); }
.detail-grid small { display: block; color: var(--ink-soft); margin-bottom: 0.25rem; }
.detail-section { margin-top: 1.2rem; }
.detail-section h4 { margin: 0 0 0.5rem; }
.tag { display: inline-flex; margin: 0.2rem 0.3rem 0.2rem 0; padding: 0.35rem 0.55rem; border-radius: 99px; background: #e6ede8; font-size: 0.75rem; }

.cancel-form { margin-top: 1.2rem; border-left: 6px solid var(--coral); }
.cancel-form h3 { margin: 0; font-size: 1.6rem; }
.cancel-form p { color: var(--ink-soft); }

.activity-column { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.activity-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 1rem; }
.activity-heading h3 { margin: 0; font-size: 1.5rem; }
.history-list { display: grid; gap: 0.6rem; }
.history-item { width: 100%; display: grid; gap: 0.25rem; padding: 0.8rem; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,0.45); cursor: pointer; }
.history-item strong { font-size: 0.82rem; }
.history-item small { color: var(--ink-soft); }
.history-state { display: flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.history-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }
.history-state.completed::before { background: #2e9b63; }
.history-state.failed::before { background: var(--coral); }
.privacy-note { margin-top: 2rem; padding: 1rem; color: var(--paper-bright); background: var(--forest-dark); border-radius: 2px 18px 2px 18px; }
.privacy-note p { margin-bottom: 0; font-size: 0.76rem; line-height: 1.5; opacity: 0.82; }

.job-card { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); background: rgba(255,253,247,0.88); box-shadow: var(--shadow); }
.job-card h2 { margin: 0 0 0.6rem; font-size: clamp(2rem,4vw,3.4rem); }
.job-status-line { display: flex; align-items: center; gap: 0.65rem; color: var(--ink-soft); }
.job-status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); animation: pulse 1.4s ease-in-out infinite; }
.job-status-dot.completed { background: #2e9b63; animation: none; }
.job-status-dot.warning { background: var(--sun); animation: none; }
.job-status-dot.failed { background: var(--coral); animation: none; }
.job-error { padding: 0.8rem; color: var(--coral-dark); background: rgba(223,91,63,0.1); border-left: 4px solid var(--coral); white-space: pre-wrap; }

.proposal-form { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.form-section { padding-top: 1rem; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 0.8rem; }
.match-note { margin: 0.7rem 0 0; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.8rem; }
.field-grid .wide { grid-column: 1 / -1; }
.subject-row { display: grid; grid-template-columns: 1fr 130px 150px auto; gap: 0.55rem; align-items: end; margin-bottom: 0.55rem; }
.application-subject-row { grid-template-columns: minmax(150px,1fr) 105px 120px 145px auto; }
.subject-row button { height: 42px; border: 1px solid var(--line); color: var(--coral-dark); background: white; cursor: pointer; }
.secondary-button { border: 1px solid var(--forest); color: var(--forest); background: transparent; padding: 0.65rem 0.9rem; border-radius: 4px; cursor: pointer; }
.confirmation-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; background: rgba(233,184,63,0.18); border-left: 5px solid var(--sun); }
.confirmation-bar p { margin: 0; font-size: 0.82rem; }
.warning-list { margin: 0.8rem 0 0; padding-left: 1.2rem; color: #76500d; }
.analysis-list { padding-left: 1.2rem; line-height: 1.55; }
.issue-panel { margin-top: 0.75rem; padding: 0.9rem 1rem; border-left: 5px solid var(--sun); background: rgba(233,184,63,0.12); }
.issue-panel h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.issue-panel p, .issue-panel ul { margin-top: 0.35rem; margin-bottom: 0; }
.issue-panel.missing, .issue-panel.conflict { border-left-color: var(--coral); background: rgba(223,91,63,0.09); }
.issue-panel.clear { border-left-color: var(--forest); background: rgba(11,102,92,0.08); }
.delivery-section { padding: 1.2rem; border: 1px solid rgba(11,102,92,0.2); background: rgba(11,102,92,0.045); }
.delivery-section > p { margin: -0.3rem 0 1rem; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.confirm-check { grid-template-columns: 22px 1fr; align-items: start; gap: 0.7rem; padding: 1rem; border: 1px solid rgba(11,102,92,0.26); background: rgba(255,253,247,0.8); cursor: pointer; }
.confirm-check input { width: 20px; height: 20px; margin: 0.05rem 0 0; padding: 0; accent-color: var(--forest); }
.confirm-check span { font-size: 0.84rem; line-height: 1.5; }
.application-confirmation { border-left-color: var(--forest); background: rgba(11,102,92,0.1); }
.checklist-intro { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.application-checklist { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.75rem; }
.application-checklist article { padding: 0.9rem; border: 1px solid var(--line); background: rgba(255,253,247,0.72); }
.application-checklist h4 { margin: 0 0 0.7rem; font: 700 1.05rem Georgia, serif; }
.document-check, .statement-check, .toggle-check { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 0.6rem; font-weight: 600; cursor: pointer; }
.document-check + .document-check { margin-top: 0.65rem; }
.document-check input, .statement-check input, .toggle-check input { width: 18px; height: 18px; margin: 0.05rem 0 0; padding: 0; accent-color: var(--forest); }
.document-check span, .statement-check span, .toggle-check span { font-size: 0.8rem; line-height: 1.4; }
.optional-statements-section > p { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.statement-checks { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0.55rem; margin-top: 0.75rem; }
.statement-check { padding: 0.7rem; border: 1px solid var(--line); background: rgba(255,255,255,0.55); }
.pedagogy-section { display: grid; gap: 1rem; }
.toggle-check { padding: 0.9rem; border-left: 5px solid var(--sun); background: rgba(233,184,63,0.12); }
.required-highlight textarea { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(223,91,63,0.08); }

.student-document-actions { display: flex; margin-top: 1.2rem; }
.student-documents-section { padding-top: 1rem; border-top: 1px solid var(--line); }
.detail-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.detail-section-heading h4 { margin: 0; }
.detail-section-heading p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.78rem; }
.student-document-list { display: grid; gap: 0.55rem; }
.student-document-row { display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: center; gap: 0.8rem; padding: 0.75rem; border: 1px solid var(--line); background: rgba(255,255,255,0.56); }
.student-document-row span strong, .student-document-row span small { display: block; }
.student-document-row span small { margin-top: 0.2rem; color: var(--ink-soft); }
.document-kind { width: fit-content; padding: 0.3rem 0.5rem; color: var(--forest-dark); background: rgba(11,102,92,0.1); border-radius: 99px; font-size: 0.68rem; font-weight: 800; }
.document-download { padding: 0.5rem 0.7rem; color: var(--forest); border: 1px solid rgba(11,102,92,0.35); border-radius: 4px; font-size: 0.75rem; font-weight: 800; text-decoration: none; }
.student-document-upload { display: grid; gap: 0.9rem; margin-top: 1.2rem; padding: 1rem; border-top: 5px solid var(--forest); background: rgba(11,102,92,0.055); }
.student-document-upload > .primary-button { justify-self: start; }
.existing-formular-shell { margin-top: 1.5rem; padding: clamp(1rem,2vw,1.6rem); border-top: 6px solid var(--forest); background: rgba(255,253,247,0.92); box-shadow: var(--shadow); }
.existing-formular-heading { display: flex; justify-content: space-between; align-items: start; gap: 1.5rem; margin-bottom: 1rem; }
.existing-formular-heading h3 { margin: 0; font-size: clamp(1.4rem,3vw,2rem); }
.existing-formular-heading p:last-child { max-width: 720px; margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.84rem; line-height: 1.5; }
.application-mandate-policy { margin: 0 0 1rem; }
.mandate-policy-card { padding: 0.9rem 1rem; border-left: 5px solid var(--forest); background: rgba(11,102,92,0.08); }
.mandate-policy-card strong { font: 700 1rem Georgia, serif; }
.mandate-policy-card p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.5; }
.mandate-policy-card.warning { border-left-color: var(--sun); background: rgba(233,184,63,0.13); }
.mandate-policy-card.danger { border-left-color: var(--coral); background: rgba(223,91,63,0.08); }
.compact-confirm { display: grid; margin-top: 0.75rem; padding: 0.75rem; }

.billing-toolbar { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0.8rem; padding: 1.1rem; }
.billing-toolbar .primary-button { min-height: 44px; }
.billing-rules { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.7rem; margin: 1rem 0 1.4rem; }
.billing-rules article { display: grid; gap: 0.25rem; padding: 0.9rem; border-top: 4px solid var(--forest); background: rgba(255,253,247,0.72); }
.billing-rules article:last-child { border-color: var(--sun); }
.billing-rules strong { font: 700 0.92rem Georgia, serif; }
.billing-rules span { color: var(--ink-soft); font-size: 0.74rem; line-height: 1.4; }
.billing-selection-form { display: grid; gap: 1rem; }
.billing-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.7rem; }
.billing-summary span { padding: 0.75rem; background: rgba(24,52,44,0.055); }
.billing-summary small, .billing-student-facts small { display: block; color: var(--ink-soft); margin-bottom: 0.2rem; }
.billing-summary strong { font: 700 1.05rem Georgia, serif; }
.billing-candidate-list { display: grid; gap: 0.75rem; }
.billing-student { display: grid; gap: 0.8rem; padding: 1rem; border: 1px solid var(--line); background: rgba(255,253,247,0.82); }
.billing-student:has(.billing-student-check:not(:checked)) { border-color: rgba(169,52,38,0.3); background: rgba(223,91,63,0.045); }
.billing-student-choice { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 0.7rem; cursor: pointer; }
.billing-student-choice input { width: 20px; height: 20px; margin: 0.1rem 0 0; accent-color: var(--forest); }
.billing-student-choice strong, .billing-student-choice small { display: block; }
.billing-student-choice strong { font: 700 1.1rem Georgia, serif; }
.billing-student-choice small { margin-top: 0.2rem; color: var(--ink-soft); font-weight: 500; }
.billing-student-facts { display: grid; grid-template-columns: 0.7fr 0.8fr 1.35fr 1.35fr; gap: 0.55rem; }
.billing-student-facts > span { padding: 0.65rem; background: rgba(24,52,44,0.04); }
.billing-student-facts strong { font-size: 0.78rem; line-height: 1.35; }
.delivery-badge.email { border-left: 4px solid var(--forest); }
.delivery-badge.postal { border-left: 4px solid var(--sun); background: rgba(233,184,63,0.14); }
.billing-exclusion-reason { padding: 0.8rem; border-left: 5px solid var(--coral); background: rgba(223,91,63,0.07); }
.billing-blocked-list { padding: 1rem; border-left: 5px solid var(--coral); background: rgba(223,91,63,0.07); }
.billing-blocked-list h3 { margin: 0; }
.billing-blocked-list > p { color: var(--ink-soft); font-size: 0.8rem; }
.billing-blocked-list article { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid rgba(169,52,38,0.16); }
.billing-blocked-list article span strong, .billing-blocked-list article span small { display: block; }
.billing-blocked-list article small { color: var(--ink-soft); }
.billing-blocked-list article b { max-width: 55%; font-size: 0.76rem; text-align: right; }
.billing-review-list { display: grid; gap: 0.6rem; margin: 1rem 0; }
.billing-review-row { display: grid; grid-template-columns: 1.15fr 0.6fr 1fr 1fr 0.65fr; gap: 0.6rem; padding: 0.8rem; border: 1px solid var(--line); background: rgba(255,253,247,0.75); }
.billing-review-row.postal { border-left: 6px solid var(--sun); }
.billing-review-row.email { border-left: 6px solid var(--forest); }
.billing-review-row small, .billing-review-row > div > strong { display: block; }
.billing-review-row small { color: var(--ink-soft); margin-bottom: 0.2rem; }
.billing-review-row > div > strong { font-size: 0.76rem; line-height: 1.35; }
.postal-alert { display: grid; gap: 0.3rem; margin: 1rem 0; padding: 1rem; border-left: 6px solid var(--sun); background: rgba(233,184,63,0.17); }
.postal-alert span { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.billing-exclusions { margin: 1rem 0; padding: 0.9rem; border-left: 5px solid var(--coral); background: rgba(223,91,63,0.06); }
.billing-exclusions h3 { margin: 0 0 0.5rem; }
.billing-exclusions p { display: grid; grid-template-columns: minmax(130px,0.5fr) 1fr; gap: 0.7rem; margin: 0; padding: 0.45rem 0; border-top: 1px solid rgba(169,52,38,0.14); }
.billing-exclusions span { color: var(--ink-soft); }
.billing-final-check { margin-bottom: 0.8rem; }
.postal-downloads { margin: 1.2rem 0; padding: 1rem; border: 1px solid rgba(233,184,63,0.55); background: rgba(233,184,63,0.09); }
.postal-downloads h3 { margin: 0; }
.postal-downloads > p { color: var(--ink-soft); font-size: 0.82rem; }
.postal-download { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.6rem; padding: 0.8rem; color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: var(--paper-bright); }
.postal-download span strong, .postal-download span small { display: block; }
.postal-download span small { margin-top: 0.2rem; color: var(--ink-soft); }
.postal-download b { color: var(--forest); font-size: 0.78rem; }
.billing-outcomes { margin-top: 1.2rem; }
.billing-outcome { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem; border-top: 1px solid var(--line); }
.billing-outcome span strong, .billing-outcome span small { display: block; }
.billing-outcome span small { margin-top: 0.2rem; color: var(--ink-soft); }
.billing-outcome b { max-width: 42%; font-size: 0.76rem; text-align: right; }
.billing-outcome.sent b { color: var(--forest); }
.billing-outcome.postal_ready b { color: #8d6500; }
.billing-outcome.failed b, .billing-outcome.email_failed b { color: var(--coral-dark); }

.toast { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 50; max-width: 390px; padding: 0.9rem 1rem; color: white; background: var(--ink); box-shadow: var(--shadow); border-radius: 4px; animation: rise 220ms ease-out both; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(233,184,63,0.35); } 50% { box-shadow: 0 0 0 9px rgba(233,184,63,0); } }

.reveal:nth-child(2) { animation-delay: 70ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 170ms; }

@media (max-width: 980px) {
  .login-stage { grid-template-columns: 1fr; max-width: 620px; gap: 2rem; }
  .login-mark { max-width: 330px; margin: 0 auto; }
  .workspace { grid-template-columns: 1fr; }
  .activity-column { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .history-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; }
  .topbar-actions { gap: 0.5rem; }
  .identity, .status-pill { display: none; }
  .warning-banner { align-items: flex-start; flex-direction: column; }
  .workspace { padding-top: 2rem; }
  .action-grid { grid-template-columns: 1fr; }
  .action-card:nth-child(2), .action-card:nth-child(4) { transform: none; }
  .action-card:nth-child(2):hover, .action-card:nth-child(4):hover { transform: translateY(-5px); }
  .field-grid, .detail-grid { grid-template-columns: 1fr; }
  .subject-preview { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .subject-row { grid-template-columns: 1fr 100px; }
  .subject-row label:nth-child(3) { grid-column: 1 / -1; }
  .application-subject-row { grid-template-columns: 1fr 90px; }
  .application-subject-row label:nth-child(3), .application-subject-row label:nth-child(4) { grid-column: auto; }
  .application-checklist { grid-template-columns: 1fr; }
  .billing-toolbar, .billing-rules, .billing-summary, .billing-student-facts, .billing-review-row { grid-template-columns: 1fr; }
  .billing-blocked-list article, .billing-outcome, .postal-download { align-items: flex-start; flex-direction: column; }
  .billing-blocked-list article b, .billing-outcome b { max-width: none; text-align: left; }
  .statement-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .result-row { grid-template-columns: 1fr auto; gap: 0.4rem; }
  .result-row > span:not(:first-child) { grid-column: 1; }
  .result-row > button { grid-column: 2; grid-row: 1; }
  .student-document-row { grid-template-columns: 1fr; }
  .document-download { justify-self: start; }
  .existing-formular-heading { align-items: stretch; flex-direction: column; }
  .history-list { grid-template-columns: 1fr; }
  .confirmation-bar { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
