:root {
  --bg: #f4f6f8;
  --bg-deep: #e9edf1;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --line: rgba(19, 31, 44, 0.12);
  --line-strong: rgba(19, 31, 44, 0.18);
  --text: #121a22;
  --muted: #5c6876;
  --brand-primary: #005daa;
  --brand-primary-strong: #00467f;
  --brand-accent: #4aa3df;
  --brand-slate: #1f3b57;
  --brand-primary-rgb: 0, 93, 170;
  --brand-primary-strong-rgb: 0, 70, 127;
  --brand-accent-rgb: 74, 163, 223;
  --brand-slate-rgb: 31, 59, 87;
  --brand-orange: var(--brand-primary);
  --brand-orange-strong: var(--brand-primary-strong);
  --brand-sun: var(--brand-accent);
  --brand-ink: #101a23;
  --success: #0f8f64;
  --warning: #d88b18;
  --warning-rgb: 216, 139, 24;
  --danger: #c63f2a;
  --info: #0f6d9e;
  --neutral: #67717d;
  --shadow: 0 18px 40px rgba(10, 18, 28, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --sidebar-width: 290px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(var(--brand-primary-rgb), 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(var(--brand-accent-rgb), 0.2), transparent 20%),
    linear-gradient(180deg, #f7f8fa 0%, #eef2f5 100%);
  font-family: "Segoe UI Variable Text", "Aptos", "Bahnschrift", sans-serif;
}

body.theme-night:not(.display-mode) {
  --bg: #101923;
  --bg-deep: #15212d;
  --surface: rgba(21, 33, 45, 0.9);
  --surface-strong: #17222c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f7fa;
  --muted: #b2becc;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  background:
    radial-gradient(circle at top left, rgba(var(--brand-primary-rgb), 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(var(--brand-accent-rgb), 0.14), transparent 18%),
    linear-gradient(180deg, #111a23 0%, #1a2733 100%);
}

body.theme-night:not(.display-mode)::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 85%);
}

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

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 24px;
  background:
    linear-gradient(160deg, rgba(16, 26, 35, 0.96), rgba(34, 48, 64, 0.92)),
    linear-gradient(180deg, rgba(var(--brand-primary-rgb), 0.28), transparent 60%);
  color: #f8fbfd;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-sun));
  color: #fff;
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 30px rgba(var(--brand-primary-rgb), 0.32);
}

.brand-lockup strong,
.topbar h1,
.hero-card h2,
.panel h3,
.display-header h1,
.display-panel h3 {
  margin: 0;
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
  letter-spacing: 0.01em;
}

.brand-lockup span,
.sidebar-panel span {
  color: rgba(255, 255, 255, 0.72);
}

.nav-stack {
  display: grid;
  gap: 10px;
}

.nav-item {
  padding: 14px 16px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.sidebar-panel {
  margin-top: auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 6px;
}

.sidebar-label,
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--muted);
}

.muted,
.ticket-meta {
  color: var(--muted);
}

.main-shell {
  padding: 26px;
}

.space-shell {
  position: relative;
  min-height: 100vh;
  padding: 24px;
  display: grid;
  gap: 24px;
}

.space-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(8, 16, 24, 0.36);
  backdrop-filter: blur(4px);
}

.space-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 36;
  width: min(360px, calc(100vw - 24px));
  height: 100vh;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.96)),
    linear-gradient(145deg, rgba(var(--brand-primary-rgb), 0.12), transparent 55%);
  border-right: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 22px 44px rgba(10, 18, 28, 0.22);
}

.theme-night .space-menu-drawer {
  background:
    linear-gradient(180deg, rgba(21, 33, 45, 0.98), rgba(16, 25, 35, 0.98)),
    linear-gradient(145deg, rgba(var(--brand-primary-rgb), 0.18), transparent 55%);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.space-menu-drawer__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.space-menu-drawer__header strong {
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
  font-size: 1.28rem;
}

.space-menu-close,
.space-menu-toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(10, 18, 28, 0.08);
}

.theme-night .space-menu-close,
.theme-night .space-menu-toggle {
  background: rgba(23, 34, 44, 0.86);
}

.space-menu-close {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--text);
  font-size: 1.4rem;
}

.space-menu-drawer__content {
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.space-menu-user {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(var(--brand-primary-rgb), 0.08);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.12);
}

.space-menu-group {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.theme-night .space-menu-group {
  background: rgba(255, 255, 255, 0.03);
}

.space-menu-group[open] {
  box-shadow: 0 14px 28px rgba(10, 18, 28, 0.08);
}

.space-menu-group__summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
}

.space-menu-group__summary::-webkit-details-marker {
  display: none;
}

.space-menu-group__summary p {
  margin: 4px 0 0;
  color: var(--muted);
}

.space-menu-group__body {
  padding: 0 14px 16px;
  display: grid;
  gap: 8px;
}

.space-menu-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(var(--brand-primary-rgb), 0.05);
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.space-menu-link:hover {
  background: rgba(var(--brand-primary-rgb), 0.1);
  border-color: rgba(var(--brand-primary-rgb), 0.12);
  transform: translateX(3px);
}

.space-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.space-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.space-menu-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  gap: 4px;
}

.space-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

.space-content {
  display: grid;
  gap: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
}

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

.page-content,
.display-content {
  display: grid;
  gap: 24px;
}

.hero-card,
.panel,
.stat-card,
.module-card,
.switcher-card,
.station-card,
.display-station-card,
.admin-card,
.rack-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -40%;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--brand-primary-rgb), 0.14), transparent 68%);
}

.hero-card--accent {
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.16), transparent 55%);
}

.hero-card--operator {
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
}

.hero-copy p:last-child,
.info-card p,
.ticket-card p,
.module-card p,
.station-card p,
.display-station-card p,
.admin-card p,
.mini-card p {
  margin: 0;
  color: var(--muted);
}

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

.user-picker {
  min-width: min(100%, 340px);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.button {
  min-height: 52px;
  padding: 12px 18px;
  border: none;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

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

.button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-strong));
  box-shadow: 0 12px 26px rgba(var(--brand-primary-rgb), 0.25);
}

.button--secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-slate), #111d28);
}

.button--ghost {
  color: var(--brand-slate);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.button--danger {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #a93122);
}

.button--compact {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.button--wide {
  width: 100%;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip--success {
  background: rgba(15, 143, 100, 0.12);
  color: var(--success);
  border-color: rgba(15, 143, 100, 0.16);
}

.chip--warning {
  background: rgba(216, 139, 24, 0.12);
  color: var(--warning);
  border-color: rgba(216, 139, 24, 0.16);
}

.chip--danger {
  background: rgba(198, 63, 42, 0.12);
  color: var(--danger);
  border-color: rgba(198, 63, 42, 0.16);
}

.chip--info {
  background: rgba(15, 109, 158, 0.12);
  color: var(--info);
  border-color: rgba(15, 109, 158, 0.16);
}

.chip--neutral {
  background: rgba(103, 113, 125, 0.12);
  color: var(--neutral);
  border-color: rgba(103, 113, 125, 0.16);
}

.stats-grid,
.module-grid,
.station-grid,
.switcher-grid,
.info-grid,
.admin-card-grid,
.display-station-grid {
  display: grid;
  gap: 18px;
}

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

.stat-card {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: clamp(1.7rem, 2vw, 2.4rem);
}

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

.module-card {
  padding: 24px;
  display: grid;
  gap: 10px;
  min-height: 200px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.module-card:hover,
.switcher-card:hover,
.station-card:hover,
.rack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-primary-rgb), 0.28);
}

.panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.panel-header,
.ticket-header,
.station-header,
.rack-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ticket-header--start {
  align-items: flex-start;
}

.panel-header--light .muted {
  color: rgba(255, 255, 255, 0.72);
}

.two-column,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

.two-column > *,
.detail-grid > * {
  min-width: 0;
  align-self: start;
}

.planning-import-layout {
  align-items: start;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
}

.planning-import-panel {
  align-self: start;
}

.planning-import-panel--actions {
  position: sticky;
  top: 24px;
}

.planning-import-form {
  align-items: start;
}

.planning-import-button {
  width: auto;
  min-width: 220px;
  justify-self: start;
}

.planning-import-toolbar {
  align-items: end;
}

.planning-import-toolbar__button {
  width: auto;
  min-width: 120px;
}

.planning-import-job-list {
  max-height: min(68vh, 980px);
  overflow-y: auto;
  padding-right: 6px;
  align-content: start;
}

.planning-import-job-list::-webkit-scrollbar {
  width: 10px;
}

.planning-import-job-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--brand-primary-rgb), 0.22);
}

.detail-grid--stock {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.9fr);
}

.stock-material-import-grid {
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
}

.stock-material-import-button {
  width: auto;
  min-width: 240px;
  justify-self: start;
}

.stock-material-table-wrap {
  max-height: min(52vh, 720px);
  overflow: auto;
}

.stock-material-form-note {
  margin: 2px 0 0;
}

.stock-material-search-form {
  margin-bottom: 16px;
}

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

.stock-material-search-note {
  margin: 0 0 14px;
}

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

.mini-card,
.ticket-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.mini-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.mini-card-right,
.ticket-meta,
.station-footer,
.display-kpi {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.ticket-card {
  display: grid;
  gap: 12px;
}

.ticket-meta,
.station-footer,
.display-kpi {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.station-card,
.display-station-card {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.station-footer {
  justify-content: space-between;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.meter {
  display: grid;
  gap: 8px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.meter-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(16, 26, 35, 0.08);
  overflow: hidden;
}

.meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-sun));
}

.meter-track--accent span {
  background: linear-gradient(90deg, #223140, #44768b);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

.data-table th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.data-table-subline {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

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

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

.switcher-card {
  padding: 18px;
  display: grid;
  gap: 8px;
  border: 1px solid transparent;
}

.switcher-card.is-active {
  border-color: rgba(var(--brand-primary-rgb), 0.36);
  box-shadow: 0 20px 40px rgba(var(--brand-primary-rgb), 0.14);
}

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

.info-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(245, 247, 250, 0.95), rgba(255, 255, 255, 0.82));
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.info-card span {
  color: var(--muted);
}

.info-card strong {
  font-size: 1.15rem;
}

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

.form-panel--compact {
  gap: 14px;
}

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

.form-grid label,
.range-field,
.checkbox-line {
  display: grid;
  gap: 8px;
}

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

.form-grid span,
.range-field span {
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(var(--brand-primary-rgb), 0.45);
  box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.12);
}

input[type="range"] {
  min-height: auto;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: var(--brand-orange);
}

.range-field strong {
  color: var(--brand-slate);
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inline-form--wrap {
  flex-wrap: wrap;
}

.inline-form-field {
  min-width: min(100%, 320px);
  display: grid;
  gap: 8px;
  flex: 1 1 280px;
}

.checkbox-line {
  grid-template-columns: auto 1fr;
  align-items: center;
}

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

.form-section__title {
  font-weight: 700;
}

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

.space-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.space-select-remove[hidden] {
  display: none;
}

.admin-user-focus {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(16, 26, 35, 0.04);
  border: 1px solid var(--line);
}

.admin-user-focus p {
  margin: 0;
  color: var(--muted);
}

.admin-quick-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-card--selected-user {
  margin-top: 18px;
}

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

.checkbox-pill {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
}

.checkbox-pill input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.checkbox-pill span {
  font-weight: 700;
}

.checkbox-pill small {
  grid-column: 2;
  color: var(--muted);
}

.checkbox-line input {
  width: 22px;
  min-height: 22px;
}

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

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

.portal-card {
  min-height: 220px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.portal-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-landing {
  align-items: center;
}

.home-landing__picker {
  min-width: min(100%, 360px);
}

.home-selection-summary {
  gap: 10px;
}

.home-choice-card {
  min-height: 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 252, 0.92)),
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.14), transparent 60%);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.14);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.home-choice-card--highlight {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.92)),
    radial-gradient(circle at top right, rgba(var(--brand-primary-rgb), 0.16), transparent 52%);
}

.home-choice-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.stock-kiosk {
  gap: 22px;
}

.stock-kiosk__steps,
.stock-kiosk__action-grid,
.stock-kiosk__item-grid,
.stock-kiosk__service-actions {
  display: grid;
  gap: 16px;
}

.stock-kiosk__steps,
.stock-kiosk__action-grid,
.stock-kiosk__item-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-kiosk__panel {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.touch-choice-card,
.touch-item-card {
  min-height: 180px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  grid-template-rows: 88px auto auto;
  align-content: start;
  justify-items: start;
  gap: 10px;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.touch-choice-card:hover,
.touch-item-card:hover,
.touch-choice-card.is-active,
.touch-item-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(var(--brand-primary-rgb), 0.3);
  box-shadow: 0 18px 34px rgba(var(--brand-primary-rgb), 0.12);
}

.touch-choice-card__icon,
.touch-item-card__icon,
.touch-item-inline__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.16), rgba(var(--brand-accent-rgb), 0.3));
  color: var(--brand-slate);
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.touch-item-card__media,
.touch-item-inline__media {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.touch-item-inline__media {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.touch-item-card__image,
.touch-item-inline__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: rgba(255, 255, 255, 0.98);
}

.touch-item-inline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.color-swatch {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  flex: 0 0 auto;
}

.stock-kiosk__quantity-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.quantity-screen {
  min-height: 180px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(16, 26, 35, 0.96), rgba(34, 48, 64, 0.92));
  color: #f8fbfd;
  display: grid;
  align-content: center;
  gap: 12px;
}

.quantity-screen span {
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
}

.quantity-screen strong {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1;
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
}

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

.quantity-key {
  min-height: 82px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  font-size: 1.6rem;
  font-weight: 800;
}

.quantity-key--muted {
  font-size: 1rem;
  color: var(--muted);
}

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

.stock-kiosk__cta {
  display: grid;
}

.operator-job-list {
  display: grid;
  gap: 16px;
}

.operator-job-card {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.operator-job-card.is-current {
  border-color: rgba(var(--brand-primary-rgb), 0.28);
  box-shadow: 0 18px 34px rgba(var(--brand-primary-rgb), 0.12);
}

.operator-job-card.is-paused {
  border-color: rgba(var(--warning-rgb), 0.34);
  box-shadow: 0 18px 34px rgba(var(--warning-rgb), 0.12);
}

.operator-job-card--completed {
  border-color: rgba(15, 143, 100, 0.16);
  background: linear-gradient(180deg, rgba(15, 143, 100, 0.05), rgba(255, 255, 255, 0.82));
}

.operator-job-card__header {
  align-items: flex-start;
}

.operator-job-card__title {
  margin: 6px 0 0;
  font-size: 1.12rem;
  color: var(--text);
}

.operator-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.operator-note-preview {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 109, 158, 0.08);
  border: 1px solid rgba(15, 109, 158, 0.12);
  display: grid;
  gap: 6px;
}

.operator-note-preview--warning {
  background: rgba(var(--warning-rgb), 0.12);
  border-color: rgba(var(--warning-rgb), 0.2);
}

.operator-note-preview p,
.job-note-item p {
  margin: 0;
}

.operator-note-preview span {
  color: var(--muted);
  font-size: 0.9rem;
}

.job-note-panel {
  min-width: min(100%, 420px);
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(16, 26, 35, 0.04);
  border: 1px solid var(--line);
}

.job-note-panel summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.job-note-panel summary::-webkit-details-marker {
  display: none;
}

.job-note-panel[open] {
  background: rgba(255, 255, 255, 0.92);
}

.job-note-panel form {
  margin-top: 14px;
}

.operator-progress-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.operator-material-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.operator-material-card div,
.operator-progress-card div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.operator-material-card span,
.operator-progress-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.operator-material-card strong,
.operator-progress-card strong {
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
  font-size: 1.18rem;
}

.operator-pause-form {
  min-width: min(100%, 320px);
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(16, 26, 35, 0.04);
  border: 1px solid var(--line);
}

.operator-pause-form label {
  display: grid;
  gap: 8px;
}

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

.job-note-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  min-width: 88px;
  min-height: 60px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-strong));
  box-shadow: 0 18px 34px rgba(var(--brand-primary-rgb), 0.28);
  font-weight: 800;
}

.chat-fab__count {
  min-width: 26px;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
}

.support-chat {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 21;
  width: min(420px, calc(100vw - 32px));
  max-height: min(78vh, 760px);
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 22px 48px rgba(10, 18, 28, 0.18);
  display: grid;
  gap: 14px;
}

.support-chat[hidden] {
  display: none;
}

.support-chat__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.support-chat__header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.support-chat__close {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.support-chat__messages {
  max-height: 320px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--brand-primary-rgb), 0.38) rgba(16, 26, 35, 0.08);
  padding-right: 4px;
  display: grid;
  gap: 10px;
}

.support-chat__messages::-webkit-scrollbar,
.chat-thread__messages::-webkit-scrollbar {
  width: 10px;
}

.support-chat__messages::-webkit-scrollbar-track,
.chat-thread__messages::-webkit-scrollbar-track {
  background: rgba(16, 26, 35, 0.06);
  border-radius: 999px;
}

.support-chat__messages::-webkit-scrollbar-thumb,
.chat-thread__messages::-webkit-scrollbar-thumb {
  background: rgba(var(--brand-primary-rgb), 0.36);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.support-chat__messages--threads {
  max-height: 52vh;
  gap: 16px;
}

.support-chat__summary {
  display: grid;
  gap: 10px;
}

.chat-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.chat-panel-switcher__button {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  color: var(--text);
}

.chat-panel-switcher__button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong));
  box-shadow: 0 12px 24px rgba(var(--brand-primary-rgb), 0.22);
}

.chat-section {
  display: grid;
  gap: 12px;
}

.chat-folder {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.chat-folder[open] {
  box-shadow: 0 14px 28px rgba(10, 18, 28, 0.08);
}

.chat-folder__summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.chat-folder__summary::-webkit-details-marker {
  display: none;
}

.chat-folder__summary p {
  margin: 4px 0 0;
  color: var(--muted);
}

.chat-folder__body {
  padding: 0 18px 18px;
}

.chat-thread-list,
.chat-board {
  display: grid;
  gap: 14px;
}

.chat-board--maintenance {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  align-items: start;
}

.chat-thread {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.chat-thread[open],
.chat-thread--board {
  box-shadow: 0 14px 28px rgba(10, 18, 28, 0.08);
}

.chat-thread--archived {
  background: rgba(103, 113, 125, 0.08);
}

.chat-thread--archived-side {
  border-radius: 18px;
}

.chat-thread--selected {
  border-color: rgba(var(--brand-primary-rgb), 0.36);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.12), 0 14px 28px rgba(10, 18, 28, 0.08);
}

.chat-thread__summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.chat-thread__summary::-webkit-details-marker {
  display: none;
}

.chat-thread__summary p {
  margin: 4px 0 0;
  color: var(--muted);
}

.chat-thread__summary--static {
  cursor: default;
}

.chat-thread__summary--archive-side {
  padding: 14px 16px;
  align-items: flex-start;
}

.chat-thread__summary--archive-side strong {
  font-size: 0.98rem;
}

.chat-thread__summary--archive-side p {
  font-size: 0.86rem;
}

.chat-thread__summary-tags,
.chat-thread__toolbar,
.chat-thread__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.chat-thread__body {
  padding: 0 18px 18px;
  display: grid;
  gap: 14px;
}

.chat-thread__messages {
  display: grid;
  gap: 10px;
}

.support-chat .chat-thread__messages {
  max-height: 240px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--brand-primary-rgb), 0.42) rgba(16, 26, 35, 0.08);
  padding-right: 4px;
}

.chat-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  display: grid;
  gap: 8px;
}

.chat-message.is-self {
  margin-left: auto;
  background: rgba(var(--brand-primary-rgb), 0.14);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
}

.chat-message.is-other {
  margin-right: auto;
  background: rgba(15, 109, 158, 0.08);
  border: 1px solid rgba(15, 109, 158, 0.12);
}

.chat-message p {
  margin: 0;
}

.chat-message__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.88rem;
}

.chat-message__meta span {
  color: var(--muted);
}

.chat-thread__archive-form,
.support-chat__form--reply {
  display: grid;
  gap: 12px;
}

.chat-archive-rail {
  gap: 14px;
  align-self: start;
  position: sticky;
  top: 24px;
}

.chat-thread-list--archive-rail {
  gap: 10px;
}

.chat-thread-list--archive-rail .chat-thread__messages {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.chat-bubble {
  padding: 14px 16px;
  border-radius: 20px 20px 20px 10px;
  background: rgba(15, 109, 158, 0.08);
  border: 1px solid rgba(15, 109, 158, 0.12);
  display: grid;
  gap: 8px;
}

.chat-bubble--empty {
  background: rgba(103, 113, 125, 0.08);
  border-color: rgba(103, 113, 125, 0.14);
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble__meta,
.chat-bubble__footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.chat-bubble__meta span,
.chat-bubble__footer span {
  color: var(--muted);
  font-size: 0.88rem;
}

.support-chat__form {
  display: grid;
  gap: 12px;
}

body.theme-night:not(.display-mode) .user-picker,
body.theme-night:not(.display-mode) .operator-job-card,
body.theme-night:not(.display-mode) .operator-material-card div,
body.theme-night:not(.display-mode) .operator-progress-card div,
body.theme-night:not(.display-mode) .operator-pause-form,
body.theme-night:not(.display-mode) .checkbox-pill,
body.theme-night:not(.display-mode) .job-note-panel,
body.theme-night:not(.display-mode) .job-note-item,
body.theme-night:not(.display-mode) .support-chat,
body.theme-night:not(.display-mode) .support-chat__close,
body.theme-night:not(.display-mode) .mini-card,
body.theme-night:not(.display-mode) .ticket-card,
body.theme-night:not(.display-mode) .stock-kiosk__panel,
body.theme-night:not(.display-mode) .touch-choice-card,
body.theme-night:not(.display-mode) .touch-item-card,
body.theme-night:not(.display-mode) .quantity-key {
  background: rgba(20, 31, 43, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body.theme-night:not(.display-mode) .operator-note-preview,
body.theme-night:not(.display-mode) .chat-bubble,
body.theme-night:not(.display-mode) .chat-folder,
body.theme-night:not(.display-mode) .chat-thread,
body.theme-night:not(.display-mode) .chat-message.is-other {
  background: rgba(15, 109, 158, 0.16);
  border-color: rgba(15, 109, 158, 0.22);
}

body.theme-night:not(.display-mode) .operator-note-preview--warning {
  background: rgba(var(--warning-rgb), 0.16);
  border-color: rgba(var(--warning-rgb), 0.24);
}

body.theme-night:not(.display-mode) .chat-bubble--empty {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-night:not(.display-mode) .chat-thread--archived {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-night:not(.display-mode) .chat-message.is-self {
  background: rgba(var(--brand-primary-rgb), 0.18);
  border-color: rgba(var(--brand-primary-rgb), 0.26);
}

body.theme-night:not(.display-mode) input,
body.theme-night:not(.display-mode) select,
body.theme-night:not(.display-mode) textarea {
  background: rgba(12, 21, 31, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.job-card,
.focus-job-card,
.display-focus-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 10px;
}

.focus-job-card,
.display-focus-card {
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.12), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
}

.focus-job-card h4,
.display-focus-card h2,
.display-focus-card h3 {
  margin: 0;
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.supervision-user-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.supervision-user-card__actions form {
  margin: 0;
}

.panel-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.panel--notice {
  border-width: 1px;
}

.panel--notice-success {
  border-color: rgba(15, 143, 100, 0.18);
  background: rgba(15, 143, 100, 0.08);
}

.panel--notice-danger {
  border-color: rgba(198, 63, 42, 0.18);
  background: rgba(198, 63, 42, 0.08);
}

.panel--collapsible {
  gap: 0;
}

.panel-collapsible__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel-collapsible__summary::-webkit-details-marker {
  display: none;
}

.panel-collapsible__summary p {
  margin: 4px 0 0;
}

.panel-collapsible__toggle {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--brand-orange-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.panel--collapsible[open] .panel-collapsible__toggle {
  background: rgba(35, 49, 64, 0.1);
  color: var(--brand-slate);
}

.panel--collapsible[open] .panel-collapsible__toggle::before {
  content: "Refermer";
}

.panel--collapsible:not([open]) .panel-collapsible__toggle::before {
  content: "Ouvrir";
}

.panel-collapsible__content {
  margin-top: 18px;
}

.admin-card {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.admin-card--create {
  margin-bottom: 18px;
}

.display-mode {
  background: linear-gradient(180deg, #111c27 0%, #1c2a36 100%);
  color: #f6f8fb;
}

.display-mode .muted,
.display-mode .eyebrow,
.display-mode .ticket-meta,
.display-mode .display-kpi {
  color: rgba(255, 255, 255, 0.72);
}

.display-shell {
  padding: 24px;
}

.display-shell--machine {
  min-height: 100vh;
  padding-bottom: 16px;
}

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

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

.display-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 22px;
}

.display-grid--machine {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.display-panel {
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.machine-wall {
  display: grid;
  gap: 18px;
  align-content: start;
}

.display-panel--hero {
  min-height: 30vh;
}

.display-panel--stack {
  gap: 16px;
}

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

.display-station-card,
.ticket-card--display {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.display-focus-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.display-focus-card--wall {
  gap: 12px;
}

.display-meter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.display-meter-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
}

.display-meter-grid span,
.display-meter-inline {
  color: rgba(255, 255, 255, 0.76);
}

.display-meter-grid strong {
  font-size: 1.3rem;
  font-family: "Aptos Display", "Bahnschrift SemiCondensed", sans-serif;
  line-height: 1.25;
  word-break: break-word;
}

.display-meter-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.95rem;
}

.display-meter-inline span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.display-note-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 8px;
}

.display-note-card p,
.display-note-inline span {
  margin: 0;
}

.display-note-inline {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.display-note-inline strong,
.display-note-card strong {
  font-size: 0.9rem;
}

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

.display-detail-list div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 6px;
}

.display-detail-list span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.ticket-card--wall {
  padding: 16px 18px;
}

.display-placeholder {
  padding: 22px;
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 8px;
}

.display-placeholder--compact {
  padding: 18px;
}

.display-placeholder p,
.display-alert-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.display-alert-strip {
  position: sticky;
  bottom: 0;
  z-index: 8;
  padding: 18px 20px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(198, 63, 42, 0.18), rgba(17, 28, 39, 0.98)),
    rgba(17, 28, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 14px;
}

.display-alert-strip__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.display-alert-strip__content {
  display: grid;
  gap: 12px;
}

.display-alert-item {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 10px;
}

.display-alert-item--ok {
  background: rgba(15, 143, 100, 0.14);
  border-color: rgba(15, 143, 100, 0.22);
}

.display-mode.theme-jour {
  color: #121a22;
  background:
    radial-gradient(circle at top left, rgba(var(--brand-primary-rgb), 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(var(--brand-accent-rgb), 0.12), transparent 18%),
    linear-gradient(180deg, #f7f8fa 0%, #e9eef3 100%);
}

.display-mode.theme-jour .muted,
.display-mode.theme-jour .eyebrow,
.display-mode.theme-jour .ticket-meta,
.display-mode.theme-jour .display-kpi,
.display-mode.theme-jour .display-meter-grid span,
.display-mode.theme-jour .display-meter-inline,
.display-mode.theme-jour .panel-header--light .muted,
.display-mode.theme-jour .display-detail-list span,
.display-mode.theme-jour .display-placeholder p,
.display-mode.theme-jour .display-alert-item p {
  color: #5c6876;
}

.display-mode.theme-jour .display-panel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(19, 31, 44, 0.1);
  box-shadow: 0 18px 40px rgba(10, 18, 28, 0.08);
}

.display-mode.theme-jour .display-station-card,
.display-mode.theme-jour .ticket-card--display,
.display-mode.theme-jour .display-focus-card,
.display-mode.theme-jour .display-meter-grid div,
.display-mode.theme-jour .display-meter-inline span,
.display-mode.theme-jour .display-note-card,
.display-mode.theme-jour .display-note-inline,
.display-mode.theme-jour .display-detail-list div,
.display-mode.theme-jour .display-placeholder,
.display-mode.theme-jour .display-alert-item {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(19, 31, 44, 0.1);
}

.display-mode.theme-jour .display-alert-strip {
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.12), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.96);
  border-color: rgba(19, 31, 44, 0.12);
  box-shadow: 0 18px 38px rgba(10, 18, 28, 0.12);
}

.display-mode.theme-jour .display-alert-item--ok {
  background: rgba(15, 143, 100, 0.08);
  border-color: rgba(15, 143, 100, 0.16);
}

.display-station-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.meter--display .meter-track {
  background: rgba(255, 255, 255, 0.12);
}

.touch-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.touch-button {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

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

.rack-card {
  padding: 18px 18px 20px;
  transform-style: preserve-3d;
}

.rack-card::before,
.rack-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(30, 44, 58, 0.16), rgba(255, 255, 255, 0.04));
}

.rack-card::before {
  left: 10px;
  right: 10px;
  top: -10px;
  height: 10px;
  transform: skewX(-45deg);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.rack-card::after {
  top: 10px;
  right: -10px;
  width: 10px;
  bottom: 10px;
  transform: skewY(-45deg);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.rack-card.is-active {
  border-color: rgba(var(--brand-primary-rgb), 0.38);
  box-shadow: 0 24px 40px rgba(var(--brand-primary-rgb), 0.15);
}

.rack-level-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.rack-stage {
  display: grid;
  gap: 8px;
}

.rack-row {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px;
}

.slot-button {
  min-height: 48px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: grid;
  gap: 2px;
  align-content: center;
  background: #e4ebf0;
  font-size: 0.74rem;
}

.slot-button strong {
  font-size: 0.8rem;
}

.slot-button--occupied {
  background: linear-gradient(180deg, rgba(15, 143, 100, 0.22), rgba(15, 143, 100, 0.1));
  border-color: rgba(15, 143, 100, 0.24);
}

.slot-button--reserved {
  background: linear-gradient(180deg, rgba(15, 109, 158, 0.22), rgba(15, 109, 158, 0.1));
  border-color: rgba(15, 109, 158, 0.24);
}

.slot-button--quarantine {
  background: linear-gradient(180deg, rgba(198, 63, 42, 0.22), rgba(198, 63, 42, 0.12));
  border-color: rgba(198, 63, 42, 0.24);
}

.slot-button--empty {
  background: linear-gradient(180deg, rgba(103, 113, 125, 0.14), rgba(103, 113, 125, 0.07));
  border-color: rgba(103, 113, 125, 0.16);
}

.slot-button.is-selected {
  border-color: var(--brand-orange);
  box-shadow: inset 0 0 0 2px rgba(var(--brand-primary-rgb), 0.2), 0 10px 20px rgba(var(--brand-primary-rgb), 0.16);
  transform: translateY(-1px);
}

@media (max-width: 1400px) {
  .station-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid,
  .switcher-grid,
  .rack-grid,
  .display-grid,
  .portal-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .display-grid > :last-child {
    grid-column: 1 / -1;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .space-header,
  .two-column,
  .detail-grid,
  .detail-grid--balanced,
  .detail-grid--stock,
  .chat-board--maintenance,
  .module-grid,
  .admin-card-grid,
  .checkbox-grid,
  .space-select-row,
  .display-station-grid,
  .info-grid,
  .operator-summary-grid,
  .operator-material-card,
  .operator-progress-card,
  .portal-card-grid,
  .display-meter-grid,
  .display-detail-list,
  .stock-kiosk__steps,
  .stock-kiosk__action-grid,
  .stock-kiosk__item-grid,
  .stock-kiosk__quantity-layout,
  .stock-kiosk__cta-row {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 20px;
  }

  .space-shell {
    padding: 20px;
  }

  .chat-archive-rail {
    position: static;
  }
}

@media (max-width: 820px) {
  .topbar,
  .space-header,
  .hero-card,
  .display-header {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .station-grid,
  .switcher-grid,
  .switcher-grid--two,
  .rack-grid,
  .portal-card-grid {
    grid-template-columns: 1fr;
  }

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

  .touch-pad {
    justify-content: stretch;
  }

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

  .display-alert-strip__header {
    flex-direction: column;
    align-items: stretch;
  }

  .support-chat {
    right: 16px;
    left: 16px;
    bottom: 88px;
    width: auto;
  }

  .chat-fab {
    right: 16px;
    left: 16px;
    width: auto;
  }
}
