@font-face {
  font-family: "WiseParent Sans";
  src: url("/assets/wiseparent-regular.ttf?v=4e147ab6") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "WiseParent Display";
  src: url("/assets/wiseparent-medium.ttf?v=9d0d55a3") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

:root {
  color-scheme: light;
  --brand-apricot: #f18742;
  --brand-coral: #f15b2a;
  --brand-coral-dark: #cb431d;
  --brand-peach: #ffe4d1;
  --brand-pale: #fff3e8;
  --brand-magenta: #ff22a7;
  --brand-orange: #fea524;
  --ink-950: #1e1b18;
  --ink-900: #1f1b16;
  --ink-800: #3f3731;
  --ink-700: #514841;
  --ink-600: #6b615a;
  --ink-500: #857870;
  --ink-400: #a5978e;
  --line-strong: #d8cbc0;
  --line: #eadfd5;
  --line-soft: #f2e9e1;
  --canvas: #fff8f2;
  --surface-soft: #fff1e6;
  --surface: #ffffff;
  --success-800: #176e39;
  --success-100: #dff4e5;
  --success-50: #f0faf3;
  --warning-800: #87510d;
  --warning-100: #ffe9be;
  --warning-50: #fff8e9;
  --danger-800: #a6382c;
  --danger-700: #c64839;
  --danger-100: #fbd9d4;
  --danger-50: #fff2ef;
  --info-800: #315b83;
  --info-100: #dbe9f6;
  --shadow-xs: 0 1px 2px rgb(54 39 27 / 4%);
  --shadow-sm: 0 1px 2px rgb(54 39 27 / 5%), 0 8px 24px rgb(78 54 35 / 5%);
  --shadow-md: 0 18px 50px rgb(54 39 27 / 10%);
  --shadow-lg: 0 30px 90px rgb(29 22 18 / 24%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --sidebar-width: 268px;
  --font-body: "WiseParent Sans", "Roboto", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "WiseParent Display", "Roboto", ui-rounded, system-ui, sans-serif;
  --font-data: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-900);
  background:
    linear-gradient(135deg, rgb(241 135 66 / 2.5%) 0, transparent 38%),
    var(--canvas);
}

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

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong,
.metric-value {
  font-family: var(--font-display);
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 14px;
  padding: 11px 16px;
  color: var(--surface);
  background: var(--ink-950);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #d7471f;
  outline-offset: 3px;
}

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 28px 20px 22px;
  overflow: hidden;
  flex-direction: column;
  color: #fff9f3;
  background:
    radial-gradient(circle at 10% 0%, rgb(241 135 66 / 18%), transparent 30%),
    radial-gradient(circle at 110% 72%, rgb(255 34 167 / 9%), transparent 30%),
    var(--ink-950);
  border-right: 1px solid rgb(255 255 255 / 5%);
}

.sidebar::before {
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -104px;
  width: 220px;
  height: 220px;
  border: 32px solid rgb(241 135 66 / 7%);
  border-right-color: rgb(255 34 167 / 10%);
  border-radius: 50%;
  content: "";
  transform: rotate(28deg);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  background: #ffffff;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

.brand-mark img {
  width: 72px;
  max-width: none;
  height: 72px;
  object-fit: contain;
}

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

.brand strong {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: #c9bbb0;
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 7px;
  margin-top: 46px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  align-items: center;
  gap: 12px;
  color: #c8bbb1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.nav-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -9px;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-orange), var(--brand-magenta));
  border-radius: 999px;
  content: "";
  opacity: 0;
  transform: scaleY(0.45);
  transition: opacity 150ms ease, transform 150ms ease;
}

.nav-item:hover {
  color: #ffffff;
  background: rgb(255 255 255 / 5%);
}

.nav-item.is-active {
  color: #ffffff;
  background: rgb(255 248 242 / 10%);
  border-color: rgb(255 255 255 / 7%);
}

.nav-item.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #9c8e83;
  border-radius: 9px;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item.is-active .nav-icon {
  color: #ffcda8;
  background: rgb(241 135 66 / 13%);
}

.sidebar-footer {
  margin-top: auto;
  padding: 17px 12px 2px;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.sidebar-footer p {
  margin: 9px 0 0;
  color: #9f9187;
  font-size: 0.73rem;
  line-height: 1.5;
}

.environment-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e7ddd5;
  font-size: 0.76rem;
  font-weight: 500;
}

.environment-badge > span,
.data-scope > span,
.login-footer > span {
  position: relative;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #55bf77;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(85 191 119 / 12%);
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  min-height: 92px;
  padding: 17px clamp(24px, 4vw, 58px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgb(255 248 242 / 88%);
  border-bottom: 1px solid rgb(234 223 213 / 80%);
  backdrop-filter: blur(18px) saturate(120%);
}

.eyebrow {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  gap: 7px;
  color: var(--brand-coral-dark);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-magenta));
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgb(241 135 66 / 11%);
}

.admin-menu {
  display: flex;
  align-items: center;
  gap: 11px;
}

.admin-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-900);
  background: linear-gradient(145deg, #ffe7d5, #fff4eb);
  border: 1px solid #f0d1ba;
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-identity {
  max-width: 250px;
  margin-right: 5px;
}

.admin-identity small,
.admin-identity strong {
  display: block;
}

.admin-identity small {
  color: var(--ink-600);
  font-size: 0.72rem;
}

.admin-identity strong {
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#main-content {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 42px clamp(24px, 4vw, 58px) 78px;
}

.view:not([hidden]) {
  animation: view-enter 280ms ease-out both;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-status {
  position: relative;
  margin-bottom: 24px;
  padding: 13px 16px 13px 44px;
  color: var(--ink-800);
  background: var(--brand-pale);
  border: 1px solid #f3d9c4;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  font-size: 0.86rem;
}

.page-status::before {
  position: absolute;
  top: 50%;
  left: 16px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  background: var(--brand-coral-dark);
  border: 5px solid var(--brand-peach);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.page-status.is-error {
  color: var(--danger-800);
  background: var(--danger-50);
  border-color: var(--danger-100);
}

.section-heading {
  display: flex;
  margin-bottom: 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.section-heading-copy,
.section-heading > div:first-child {
  min-width: 0;
}

.section-heading p:not(.eyebrow),
.modal-header p:not(.eyebrow),
.login-card-heading p,
.login-intro-copy p {
  margin-bottom: 0;
  color: var(--ink-600);
}

.section-heading p:not(.eyebrow) {
  font-size: 0.93rem;
}

.overview-heading {
  position: relative;
  margin-bottom: 26px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.overview-heading::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 92px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-magenta));
  border-radius: 999px;
  content: "";
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-scope {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  color: var(--ink-600);
  background: rgb(255 255 255 / 56%);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
}

.data-scope > span {
  width: 7px;
  height: 7px;
}

.button,
.icon-button,
.text-button,
.quick-action,
.table-action {
  appearance: none;
}

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button[aria-busy="true"] svg {
  animation: spin 750ms linear infinite;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  color: #ffffff;
  background: var(--brand-coral-dark);
  border-color: var(--brand-coral-dark);
  box-shadow: 0 8px 20px rgb(241 91 42 / 17%);
}

.button-primary:hover:not(:disabled) {
  background: #a83214;
  border-color: #a83214;
  box-shadow: 0 10px 24px rgb(203 67 29 / 20%);
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--ink-800);
  background: rgb(255 255 255 / 84%);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  color: var(--ink-900);
  background: var(--surface);
  border-color: #cbb9ac;
}

.button-quiet {
  color: var(--ink-600);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.button-danger {
  color: #ffffff;
  background: var(--danger-700);
  border-color: var(--danger-700);
  box-shadow: 0 8px 20px rgb(198 72 57 / 16%);
}

.button-danger:hover:not(:disabled) {
  background: var(--danger-800);
  border-color: var(--danger-800);
}

.button-full {
  width: 100%;
}

.text-button {
  min-height: 40px;
  padding: 8px 5px;
  color: var(--brand-coral-dark);
  background: transparent;
  border: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
}

.text-button:hover {
  color: var(--ink-900);
}

.text-button::after {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 2px 1px 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform 140ms ease;
}

.text-button:hover::after {
  transform: translateX(2px) rotate(-45deg);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-600);
  background: var(--brand-pale);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1.45rem;
  line-height: 1;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.icon-button:hover {
  color: var(--ink-900);
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.metric-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: 1.18fr repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  position: relative;
  display: flex;
  min-height: 184px;
  padding: 21px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  position: absolute;
  right: -26px;
  bottom: -31px;
  width: 78px;
  height: 78px;
  background: var(--brand-pale);
  border-radius: 50%;
  content: "";
}

.metric-accent {
  color: #fffaf5;
  background: linear-gradient(145deg, #302821 0%, var(--ink-950) 76%);
  border-color: rgb(255 255 255 / 5%);
}

.metric-accent::before,
.metric-accent::after {
  position: absolute;
  border-style: solid;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.metric-accent::before {
  right: -96px;
  bottom: -170px;
  width: 255px;
  height: 310px;
  border-width: 27px;
  border-color: var(--brand-orange) var(--brand-coral) var(--brand-magenta) transparent;
  opacity: 0.84;
  transform: rotate(24deg);
}

.metric-accent::after {
  right: -42px;
  bottom: -144px;
  width: 175px;
  height: 245px;
  background: transparent;
  border-width: 18px;
  border-color: rgb(255 153 42 / 45%) transparent rgb(255 34 167 / 45%) transparent;
  opacity: 1;
  transform: rotate(28deg);
}

.metric-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.metric-label,
.metric-value,
.metric-note {
  position: relative;
  z-index: 2;
  display: block;
}

.metric-label {
  max-width: 170px;
  color: var(--ink-600);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.metric-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-coral-dark);
  background: var(--brand-pale);
  border: 1px solid #f5dfce;
  border-radius: 11px;
}

.metric-glyph svg {
  width: 17px;
  height: 17px;
}

.metric-glyph-success {
  color: var(--success-800);
  background: var(--success-50);
  border-color: var(--success-100);
}

.metric-accent .metric-label,
.metric-accent .metric-note {
  color: #d8c9bd;
}

.metric-accent .metric-glyph {
  color: #ffd8bc;
  background: rgb(255 255 255 / 8%);
  border-color: rgb(255 255 255 / 10%);
}

.metric-value {
  margin: 22px 0 10px;
  font-size: clamp(2rem, 3.7vw, 2.7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  white-space: nowrap;
}

.metric-value.metric-value-compact {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.metric-note {
  max-width: 220px;
  color: var(--ink-600);
  font-size: 0.77rem;
  line-height: 1.4;
}

.overview-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.25fr);
  gap: 18px;
}

.panel {
  overflow: hidden;
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  min-height: 76px;
  padding: 19px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-heading h3,
.panel-heading p {
  margin-bottom: 0;
}

.panel-heading .eyebrow {
  margin-bottom: 5px;
}

.quick-actions {
  display: grid;
  padding: 9px;
  gap: 5px;
}

.quick-action {
  display: grid;
  width: 100%;
  min-height: 74px;
  padding: 11px 12px;
  align-items: center;
  grid-template-columns: 40px minmax(0, 1fr) 26px;
  gap: 12px;
  color: var(--ink-900);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: left;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.quick-action:hover {
  background: var(--brand-pale);
  border-color: #f6e2d2;
  transform: translateX(2px);
}

.quick-action-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--brand-coral-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.quick-action-icon svg {
  width: 18px;
  height: 18px;
}

.quick-action-copy,
.quick-action-copy strong,
.quick-action-copy > span {
  display: block;
}

.quick-action-copy strong {
  margin-bottom: 3px;
  font-size: 0.88rem;
  font-weight: 700;
}

.quick-action-copy > span {
  color: var(--ink-600);
  font-size: 0.77rem;
  line-height: 1.4;
}

.quick-action-arrow {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--brand-coral-dark);
  font-family: var(--font-display);
  font-size: 1rem;
  transition: transform 140ms ease;
}

.quick-action:hover .quick-action-arrow {
  transform: translateX(3px);
}

.compact-list {
  min-height: 122px;
  padding: 6px 20px;
}

.compact-item {
  display: grid;
  min-height: 66px;
  padding: 13px 1px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.compact-item:last-child {
  border-bottom: 0;
}

.compact-item strong,
.compact-item span,
.compact-item small {
  display: block;
}

.compact-item strong {
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item span,
.compact-item small,
.empty-copy {
  color: var(--ink-600);
  font-size: 0.76rem;
}

.compact-item span {
  margin-top: 2px;
}

.compact-amount {
  text-align: right;
}

.compact-amount strong {
  margin-bottom: 2px;
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

.empty-copy {
  margin: 24px 0;
  text-align: center;
}

.search-bar {
  padding: 20px 22px;
  background: linear-gradient(180deg, rgb(255 243 232 / 52%), transparent);
  border-bottom: 1px solid var(--line-soft);
}

.search-bar > label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-800);
  font-family: var(--font-display);
  font-size: 0.79rem;
  font-weight: 700;
}

.search-controls {
  display: flex;
  gap: 9px;
}

.search-controls input {
  min-width: 180px;
  flex: 1;
}

.field {
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-800);
  font-family: var(--font-display);
  font-size: 0.79rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink-900);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgb(54 39 27 / 3%);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #776a61;
  opacity: 1;
}

textarea {
  min-height: 88px;
  line-height: 1.5;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #baa99d;
}

input:focus,
select:focus,
textarea:focus {
  background: #fffdfa;
  border-color: var(--brand-coral-dark);
  outline: 2px solid #d7471f;
  outline-offset: 1px;
  box-shadow: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger-700);
}

.field-help {
  display: block;
  margin-top: 7px;
  color: var(--ink-600);
  font-size: 0.75rem;
  line-height: 1.45;
}

.optional {
  color: var(--ink-500);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
}

.field-checkbox {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 10px;
}

.field-checkbox input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand-coral);
}

.field-checkbox label {
  margin: 0;
  line-height: 1.4;
}

.align-end {
  align-content: center;
  padding-top: 23px;
}

.table-wrap {
  position: relative;
  width: 100%;
  max-height: min(68vh, 780px);
  overflow: auto;
  scrollbar-color: #d7c9bf transparent;
  scrollbar-width: thin;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

th,
td {
  padding: 14px 17px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: var(--ink-600);
  background: #fffaf5;
  box-shadow: 0 1px 0 var(--line-soft);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr {
  transition: background-color 120ms ease;
}

tbody tr:hover {
  background: #fffaf6;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td {
  color: var(--ink-700);
  background: transparent;
}

.cell-primary,
.cell-secondary {
  display: block;
}

.cell-primary {
  max-width: 320px;
  overflow: hidden;
  color: var(--ink-900);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-secondary {
  max-width: 320px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td:nth-last-child(1) .cell-primary {
  font-family: var(--font-data);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.table-action {
  min-height: 38px;
  padding: 7px 12px;
  color: var(--brand-coral-dark);
  background: var(--brand-pale);
  border: 1px solid #f3d9c4;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.table-action:hover {
  color: #ffffff;
  background: var(--brand-coral-dark);
  border-color: var(--brand-coral-dark);
}

.table-empty {
  padding: 58px 20px;
  color: var(--ink-600);
  text-align: center;
}

.table-empty::before {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  place-items: center;
  background: var(--brand-pale);
  border: 1px solid #f3dac7;
  border-radius: 13px;
  box-shadow: inset 0 0 0 10px var(--surface), inset 0 0 0 12px var(--brand-apricot);
  content: "";
}

.table-empty strong,
.table-empty span {
  display: block;
}

.table-empty strong {
  margin-bottom: 5px;
  color: var(--ink-800);
  font-size: 0.9rem;
}

.table-empty span {
  font-size: 0.8rem;
}

.table-footer {
  display: flex;
  min-height: 62px;
  padding: 10px 17px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--ink-600);
  background: #fffdfa;
  border-top: 1px solid var(--line-soft);
  font-size: 0.76rem;
}

.badge {
  display: inline-flex;
  max-width: 190px;
  min-height: 26px;
  padding: 5px 9px;
  align-items: center;
  overflow: hidden;
  color: var(--ink-700);
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.7;
}

.badge-success {
  color: var(--success-800);
  background: var(--success-100);
  border-color: rgb(23 110 57 / 9%);
}

.badge-warning {
  color: var(--warning-800);
  background: var(--warning-100);
  border-color: rgb(135 81 13 / 9%);
}

.badge-danger {
  color: var(--danger-800);
  background: var(--danger-100);
  border-color: rgb(166 56 44 / 9%);
}

.badge-info {
  color: var(--info-800);
  background: var(--info-100);
  border-color: rgb(49 91 131 / 9%);
}

.drawer-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgb(30 27 24 / 58%);
  border: 0;
  cursor: default;
  backdrop-filter: blur(4px);
  animation: fade-in 180ms ease-out both;
}

.drawer {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: min(620px, 100%);
  height: 100%;
  overflow-y: auto;
  color: var(--ink-900);
  background: var(--canvas);
  box-shadow: var(--shadow-lg);
  animation: drawer-in 260ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawer-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header,
.modal-header {
  display: flex;
  padding: 24px 27px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: rgb(255 248 242 / 94%);
  backdrop-filter: blur(16px);
}

.drawer-header::after {
  position: absolute;
  right: 78px;
  bottom: -1px;
  left: 27px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-apricot), transparent 45%);
  content: "";
}

.drawer-header h2,
.drawer-header p,
.modal-header h2,
.modal-header p {
  margin-bottom: 0;
}

#drawer-subtitle {
  max-width: 440px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-body {
  padding: 26px 27px 66px;
}

.loading-block {
  padding: 64px 20px;
  color: var(--ink-600);
  text-align: center;
}

.loading-block::before {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 13px;
  border: 3px solid var(--brand-peach);
  border-top-color: var(--brand-coral);
  border-radius: 50%;
  content: "";
  animation: spin 750ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.subsection-heading {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.subsection-heading h3,
.subsection-heading p {
  margin-bottom: 0;
}

.detail-grid {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
}

.detail-item {
  min-width: 0;
  padding: 14px 15px;
  background: var(--surface);
}

.detail-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.detail-item dt {
  margin-bottom: 4px;
  color: var(--ink-600);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 500;
}

.drawer-section {
  margin-top: 32px;
  padding-top: 29px;
  border-top: 1px solid var(--line);
}

.drawer-section .compact-list {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.drawer-section .compact-item {
  padding-right: 14px;
  padding-left: 14px;
}

.action-console {
  padding: 24px;
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.action-console > .subsection-heading {
  margin: -24px -24px 22px;
  padding: 20px 24px 17px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.action-description {
  margin: -4px 0 18px;
  padding: 11px 13px;
  color: var(--ink-700);
  background: var(--brand-pale);
  border: 1px solid #f3ddcc;
  border-left: 3px solid var(--brand-apricot);
  border-radius: 5px 10px 10px 5px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.capability-notes {
  margin: -7px 0 18px;
  padding: 12px 14px;
  color: var(--warning-800);
  background: var(--warning-50);
  border: 1px solid var(--warning-100);
  border-radius: 10px;
  font-size: 0.76rem;
}

.capability-notes p {
  margin: 0 0 7px;
}

.capability-notes p:last-child {
  margin-bottom: 0;
}

.warning-box,
.danger-box {
  margin-bottom: 17px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.warning-box {
  color: var(--warning-800);
  background: var(--warning-50);
  border-color: var(--warning-100);
}

.danger-box {
  color: var(--danger-800);
  background: var(--danger-50);
  border-color: var(--danger-100);
}

.confirmation-block {
  margin: 21px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.confirmation-block .field:last-child {
  margin-bottom: 0;
}

.confirmation-block strong {
  color: var(--danger-800);
}

.form-message {
  margin-bottom: 17px;
  padding: 11px 13px;
  color: var(--success-800);
  background: var(--success-50);
  border: 1px solid var(--success-100);
  border-radius: 10px;
  font-size: 0.79rem;
  line-height: 1.45;
}

.form-message.is-error {
  color: var(--danger-800);
  background: var(--danger-50);
  border-color: var(--danger-100);
}

body.drawer-open {
  overflow: hidden;
}

.modal {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  color: var(--ink-900);
  background: var(--canvas);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal[open] {
  animation: modal-in 220ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal::backdrop {
  background: rgb(30 27 24 / 62%);
  backdrop-filter: blur(4px);
}

.modal-header {
  position: relative;
  background: linear-gradient(135deg, var(--surface-soft), var(--canvas));
}

.modal-header::after {
  position: absolute;
  right: 80px;
  bottom: -1px;
  left: 27px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-apricot), transparent 48%);
  content: "";
}

.modal-body {
  padding: 24px 27px 6px;
}

.modal-footer {
  display: flex;
  padding: 18px 27px 24px;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.review-checkbox {
  margin-top: 23px;
  padding: 14px;
  background: var(--brand-pale);
  border: 1px solid #f3d9c4;
  border-radius: 10px;
}

.toast-region {
  position: fixed;
  z-index: 250;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(400px, calc(100% - 40px));
  gap: 9px;
}

.toast {
  padding: 14px 16px;
  color: #ffffff;
  background: var(--ink-900);
  border: 1px solid rgb(255 255 255 / 10%);
  border-left: 3px solid var(--brand-apricot);
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 500;
  animation: toast-in 180ms ease-out both;
}

.toast.is-error {
  background: var(--danger-800);
  border-left-color: #ffc1b9;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Login */
.login-page {
  background: #f7eee6;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(460px, 1.05fr) minmax(440px, 0.95fr);
}

.login-intro {
  position: relative;
  display: flex;
  min-height: 100%;
  padding: clamp(34px, 5vw, 70px);
  overflow: hidden;
  flex-direction: column;
  isolation: isolate;
  color: #fffaf5;
  background:
    radial-gradient(circle at 4% 4%, rgb(241 135 66 / 15%), transparent 29%),
    linear-gradient(145deg, #2a231e, var(--ink-950));
}

.login-intro::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 2.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2.5%) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.brand-login {
  z-index: 2;
  align-self: flex-start;
}

.brand-login .brand-mark {
  width: 50px;
  height: 50px;
}

.brand-login .brand-mark img {
  width: 78px;
  height: 78px;
}

.login-intro-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: auto 0;
  padding: 86px 0;
}

.login-intro-copy .eyebrow {
  color: #ffbc8e;
}

.login-intro-copy h1 {
  max-width: 620px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.login-intro-copy p:not(.eyebrow) {
  max-width: 510px;
  color: #cdbfb5;
  font-size: 1rem;
  line-height: 1.65;
}

.login-ribbon {
  position: absolute;
  z-index: -1;
  right: -11%;
  bottom: -15%;
  width: min(55vw, 660px);
  height: min(68vw, 760px);
  opacity: 0.58;
  transform: rotate(6deg);
}

.ribbon-line {
  position: absolute;
  bottom: -23%;
  display: block;
  border-style: solid;
  border-color: transparent var(--brand-orange) var(--brand-magenta) transparent;
  border-radius: 50%;
}

.ribbon-line-one {
  right: -3%;
  width: 68%;
  height: 92%;
  border-width: clamp(34px, 5vw, 68px);
  transform: rotate(18deg);
}

.ribbon-line-two {
  right: 39%;
  width: 54%;
  height: 75%;
  border-width: clamp(25px, 4vw, 54px);
  opacity: 0.88;
  transform: rotate(14deg);
}

.ribbon-orb {
  position: absolute;
  display: block;
  width: clamp(34px, 4.5vw, 62px);
  height: clamp(55px, 7vw, 90px);
  background: linear-gradient(180deg, var(--brand-orange), var(--brand-magenta));
  border-radius: 999px;
}

.ribbon-orb-one {
  top: 15%;
  right: 23%;
}

.ribbon-orb-two {
  top: 28%;
  right: 67%;
  transform: scale(0.83);
}

.security-points {
  position: relative;
  z-index: 2;
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 10px;
  color: #d0c3ba;
  font-size: 0.75rem;
  list-style: none;
}

.security-points li {
  display: inline-flex;
  min-height: 38px;
  padding: 8px 11px 8px 9px;
  align-items: center;
  gap: 8px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}

.security-points li > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffc59c;
  background: rgb(241 135 66 / 12%);
  border-radius: 7px;
}

.security-points svg {
  width: 13px;
  height: 13px;
}

.login-panel {
  position: relative;
  display: grid;
  min-height: 100%;
  padding: 42px clamp(28px, 7vw, 100px);
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at 100% 0%, rgb(255 228 209 / 75%), transparent 32%),
    var(--canvas);
}

.login-card {
  width: min(100%, 462px);
  padding: clamp(30px, 5vw, 45px);
  background: rgb(255 255 255 / 90%);
  border: 1px solid rgb(234 223 213 / 92%);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgb(73 48 31 / 11%);
  backdrop-filter: blur(12px);
  animation: login-card-enter 420ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
}

@keyframes login-card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card-heading {
  margin-bottom: 29px;
}

.login-card-heading .eyebrow {
  margin-bottom: 10px;
}

.login-card-heading h2 {
  font-size: 2.05rem;
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 69px;
}

.password-input button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 54px;
  height: 32px;
  padding: 0 8px;
  color: var(--brand-coral-dark);
  background: var(--brand-pale);
  border: 0;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}

.password-input button:hover {
  background: var(--brand-peach);
}

.login-submit {
  min-height: 48px;
  margin-top: 6px;
}

.login-help {
  margin: 24px 0 0;
  color: var(--ink-600);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

.login-footer {
  display: flex;
  margin: 25px 0 0;
  align-items: center;
  gap: 9px;
  color: var(--ink-600);
  font-size: 0.72rem;
  text-align: center;
}

.login-footer > span {
  width: 7px;
  height: 7px;
}

@media (max-width: 1340px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-accent {
    grid-row: span 1;
  }
}

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .login-layout {
    grid-template-columns: minmax(380px, 0.86fr) minmax(410px, 1.14fr);
  }

  .login-intro-copy h1 {
    font-size: clamp(2.7rem, 5.5vw, 4.15rem);
  }

  .security-points {
    display: grid;
    align-self: flex-start;
  }
}

@media (max-width: 860px) {
  :root {
    --sidebar-width: 100%;
  }

  .sidebar {
    position: relative;
    display: grid;
    width: 100%;
    min-height: auto;
    padding: 13px 17px 10px;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr);
    background:
      radial-gradient(circle at 0 0, rgb(241 135 66 / 15%), transparent 28%),
      var(--ink-950);
  }

  .sidebar::before {
    display: none;
  }

  .sidebar .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 11px;
  }

  .sidebar .brand-mark img {
    width: 62px;
    height: 62px;
  }

  .sidebar .brand strong {
    font-size: 0.92rem;
  }

  .sidebar .brand small {
    font-size: 0.61rem;
  }

  .primary-nav {
    display: flex;
    min-width: 0;
    margin: 0 0 0 22px;
    padding: 2px 0;
    overflow-x: auto;
    gap: 4px;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    width: auto;
    min-height: 40px;
    padding: 5px 10px;
    flex: 0 0 auto;
    gap: 7px;
    font-size: 0.79rem;
  }

  .nav-item::before {
    top: auto;
    right: 12px;
    bottom: -2px;
    left: 12px;
    width: auto;
    height: 2px;
    transform: scaleX(0.45);
  }

  .nav-item.is-active::before {
    transform: scaleX(1);
  }

  .nav-icon {
    width: 26px;
    height: 26px;
  }

  .nav-icon svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    min-height: 78px;
    padding: 12px 18px;
  }

  .topbar > div:first-child .eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 1.32rem;
  }

  .admin-menu {
    min-width: 0;
  }

  .admin-identity {
    min-width: 0;
  }

  .login-layout {
    display: block;
  }

  .login-intro {
    min-height: 210px;
    padding: 24px;
  }

  .login-intro-copy {
    margin: 32px 0 0;
    padding: 0;
  }

  .login-intro-copy .eyebrow,
  .login-intro-copy p:not(.eyebrow),
  .security-points {
    display: none;
  }

  .login-intro-copy h1 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(1.9rem, 7vw, 2.8rem);
    line-height: 1;
  }

  .login-ribbon {
    right: -12%;
    bottom: -70%;
    width: 350px;
    height: 430px;
    opacity: 0.45;
  }

  .login-panel {
    min-height: calc(100vh - 210px);
    padding: 30px 18px;
  }
}

@media (max-width: 660px) {
  #main-content {
    padding: 30px 14px 58px;
  }

  .sidebar {
    display: block;
    padding-bottom: 9px;
  }

  .sidebar .brand {
    margin-left: 2px;
  }

  .primary-nav {
    display: grid;
    margin: 11px 0 0;
    overflow: visible;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    font-size: 0.65rem;
    text-align: center;
  }

  .nav-item::before {
    right: 14px;
    left: 14px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .topbar {
    min-height: 70px;
    padding: 10px 15px;
  }

  .topbar > div:first-child {
    flex: 0 0 auto;
  }

  .admin-avatar {
    display: none;
  }

  .admin-identity {
    max-width: 150px;
  }

  .admin-identity small {
    display: none;
  }

  .admin-identity strong {
    font-size: 0.76rem;
  }

  .admin-menu .button {
    min-height: 39px;
    padding: 8px 11px;
  }

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

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

  .section-heading,
  .overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-heading {
    gap: 19px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .button {
    flex: 1;
  }

  .data-scope {
    display: none;
  }

  .section-heading > .button {
    width: 100%;
  }

  .search-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .search-controls input {
    grid-column: 1 / -1;
  }

  .field-row,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .align-end {
    padding-top: 0;
  }

  .table-wrap {
    max-height: none;
  }

  .panel:has(.table-wrap) {
    position: relative;
  }

  .panel:has(.table-wrap)::after {
    position: absolute;
    z-index: 4;
    top: 0;
    right: 0;
    bottom: 0;
    width: 18px;
    background: linear-gradient(90deg, transparent, rgb(31 27 22 / 5%));
    content: "";
    pointer-events: none;
  }

  .drawer-header,
  .drawer-body,
  .modal-header,
  .modal-body,
  .modal-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .action-console {
    padding: 18px;
  }

  .action-console > .subsection-heading {
    margin: -18px -18px 20px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .modal-footer .button {
    flex: 1;
  }

  .login-card {
    padding: 29px 23px;
  }
}

@media (max-width: 420px) {
  .topbar h1 {
    font-size: 1.12rem;
  }

  .admin-identity {
    display: none;
  }

  .admin-menu {
    margin-left: auto;
  }

  .panel-heading {
    padding: 17px;
  }

  .quick-action {
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    padding-right: 8px;
    padding-left: 8px;
    gap: 10px;
  }

  .quick-action-icon {
    width: 38px;
    height: 38px;
  }

  .login-intro {
    min-height: 188px;
  }

  .login-panel {
    min-height: calc(100vh - 188px);
  }
}

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

@media print {
  .sidebar,
  .topbar,
  .button,
  .drawer-layer,
  .toast-region {
    display: none !important;
  }

  .workspace {
    margin: 0;
  }

  #main-content {
    width: 100%;
    padding: 0;
  }

  .panel,
  .metric-card {
    box-shadow: none;
  }
}
