:root {
  color-scheme: dark;
  --ui-scale: 1;
  --viewport-scale: 1;
  --viewport-offset-x: 0px;
  --viewport-offset-y: 0px;
  --bg: #081017;
  --panel: rgba(11, 18, 24, 0.96);
  --panel-border: rgba(124, 145, 164, 0.16);
  --text: #f3f7fb;
  --muted: #8999aa;
  --accent: #d98f5a;
  --accent-soft: rgba(217, 143, 90, 0.18);
  --source-button-bg: rgba(214, 226, 239, 0.58);
  --source-button-border: rgba(247, 251, 255, 0.92);
  --source-button-text: #fbfdff;
  --queue-ready-bg: rgba(61, 179, 92, 0.98);
  --queue-ready-border: rgba(226, 255, 232, 0.98);
  --queue-ready-side-bg: rgba(97, 202, 126, 0.68);
  --queue-ready-side-border: rgba(228, 255, 233, 0.96);
  --queue-ready-text: #f6fff8;
  --queue-ready-sheen: rgba(255, 255, 255, 0.24);
  --queue-ready-glow: rgba(101, 230, 137, 0.34);
  --queue-prefix-bg: rgba(165, 176, 188, 0.52);
  --queue-prefix-border: rgba(242, 247, 252, 0.94);
  --queue-prefix-text: #f9fbfd;
  --queue-train-bg: rgba(233, 199, 56, 0.96);
  --queue-train-border: rgba(255, 243, 170, 1);
  --queue-battery-bg: rgba(153, 28, 72, 0.96);
  --queue-battery-border: rgba(255, 194, 217, 0.92);
  --queue: #5fb0ff;
  --queue-soft: rgba(95, 176, 255, 0.18);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  --radius-xl: calc(30px * var(--ui-scale));
  --radius-lg: calc(22px * var(--ui-scale));
  --radius-md: calc(16px * var(--ui-scale));
  --shared-loyve-font-size: calc(1.72rem * var(--ui-scale));
  --runtime-row-height: 72px;
  --runtime-loyve-font-size: var(--shared-loyve-font-size);
  --source-row-height: 72px;
  --source-font-size: var(--shared-loyve-font-size);
  --source-gap: 8px;
  --page-pad: calc(18px * var(--ui-scale));
  --panel-gap: calc(18px * var(--ui-scale));
  --panel-pad: calc(24px * var(--ui-scale));
  --panel-header-gap: calc(20px * var(--ui-scale));
  --pill-pad-y: calc(12px * var(--ui-scale));
  --pill-pad-x: calc(24px * var(--ui-scale));
  --button-frame-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 0 rgba(4, 10, 14, 0.28), 0 0 0 3px rgba(255, 255, 255, 0.14), 0 0 0 7px rgba(4, 9, 13, 0.76), 0 12px 24px rgba(0, 0, 0, 0.22), 0 18px 28px rgba(0, 0, 0, 0.12);
  --button-frame-shadow-soft: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(4, 10, 14, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.11), 0 0 0 6px rgba(4, 9, 13, 0.64), 0 10px 18px rgba(0, 0, 0, 0.18), 0 14px 22px rgba(0, 0, 0, 0.1);
  --button-rim: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0) 36%, rgba(0, 0, 0, 0.06) 100%);
  --button-inner-edge: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: linear-gradient(180deg, #071018 0%, #0b141c 100%);
  color: var(--text);
}

body {
  min-height: 100dvh;
  touch-action: manipulation;
  overflow: hidden;
  position: relative;
}

.layout {
  position: fixed;
  left: var(--viewport-offset-x);
  top: var(--viewport-offset-y);
  width: 1080px;
  height: 1920px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--panel-gap);
  padding: var(--page-pad);
  align-items: stretch;
  transform: scale(var(--viewport-scale));
  transform-origin: top left;
}

body.layout-native .layout {
  left: 0;
  top: 0;
  width: 100vw;
  height: 100dvh;
  transform: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: var(--panel-pad);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  contain: layout paint;
}

.source-panel {
  position: relative;
  padding-bottom: 420px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--panel-header-gap);
}

.panel-pill,
h1,
h2 {
  margin: 0;
  width: calc(100% - 8px);
  padding: var(--pill-pad-y) var(--pill-pad-x);
  border-radius: calc(20px * var(--ui-scale));
  background: rgba(18, 28, 36, 0.96);
  border: 2px solid rgba(180, 198, 214, 0.34);
  text-align: center;
  font-size: calc(1.52rem * var(--ui-scale));
  line-height: 1.02;
  letter-spacing: 0.11em;
  position: relative;
  overflow: hidden;
}

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

.panel-pill-button {
  appearance: none;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}

.panel-pill-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(95, 176, 255, 0.22) 0%, rgba(95, 176, 255, 0.48) 100%);
  border-radius: inherit;
  transition: width 60ms linear;
}

.panel-pill-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 1em;
  align-items: center;
  font-weight: 950;
}

.queue-list,
.source-list {
  display: flex;
  flex-direction: column;
}

.queue-list {
  gap: var(--queue-gap, 12px);
  min-height: 0;
  flex: 1;
  overflow: hidden;
  --queue-row-height: 82px;
  --queue-font-size: var(--shared-loyve-font-size);
  --queue-prefix-size: 44px;
  --queue-side-font-size: clamp(1.05rem, 1.15vw, 1.4rem);
  --queue-gap: 8px;
}

.queue-item,
.source-item,
.source-row,
.drag-preview {
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  user-select: none;
  touch-action: none;
  font-family: Bahnschrift, "Segoe UI Semibold", "Segoe UI", sans-serif;
}

.panel-pill-button,
.corner-button,
.queue-number,
.suffix-badge,
.sleep-overlay {
  touch-action: manipulation;
}

.queue-item {
  min-height: var(--queue-row-height);
  font-size: var(--queue-font-size);
  background: transparent;
  border: 0;
  gap: 12px;
  padding: 0;
  position: relative;
  overflow: visible;
}

.queue-item.drop-target-before::before,
.queue-item.drop-target-after::after {
  content: "";
  position: absolute;
  left: calc(clamp(48px, calc(var(--queue-row-height) * 0.9), 68px) + 6px);
  right: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(95, 176, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(8, 16, 23, 0.9);
  z-index: 20;
}

.queue-drop-placeholder {
  height: var(--queue-row-height);
  min-height: var(--queue-row-height);
  border-radius: calc(var(--radius-md) * 1.08);
  border: 3px dashed rgba(95, 176, 255, 0.72);
  background: rgba(95, 176, 255, 0.14);
  margin-left: calc(clamp(48px, calc(var(--queue-row-height) * 0.9), 68px) + 12px);
  margin-right: 0;
  transition: height 0.2s ease-in-out, min-height 0.2s ease-in-out, margin 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
.queue-drop-placeholder.is-entering {
  height: 0;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  border-width: 0;
}

.queue-item.drop-target-before::before {
  top: -8px;
}

.queue-item.drop-target-after::after {
  bottom: -8px;
}

.source-item,
.source-slot-placeholder {
  height: var(--source-row-height);
  min-height: var(--source-row-height);
  max-height: var(--source-row-height);
  padding: 10px 16px;
  font-size: var(--source-font-size);
  flex: 0 0 var(--source-row-height);
}

.source-row {
  width: 100%;
  flex: 0 0 auto;
}

.source-item {
  flex: 1;
  border-radius: calc(var(--radius-md) * 1.2);
  background: rgba(92, 112, 126, 0.78);
  border: 2px solid rgba(233, 240, 246, 0.34);
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.source-item:active {
  transform: translateY(1px) scale(0.992);
}

.source-item .label-normal {
  color: rgba(214, 224, 232, 0.44);
}

.source-item .label-emphasis {
  color: #fff07a;
  letter-spacing: 0.05em;
  font-weight: 990;
  text-shadow: 0 0 1px rgba(8, 16, 23, 0.55);
}

.source-label {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.08;
  font-size: calc(var(--source-font-size) * 1.2);
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.source-slot {
  width: 100%;
  flex: 0 0 auto;
}

.source-slot-placeholder {
  border: 1px dashed rgba(142, 160, 179, 0.16);
  background: rgba(255, 255, 255, 0.008);
  opacity: 0.18;
}

.source-row-placeholder .source-slot-placeholder {
  border-color: rgba(142, 160, 179, 0.08);
}

.source-row-placeholder .label-normal,
.source-row-placeholder .label-emphasis {
  opacity: 0.34;
}

.source-row-placeholder .label-emphasis {
  opacity: 0.42;
}

.queue-card {
  min-height: var(--queue-row-height);
  flex: 1;
  border-radius: calc(var(--radius-md) * 1.2);
  border: 2px solid rgba(236, 247, 238, 0.44);
  background: var(--queue-ready-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px 4px calc(var(--queue-row-height) * 0.62);
  position: relative;
  gap: 8px;
  cursor: pointer;
  appearance: none;
  color: inherit;
  text-align: inherit;
  overflow: hidden;
}

.queue-card:active {
  transform: translateY(1px) scale(0.992);
}

.queue-card-ready {
  border-color: rgba(231, 250, 236, 0.52);
  background: var(--queue-ready-bg);
}

.queue-card-battery {
  border-color: rgba(255, 243, 170, 0.62);
  background: var(--queue-train-bg);
}

.queue-card-train {
  border-color: rgba(255, 194, 217, 0.6);
  background: var(--queue-battery-bg);
}

.queue-number {
  width: clamp(48px, calc(var(--queue-row-height) * 0.9), 68px);
  min-height: var(--queue-row-height);
  height: var(--queue-row-height);
  border-radius: calc(var(--radius-md) * 1.08);
  display: grid;
  place-items: center;
  background: var(--queue-prefix-bg);
  color: var(--queue-prefix-text);
  flex: 0 0 auto;
  border: 2px solid rgba(242, 247, 252, 0.36);
  font-size: max(var(--queue-side-font-size), calc(var(--queue-row-height) * 0.42));
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.queue-number:active {
  transform: translateY(1px) scale(0.99);
}

.item-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.08;
  min-width: 0;
  font-size: max(calc(var(--queue-font-size) * 1.08), calc(var(--queue-row-height) * 0.62));
  font-weight: 950;
}

.label-normal,
.label-emphasis {
  display: inline-flex;
  align-items: center;
  min-height: 1em;
}

.label-normal {
  color: rgba(224, 236, 244, 0.78);
}

.label-emphasis {
  font-weight: 950;
  color: rgba(245, 250, 255, 0.96);
  letter-spacing: 0.04em;
}

.queue-card .label-normal {
  color: rgba(219, 231, 239, 0.38);
}

.queue-card .label-emphasis {
  color: #fff4a8;
  letter-spacing: 0.07em;
  font-weight: 980;
  text-shadow: 0 0 1px rgba(8, 16, 23, 0.45);
}

.suffix-badge {
  width: clamp(48px, calc(var(--queue-row-height) * 0.95), 72px);
  min-height: var(--queue-row-height);
  height: var(--queue-row-height);
  border-radius: calc(var(--radius-md) * 1.08);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: max(var(--queue-side-font-size), calc(var(--queue-row-height) * 0.46));
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  background: var(--queue-ready-side-bg);
  border: 2px solid rgba(236, 247, 238, 0.36);
  color: var(--queue-ready-text);
  text-align: center;
  padding-top: 5px;
  position: relative;
  overflow: hidden;
}

.suffix-badge:active {
  transform: translateY(1px) scale(0.99);
}

.suffix-badge-ready {
  border-color: rgba(231, 250, 236, 0.52);
  background: var(--queue-ready-bg);
}

.suffix-badge-battery {
  border-color: rgba(255, 243, 170, 0.62);
  background: var(--queue-train-bg);
}

.suffix-badge-train {
  border-color: rgba(255, 194, 217, 0.6);
  background: var(--queue-battery-bg);
}

.suffix-badge-empty {
  visibility: hidden;
}

.status-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: calc(var(--queue-row-height) * 0.52);
  height: calc(var(--queue-row-height) * 0.52);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: calc(var(--queue-row-height) * 0.26);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.9);
}

.status-icon-ready {
  background-image: url("./taxi-transparent.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.status-icon-battery {
  background-image: url("./bat-transparent.png?v=1");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.status-icon-train {
  background-image: url("./lok-transparent.png?v=1");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.source-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.source-logo-wrap {
  position: absolute;
  left: 50%;
  bottom: 300px;
  transform: translateX(-50%);
  width: min(78%, 420px);
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0.9;
}

.source-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.group-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-height: 0;
}

.source-list {
  flex: 1;
  gap: var(--source-gap);
  overflow: hidden;
  min-height: 0;
}

.empty-state {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.drop-placeholder {
  min-height: var(--queue-row-height);
  border: 3px dashed rgba(73, 200, 165, 0.6);
  background: rgba(73, 200, 165, 0.12);
  border-radius: var(--radius-md);
  margin-left: calc(clamp(48px, calc(var(--queue-row-height) * 0.9), 68px) + var(--queue-gap, 8px));
}

.dragging-origin {
  opacity: 0.35;
}

.drag-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.95;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  transform-origin: top left;
  will-change: transform;
  transition: transform 0.15s ease-out;
  --queue-row-height: 82px;
  --queue-font-size: var(--shared-loyve-font-size);
  --queue-prefix-size: 44px;
  --queue-side-font-size: clamp(1.05rem, 1.15vw, 1.4rem);
  --queue-gap: 8px;
}

.drag-preview-queue,
.drag-preview-source {
  display: flex;
}

.transfer-ghost {
  position: fixed;
  z-index: 9998;
  margin: 0;
  pointer-events: none;
  opacity: 0.96;
  transform-origin: top left;
  will-change: transform, opacity;
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    box-shadow 260ms ease;
}

.transfer-ghost-moving {
  box-shadow: none;
}

.transfer-landed {
  animation: none;
}

.queue-panel.is-drop-target {
  outline: 2px solid rgba(73, 200, 165, 0.18);
}

.source-panel.is-drop-target {
  outline: 2px solid rgba(255, 159, 107, 0.16);
}

.corner-controls {
  position: absolute;
  right: var(--panel-pad);
  bottom: 24px;
  display: flex;
  justify-content: flex-end;
  display: flex;
  gap: 12px;
  padding-top: 0;
}

.corner-button {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(11, 18, 24, 0.94);
  color: var(--text);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.corner-button:active {
  transform: translateY(1px) scale(0.985);
}

.corner-button-label {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  line-height: 1.08;
  display: inline-flex;
  align-items: center;
}

.reset-button .corner-button-label {
  font-size: 1.4rem;
}

.reset-button {
  border-color: rgba(214, 89, 89, 0.42);
  background: linear-gradient(135deg, rgba(146, 48, 48, 0.94) 0%, rgba(96, 24, 24, 0.98) 100%);
}

.hold-progress {
  --hold-progress: 0%;
  position: absolute;
  inset: 0;
  background: conic-gradient(rgba(255, 159, 107, 0.92) var(--hold-progress), rgba(255, 255, 255, 0.08) 0);
}

.reset-button.is-holding {
  border-color: rgba(255, 159, 107, 0.4);
}

.sleep-button {
  width: 88px;
}

.sleep-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #000;
}

.admin-body {
  min-height: 100vh;
}

.admin-layout {
  height: 100vh;
  padding: 18px;
  overflow: hidden;
}

.admin-panel {
  margin: 0 auto;
  height: 100%;
}

.admin-header {
  justify-content: space-between;
  gap: 18px;
}

.admin-header .panel-pill {
  width: auto;
  flex: 1;
}

.admin-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.9fr);
  gap: 20px;
  margin-bottom: 18px;
  overflow: hidden;
}

.admin-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.admin-shift-card,
.admin-editor {
  border-radius: 24px;
  border: 2px solid rgba(124, 145, 164, 0.22);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  min-height: 0;
}

.admin-shift-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-shift-title,
.admin-editor-label {
  color: #ced8e2;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-shift-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}

.admin-loyve {
  min-height: 82px;
  border-radius: 16px;
  border: 2px solid rgba(142, 160, 179, 0.22);
  background: linear-gradient(135deg, rgba(103, 120, 139, 0.32) 0%, rgba(48, 60, 74, 0.74) 100%);
  color: var(--text);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font-family: Bahnschrift, "Segoe UI Semibold", "Segoe UI", sans-serif;
  font-size: 2.04rem;
  font-weight: 800;
  text-align: left;
  width: 100%;
  touch-action: none;
}

.admin-loyve.is-selected {
  border-color: rgba(156, 216, 255, 0.96);
  background: linear-gradient(135deg, rgba(118, 147, 173, 0.52) 0%, rgba(55, 74, 94, 0.92) 100%);
  box-shadow:
    0 0 0 4px rgba(95, 176, 255, 0.24),
    0 14px 30px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(224, 242, 255, 0.22);
}

.admin-loyve.is-dragging-origin {
  opacity: 0.18;
}

.admin-loyve-preview {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  margin: 0;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.admin-loyve-placeholder {
  width: 100%;
  border-radius: 16px;
  border: 2px dashed rgba(95, 176, 255, 0.52);
  background: rgba(95, 176, 255, 0.12);
  flex: 0 0 auto;
}

.admin-loyve-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.admin-loyve-suffix {
  min-width: 52px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 2px solid rgba(142, 160, 179, 0.24);
  background: rgba(13, 20, 28, 0.54);
  text-align: center;
  font-size: 1.64rem;
}

.admin-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.admin-editor-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-helper-badge {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(142, 160, 179, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #d5dfe8;
  font-size: 0.94rem;
  line-height: 1.3;
}

.admin-text-field {
  min-height: 76px;
  border-radius: 20px;
  border: 2px solid rgba(95, 176, 255, 0.28);
  background: rgba(5, 10, 15, 0.58);
  color: var(--text);
  padding: 0 18px;
  font-family: Bahnschrift, "Segoe UI Semibold", "Segoe UI", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  white-space: nowrap;
}

.admin-text-field.is-placeholder {
  color: var(--muted);
}

.admin-text-field.is-active {
  border-color: rgba(95, 176, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(95, 176, 255, 0.14);
}

.admin-text-field-secondary {
  min-height: 68px;
  font-size: 1.42rem;
}

.admin-field-content,
.admin-field-placeholder {
  white-space: pre;
  line-height: 1;
}

.admin-field-placeholder {
  color: var(--muted);
}

.admin-field-placeholder-overlay {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-caret {
  width: 3px;
  height: 1.05em;
  margin: 0 1px;
  border-radius: 999px;
  background: #8dcaff;
  animation: admin-caret-blink 1s step-end infinite;
  flex: 0 0 auto;
}

.admin-text-measure {
  position: fixed;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
  pointer-events: none;
  white-space: pre;
}

.admin-chip-row,
.admin-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-chip {
  min-width: 88px;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid rgba(142, 160, 179, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: Bahnschrift, "Segoe UI Semibold", "Segoe UI", sans-serif;
  font-size: 1.56rem;
  font-weight: 800;
}

.admin-chip.is-active {
  border-color: rgba(95, 176, 255, 0.72);
  background: linear-gradient(135deg, rgba(95, 176, 255, 0.24) 0%, rgba(26, 63, 98, 0.54) 100%);
}

.admin-chip.is-selected-option {
  border-color: rgba(217, 143, 90, 0.64);
  box-shadow: 0 0 0 2px rgba(217, 143, 90, 0.12);
}

.admin-property-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: -2px;
}

.admin-editor-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-action,
.admin-back {
  min-height: 58px;
  border-radius: 18px;
  border: 2px solid rgba(142, 160, 179, 0.22);
  color: var(--text);
  font-family: Bahnschrift, "Segoe UI Semibold", "Segoe UI", sans-serif;
  font-size: 1.34rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.admin-action-primary {
  background: linear-gradient(135deg, rgba(95, 176, 255, 0.24) 0%, rgba(26, 63, 98, 0.52) 100%);
  border-color: rgba(95, 176, 255, 0.34);
}

.admin-action-danger {
  background: linear-gradient(135deg, rgba(152, 69, 69, 0.28) 0%, rgba(88, 24, 24, 0.5) 100%);
  border-color: rgba(185, 84, 84, 0.34);
}

.admin-action-save,
.admin-back {
  background: linear-gradient(135deg, rgba(79, 171, 139, 0.24) 0%, rgba(24, 83, 69, 0.5) 100%);
  border-color: rgba(79, 171, 139, 0.34);
}

.admin-action:disabled,
.admin-chip:disabled {
  opacity: 0.4;
}

.admin-status {
  min-height: 28px;
  color: #9db1c5;
  font-size: 1.14rem;
  font-weight: 700;
  margin-top: 10px;
}

.admin-status.is-error {
  color: #ff9d9d;
}

.admin-status.is-success {
  color: #97e3bf;
}

.admin-keyboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.admin-keyboard-row:nth-child(3) {
  grid-template-columns: repeat(11, minmax(0, 1fr));
}

.admin-keyboard-row:nth-child(4) {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.admin-keyboard-row:nth-child(5) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.key {
  min-height: 58px;
  border-radius: 18px;
  border: 2px solid rgba(142, 160, 179, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: Bahnschrift, "Segoe UI Semibold", "Segoe UI", sans-serif;
  font-size: 1.64rem;
  font-weight: 800;
}

.key-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.key-wide {
  min-width: 0;
}

@keyframes admin-caret-blink {
  50% {
    opacity: 0;
  }
}

@media (min-width: 1600px) {
  :root {
    --shared-loyve-font-size: 2.08rem;
  }

  .queue-list {
    --queue-font-size: var(--shared-loyve-font-size);
    --queue-side-font-size: 1.65rem;
  }
}
