:root {
  --navy: #0b2555;
  --navy-2: #12366f;
  --blue: #2364df;
  --blue-dark: #1755c8;
  --sky: #e9f2ff;
  --ink: #14233d;
  --muted: #5c6880;
  --line: #dce5f3;
  --paper: #ffffff;
  --wash: #f5f8fd;
  --gold: #f2bc54;
  --green: #16794a;
  --green-soft: #e7f6ee;
  --red: #b42318;
  --red-soft: #fef0ee;
  --amber: #8b5b00;
  --amber-soft: #fff3d8;
  --shadow: 0 24px 70px rgba(11, 37, 85, .14);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--wash);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 500;
  top: -80px;
  left: 16px;
  padding: 11px 16px;
  border-radius: 9px;
  background: var(--navy);
  color: white;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(220, 229, 243, .88);
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(16px);
}
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  font-size: 17px;
  letter-spacing: -.08em;
  box-shadow: 0 8px 20px rgba(11, 37, 85, .18);
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--gold);
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #34435d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.home-link:hover, .home-link:focus-visible { color: var(--blue); }
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
}
.language-switch button {
  min-width: 38px;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.language-switch button:hover { color: var(--navy); }
.language-switch button[aria-pressed="true"] { color: white; background: var(--navy); }

main { flex: 1; }
.auth-section {
  min-height: calc(100vh - 158px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .82fr);
  align-items: center;
  gap: 88px;
  padding-top: 66px;
  padding-bottom: 72px;
}
.portal-intro {
  position: relative;
  padding: 38px 0;
}
.portal-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -65px -28px -65px -200px;
  opacity: .42;
  background-image:
    linear-gradient(rgba(35, 100, 223, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 100, 223, .10) 1px, transparent 1px),
    radial-gradient(circle at 68% 35%, rgba(35, 100, 223, .14), transparent 30%);
  background-size: 34px 34px, 34px 34px, auto;
  mask-image: linear-gradient(90deg, transparent, black 28%, black 86%, transparent);
}
.eyebrow, .section-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.portal-intro h1, .dashboard-top h1 {
  max-width: 700px;
  margin: 0;
  color: var(--navy);
  font: 800 clamp(42px, 5vw, 65px)/1.06 "Manrope", sans-serif;
  letter-spacing: -.055em;
}
.intro-copy {
  max-width: 630px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}
.benefit-list {
  max-width: 640px;
  display: grid;
  gap: 12px;
  margin: 31px 0 0;
  padding: 0;
  list-style: none;
}
.benefit-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  border: 1px solid rgba(220, 229, 243, .95);
  border-radius: 15px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 22px rgba(11, 37, 85, .04);
  backdrop-filter: blur(8px);
}
.benefit-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  font: 800 12px/1 "Manrope", sans-serif;
}
.benefit-list strong { display: block; color: var(--navy); font-size: 15px; }
.benefit-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  color: #41516c;
  font-size: 14px;
  font-weight: 600;
}
.privacy-note > span:first-child {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
}

.auth-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}
.auth-tab {
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.auth-tab:hover { color: var(--navy); }
.auth-tab.is-active { color: var(--navy); background: white; box-shadow: 0 3px 12px rgba(11, 37, 85, .08); }
.auth-panel { padding: 34px; }
.panel-heading h2, .section-heading h2 {
  margin: 0;
  color: var(--navy);
  font: 800 29px/1.18 "Manrope", sans-serif;
  letter-spacing: -.035em;
}
.panel-heading p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.form-stack { display: grid; gap: 18px; margin-top: 26px; }
.field { display: grid; gap: 7px; color: #2c3e5b; font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #ccd8e9;
  border-radius: 11px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #8a96aa; font-weight: 400; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(35, 100, 223, .12);
}
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.primary-button, .secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 19px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 12px 25px rgba(35, 100, 223, .22);
}
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--blue-dark); }
.primary-button.compact { min-height: 44px; padding: 10px 17px; white-space: nowrap; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--navy); }
.secondary-button:hover:not(:disabled) { border-color: #b9d0f7; background: var(--sky); }
.primary-button:disabled, .secondary-button:disabled { opacity: .58; cursor: wait; }
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}
.text-button:hover { color: var(--blue-dark); text-decoration: underline; }
.password-note, .form-note { margin: -6px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.form-footnote { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.confirmation-panel { padding-block: 54px; text-align: center; }
.confirmation-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 19px;
  border-radius: 22px;
  background: var(--sky);
  color: var(--blue);
  font-size: 27px;
}
.confirmation-panel h2 { margin: 0; color: var(--navy); font: 800 29px/1.2 "Manrope", sans-serif; }
.confirmation-panel p { max-width: 380px; margin: 12px auto 24px; color: var(--muted); }

.dashboard { padding-top: 48px; padding-bottom: 72px; }
.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.dashboard-top h1 { font-size: clamp(34px, 4.5vw, 50px); }
#welcome-name:not(:empty)::before { content: ", "; }
.account-email { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.workspace {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: white;
  box-shadow: 0 18px 55px rgba(11, 37, 85, .09);
}
.workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: #fbfcff;
}
.workspace-tab {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #495a74;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.workspace-tab:hover { background: var(--sky); color: var(--navy); }
.workspace-tab.is-active { background: var(--navy); color: white; }
.tab-symbol { color: var(--blue); font-size: 18px; font-weight: 800; text-align: center; }
.workspace-tab.is-active .tab-symbol { color: var(--gold); }
.count-badge {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  background: #eaf0f9;
  color: var(--navy);
  font-size: 12px;
}
.workspace-tab.is-active .count-badge { background: rgba(255, 255, 255, .16); color: white; }
.workspace-content { min-width: 0; padding: 34px; }
.workspace-pane { animation: pane-in .18s ease-out; }
@keyframes pane-in { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 29px;
}
.section-heading > p { max-width: 390px; margin: 0 0 3px; color: var(--muted); font-size: 15px; }
.section-heading h2 { font-size: clamp(27px, 3vw, 36px); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.summary-card {
  min-height: 165px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 3px 10px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.summary-card:hover { transform: translateY(-3px); border-color: #b9d0f7; box-shadow: 0 14px 30px rgba(11, 37, 85, .09); }
.summary-card .summary-label { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.summary-card strong { margin-top: 9px; color: var(--navy); font: 800 39px/1 "Manrope", sans-serif; }
.summary-card small { grid-column: 1 / -1; margin-top: 12px; color: var(--muted); font-size: 13px; }
.card-arrow { align-self: center; color: var(--blue); font-size: 22px; }
.getting-started {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #d4e5ff;
  border-radius: 17px;
  background: var(--sky);
}
.getting-started-copy { display: flex; align-items: center; gap: 15px; }
.step-bubble { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 13px; background: var(--blue); color: white; font-weight: 800; }
.getting-started h3 { margin: 0; color: var(--navy); font: 800 17px/1.25 "Manrope", sans-serif; }
.getting-started p { margin: 4px 0 0; color: #52637e; font-size: 14px; }
.recent-block { margin-top: 27px; }
.mini-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.mini-heading h3 { margin: 0; color: var(--navy); font: 800 18px/1.3 "Manrope", sans-serif; }
.compact-list, .record-list { display: grid; gap: 11px; }
.compact-record {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}
.compact-record strong { color: var(--navy); }
.compact-record small { color: var(--muted); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: 26px; align-items: start; }
.form-card {
  display: grid;
  gap: 17px;
  position: sticky;
  top: 104px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
}
.form-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.form-card h3 { margin: 0; color: var(--navy); font: 800 21px/1.25 "Manrope", sans-serif; }
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.record-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 6px 18px rgba(11, 37, 85, .035);
}
.record-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.record-title { margin: 0; color: var(--navy); font: 800 18px/1.3 "Manrope", sans-serif; }
.record-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.record-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.meta-chip, .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--wash);
  color: #43536d;
  font-size: 12px;
  font-weight: 700;
}
.record-notes { margin: 13px 0 0; color: #52617a; font-size: 14px; white-space: pre-wrap; }
.record-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #e9eef6; }
.record-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.record-action:hover { text-decoration: underline; }
.record-action.danger { color: var(--red); }
.status-pill.pending { background: var(--amber-soft); color: var(--amber); }
.status-pill.confirmed, .status-pill.completed { background: var(--green-soft); color: var(--green); }
.status-pill.declined, .status-pill.cancelled { background: var(--red-soft); color: var(--red); }
.status-pill.active { background: var(--sky); color: var(--blue-dark); }
.status-pill.paused { background: #eef0f4; color: #596579; }
.status-select {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.empty-state {
  padding: 38px 24px;
  border: 1px dashed #bdcbe0;
  border-radius: 16px;
  background: #fbfcff;
  text-align: center;
}
.empty-state-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: var(--sky);
  color: var(--blue);
  font-weight: 800;
}
.empty-state h3 { margin: 0; color: var(--navy); font: 800 18px/1.3 "Manrope", sans-serif; }
.empty-state p { max-width: 390px; margin: 7px auto 0; color: var(--muted); font-size: 14px; }
.empty-callout { padding: 28px; border: 1px solid #d4e5ff; border-radius: 17px; background: var(--sky); text-align: center; }
.empty-callout h3 { margin: 0; color: var(--navy); font: 800 21px/1.3 "Manrope", sans-serif; }
.empty-callout p { margin: 8px auto 17px; color: #52637e; }

.toast {
  position: fixed;
  z-index: 400;
  top: 92px;
  left: 50%;
  width: min(520px, calc(100% - 30px));
  padding: 13px 17px;
  border: 1px solid #b8e0ca;
  border-radius: 12px;
  background: #f0fbf5;
  color: #125d3b;
  box-shadow: 0 16px 35px rgba(11, 37, 85, .14);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  transform: translateX(-50%);
}
.toast.is-error { border-color: #f4c5bf; background: #fff5f4; color: var(--red); }
.loading-screen {
  position: fixed;
  z-index: 300;
  inset: 77px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: rgba(245, 248, 253, .94);
  color: var(--navy);
  font-weight: 800;
  backdrop-filter: blur(6px);
}
.loading-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--navy);
  color: white;
  font-size: 14px;
  animation: breathe 1.1s ease-in-out infinite alternate;
}
@keyframes breathe { to { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(35, 100, 223, .10); } }
.portal-footer { padding: 27px 0; border-top: 1px solid var(--line); background: white; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-row p { margin: 0; color: var(--muted); font-size: 13px; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(35, 100, 223, .25);
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  .auth-section { grid-template-columns: 1fr; gap: 34px; max-width: 760px; }
  .portal-intro { padding-bottom: 0; }
  .portal-intro h1 { font-size: clamp(42px, 7vw, 60px); }
  .benefit-list { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .benefit-list li { align-items: flex-start; flex-direction: column; }
  .workspace { grid-template-columns: 1fr; }
  .workspace-nav { overflow-x: auto; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-tab { min-width: 150px; width: auto; }
  .content-grid { grid-template-columns: 1fr; }
  .form-card { position: static; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 68px; gap: 12px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-copy small { display: none; }
  .home-link span:last-child { display: none; }
  .home-link { width: 36px; height: 36px; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
  .topbar-actions { gap: 9px; }
  .language-switch button { min-width: 35px; min-height: 32px; padding: 5px 7px; }
  .auth-section { min-height: 0; gap: 26px; padding-top: 38px; padding-bottom: 52px; }
  .portal-intro { padding-top: 12px; }
  .portal-intro h1 { font-size: 39px; }
  .intro-copy { font-size: 17px; }
  .benefit-list { grid-template-columns: 1fr; }
  .benefit-list li { align-items: center; flex-direction: row; }
  .benefit-list li:nth-child(n+3) { display: none; }
  .auth-card { border-radius: 20px; }
  .auth-panel { padding: 27px 22px; }
  .two-fields { grid-template-columns: 1fr; }
  .dashboard { padding-top: 33px; padding-bottom: 50px; }
  .dashboard-top { align-items: flex-start; }
  .dashboard-top .secondary-button { min-height: 42px; padding: 8px 14px; }
  .workspace { border-radius: 19px; }
  .workspace-nav { padding: 10px; }
  .workspace-tab { min-width: 124px; min-height: 44px; grid-template-columns: 22px 1fr auto; padding: 8px 10px; }
  .workspace-content { padding: 23px 18px 28px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 23px; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 125px; }
  .getting-started { align-items: stretch; flex-direction: column; }
  .getting-started .primary-button { width: 100%; }
  .content-grid { gap: 19px; }
  .form-card { padding: 19px; }
  .record-card { padding: 17px; }
  .footer-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .toast { top: 79px; }
  .loading-screen { inset: 69px 0 0; }
}

@media (max-width: 430px) {
  .brand-copy { font-size: 14px; }
  .portal-intro h1 { font-size: 35px; }
  .privacy-note { align-items: flex-start; }
  .dashboard-top h1 { font-size: 31px; }
  .workspace-tab { min-width: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
