@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap");

/* ITR123 — Quiet confidence design language */
:root {
  --p-ink: #16231f;
  --p-ink-2: #24342f;
  --p-forest: #0b5d4b;
  --p-forest-2: #0e745d;
  --p-forest-soft: #e1efe9;
  --p-sage: #8fa99d;
  --p-paper: #fbfaf6;
  --p-canvas: #f2f0e9;
  --p-canvas-2: #ebe8df;
  --p-white: #ffffff;
  --p-line: #dcd9cf;
  --p-line-dark: #c9c6bb;
  --p-copy: #596762;
  --p-gold: #c78e3b;
  --p-gold-soft: #f6ead7;
  --p-danger: #a63e32;
  --p-danger-soft: #f8e8e4;
  --p-success: #24745b;
  --p-success-soft: #e2f0e9;
  --p-shadow: 0 16px 46px rgba(30, 43, 37, 0.08);
  --p-shadow-sm: 0 4px 16px rgba(30, 43, 37, 0.055);

  --bg: var(--p-canvas);
  --surface: var(--p-white);
  --surface-container: var(--p-white);
  --surface-muted: #f7f6f1;
  --surface-strong: #eceae2;
  --border: var(--p-line);
  --border-strong: var(--p-line-dark);
  --text: var(--p-ink);
  --muted: var(--p-copy);
  --primary: var(--p-forest);
  --primary-dark: #084a3c;
  --primary-active: #063b31;
  --primary-soft: var(--p-forest-soft);
}

* {
  scrollbar-color: #aebbb5 transparent;
}

html,
body {
  font-family: "DM Sans", "Inter", sans-serif;
  color: var(--p-ink);
  background: var(--p-canvas);
}

body {
  font-size: 14px;
  line-height: 1.45;
}

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

a {
  color: var(--p-forest);
}

/* --------------------------------------------------------------------------
   Public / login surfaces
   -------------------------------------------------------------------------- */

.page-shell:not(.workspace-body) {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 82%, rgba(199, 142, 59, 0.12), transparent 22rem),
    radial-gradient(circle at 88% 15%, rgba(11, 93, 75, 0.1), transparent 28rem),
    var(--p-paper);
}

.page-shell:not(.workspace-body) .topbar {
  position: relative;
  background: rgba(251, 250, 246, 0.88);
  border-bottom: 1px solid rgba(201, 198, 187, 0.72);
  box-shadow: none;
}

.page-shell:not(.workspace-body) .topbar-inner {
  max-width: 1440px;
  height: 78px;
  padding-inline: 42px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 13px 13px 13px 4px;
  background: var(--p-ink);
  color: #fff;
  box-shadow: none;
  font-size: 0.7rem;
  letter-spacing: -0.03em;
}

.brand-mark::after {
  width: 9px;
  height: 9px;
  transform: translate(14px, -14px);
  border-color: var(--p-paper);
  background: var(--p-gold);
}

.brand-copy strong {
  font-family: "DM Sans", sans-serif;
  color: var(--p-ink);
  font-size: 1.13rem;
  font-weight: 700;
}

.brand-copy span {
  color: #738079;
}

.page-shell:not(.workspace-body) .topbar-nav {
  margin-left: auto;
  margin-right: 0;
}

.page-shell:not(.workspace-body) .topbar-nav a {
  color: #56645e;
}

.page-shell:not(.workspace-body) .topbar-nav a:hover {
  background: var(--p-forest-soft);
  color: var(--p-forest);
}

.auth-shell {
  max-width: 1440px;
  min-height: calc(100vh - 78px);
  padding: clamp(54px, 7vh, 92px) 42px 60px;
}

.auth-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 450px);
  gap: clamp(64px, 10vw, 150px);
}

.auth-intro {
  max-width: 760px;
}

.eyebrow {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #c8ded5;
  border-radius: 20px;
  background: rgba(225, 239, 233, 0.72);
  color: var(--p-forest);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.auth-intro h1 {
  max-width: 760px;
  margin-top: 20px;
  font-family: "Newsreader", Georgia, serif;
  color: var(--p-ink);
  font-size: clamp(3.5rem, 5.4vw, 5.35rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.052em;
}

.auth-intro p {
  max-width: 660px;
  margin-top: 24px;
  color: #52615b;
  font-size: 1.02rem;
  line-height: 1.72;
}

.feature-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 34px;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  background: var(--p-line);
}

.feature-chip {
  min-height: 146px;
  padding: 21px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.76);
}

.feature-chip::before {
  width: 22px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--p-gold);
}

.feature-chip:hover {
  border-color: transparent;
  background: #fff;
  box-shadow: none;
}

.feature-chip strong {
  color: var(--p-ink);
  font-size: 0.86rem;
}

.feature-chip span {
  color: #65726c;
  font-size: 0.77rem;
}

.auth-trust-row {
  margin-top: 22px;
  color: #64736c;
  font-size: 0.73rem;
}

.auth-trust-row span::before {
  color: var(--p-forest);
}

.auth-card {
  padding: 38px;
  border: 1px solid rgba(185, 190, 180, 0.8);
  border-radius: 3px 22px 22px 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 70px rgba(31, 45, 38, 0.14);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 11px -11px -11px 11px;
  z-index: -1;
  border: 1px solid #d8d0be;
  border-radius: 3px 22px 22px 22px;
}

.auth-card::before {
  top: -13px;
  right: 24px;
  border-color: #bcd8ce;
  background: #f3faf7;
  color: var(--p-forest);
}

.card-title h2 {
  font-family: "Newsreader", Georgia, serif;
  color: var(--p-ink);
  font-size: 1.8rem;
  font-weight: 600;
}

.card-title p {
  color: #607069;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Shared controls
   -------------------------------------------------------------------------- */

.label {
  margin-bottom: 8px;
  color: #4c5d56;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.095em;
}

.optional-label {
  margin-left: 6px;
  color: #9a958b;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field,
.textarea,
.select {
  border: 1px solid #cbc9bf;
  border-radius: 8px;
  background: #fff;
  color: var(--p-ink);
  box-shadow: inset 0 1px 0 rgba(22, 35, 31, 0.02);
}

.field,
.select {
  height: 48px;
}

.field:hover:not(:disabled),
.textarea:hover:not(:disabled),
.select:hover:not(:disabled) {
  border-color: #a8b3ac;
}

.field:focus,
.textarea:focus,
.select:focus {
  border-color: var(--p-forest);
  box-shadow: 0 0 0 3px rgba(11, 93, 75, 0.12);
}

.field::placeholder,
.textarea::placeholder {
  color: #aaa9a2;
}

.btn-primary,
.btn-secondary,
.profile-pill,
.btn-linkish {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 650;
}

.btn-primary {
  background: var(--p-forest);
  color: #fff;
  box-shadow: 0 5px 14px rgba(11, 93, 75, 0.16);
}

.btn-primary:hover {
  background: #084e40;
  box-shadow: 0 7px 18px rgba(11, 93, 75, 0.2);
}

.btn-secondary,
.profile-pill {
  border-color: #c6c8bf;
  background: rgba(255, 255, 255, 0.7);
  color: #344740;
}

.btn-secondary:hover,
.profile-pill:hover {
  border-color: #aeb8b2;
  background: #fff;
  color: var(--p-forest);
}

/* --------------------------------------------------------------------------
   Authenticated application shell
   -------------------------------------------------------------------------- */

.workspace-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 2%, rgba(143, 169, 157, 0.12), transparent 28rem),
    var(--p-canvas);
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 20px 20px;
  color: #e7eee9;
  background:
    radial-gradient(circle at 12% 90%, rgba(199, 142, 59, 0.14), transparent 18rem),
    linear-gradient(165deg, #1b2d28 0%, #10231e 100%);
}

.side-rail::after,
.role-shell > .topbar::after {
  content: "";
  position: absolute;
  top: 118px;
  right: -72px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025), 0 0 0 68px rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.rail-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
}

.rail-brand:hover {
  color: #fff;
  text-decoration: none;
}

.rail-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px 12px 12px 3px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 0.69rem;
  font-weight: 750;
}

.rail-brand strong,
.rail-brand small {
  display: block;
}

.rail-brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.rail-brand small {
  margin-top: 2px;
  color: #a9bbb3;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rail-label {
  position: relative;
  z-index: 1;
  margin: 46px 11px 10px;
  color: #7f958c;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rail-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.rail-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #b8c7c0;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.rail-link:hover,
.rail-link.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.rail-link.active {
  box-shadow: inset 3px 0 0 var(--p-gold);
}

.rail-icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  color: #94aca1;
  font-size: 1rem;
}

.rail-link.active .rail-icon {
  color: #e4b974;
}

.rail-spacer {
  flex: 1;
}

.rail-assurance {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  margin: 18px 4px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.rail-assurance-icon {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(144, 200, 174, 0.16);
  color: #9dd1b9;
  font-size: 0.7rem;
}

.rail-assurance strong,
.rail-assurance small {
  display: block;
}

.rail-assurance strong {
  color: #e8eeeb;
  font-size: 0.7rem;
}

.rail-assurance small {
  margin-top: 3px;
  color: #8fa299;
  font-size: 0.61rem;
  line-height: 1.45;
}

.rail-footer {
  color: #738a80;
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-align: center;
}

.app-stage {
  min-width: 0;
}

.app-toolbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  border-bottom: 1px solid var(--p-line);
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: blur(16px);
}

.toolbar-context {
  display: grid;
  gap: 2px;
}

.toolbar-context strong {
  color: var(--p-ink);
  font-size: 0.91rem;
}

.toolbar-eyebrow {
  color: #8b958f;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.app-toolbar .topbar-user {
  text-align: right;
}

.portal-shell,
.workbench-shell {
  max-width: 1460px;
  padding: 34px 36px 58px;
}

.workspace-page-head {
  margin-bottom: 24px;
}

.workspace-page-head h1 {
  font-family: "Newsreader", Georgia, serif;
  color: var(--p-ink);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.workspace-page-head p {
  color: #68736e;
}

.section-kicker {
  color: var(--p-forest);
  font-size: 0.64rem;
  letter-spacing: 0.125em;
}

/* Turn the existing CA/admin topbar into the same premium rail */
.role-shell > .topbar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 252px;
  height: 100vh;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 12% 90%, rgba(199, 142, 59, 0.14), transparent 18rem),
    linear-gradient(165deg, #1b2d28 0%, #10231e 100%);
  box-shadow: none;
}

.role-shell > .topbar .topbar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 28px 20px 20px;
}

.role-shell > .topbar .brand {
  position: relative;
  z-index: 1;
  color: #fff;
}

.role-shell > .topbar .brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
}

.role-shell > .topbar .brand-mark::after {
  border-color: #182b25;
  background: var(--p-gold);
}

.role-shell > .topbar .brand-copy strong {
  color: #fff;
}

.role-shell > .topbar .brand-copy span {
  color: #90a39a;
}

.role-shell > .topbar .topbar-nav {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  align-self: auto;
  gap: 5px;
  margin: 46px 0 0;
}

.role-shell > .topbar .topbar-nav a {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #b8c7c0;
}

.role-shell > .topbar .topbar-nav a:hover,
.role-shell > .topbar .topbar-nav a.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.role-shell > .topbar .topbar-nav a.active {
  box-shadow: inset 3px 0 0 var(--p-gold);
}

.role-shell > .topbar .topbar-actions {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.role-shell > .topbar .topbar-user {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  text-align: left;
}

.role-shell > .topbar .topbar-user strong {
  color: #fff;
}

.role-shell > .topbar .topbar-user span {
  color: #84998f;
}

.role-shell > .topbar .profile-pill,
.role-shell > .topbar .btn-secondary {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #dce6e1;
}

.role-shell > .topbar form {
  margin: 0;
}

.role-shell > .workbench-shell,
.role-shell > .admin-shell {
  width: calc(100% - 252px);
  max-width: none;
  margin-left: 252px;
  padding: 34px 36px 58px;
}

.role-shell .admin-sidebar {
  display: none;
}

.role-shell > .admin-shell {
  display: block;
}

/* --------------------------------------------------------------------------
   Guided onboarding and settings
   -------------------------------------------------------------------------- */

.onboarding-layout {
  min-height: calc(100vh - 168px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  overflow: hidden;
  border: 1px solid var(--p-line);
  border-radius: 18px;
  background: var(--p-white);
  box-shadow: var(--p-shadow);
}

.onboarding-card {
  padding: clamp(42px, 5vw, 72px);
}

.onboarding-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 18px;
  max-width: 800px;
}

.onboarding-step,
.settings-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d8c7aa;
  border-radius: 50%;
  color: var(--p-gold);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1rem;
}

.onboarding-heading h1,
.settings-intro h1 {
  margin: 7px 0 8px;
  font-family: "Newsreader", Georgia, serif;
  color: var(--p-ink);
  font-size: clamp(2rem, 3.1vw, 3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.onboarding-heading p {
  max-width: 670px;
  margin: 0;
  color: #65716b;
  font-size: 0.91rem;
  line-height: 1.65;
}

.premium-form {
  max-width: 860px;
  gap: 21px;
  margin-top: 38px;
  padding-left: 64px;
}

.verified-value {
  display: inline-grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 13px;
  border: 1px solid #d2dfd9;
  border-radius: 9px;
  background: #f4f9f6;
}

.verified-value > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--p-forest-soft);
  color: var(--p-forest);
  font-weight: 750;
}

.verified-value small,
.verified-value strong {
  display: block;
}

.verified-value small {
  color: #75817b;
  font-size: 0.61rem;
  font-weight: 650;
  text-transform: uppercase;
}

.verified-value strong {
  margin-top: 1px;
  font-size: 0.79rem;
}

.verification-pending {
  border-color: #efd29a;
  background: #fffaf0;
}

.verification-pending > span {
  background: #fff0cb;
  color: #8a5700;
}

.premium-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--p-line);
}

.premium-form-actions > span {
  color: #8a8c84;
  font-size: 0.72rem;
}

.premium-form-actions .btn-primary {
  min-height: 46px;
  padding-inline: 20px;
}

.premium-form-actions .btn-primary b {
  margin-left: 8px;
  font-size: 1rem;
}

.onboarding-guide {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 4vw, 58px);
  color: #e7eee9;
  background:
    radial-gradient(circle at 105% 5%, rgba(199, 142, 59, 0.22), transparent 18rem),
    linear-gradient(160deg, #20362f 0%, #10241e 100%);
}

.guide-orbit {
  position: relative;
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  margin-bottom: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.035), 0 0 0 36px rgba(255, 255, 255, 0.018);
}

.guide-orbit::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p-gold);
}

.guide-orbit span {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
}

.onboarding-guide .section-kicker {
  color: #d9b77d;
}

.onboarding-guide h2 {
  margin: 10px 0 0;
  font-family: "Newsreader", Georgia, serif;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.guide-steps {
  display: grid;
  gap: 0;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 0 0 25px;
  color: #789087;
}

.guide-steps li::after {
  content: "";
  position: absolute;
  top: 31px;
  left: 15px;
  width: 1px;
  height: calc(100% - 27px);
  background: rgba(255, 255, 255, 0.1);
}

.guide-steps li:last-child::after {
  display: none;
}

.guide-steps li > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
}

.guide-steps strong,
.guide-steps small {
  display: block;
}

.guide-steps strong {
  color: #b6c5be;
  font-size: 0.78rem;
}

.guide-steps small {
  margin-top: 3px;
  color: #748a81;
  font-size: 0.68rem;
}

.guide-steps li.active > span,
.guide-steps li.complete > span {
  border-color: rgba(217, 183, 125, 0.7);
  background: rgba(199, 142, 59, 0.16);
  color: #e6c792;
}

.guide-steps li.active strong,
.guide-steps li.complete strong {
  color: #fff;
}

.guide-note {
  position: absolute;
  right: 42px;
  bottom: 42px;
  left: 42px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-note > span {
  color: #dab675;
  font-size: 1.2rem;
}

.guide-note p {
  margin: 0;
  color: #8da097;
  font-size: 0.68rem;
  line-height: 1.5;
}

.guide-note strong {
  display: block;
  margin-bottom: 3px;
  color: #d7e0dc;
}

.settings-layout {
  min-height: calc(100vh - 168px);
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.45fr);
  overflow: hidden;
  border: 1px solid var(--p-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--p-shadow-sm);
}

.settings-intro {
  position: relative;
  padding: 54px 42px;
  border-right: 1px solid var(--p-line);
  background:
    radial-gradient(circle at -10% 100%, rgba(199, 142, 59, 0.12), transparent 18rem),
    #f6f4ed;
}

.settings-number {
  margin-bottom: 40px;
}

.settings-intro p {
  color: #68736d;
  line-height: 1.65;
}

.settings-aside-note {
  position: absolute;
  right: 42px;
  bottom: 42px;
  left: 42px;
  padding: 16px 0 0;
  border-top: 1px solid #d9d5c9;
  color: #777d76;
  font-size: 0.72rem;
  line-height: 1.55;
}

.settings-aside-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--p-ink);
}

.settings-card,
.guided-surface .settings-card {
  max-width: none;
  margin: 0;
  padding: 54px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.settings-card .wizard-copy h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.7rem;
}

/* --------------------------------------------------------------------------
   Dashboards, cards and operations tables
   -------------------------------------------------------------------------- */

.metric-grid {
  gap: 12px;
  margin-bottom: 22px;
}

.metric-card {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: none;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 2px;
  background: #b1c4bb;
}

.metric-card.attention::before {
  background: var(--p-gold);
}

.metric-card.success::before {
  background: var(--p-forest);
}

.metric-card::after {
  right: 18px;
  bottom: 18px;
  width: 32px;
  height: 32px;
  border: 1px solid #dfe7e3;
  background: transparent;
}

.metric-card.attention::after {
  border-color: #ead9bb;
  background: transparent;
}

.metric-card.success::after {
  border-color: #c7ddd3;
  background: transparent;
}

.metric-label {
  color: #78827d;
  font-size: 0.63rem;
  letter-spacing: 0.105em;
}

.metric-value {
  margin-top: 10px;
  font-family: "Newsreader", Georgia, serif;
  color: var(--p-ink);
  font-size: 2rem;
  font-weight: 600;
}

.metric-note {
  color: #858b86;
  font-size: 0.68rem;
}

.ops-panel,
.workbench-card,
.taxpayer-panel,
.filing-detail-card {
  border-color: var(--p-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--p-shadow-sm);
}

.ops-panel-head,
.taxpayer-panel-header,
.filing-detail-header {
  padding: 19px 22px;
  border-bottom-color: var(--p-line);
  background: rgba(255, 255, 255, 0.78);
}

.ops-panel-head h2,
.taxpayer-panel-header h2 {
  color: var(--p-ink);
  font-size: 0.97rem;
}

.filter-field {
  border-color: #cfcec5;
  background: #fbfaf7;
}

.table th {
  height: 42px;
  color: #6c7771;
  background: #f5f3ed;
}

.table th,
.table td {
  border-bottom-color: #e5e2d9;
}

.table tbody tr:hover {
  background: #f8f7f2;
}

.table .btn-primary {
  box-shadow: none;
}

.status-badge,
.pill,
.status-select {
  border-radius: 20px;
}

.status-badge.pending,
.status-select.pending {
  border-color: #e5c998;
  background: var(--p-gold-soft);
  color: #8d5a13;
}

.status-badge.submitted,
.status-select.completed {
  border-color: #bad7ca;
  background: var(--p-success-soft);
  color: var(--p-success);
}

.status-badge.default,
.pill {
  border-color: #c8d9d1;
  background: #edf4f0;
  color: var(--p-forest);
}

.status-badge.blocked,
.status-select.hold {
  border-color: #e6bcb6;
  background: var(--p-danger-soft);
  color: var(--p-danger);
}

.taxpayer-dashboard-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.65fr);
  gap: 18px;
}

.taxpayer-button {
  min-height: 82px;
  padding: 15px 21px;
}

.taxpayer-button:hover {
  background: #f7f6f1;
}

.taxpayer-button.active {
  background: linear-gradient(90deg, #edf4f0 0%, #fff 58%);
  box-shadow: inset 3px 0 0 var(--p-forest);
}

.taxpayer-button.active .taxpayer-main strong {
  color: var(--p-forest);
}

.action-panel {
  border-color: #c8d5cf;
  border-radius: 14px;
  box-shadow: var(--p-shadow-sm);
}

.action-panel-head {
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(199, 142, 59, 0.2), transparent 12rem),
    var(--p-ink-2);
}

.action-panel-head span {
  color: #a4bbb0;
}

.action-panel-body {
  padding: 20px;
}

.action-list li {
  border-bottom-color: var(--p-line);
}

.action-list b {
  background: var(--p-forest-soft);
  color: var(--p-forest);
}

.progress-step::before {
  border-color: #d7d8d1;
}

.progress-step::after {
  background: #dddcd5;
}

.progress-step.done::before,
.progress-step.active::before {
  border-color: var(--p-forest);
  background: var(--p-forest);
}

.progress-step.done::after,
.progress-step.active::after {
  background: var(--p-forest);
}

/* --------------------------------------------------------------------------
   Filing detail, documents and messages
   -------------------------------------------------------------------------- */

.filing-context-bar {
  padding-bottom: 2px;
}

.filing-detail-avatar {
  border-radius: 12px 12px 12px 3px;
  background: var(--p-ink-2);
}

.filing-detail-name {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.filing-tabs {
  border-bottom-color: var(--p-line);
  background: #f5f3ed;
}

.filing-tab.active {
  border-bottom-color: var(--p-forest);
  color: var(--p-forest);
}

.filing-tab-body {
  padding: 24px;
}

.filing-next-action {
  border-color: #d3d9d4;
  background: linear-gradient(155deg, #f3f6f2 0%, #fff 72%);
}

.filing-next-action h3 {
  font-family: "Newsreader", Georgia, serif;
  color: var(--p-ink);
  font-size: 1.2rem;
  font-weight: 600;
}

.filing-next-action .status-control-note {
  margin-top: 8px;
  color: #7b857f;
  font-size: 0.66rem;
  line-height: 1.45;
}

.filing-next-links {
  border-top-color: var(--p-line);
}

.filing-next-links button {
  border-bottom-color: var(--p-line);
  color: var(--p-forest);
}

.filing-doc-row {
  border-color: var(--p-line);
  background: #fff;
}

.filing-doc-row:hover {
  border-color: #b7c9c0;
  box-shadow: var(--p-shadow-sm);
}

.message-thread {
  border-color: var(--p-line);
  background:
    radial-gradient(circle at 20% 10%, rgba(11, 93, 75, 0.045), transparent 18rem),
    #f1efe8;
}

.chat-start .chat-bubble {
  background: #fff;
}

.chat-end .chat-bubble {
  background: #dfeee7;
}

.chat-input-area {
  border-top-color: var(--p-line);
  background: #f5f3ed !important;
}

.chat-send-btn {
  background: var(--p-forest);
}

.chat-send-btn:hover {
  background: #084e40;
}

.empty-state {
  background: #f7f5ef;
}

.empty-state-icon {
  background: var(--p-forest-soft);
  color: var(--p-forest);
}

/* Admin refinements */
.admin-main .workbench-card {
  border-color: var(--p-line);
}

[data-admin-panel][hidden] {
  display: none !important;
}

.settings-focus {
  margin: -6px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(199, 142, 59, 0.1);
  box-shadow: 0 0 0 1px rgba(199, 142, 59, 0.24);
}

.admin-main .workbench-head {
  border-bottom-color: var(--p-line);
}

.admin-main .wizard-copy h2 {
  color: var(--p-ink);
}

.admin-main #add-ca-panel:not(:empty) {
  border-color: #c9d8d1;
  background: #f2f7f4;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .role-shell > .topbar {
    width: 218px;
  }

  .role-shell > .workbench-shell,
  .role-shell > .admin-shell {
    width: calc(100% - 218px);
    margin-left: 218px;
  }

  .onboarding-card {
    padding: 46px 38px;
  }

  .premium-form {
    padding-left: 0;
  }
}

@media (max-width: 960px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .auth-intro {
    max-width: none;
  }

  .auth-card {
    max-width: 620px;
  }

  .app-frame {
    display: block;
  }

  .side-rail,
  .role-shell > .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    height: 76px;
    min-height: 76px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 10px 18px;
  }

  .side-rail::after,
  .role-shell > .topbar::after,
  .rail-label,
  .rail-assurance,
  .rail-footer,
  .role-shell > .topbar .topbar-user {
    display: none;
  }

  .rail-brand {
    flex-shrink: 0;
  }

  .rail-brand small,
  .role-shell > .topbar .brand-copy span {
    display: none;
  }

  .rail-nav {
    display: flex;
    gap: 3px;
    margin-left: auto;
  }

  .rail-link {
    width: auto;
    min-height: 40px;
    padding-inline: 10px;
  }

  .rail-icon {
    display: none;
  }

  .role-shell > .topbar .topbar-inner {
    height: 56px;
    flex-direction: row;
    align-items: center;
    padding: 0;
  }

  .role-shell > .topbar .topbar-nav {
    width: auto;
    display: flex;
    margin: 0 0 0 auto;
  }

  .role-shell > .topbar .topbar-nav a {
    width: auto;
    min-height: 40px;
    padding-inline: 10px;
  }

  .role-shell > .topbar .topbar-actions {
    width: auto;
    display: flex;
    margin: 0;
  }

  .role-shell > .topbar .profile-pill {
    display: none !important;
  }

  .role-shell > .workbench-shell,
  .role-shell > .admin-shell {
    width: 100%;
    margin-left: 0;
  }

  .app-toolbar {
    height: 64px;
    padding-inline: 22px;
  }

  .onboarding-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .onboarding-guide {
    min-height: 520px;
  }

  .settings-intro {
    min-height: 340px;
    border-right: 0;
    border-bottom: 1px solid var(--p-line);
  }
}

@media (max-width: 720px) {
  .page-shell:not(.workspace-body) .topbar-inner {
    height: 68px;
    padding-inline: 18px;
  }

  .auth-shell {
    padding: 36px 18px 48px;
  }

  .auth-intro h1 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .feature-chip {
    min-height: auto;
  }

  .auth-card {
    padding: 28px 23px;
  }

  .side-rail,
  .role-shell > .topbar {
    overflow-x: auto;
  }

  .rail-brand span:last-child,
  .role-shell > .topbar .brand-copy {
    display: none;
  }

  .rail-nav,
  .role-shell > .topbar .topbar-nav {
    flex: 1;
    justify-content: flex-end;
  }

  .rail-link,
  .role-shell > .topbar .topbar-nav a {
    font-size: 0.72rem;
  }

  .app-toolbar .topbar-user {
    display: none;
  }

  .portal-shell,
  .workbench-shell,
  .role-shell > .workbench-shell,
  .role-shell > .admin-shell {
    padding: 24px 16px 42px;
  }

  .onboarding-card,
  .settings-card,
  .guided-surface .settings-card {
    padding: 30px 22px;
  }

  .onboarding-heading {
    grid-template-columns: 1fr;
  }

  .premium-form {
    margin-top: 30px;
  }

  .premium-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .premium-form-actions .btn-primary {
    width: 100%;
  }

  .onboarding-guide {
    min-height: 560px;
    padding: 34px 24px;
  }

  .guide-note {
    right: 24px;
    bottom: 28px;
    left: 24px;
  }

  .settings-intro {
    min-height: 390px;
    padding: 34px 24px;
  }

  .settings-aside-note {
    right: 24px;
    bottom: 28px;
    left: 24px;
  }

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

  .taxpayer-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .rail-link:nth-child(2),
  .role-shell > .topbar .topbar-nav a:nth-child(n + 3) {
    display: inline-flex !important;
  }

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

  .metric-card {
    min-height: 104px;
  }
}
