:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #17202a;
  --muted: #64717f;
  --line: #d7dde5;
  --line-strong: #b8c1cc;
  --brand: #d71920;
  --brand-dark: #a61117;
  --ink: #101820;
  --teal: #117c73;
  --amber: #b46b00;
  --green: #267341;
  --shadow: 0 18px 50px rgba(16, 24, 32, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

.home-page {
  background:
    linear-gradient(180deg, #eef2f5 0, #f7f8fa 420px, #f4f6f8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.13);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  color: var(--ink);
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.top-nav a {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
}

.top-nav a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(16, 24, 32, 0.08);
}

.user-menu {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-menu span {
  overflow: hidden;
  max-width: 240px;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-shell,
.center-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.portal-shell {
  padding: 28px 0 48px;
}

.home-shell {
  padding-top: 22px;
}

.center-shell {
  display: grid;
  min-height: calc(100vh - 100px);
  place-items: center;
  padding: 40px 0;
}

.hero-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 24px clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.10), transparent 36%),
    linear-gradient(135deg, #ffffff, #f8fafb);
  box-shadow: var(--shadow);
}

.hero-band h1 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.kicker {
  display: inline-block;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-stat {
  display: grid;
  place-items: center;
  width: 110px;
  min-width: 110px;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.hero-stat strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.hero-stat span {
  color: var(--muted);
  font-weight: 700;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.home-hero-copy,
.home-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-hero-copy {
  min-height: 280px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.12), transparent 34%),
    linear-gradient(140deg, #ffffff 0, #f8fafb 58%, #eef2f5 100%);
  overflow: hidden;
}

.home-hero-copy h1 {
  max-width: 680px;
  margin: 8px 0 12px;
  color: var(--ink);
  font-size: clamp(2.15rem, 4vw, 3.55rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.home-hero-copy p {
  max-width: 590px;
  margin: 0;
  color: #475463;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-actions .primary-button,
.hero-actions .ghost-button {
  min-height: 44px;
  padding-inline: 16px;
}

.hero-ghost {
  background: rgba(255, 255, 255, 0.72);
}

.home-overview-card {
  display: grid;
  gap: 18px;
  align-content: space-between;
  padding: 22px;
  background:
    linear-gradient(160deg, #101820 0, #202b36 58%, #ffffff 58.4%, #ffffff 100%);
  overflow: hidden;
}

.overview-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.overview-brand img {
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  background: #fff;
  object-fit: contain;
  padding: 7px;
}

.overview-brand span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.overview-brand strong {
  font-size: 1.05rem;
}

.overview-brand small {
  color: rgba(255, 255, 255, 0.70);
  font-weight: 700;
}

.overview-metrics {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 10px;
  margin-top: 26px;
}

.overview-metrics span {
  display: grid;
  gap: 5px;
  min-height: 96px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.overview-metrics strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.overview-metrics small {
  color: var(--muted);
  font-weight: 800;
}

.overview-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 36px;
  border: 1px solid rgba(38, 115, 65, 0.20);
  border-radius: 999px;
  background: rgba(38, 115, 65, 0.09);
  color: var(--green);
  padding: 8px 11px;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.dashboard-section {
  margin-top: 18px;
}

.home-section-title {
  align-items: center;
  margin-bottom: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.dashboard-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 230px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0, #ffffff 72%, #f7f9fb 100%);
  box-shadow: 0 8px 26px rgba(16, 24, 32, 0.06);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
}

.dashboard-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-card:hover,
.dashboard-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 16px 38px rgba(16, 24, 32, 0.12);
  transform: translateY(-2px);
}

.dashboard-thumbnail {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, #101820, #2d3d4c);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 12px 24px rgba(16, 24, 32, 0.16);
}

.dashboard-thumbnail svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-thumbnail-ocs {
  background: linear-gradient(145deg, #101820, #2f6f95);
}

.dashboard-thumbnail-monthly-sales {
  background: linear-gradient(145deg, #117c73, #1f5f9c);
}

.dashboard-thumbnail-map-violation {
  background: linear-gradient(145deg, #c8102e, #6b2d5c);
}

.dashboard-thumbnail-collections-30-60-90 {
  background: linear-gradient(145deg, #7b3f00, #b46b00);
}

.dashboard-thumbnail-tommys-board {
  background: linear-gradient(145deg, #101820, #6c5ce7);
}

.dashboard-thumbnail-warranty-rma-intake {
  background: linear-gradient(145deg, #d9232e, #1f6f78);
}

.dashboard-thumbnail-dm-weekly-prep {
  background: linear-gradient(145deg, #0f6b5c, #d19a22);
}

.dashboard-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
  flex: 1;
}

.dashboard-copy strong {
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.dashboard-copy small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
}

.dashboard-arrow {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  width: 100%;
  margin-top: auto;
  border: 1px solid rgba(17, 124, 115, 0.22);
  border-radius: var(--radius);
  background: rgba(17, 124, 115, 0.10);
  color: #0c625b;
  font-size: 0.82rem;
  font-weight: 800;
}

.home-page,
.dashboard-frame-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 62% 38%, rgba(130, 104, 210, 0.10), transparent 34%),
    linear-gradient(145deg, #f5f3f8 0, #eef2f6 48%, #f8fafc 100%);
}

.home-page .site-header,
.dashboard-frame-page .site-header {
  display: none;
}

.home-page .flash {
  width: min(1960px, calc(100% - 36px));
  margin: 18px auto -8px;
}

.home-console {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(1960px, calc(100% - 36px));
  height: calc(100vh - 40px);
  min-height: 680px;
  margin: 20px auto;
  border: 1px solid rgba(139, 147, 164, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 72px rgba(39, 35, 71, 0.18);
  overflow: hidden;
}

.home-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 24px;
  min-height: 0;
  padding: 16px 12px;
  background:
    radial-gradient(circle at 75% 7%, rgba(255, 255, 255, 0.20), transparent 24%),
    linear-gradient(165deg, #a44ef0 0, #6f35d1 48%, #2d2384 100%);
  color: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 6px;
}

.sidebar-brand img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  object-fit: contain;
  padding: 5px;
}

.sidebar-brand span,
.sidebar-user span {
  display: grid;
  min-width: 0;
}

.sidebar-brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.sidebar-brand small,
.sidebar-user small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.sidebar-nav a,
.sidebar-settings {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.90);
  padding: 9px 11px;
  font-size: 0.86rem;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-nav a span:last-child,
.sidebar-settings span:last-child {
  overflow: hidden;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus-visible,
.sidebar-settings:hover,
.sidebar-settings:focus-visible,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  outline: none;
}

.sidebar-nav a:hover,
.sidebar-settings:hover {
  transform: translateX(2px);
}

.sidebar-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: currentColor;
}

.sidebar-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
}

.sidebar-user {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(10, 10, 34, 0.18);
}

.sidebar-user strong {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user button {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
}

.home-stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
  padding: clamp(20px, 3vw, 34px);
  background:
    radial-gradient(circle at 54% 45%, rgba(65, 57, 119, 0.07), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(251, 252, 255, 0.95));
}

.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.stage-toolbar h1 {
  margin: 3px 0 0;
  color: #211b3f;
  font-size: clamp(1.55rem, 2.8vw, 2.55rem);
  line-height: 1.05;
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stage-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(111, 53, 209, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4d4568;
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 800;
}

.logo-stage {
  display: grid;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  place-items: center;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, rgba(116, 105, 154, 0.08), transparent 42%);
  overflow: hidden;
}

.logo-stage::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.78), transparent 62%);
}

.logo-stage img {
  position: relative;
  width: min(680px, 72%);
  max-height: 470px;
  object-fit: contain;
  opacity: 0.16;
  filter: saturate(0.65);
}

.dashboard-console {
  width: min(2000px, calc(100% - 24px));
  height: calc(100vh - 24px);
  min-height: 640px;
  margin: 12px auto;
}

.dashboard-frame-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: #f8fafc;
}

.dashboard-frame-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(139, 147, 164, 0.25);
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-frame-toolbar h1 {
  margin: 2px 0 0;
  color: #211b3f;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.1;
}

.dashboard-frame-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(200, 16, 46, 0.18);
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.08);
  color: #c8102e;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-iframe {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.dashboard-dock {
  margin-top: 0;
  padding-top: 2px;
}

.home-console .dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin: 12px 0 0;
}

.home-console .dashboard-card {
  gap: 9px;
  min-height: 154px;
  padding: 14px;
  border-color: rgba(111, 53, 209, 0.14);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(39, 35, 71, 0.08);
}

.home-console .dashboard-card:hover,
.home-console .dashboard-card:focus-visible {
  border-color: rgba(200, 16, 46, 0.65);
  box-shadow: 0 16px 34px rgba(39, 35, 71, 0.14);
}

.home-console .dashboard-card::before {
  height: 3px;
  background: linear-gradient(90deg, #c8102e, #6f35d1, #117c73);
}

.home-console .dashboard-card .status-pill,
.home-console .dashboard-meta {
  display: none;
}

.home-console .dashboard-thumbnail {
  width: 54px;
  height: 54px;
}

.home-console .dashboard-thumbnail svg {
  width: 32px;
  height: 32px;
}

.home-console .dashboard-copy {
  gap: 5px;
}

.home-console .dashboard-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.98rem;
  line-height: 1.18;
}

.home-console .dashboard-copy small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.8rem;
  line-height: 1.3;
}

.home-console .dashboard-arrow {
  min-height: 34px;
  border-color: rgba(111, 53, 209, 0.18);
  background: rgba(111, 53, 209, 0.08);
  color: #4931a8;
  font-size: 0.78rem;
}

.tech-support {
  margin-top: auto;
  border-top: 1px solid rgba(111, 53, 209, 0.12);
  color: #6b647e;
  padding-top: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.tech-support a {
  color: #c8102e;
  font-weight: 900;
}

.work-panel,
.empty-state,
.login-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.work-panel {
  margin-top: 18px;
  padding: 22px;
}

.password-panel.needs-action {
  border-color: rgba(180, 107, 0, 0.45);
  background: #fffaf0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.18rem;
}

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

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

.full-span {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: 100%;
  border-radius: var(--radius);
  padding: 9px 14px;
  border: 1px solid transparent;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.primary-button {
  background: var(--brand);
  color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--brand-dark);
}

.secondary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.ghost-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.full-width {
  width: 100%;
}

.inline-check,
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
}

.inline-check input,
.check-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.check-row {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.check-row span {
  display: grid;
  min-width: 0;
}

.check-row strong,
.check-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-row small {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.admin-layout-single {
  grid-template-columns: 1fr;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.record summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  cursor: pointer;
}

.record summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.record summary strong,
.record summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record summary small {
  color: var(--muted);
}

.record-form {
  padding: 4px 16px 16px;
}

.summary-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.good {
  border-color: rgba(38, 115, 65, 0.28);
  background: rgba(38, 115, 65, 0.10);
  color: var(--green);
}

.status-pill.warn {
  border-color: rgba(180, 107, 0, 0.30);
  background: rgba(180, 107, 0, 0.12);
  color: var(--amber);
}

.status-pill.muted {
  background: var(--surface-2);
}

.flash {
  position: fixed;
  top: 86px;
  right: 18px;
  z-index: 40;
  width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.flash-success {
  border-left-color: var(--green);
}

.flash-error {
  border-left-color: var(--brand);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 28px;
}

.empty-state h1,
.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
}

.login-page {
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.88), rgba(16, 24, 32, 0.78)),
    linear-gradient(90deg, #f4f6f8, #dfe5ea);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(430px, 100%);
  padding: 28px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.login-brand div {
  display: grid;
}

.login-brand strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.login-brand span {
  color: var(--muted);
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 16px;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .top-nav,
  .user-menu {
    justify-self: stretch;
  }

  .top-nav {
    justify-content: center;
  }

  .user-menu {
    justify-content: space-between;
  }

  .admin-layout,
  .form-grid,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero-copy {
    min-height: auto;
  }

  .home-overview-card {
    background:
      linear-gradient(135deg, #101820 0, #202b36 48%, #ffffff 48.4%, #ffffff 100%);
  }

  .hero-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-stat {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .portal-shell,
  .center-shell {
    width: min(100% - 20px, 1180px);
  }

  .dashboard-card {
    min-height: 210px;
  }

  .dashboard-thumbnail {
    width: 56px;
    height: 56px;
  }

  .dashboard-thumbnail svg {
    width: 32px;
    height: 32px;
  }

  .dashboard-arrow {
    justify-content: center;
    width: 100%;
  }

  .home-hero-copy h1 {
    font-size: 2.4rem;
  }

  .home-overview-card {
    gap: 12px;
    padding: 16px;
  }

  .overview-brand img {
    width: 48px;
    height: 48px;
  }

  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }

  .overview-metrics span {
    min-height: 76px;
    padding: 10px;
  }

  .overview-metrics strong {
    font-size: 1.1rem;
  }

  .hero-actions,
  .hero-actions .primary-button,
  .hero-actions .ghost-button {
    width: 100%;
  }

  .record summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .home-page .flash,
  .home-console {
    width: min(100% - 24px, 1180px);
  }

  .home-console {
    grid-template-columns: 1fr;
    margin: 12px auto;
  }

  .home-sidebar {
    grid-template-rows: auto auto auto;
    min-height: auto;
    gap: 14px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    overflow: visible;
  }

  .sidebar-footer {
    grid-template-columns: 1fr minmax(220px, auto);
    align-items: center;
  }

  .sidebar-settings {
    min-height: 42px;
  }

  .logo-stage {
    min-height: 300px;
  }

  .logo-stage img {
    width: min(560px, 82%);
  }
}

@media (max-width: 640px) {
  .home-console {
    width: min(100% - 16px, 1180px);
    min-height: auto;
    border-radius: 12px;
  }

  .home-sidebar,
  .home-stage {
    padding: 14px;
  }

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

  .sidebar-nav {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sidebar-footer {
    grid-template-columns: 1fr;
  }

  .stage-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stage-pills {
    justify-content: flex-start;
  }

  .logo-stage {
    min-height: 230px;
  }

  .logo-stage img {
    width: 90%;
    opacity: 0.22;
  }

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

  .home-console .dashboard-card {
    min-height: 150px;
  }

  .tech-support {
    text-align: left;
  }
}

/* Portal dashboard usage reporting */
.usage-shell{width:min(1500px,calc(100% - 32px))}.usage-hero{align-items:flex-end}.usage-hero p{max-width:700px;margin:8px 0 0;color:var(--muted)}.usage-periods{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.usage-periods a{min-height:36px;padding:8px 11px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted);font-size:.82rem;font-weight:800}.usage-periods a.active{border-color:var(--brand);background:var(--brand);color:#fff}.usage-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.usage-metric{display:grid;gap:5px;min-height:118px;align-content:center;padding:18px;border:1px solid var(--line);border-top:3px solid var(--brand);border-radius:8px;background:#fff;box-shadow:0 10px 28px rgba(16,24,32,.06)}.usage-metric span{color:var(--muted);font-size:.8rem;font-weight:800;text-transform:uppercase}.usage-metric strong{color:var(--ink);font-size:2rem;line-height:1}.usage-metric small{color:var(--muted)}.usage-metric .usage-time-value{font-size:1rem;line-height:1.35}.usage-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}.usage-panel{margin-bottom:16px;padding:20px}.usage-columns .usage-panel{margin-bottom:0}.usage-table-wrap{overflow:auto}.usage-table{width:100%;min-width:640px;border-collapse:collapse}.usage-table th,.usage-table td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.usage-table th{background:#eef2f5;color:#4f5d6b;font-size:.72rem;text-transform:uppercase}.usage-table td{font-size:.86rem}.usage-table td strong,.usage-table td small{display:block}.usage-table td small{margin-top:2px;color:var(--muted);font-size:.75rem}
@media (max-width:1000px){.usage-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.usage-columns{grid-template-columns:minmax(0,1fr)}}
@media (max-width:620px){.usage-hero{align-items:flex-start;flex-direction:column}.usage-periods{justify-content:flex-start}.usage-metrics{grid-template-columns:minmax(0,1fr)}.usage-metric{min-height:100px}.usage-panel{padding:14px}}
