:root {
  color-scheme: dark;
  --bg: #07111d;
  --ink: #f7fbff;
  --muted: #93a4b8;
  --muted-strong: #c6d4e2;
  --panel: rgba(11, 22, 36, 0.92);
  --panel-soft: rgba(16, 32, 52, 0.9);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(110, 231, 255, 0.32);
  --cyan: #22d3ee;
  --blue: #5b8cff;
  --green: #4ade80;
  --amber: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(135deg, #050b14 0%, #07111d 46%, #0b1828 100%);
  background-size: 56px 56px, 56px 56px, auto;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: 0;
}

.app {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 18px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.view-switch button {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.view-switch button.active {
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
}

.hidden {
  display: none !important;
}

body[data-role="jr_admin"] .accounting-admin-only,
body[data-role="accounting_admin"] .jr-only,
body[data-role="operator"] .jr-only,
body[data-role="operator"] .accounting-admin-only,
body[data-role="operator"] .portal-panel {
  display: none !important;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 54px);
}

.login-copy,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-copy {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  isolation: isolate;
}

.login-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 11, 20, 0.9) 0%, rgba(5, 11, 20, 0.62) 42%, rgba(5, 11, 20, 0.12) 100%),
    linear-gradient(180deg, rgba(5, 11, 20, 0.24), rgba(5, 11, 20, 0.46));
}

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

.login-copy-content .brand {
  margin-bottom: 24px;
}

.login-copy-content h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 5vw, 5rem);
  text-shadow: 0 16px 48px rgba(0, 0, 0, 0.48);
}

.login-copy-content p:last-child {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.7;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

.public-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 56px;
}

.public-tabs button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(198, 212, 226, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 0.86rem;
}

.public-tabs button.active {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
}

.public-panel {
  display: none;
}

.public-panel.active {
  display: block;
}

.public-proof,
.public-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.public-proof span,
.public-steps span {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(198, 212, 226, 0.18);
  border-radius: 8px;
  background: rgba(5, 11, 20, 0.46);
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.login-card {
  align-self: center;
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
  padding: 0 12px;
}

.login-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13);
}

.reader-company {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.reader-company select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
  padding: 0 12px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 750;
}

.login-error.success {
  color: var(--green);
}

.first-access-panel {
  display: grid;
  min-height: calc(100vh - 96px);
  place-items: center;
  padding: 28px 16px;
}

.first-access-card {
  width: min(100%, 430px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.first-access-card h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.first-access-card > p:not(.section-label) {
  margin: 0 0 20px;
  color: var(--muted-strong);
  line-height: 1.55;
}

.contact-card {
  display: grid;
  gap: 14px;
}

.login-access-title {
  margin-top: 6px;
}

.login-options {
  display: grid;
  gap: 10px;
}

.login-option {
  display: grid;
  gap: 5px;
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
}

.login-option strong {
  color: var(--ink);
}

.login-option span,
.login-option small {
  color: var(--muted);
  font-size: 0.86rem;
}

.login-option small {
  color: var(--muted-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 900;
}

.brand b {
  color: var(--cyan);
}

.mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(91, 140, 255, 0.12));
  color: var(--cyan);
  font-size: 0.85rem;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 750;
}

.session-pill button {
  min-height: 26px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-size: 0.78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12);
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.portal-panel {
  display: grid;
  gap: 18px;
}

.portal-hero,
.portal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: end;
  padding: 22px;
}

.portal-hero h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 4vw, 3.65rem);
}

.portal-hero p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.billing-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
}

.billing-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.billing-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 1.6rem;
  font-weight: 900;
}

.billing-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
  outline: none;
  padding: 0 10px;
}

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

.portal-card {
  min-width: 0;
  padding: 18px;
}

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

.portal-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.portal-card h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.15;
}

.portal-card select,
.collaborator-form input,
.collaborator-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
  padding: 0 12px;
}

.portal-card select option {
  background: #0b1624;
}

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

.metric-grid div,
.portal-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-grid span,
.portal-summary dt {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.metric-grid strong,
.portal-summary dd {
  margin: 0;
  color: var(--green);
  font-size: 1.6rem;
  font-weight: 900;
  text-align: left;
}

.portal-summary {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.portal-copy {
  margin: 14px 0 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.collaborator-form {
  display: grid;
  gap: 10px;
}

.collaborator-list,
.usage-list {
  display: grid;
  gap: 8px;
}

.collaborator-row,
.usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.collaborator-row div,
.usage-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.collaborator-row strong,
.usage-row strong {
  color: var(--ink);
}

.collaborator-row span,
.usage-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaborator-row small,
.usage-row b {
  color: var(--cyan);
  white-space: nowrap;
}

.control-panel,
.report-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.control-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.intro {
  padding: 8px 4px 2px;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p:last-child,
.employee-card p,
.status-text,
td,
dt {
  color: var(--muted);
}

.intro p:last-child {
  margin-bottom: 0;
  line-height: 1.65;
}

.upload,
.employee-card,
.alerts-panel,
.sheet {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.upload {
  padding: 14px;
}

.dropzone {
  display: grid;
  gap: 9px;
  min-height: 184px;
  place-items: center;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.1), rgba(91, 140, 255, 0.05)),
    rgba(255, 255, 255, 0.025);
  text-align: center;
  cursor: pointer;
}

.dropzone input {
  display: none;
}

.upload-icon {
  position: relative;
  display: block;
  width: 44px;
  height: 52px;
  border: 1px solid rgba(198, 212, 226, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.upload-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 15px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 8px 0 var(--cyan), 0 16px 0 rgba(198, 212, 226, 0.42);
}

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

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

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

.primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #03101f;
  box-shadow: 0 12px 26px rgba(34, 211, 238, 0.16);
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.status-text {
  min-height: 21px;
  margin: 12px 2px 0;
  font-size: 0.9rem;
}

.employee-card {
  padding: 18px;
}

.employee-card h2 {
  margin: 0 0 5px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.employee-card > p:last-of-type {
  margin-bottom: 18px;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.meta-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

dt {
  font-size: 0.86rem;
}

dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

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

.report-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-header h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.confidence {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

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

.kpi-grid article {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.025);
}

.kpi-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.kpi-grid strong {
  color: var(--green);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.report-actions button {
  min-width: 154px;
  padding: 0 14px;
}

.quality-card {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.quality-card strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.quality-card span {
  color: var(--muted-strong);
  line-height: 1.45;
}

.quality-card.status-ok {
  border-color: rgba(74, 222, 128, 0.36);
  background: rgba(74, 222, 128, 0.09);
}

.quality-card.status-ok strong {
  color: var(--green);
}

.quality-card.status-warn {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.1);
}

.quality-card.status-warn strong {
  color: var(--amber);
}

.quality-card.status-bad {
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.11);
}

.quality-card.status-bad strong {
  color: var(--danger);
}

.alerts-panel {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding: 14px;
}

.alerts-heading .section-label {
  margin-bottom: 0;
}

#alertsList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#alertsList li,
.tag {
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.09);
  color: #fde68a;
  font-size: 0.84rem;
}

.alerts-panel.status-ok #alertsList li,
.alerts-panel.status-ok .tag {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.08);
  color: #bbf7d0;
}

.alerts-panel.status-bad #alertsList li,
.alerts-panel.status-bad .tag {
  border-color: rgba(251, 113, 133, 0.38);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

#alertsList li {
  padding: 7px 10px;
}

.tag {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 5px 8px;
  max-width: 180px;
  white-space: normal;
}

.sheet {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #102034;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

th:nth-child(1),
td:nth-child(1) {
  width: 68px;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  width: 84px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 170px;
}

tbody tr:hover {
  background: rgba(34, 211, 238, 0.035);
}

td strong {
  color: var(--ink);
}

.entries {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.entries span {
  min-width: 50px;
  padding: 6px 8px;
  border: 1px solid rgba(198, 212, 226, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dbeafe;
  text-align: center;
  font-weight: 750;
}

.time-input {
  width: 64px;
  min-height: 34px;
  border: 1px solid rgba(198, 212, 226, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.time-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13);
}

.missing-time-input {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.missing-time-input::placeholder {
  color: rgba(253, 230, 138, 0.78);
}

.disabled-value {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

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

.empty-state {
  padding: 22px 16px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.batch-panel {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.batch-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  color: var(--muted);
}

.batch-item {
  display: grid;
  gap: 5px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
}

.batch-item.active {
  border-color: var(--line-strong);
  background: rgba(34, 211, 238, 0.09);
}

.batch-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

  .portal-hero,
  .portal-grid,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .portal-card.span-2 {
    grid-column: auto;
  }

  .control-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .app {
    width: min(100% - 20px, 1280px);
    padding-top: 12px;
  }

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

  .topbar-right {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .view-switch,
  .topbar-status,
  .session-pill {
    width: 100%;
  }

  .view-switch button {
    flex: 1;
  }

  .control-panel,
  .report-panel,
  .portal-hero,
  .portal-card,
  .login-copy,
  .login-card {
    padding: 14px;
  }

  .public-tabs {
    margin-bottom: 28px;
  }

  .public-tabs button {
    flex: 1 1 calc(50% - 8px);
  }

  .actions,
  .kpi-grid,
  .alerts-panel,
  .report-actions,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .report-actions {
    display: grid;
  }

  h1 {
    font-size: 2.55rem;
  }

  .report-header {
    flex-direction: column;
  }

  .meta-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  dd {
    text-align: left;
  }
}
