:root {
  --text: #20302b;
  --muted: #5d6f69;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(19, 33, 27, 0.12);
  --accent-soft: rgba(12, 122, 110, 0.14);
  --accent-strong: #0c7a6e;
  --blue-soft: rgba(37, 99, 235, 0.14);
  --blue-strong: #1d4ed8;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --amber-strong: #b45309;
  --live-view-bg: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(155deg, rgba(11, 110, 92, 0.96), rgba(150, 93, 24, 0.86));
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow: 0 18px 40px rgba(18, 33, 27, 0.12);
  --shadow-soft: 0 14px 28px rgba(18, 33, 27, 0.08);
}

.hero-copy {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 255, 252, 0.74)),
    var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #f9fffd;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(155deg, rgba(8, 97, 89, 0.94), rgba(8, 58, 96, 0.95));
  padding: 34px;
  gap: 8px;
  align-items: flex-start;
}
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(180, 83, 9, 0.12), transparent 22%),
    linear-gradient(180deg, #f8f4ed 0%, #efe7db 100%);
  min-height: 100dvh;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

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

body.portal-locked {
  overflow: hidden;
}

body.portal-locked .page-shell {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.portal-lock-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 15, 13, 0.78);
  backdrop-filter: blur(10px);
  z-index: 9999;
}

.portal-lock-overlay.is-visible {
  display: flex;
}

.portal-lock-card {
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 241, 233, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.portal-lock-card h2 {
  margin: 10px 0 12px;
}

.portal-lock-copy {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 16px 60px 16px;
  box-sizing: border-box;
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  margin-bottom: 34px;
}

.hero-copy,
.hero-card,
.panel,
.metric-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-copy,
.panel,
.hero-card {
  padding: 30px;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.hero-card-admin {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(155deg, rgba(19, 55, 140, 0.95), rgba(8, 84, 108, 0.92));
}

.hero-card-operator {
  background: var(--live-view-bg);
}

.eyebrow,
.section-tag,
.hero-label,
.metric-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.eyebrow,
.section-tag,
.metric-label {
  color: var(--accent-strong);
}

.hero-label {
  color: rgba(249, 255, 253, 0.78);
}

.hero-copy h1,
.panel-form h2,
.panel h2,
.mini-heading h3,
.review-heading h3,
.table-heading h3 {
  margin: 0;
  line-height: 1.04;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 3.2vw, 4rem);
  max-width: 13ch;
}

.hero-title-single {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.95rem, 2.7vw, 3.3rem);
}

.hero-copy h1,
.panel h2,
.mini-heading h3,
.review-heading h3,
.table-heading h3,
.summary-item strong,
.report-card strong,
.status-preview,
.info-list,
.report-copy,
.report-meta,
.report-foot,
th,
td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-text,
.hero-card p,
.info-list,
.metric-card p,
.report-copy,
.report-meta,
.report-foot,
.status-preview {
  color: var(--muted);
  line-height: 1.65;
}

.hero-card p {
  color: rgba(249, 255, 253, 0.82);
}

.hero-card strong {
  font-size: 1.65rem;
  margin-bottom: 10px;
}

.hero-actions,
.side-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.dashboard-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  align-items: stretch;
}

.metric-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 255, 252, 0.7));
  padding: 28px 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card-blue {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.72));
}

.metric-card-gold {
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.96), rgba(255, 255, 255, 0.72));
}

.metric-card-green {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.72));
}

.metric-value {
  display: block;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  margin-bottom: 10px;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.portal-layout-wide {
  align-items: start;
}

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

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

.dashboard-rail,
.modules-stack,
.landing-panel {
  display: grid;
  gap: 28px;
  align-content: start;
  min-width: 0;
}

.portal-layout-wide .dashboard-rail {
  gap: 20px;
}

.portal-layout-wide .dashboard-rail > .panel {
  padding: 24px 22px;
}

.portal-layout-wide .dashboard-rail .section-heading {
  margin-bottom: 18px;
}

.portal-layout-wide .dashboard-rail .mini-heading {
  margin-bottom: 10px;
}

.portal-layout-wide .dashboard-rail .info-list {
  margin-top: 14px;
}

.portal-layout-wide .dashboard-rail .info-list li + li {
  margin-top: 8px;
}

.portal-layout-wide .dashboard-rail .report-feed {
  gap: 14px;
}

.portal-layout-wide .dashboard-rail .report-card {
  min-height: auto;
  padding: 16px 18px;
}

.operator-modules-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: stretch;
}

/* Ensure each panel inside modules-stack grows to fill column and aligns footer/actions */
.modules-stack.operator-modules-stack > section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modules-stack.operator-modules-stack > section .form-actions,
.modules-stack.operator-modules-stack > section .report-feed {
  margin-top: auto;
}

/* Make summary and report cards consistent height and spacing */
.report-feed .report-card {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Keep the Post Maintenance module full-width in the operator stack */
.operator-modules-stack > #line-clearance-entry {
  grid-column: 1 / -1;
  align-self: start;
  width: 100%;
}

.super-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.super-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 250, 255, 0.72));
  border: 1px solid rgba(19, 33, 27, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-soft);
  min-height: 100%;
  min-width: 0;
}

.field-policy-grid {
  display: grid;
  gap: 22px;
}

.policy-group {
  display: grid;
  gap: 16px;
}

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

.policy-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(19, 33, 27, 0.08);
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.policy-card strong,
.policy-card p {
  margin: 0;
}

.policy-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.policy-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--accent-strong);
}

.policy-switch input {
  width: 18px;
  height: 18px;
}

.login-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.portal-layout-admin .dashboard-rail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 251, 247, 0.72));
  min-height: 100%;
}

.premium-panel {
  position: relative;
  overflow: hidden;
}

.premium-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(12, 122, 110, 0.12), transparent 70%);
  pointer-events: none;
}

.glass-highlight {
  background:
    linear-gradient(180deg, rgba(221, 242, 236, 0.88), rgba(255, 255, 255, 0.7));
}

.side-panel {
  box-shadow: var(--shadow-soft);
}

.mini-heading {
  margin-bottom: 14px;
}

.status-preview {
  font-weight: 700;
}

.panel-admin {
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0.96), rgba(255, 255, 255, 0.78));
}

.panel-maintenance {
  background:
    linear-gradient(180deg, rgba(244, 248, 255, 0.98), rgba(255, 255, 255, 0.8));
}

.info-list {
  margin: 18px 0 0;
  padding-left: 18px;
}

.info-list li + li {
  margin-top: 10px;
}

.section-heading,
.review-heading,
.table-heading,
.report-card-head,
.report-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-heading {
  margin-bottom: 24px;
}

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

.review-heading,
.table-heading {
  margin-bottom: 18px;
}

.status-pill,
.review-badge,
.table-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill-secondary,
.review-badge {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.status-pill-amber {
  background: var(--amber-soft);
  color: var(--amber-strong);
}

.review-card {
  background:
    linear-gradient(180deg, rgba(233, 241, 255, 0.76), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(29, 78, 216, 0.12);
  border-radius: var(--radius-md);
  padding: 22px;
}

.review-card-tall {
  min-height: 100%;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: start;
  width: 100%;
}

.workspace-pane {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.workspace-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.workspace-pane-head h3 {
  margin: 0;
}

.workspace-scroll {
  max-height: 980px;
  overflow: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

.workspace-scroll::-webkit-scrollbar {
  width: 10px;
}

.workspace-scroll::-webkit-scrollbar-thumb {
  background: rgba(12, 122, 110, 0.24);
  border-radius: 999px;
}

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

.summary-item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(19, 33, 27, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.summary-item strong {
  line-height: 1.5;
}

.summary-item-full {
  grid-column: 1 / -1;
}

.breakdown-form,
.table-block,
.report-feed {
  display: grid;
  gap: 22px;
}

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

.field {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
}

.required-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber-strong);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.field input,
.field textarea,
.field select,
td input,
td select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

td input,
td select {
  border-radius: 12px;
  padding: 10px 12px;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
td input:focus,
td select:focus {
  outline: none;
  border-color: rgba(12, 122, 110, 0.68);
  box-shadow: 0 6px 18px rgba(12, 122, 110, 0.12);
  transform: translateY(-1px);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

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

.part-toggle-card {
  padding: 18px 20px;
  border: 1px solid rgba(19, 33, 27, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.95), rgba(255, 255, 255, 0.78));
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 10px;
}

.segmented-option {
  cursor: pointer;
}

.segmented-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.segmented-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(19, 33, 27, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-weight: 800;
  transition: all 0.2s ease;
}

.segmented-option input:checked + span {
  background: linear-gradient(135deg, #0c7a6e, #0a5f56);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(12, 122, 110, 0.2);
}

.part-fields-shell {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 20px;
  border: 1px dashed rgba(12, 122, 110, 0.22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(238, 250, 247, 0.9), rgba(255, 255, 255, 0.74));
}

.part-fields-shell.is-visible {
  display: grid;
}

.part-fields-header {
  grid-column: 1 / -1;
}

.part-fields-header h3 {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
}

table {
  width: 100%;
  /* allow tables to shrink and wrap on small screens instead of forcing horizontal scroll */
  min-width: 0;
  border-collapse: collapse;
}

/* Allow table cells to wrap and break long words to avoid horizontal scroll */
.table-wrap table {
  table-layout: auto;
}

th, td {
  white-space: normal;
  word-break: break-word;
}

th,
td {
  border-bottom: 1px solid rgba(19, 33, 27, 0.08);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.88rem;
  color: var(--muted);
  background: rgba(238, 246, 243, 0.88);
}

.empty-state-cell {
  text-align: center;
  color: var(--muted);
  padding: 24px 16px;
}

.table-status {
  background: rgba(12, 122, 110, 0.12);
  color: var(--accent-strong);
}

.table-action {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.18);
}

.active-row {
  background: rgba(29, 78, 216, 0.06);
}

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

.report-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 255, 252, 0.72));
  border: 1px solid rgba(19, 33, 27, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.report-card-action {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.74));
}

.report-card-empty {
  grid-column: 1 / -1;
}

.report-meta,
.report-copy,
.report-foot {
  margin: 0;
}

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

.form-message {
  margin-right: auto;
  color: var(--accent-strong);
  font-weight: 700;
  min-height: 24px;
}

.button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

.button:disabled,
.table-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-secondary {
  background: rgba(233, 225, 211, 0.95);
  color: var(--text);
}

.button-primary {
  background: linear-gradient(135deg, #0c7a6e, #0a5f56);
  color: #f6fffc;
  box-shadow: 0 10px 24px rgba(12, 122, 110, 0.18);
  padding: 12px 20px;
  border-radius: 12px;
}

.admin-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.22);
}

.export-button {
  background: linear-gradient(135deg, #0f766e, #0b5d57);
  color: #fff;
  box-shadow: 0 12px 24px rgba(12, 122, 110, 0.22);
}

.site-footer {
  margin-top: 26px;
  padding: 18px 8px 0;
  text-align: center;
}

.top-border {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(19, 33, 27, 0.08);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .hero,
  .portal-layout,
  .dashboard-strip,
  .landing-grid,
  .operator-modules-stack,
  .report-feed,
  .super-grid,
  .policy-list {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-title-single {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .form-grid,
  .summary-grid,
  .admin-workspace,
  .part-fields-shell {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .review-heading,
  .table-heading,
  .report-card-head,
  .report-foot,
  .workspace-pane-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .operator-entry-shell .heading-actions {
    margin-left: 0;
  }

  .workspace-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 16px, 1280px);
    padding: 18px 8px 48px;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .metric-card,
  .super-card,
  .review-card {
    padding: 18px;
  }

  .brand-logo {
    height: 34px;
  }

  .hero-actions,
  .side-actions,
  .form-actions,
  .heading-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button-link,
  .side-actions .button-link,
  .form-actions .button,
  .form-actions .button-link,
  .heading-actions .button,
  .heading-actions .button-link {
    width: 100%;
  }

  .form-message {
    margin-right: 0;
    width: 100%;
  }

  .button,
  .button-link {
    width: 100%;
  }
}

/* Final responsive and visual polish */
.panel {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.panel:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(18, 33, 27, 0.12);
}

/* Slightly smaller metric cards and tighter padding on narrow screens */
@media (max-width: 900px) {
  .metric-card {
    min-height: 120px;
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(1.6rem, 4.2vw, 2.6rem);
    max-width: 48ch;
  }

  .hero {
    gap: 18px;
  }
}

/* Improve readability on small phones */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .brand-logo {
    height: 30px;
  }

  .hero-text {
    font-size: 0.95rem;
  }

  .report-feed {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status-pill,
  .review-badge,
  .table-status {
    white-space: normal;
  }
}

/* Make calls-to-action more prominent but consistent */
.button-primary {
  letter-spacing: 0.02em;
}

/* Ensure forms and panels have consistent inner alignment */
.panel .section-tag {
  margin-bottom: 6px;
}

.operator-entry-shell {
  margin: 0 0 34px;
  scroll-margin-top: 24px;
  color: #f9fffd;
  background: var(--live-view-bg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.operator-entry-shell .section-heading {
  align-items: center;
}

.operator-entry-shell .heading-actions {
  margin-left: auto;
  justify-content: flex-end;
  align-items: center;
}

.operator-entry-shell .section-tag,
.operator-entry-shell .section-heading h2 {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.26);
}

.operator-entry-shell .status-pill {
  background: rgba(255, 255, 255, 0.16);
  color: #f9fffd;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.operator-entry-shell .form-message {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.operator-entry-shell .field span {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.operator-entry-shell .field input,
.operator-entry-shell .field textarea,
.operator-entry-shell .field select {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.operator-entry-shell .field input::placeholder,
.operator-entry-shell .field textarea::placeholder {
  color: rgba(33, 52, 46, 0.52);
}

#operator-entry[hidden] {
  display: none !important;
}

/* Collapsible form sections */
.collapsible-section {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(19,33,27,0.06);
  background: rgba(255,255,255,0.9);
}
.operator-entry-shell .collapsible-section {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(6, 26, 22, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.collapsible-header {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(250,250,250,0.98), rgba(245,245,245,0.96));
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.operator-entry-shell .collapsible-header {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}
.collapsible-header .chev {
  opacity: 0.7;
  transition: transform 0.18s ease;
}
.collapsible-section.collapsed .collapsible-header .chev {
  transform: rotate(-90deg);
}
.collapsible-body {
  padding: 14px 16px 18px 16px;
  transition: max-height 0.24s ease, opacity 0.24s ease;
  max-height: 2000px;
  opacity: 1;
}
.operator-entry-shell .collapsible-body {
  background: rgba(255, 255, 255, 0.03);
}
.collapsible-section.collapsed .collapsible-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* Additional polish */
.report-card {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }

  .hero-card {
    align-items: stretch;
  }
}

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