:root {
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --page: #06192d;
  --page-2: #09233c;
  --sidebar: #04111f;
  --panel: rgba(12, 38, 62, 0.9);
  --panel-solid: #0b263f;
  --panel-soft: #123452;
  --cream: #f4eadc;
  --cream-2: #fff8ec;
  --muted: #b9aa98;
  --muted-2: #7f8fa0;
  --bronze: #c99561;
  --brown: #714a2c;
  --line: rgba(244, 234, 220, 0.14);
  --line-strong: rgba(244, 234, 220, 0.24);
  --success: #76c7a4;
  --warning: #e2b66e;
  --danger: #e48275;
  --info: #82b7e4;
  --shadow: rgba(0, 0, 0, 0.34);
  color-scheme: dark;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    linear-gradient(90deg, rgba(201, 149, 97, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(201, 149, 97, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 16% 10%, rgba(201, 149, 97, 0.18), transparent 30%),
    linear-gradient(135deg, #04111f 0%, var(--page) 52%, #020914 100%);
  background-size: 42px 42px, 42px 42px, auto, auto;
  letter-spacing: 0;
}

body[data-theme="light"] {
  --page: #f7efe5;
  --page-2: #fff8ec;
  --sidebar: #fff8ec;
  --panel: rgba(255, 250, 241, 0.94);
  --panel-solid: #fff8ec;
  --panel-soft: #f1e2cf;
  --cream: #102235;
  --cream-2: #fffaf1;
  --muted: #645a50;
  --muted-2: #817365;
  --bronze: #a36f3e;
  --brown: #714a2c;
  --line: rgba(9, 35, 60, 0.14);
  --line-strong: rgba(9, 35, 60, 0.22);
  --shadow: rgba(48, 27, 13, 0.15);
  color-scheme: light;
  background:
    linear-gradient(90deg, rgba(9, 35, 60, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(9, 35, 60, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 14% 8%, rgba(163, 111, 62, 0.16), transparent 30%),
    linear-gradient(135deg, #fff8ec 0%, #f7efe5 58%, #e8d8c4 100%);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

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

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.35rem;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.08;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--bronze);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--sidebar) 92%, #1a3150 8%);
  box-shadow: 14px 0 48px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .sidebar {
  background: color-mix(in srgb, var(--sidebar) 92%, #e6d1b8 8%);
}

.brand-block {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.brand-block img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  object-fit: contain;
  background: #f8efe3;
}

.brand-block strong,
.brand-block span,
.demo-company strong,
.demo-company span,
.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.brand-block strong {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1;
}

.brand-block span,
.demo-company span,
.sidebar-note span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.demo-company,
.sidebar-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.04);
}

.demo-company strong {
  margin-top: 5px;
  font-size: 0.95rem;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding-right: 3px;
}

.side-nav button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 850;
}

.side-nav button:hover,
.side-nav button.active {
  border-color: var(--line-strong);
  color: var(--cream);
  background: linear-gradient(135deg, rgba(201, 149, 97, 0.18), rgba(244, 234, 220, 0.05));
}

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--bronze);
  font-size: 0.74rem;
  font-weight: 900;
}

.side-nav b,
.notification-button b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #210b08;
  font-size: 0.72rem;
}

.main-area {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 25, 45, 0.86);
  backdrop-filter: blur(16px);
}

body[data-theme="light"] .topbar {
  background: rgba(255, 250, 241, 0.86);
}

body[data-theme="light"] .demo-company,
body[data-theme="light"] .sidebar-note,
body[data-theme="light"] .work-tile,
body[data-theme="light"] .analysis-card,
body[data-theme="light"] .selection-list button,
body[data-theme="light"] .person-card,
body[data-theme="light"] .notification-item,
body[data-theme="light"] .assignment-summary div,
body[data-theme="light"] .definition-list div,
body[data-theme="light"] .timeline-item,
body[data-theme="light"] .signature-demo {
  background: rgba(255, 255, 255, 0.52);
}

.topbar span,
.page-header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.topbar strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.topbar-actions,
.page-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.content-area {
  display: grid;
  gap: 16px;
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  margin-bottom: 4px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.table-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.primary-button {
  color: #071525;
  background: linear-gradient(180deg, var(--cream), var(--bronze));
}

body[data-theme="light"] .primary-button {
  color: #fff8ec;
  background: linear-gradient(180deg, #102235, #714a2c);
}

.secondary-button,
.ghost-button,
.table-button,
.icon-button {
  background: rgba(244, 234, 220, 0.06);
  color: var(--cream);
}

.secondary-button:hover,
.ghost-button:hover,
.table-button:hover,
.icon-button:hover,
.primary-button:hover {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(201, 149, 97, 0.17);
}

.icon-button {
  display: grid;
  width: 40px;
  padding: 0;
  place-items: center;
}

.notification-button {
  position: relative;
}

.notification-button b {
  position: absolute;
  top: -7px;
  right: -7px;
}

.mobile-only {
  display: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card,
.panel,
.analysis-card,
.work-tile,
.person-card,
.selection-list button,
.notification-item,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 50px var(--shadow);
}

.kpi-card {
  display: grid;
  gap: 12px;
  min-height: 118px;
  padding: 16px;
  text-align: left;
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.kpi-card strong {
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1;
}

.kpi-card:hover {
  border-color: var(--bronze);
  background: linear-gradient(135deg, rgba(201, 149, 97, 0.14), rgba(12, 38, 62, 0.94));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.span-2 {
  grid-column: span 2;
}

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

.panel-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.work-grid,
.analysis-grid,
.person-grid,
.settings-grid,
.calendar-grid {
  display: grid;
  gap: 12px;
}

.work-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-tile {
  display: grid;
  gap: 10px;
  min-height: 100px;
  padding: 14px;
  background: rgba(244, 234, 220, 0.05);
}

.work-tile span,
.analysis-card {
  color: var(--muted);
  line-height: 1.55;
}

.work-tile strong {
  font-size: 2rem;
}

.tile-success {
  border-color: rgba(118, 199, 164, 0.34);
}

.tile-warning {
  border-color: rgba(226, 182, 110, 0.36);
}

.tile-info,
.tile-progress {
  border-color: rgba(130, 183, 228, 0.32);
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.bar-row > span:not(.method-pill) {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 234, 220, 0.08);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bronze), var(--cream));
}

.bar-track.sepia span {
  background: linear-gradient(90deg, var(--brown), var(--warning));
}

.analysis-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-card {
  padding: 14px;
  background: rgba(244, 234, 220, 0.05);
  font-size: 0.92rem;
}

.two-column,
.assignment-layout,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(150px, 0.25fr));
  gap: 10px;
  margin-bottom: 14px;
}

.search-field,
.select-field,
.form-stack label,
.form-grid label {
  display: grid;
  gap: 7px;
}

.search-field span,
.select-field span,
.form-stack span,
.form-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--cream);
  background: rgba(4, 17, 31, 0.62);
  outline: none;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  color: #102235;
  background: rgba(255, 255, 255, 0.72);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(201, 149, 97, 0.17);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  background: rgba(4, 17, 31, 0.48);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

body[data-theme="light"] th {
  background: rgba(16, 34, 53, 0.07);
}

td {
  color: var(--cream);
  font-size: 0.88rem;
}

tbody tr:hover {
  background: rgba(244, 234, 220, 0.04);
}

body[data-theme="light"] tbody tr:hover {
  background: rgba(163, 111, 62, 0.07);
}

.badge,
.method-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge-success {
  border-color: rgba(118, 199, 164, 0.44);
  color: var(--success);
  background: rgba(118, 199, 164, 0.1);
}

.badge-warning {
  border-color: rgba(226, 182, 110, 0.44);
  color: var(--warning);
  background: rgba(226, 182, 110, 0.1);
}

.badge-danger {
  border-color: rgba(228, 130, 117, 0.44);
  color: var(--danger);
  background: rgba(228, 130, 117, 0.1);
}

.badge-info {
  border-color: rgba(130, 183, 228, 0.42);
  color: var(--info);
  background: rgba(130, 183, 228, 0.1);
}

.badge-neutral {
  color: var(--muted);
  background: rgba(244, 234, 220, 0.05);
}

.method-pill {
  margin: 1px 3px 1px 0;
  color: #081827;
  background: var(--cream);
}

body[data-theme="light"] .method-pill {
  color: #102235;
}

.method-mt {
  background: #e5c08e;
}

.method-vt {
  background: #d8e6ef;
}

.method-ut {
  background: #a9d3f0;
}

.method-pt {
  background: #d8c3a5;
}

.selection-list,
.notification-list,
.timeline-list,
.definition-list {
  display: grid;
  gap: 10px;
}

.selection-list button,
.person-card,
.notification-item {
  display: grid;
  gap: 7px;
  padding: 13px;
  text-align: left;
}

.selection-list button,
.person-card,
.notification-item {
  background: rgba(244, 234, 220, 0.05);
}

.selection-list button.selected,
.person-card.selected,
.notification-item:hover {
  border-color: var(--bronze);
  background: rgba(201, 149, 97, 0.13);
}

.person-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-card.muted {
  opacity: 0.68;
}

.selection-list small,
.person-card small,
.notification-item small,
.timeline-item span {
  color: var(--muted);
}

.assignment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.assignment-summary div,
.definition-list div,
.timeline-item,
.signature-demo {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.04);
}

.assignment-summary span,
.definition-list span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.warning-callout,
.success-callout,
.form-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 850;
  line-height: 1.5;
}

.warning-callout,
.form-error {
  border: 1px solid rgba(226, 182, 110, 0.42);
  color: var(--warning);
  background: rgba(226, 182, 110, 0.1);
}

.success-callout {
  border: 1px solid rgba(118, 199, 164, 0.42);
  color: var(--success);
  background: rgba(118, 199, 164, 0.1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 8, 15, 0.72);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0a2239;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

body[data-theme="light"] .modal-panel {
  background: #fff8ec;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.06);
  color: var(--cream);
  font-size: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.field-wide {
  grid-column: 1 / -1;
}

.signature-demo {
  display: grid;
  gap: 8px;
  min-height: 80px;
}

.pdf-preview {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 22px;
  border-radius: 8px;
  color: #132236;
  background: var(--cream-2);
}

.pdf-head,
.pdf-signature {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(19, 34, 54, 0.18);
  padding-bottom: 12px;
}

.pdf-preview dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pdf-preview dl div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.pdf-preview dt,
.pdf-preview dd {
  margin: 0;
}

.pdf-preview dt {
  color: #607082;
  font-weight: 800;
}

.pdf-preview dd {
  font-weight: 900;
}

.calendar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-item {
  display: grid;
  gap: 6px;
}

.timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.timeline-item time {
  color: var(--bronze);
  font-size: 0.78rem;
  font-weight: 900;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.demo-disclaimer {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 0.78rem;
  text-align: center;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: 100vh;
}

.login-visual {
  position: relative;
  display: grid;
  align-content: end;
  gap: 24px;
  min-height: 100vh;
  padding: 56px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(244, 234, 220, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(244, 234, 220, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(201, 149, 97, 0.26), transparent 28%),
    linear-gradient(135deg, #06192d, #020914);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

body[data-theme="light"] .login-visual {
  background:
    linear-gradient(90deg, rgba(9, 35, 60, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(9, 35, 60, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(163, 111, 62, 0.2), transparent 28%),
    linear-gradient(135deg, #fff8ec, #ead8c3);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

.login-visual img {
  position: absolute;
  top: 42px;
  left: 48px;
  width: 132px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--cream-2);
}

.login-visual-copy {
  max-width: 720px;
}

.login-visual-copy h1 {
  margin-bottom: 18px;
  font-size: 4.3rem;
  line-height: 0.94;
}

.login-visual-copy p:not(.eyebrow) {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 12px;
}

.login-metrics span {
  display: grid;
  gap: 4px;
  min-height: 90px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 234, 220, 0.05);
  color: var(--muted);
  font-weight: 800;
}

.login-metrics strong {
  color: var(--cream);
  font-size: 2rem;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  border-left: 1px solid var(--line);
  background: rgba(4, 17, 31, 0.76);
}

body[data-theme="light"] .login-panel {
  background: rgba(255, 250, 241, 0.78);
}

.login-card {
  width: 100%;
  padding: 24px;
}

.login-card h2 {
  margin-bottom: 18px;
  font-size: 2.1rem;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.credential-note {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(244, 234, 220, 0.04);
}

.theme-login-button {
  width: 100%;
  margin-top: 14px;
}

.login-note {
  text-align: left;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--cream);
  background: #102d49;
  box-shadow: 0 18px 45px var(--shadow);
  font-weight: 850;
}

body[data-theme="light"] .toast {
  color: #102235;
  background: #fff8ec;
}

.mobile-scrim {
  display: none;
}

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

  .span-2 {
    grid-column: span 2;
  }

  .analysis-grid,
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    width: min(320px, calc(100vw - 36px));
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-open .mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(2, 8, 15, 0.62);
  }

  .mobile-only {
    display: grid;
  }

  .topbar {
    padding: 12px 16px;
  }

  .content-area {
    padding: 16px;
  }

  .page-header,
  .two-column,
  .assignment-layout,
  .settings-grid,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .page-header {
    align-items: start;
    flex-direction: column;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .login-visual {
    min-height: auto;
    padding: 120px 24px 28px;
  }

  .login-visual-copy h1 {
    font-size: 2.9rem;
  }

  .login-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .kpi-grid,
  .dashboard-grid,
  .analysis-grid,
  .calendar-grid,
  .person-grid,
  .work-grid,
  .toolbar,
  .form-grid,
  .assignment-summary,
  .login-metrics {
    grid-template-columns: 1fr;
  }

  .span-2,
  .field-wide {
    grid-column: auto;
  }

  h1 {
    font-size: 2rem;
  }

  .topbar-actions .ghost-button {
    display: none;
  }
}
