:root {
  color-scheme: dark;
  --bg: #07090d;
  --surface: #11141b;
  --surface-2: #171d27;
  --surface-3: #202838;
  --input: #0c1118;
  --ink: #f3f7fb;
  --muted: #9aa8ba;
  --line: #2b3544;
  --blue: #60a5fa;
  --blue-strong: #3b82f6;
  --teal: #2dd4bf;
  --green: #86efac;
  --amber: #fbbf24;
  --red: #fb7185;
  --accent: #c084fc;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #07090d 0%, #0c1118 46%, #07090d 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
}

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

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

h1 {
  max-width: 760px;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.65rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

label {
  display: grid;
  min-width: 0;
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  color: var(--ink);
  min-height: 42px;
  padding: 0.65rem 0.78rem;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #6f7f92;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

tfoot td {
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 520px);
  gap: 2rem;
  padding: 2rem;
  align-items: stretch;
}

.auth-brand {
  display: grid;
  align-content: end;
  gap: 2.5rem;
  min-height: calc(100vh - 4rem);
  padding: clamp(2rem, 5vw, 5rem);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(45, 212, 191, 0.12) 52%, rgba(251, 191, 36, 0.08)),
    var(--surface);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 86px;
  height: 86px;
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 1.2rem;
  min-height: calc(100vh - 4rem);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin-bottom: 0.42rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.auth-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.auth-menu-option {
  display: grid;
  gap: 0.24rem;
  align-content: center;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0.78rem;
  text-align: left;
}

.auth-menu-option strong,
.auth-menu-option span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-menu-option strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.auth-menu-option span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.auth-menu-option:hover,
.auth-menu-option:focus {
  border-color: var(--blue);
  background: var(--surface-3);
}

.auth-menu-option.active {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(96, 165, 250, 0.14);
}

.segment,
.auth-menu-option,
.tab,
.ghost-button,
.primary-button,
.danger-button {
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.62rem 0.86rem;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.auth-menu .auth-menu-option {
  min-height: 78px;
}

.segment {
  background: transparent;
  color: var(--muted);
}

.segment.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.create-workspace-form {
  gap: 0.86rem;
}

.setup-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.36rem;
}

.setup-progress span {
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-progress span:first-child {
  border-color: rgba(45, 212, 191, 0.5);
  color: var(--teal);
}

.setup-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 17, 24, 0.7);
  padding: 0.85rem;
}

.setup-group legend {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0 0.36rem;
  text-transform: uppercase;
}

.setup-group label:first-of-type {
  grid-column: 1 / -1;
}

.trial-summary {
  display: grid;
  gap: 0.45rem;
  border: 1px solid rgba(134, 239, 172, 0.26);
  border-radius: 8px;
  background: rgba(134, 239, 172, 0.08);
  padding: 0.82rem;
}

.trial-summary strong {
  color: var(--green);
  font-size: 1rem;
}

.trial-summary > span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.trial-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.recovery-form {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.recovery-results {
  display: grid;
  gap: 0.5rem;
}

.recovery-result {
  display: grid;
  gap: 0.16rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  text-align: left;
}

.recovery-result span {
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.pin-key {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.pin-key:hover,
.pin-key:focus {
  border-color: var(--blue);
  background: var(--surface-3);
}

.kiosk-pin-pad .pin-key {
  min-height: 48px;
  font-size: 1.12rem;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--blue-strong);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue);
}

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

.ghost-button:hover {
  border-color: var(--blue);
  background: var(--surface-3);
  color: var(--blue);
}

.danger-button {
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.3);
  color: var(--red);
}

.danger-button:hover {
  background: rgba(251, 113, 133, 0.14);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  align-self: end;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0.62rem 0.78rem;
}

.check-line input {
  width: 18px;
  flex: 0 0 auto;
  min-height: 18px;
  accent-color: var(--teal);
}

.check-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.form-note,
.connection-status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.connection-status:empty {
  display: none;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.82rem 1rem;
  background: rgba(7, 9, 13, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.company-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
}

.company-lockup div {
  display: grid;
  min-width: 0;
}

.company-lockup strong,
.company-lockup span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-lockup span {
  color: var(--muted);
  font-size: 0.8rem;
}

.topbar-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.tabbar {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.tab {
  flex: 0 0 auto;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: rgba(96, 165, 250, 0.14);
  color: var(--blue);
}

.workspace {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 1.2rem;
}

.view {
  display: none;
  animation: fade-in 140ms ease-out;
}

.view.active {
  display: grid;
  gap: 1.2rem;
}

.section-head,
.panel-head,
.button-row,
.report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
  justify-content: space-between;
}

.button-row {
  justify-content: flex-start;
}

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

.metric-card,
.panel,
.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.metric-card {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  padding: 1rem;
}

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

.metric-card strong {
  font-size: 1.7rem;
  letter-spacing: 0;
}

.metric-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  padding: 1rem;
  min-width: 0;
}

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

.form-grid > *,
.report-controls > * {
  min-width: 0;
}

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

.stack-list {
  display: grid;
  gap: 0.72rem;
}

.audit-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.list-item {
  display: grid;
  gap: 0.58rem;
  padding: 0.86rem;
}

.compact-item,
.exception-item,
.audit-item {
  box-shadow: none;
}

.list-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.list-main strong {
  display: block;
}

.list-main small,
.meta-line {
  color: var(--muted);
  font-size: 0.84rem;
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.correction-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 0.9rem;
}

.correction-fields legend {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 0.35rem;
}

.settings-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 0.9rem;
}

.settings-group legend {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0 0.35rem;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.weekday-grid .check-line {
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 0.45rem;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.usage-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0.6rem;
  font-size: 0.82rem;
}

.usage-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.pill.good {
  background: rgba(134, 239, 172, 0.13);
  color: var(--green);
}

.pill.warn {
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
}

.pill.bad {
  background: rgba(251, 113, 133, 0.13);
  color: var(--red);
}

.pill.accent {
  background: rgba(192, 132, 252, 0.14);
  color: var(--accent);
}

.report-controls {
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.report-controls label {
  min-width: 180px;
}

.report-note {
  margin: -0.2rem 0 1rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.payroll-email-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.8rem;
  align-items: end;
  margin-top: 1rem;
}

.payroll-email-form > * {
  min-width: 0;
}

.live-total {
  color: var(--teal);
  font-weight: 800;
  white-space: nowrap;
}

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

.table-wrap table {
  min-width: 1380px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

.calendar-panel {
  display: grid;
  gap: 0.7rem;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.28rem;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.58rem;
  color: var(--ink);
  text-align: left;
}

.calendar-day:hover,
.calendar-day.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.calendar-day.outside {
  background: #0b1017;
  color: var(--muted);
}

.calendar-day.closed {
  background: #0d1118;
}

.calendar-day.today .calendar-number {
  color: var(--blue);
}

.calendar-day.holiday .calendar-number {
  color: var(--red);
}

.calendar-number {
  font-weight: 900;
}

.calendar-count,
.calendar-request-count {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.calendar-request-count {
  color: var(--amber);
}

.payday-star {
  position: absolute;
  top: 0.46rem;
  right: 0.5rem;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: var(--amber);
  font-weight: 900;
}

.calendar-note-dot {
  position: absolute;
  top: 0.46rem;
  right: 2.05rem;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.16);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
}

.calendar-holiday-dot {
  position: absolute;
  top: 0.46rem;
  right: 3.6rem;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.15);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translate(-50%, 140%);
  z-index: 20;
  width: min(520px, calc(100vw - 2rem));
  padding: 0.86rem 1rem;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

.kiosk-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 2vh, 1rem);
  background:
    linear-gradient(140deg, rgba(96, 165, 250, 0.15), transparent 42%),
    linear-gradient(320deg, rgba(45, 212, 191, 0.13), transparent 46%),
    var(--bg);
}

.kiosk-panel {
  display: grid;
  gap: 0.75rem;
  width: min(520px, 100%);
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 27, 0.94);
  box-shadow: var(--shadow);
  padding: clamp(0.85rem, 2.5vh, 1.35rem);
}

.kiosk-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kiosk-head .brand-mark {
  width: 58px;
  height: 58px;
}

.kiosk-head h1 {
  font-size: clamp(1.35rem, 4vw, 2.2rem);
}

.kiosk-clock {
  margin: 0.28rem 0 0;
  color: var(--blue);
  font-size: clamp(1.9rem, 6vw, 3rem);
  font-weight: 900;
  line-height: 1;
}

.kiosk-form {
  display: grid;
  gap: 0.65rem;
}

.kiosk-form input {
  min-height: 48px;
  font-size: 1.22rem;
  text-align: center;
}

.kiosk-form input[readonly] {
  caret-color: transparent;
  user-select: none;
}

.kiosk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.kiosk-actions button {
  min-height: 52px;
  font-size: 1rem;
}

.kiosk-status {
  display: grid;
  place-items: center;
  min-height: 4.1rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0.72rem 0.9rem;
  line-height: 1.3;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 900;
}

.kiosk-status.good {
  border-color: rgba(134, 239, 172, 0.5);
  background: rgba(134, 239, 172, 0.14);
  color: var(--green);
}

.kiosk-status.warn {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
}

.kiosk-status.bad {
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.14);
  color: var(--red);
}

.kiosk-fun-holiday {
  margin: -0.2rem 0 0.1rem;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--teal);
  padding: 0.6rem 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 900;
}

#exitKioskButton {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
}

.manager-hidden,
.owner-hidden,
.employee-hidden {
  display: none !important;
}

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

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-panel {
    min-height: auto;
  }

  .auth-brand {
    align-content: start;
  }

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

  .topbar-actions {
    width: 100%;
    align-items: center;
  }

  .tabbar {
    grid-column: 1 / -1;
    order: 3;
  }

  .metric-grid,
  .two-column,
  .calendar-layout,
  .correction-fields,
  .settings-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-layout,
  .workspace {
    padding: 0.8rem;
  }

  h1 {
    font-size: 2.15rem;
  }

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

  .auth-menu,
  .setup-progress,
  .setup-group {
    grid-template-columns: 1fr;
  }

  .auth-menu .auth-menu-option {
    min-height: 62px;
  }

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

  input[type="date"],
  input[type="time"] {
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
  }

  input[type="date"]::-webkit-date-and-time-value,
  input[type="time"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
  }

  .payroll-email-form {
    grid-template-columns: 1fr;
  }

  .section-head,
  .panel-head {
    align-items: stretch;
  }

  .section-head > *,
  .panel-head > *,
  .button-row > *,
  .report-controls > * {
    width: 100%;
  }

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

  .topbar-actions > * {
    width: 100%;
    min-width: 0;
  }

  .tabbar {
    gap: 0.3rem;
  }

  .tab {
    min-height: 36px;
    padding: 0.48rem 0.62rem;
    font-size: 0.9rem;
  }

  .topbar {
    padding: 0.72rem;
  }

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

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

  .kiosk-panel {
    gap: 0.58rem;
  }

  .kiosk-head {
    align-items: flex-start;
  }

  .kiosk-head .brand-mark {
    width: 48px;
    height: 48px;
  }

  .kiosk-clock {
    font-size: 2rem;
  }

  .kiosk-pin-pad .pin-key {
    min-height: 44px;
    font-size: 1.08rem;
  }

  .kiosk-status {
    min-height: 3.4rem;
    font-size: 0.98rem;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 0.28rem;
  }

  .calendar-day {
    min-height: 76px;
    padding: 0.42rem;
  }

  .calendar-count,
  .calendar-request-count {
    font-size: 0.68rem;
  }
}
