:root {
  --bg: #080a09;
  --bg-elevated: #0d100f;
  --surface: rgba(17, 21, 19, 0.92);
  --surface-solid: #111513;
  --surface-soft: #151a17;
  --surface-hover: #19201c;
  --line: rgba(236, 255, 246, 0.09);
  --line-strong: rgba(236, 255, 246, 0.15);
  --text: #f2f6f4;
  --text-soft: #c8d0cc;
  --muted: #7f8b85;
  --muted-strong: #9ca6a1;
  --accent: #6ff3be;
  --accent-strong: #48d9a0;
  --accent-soft: rgba(111, 243, 190, 0.10);
  --accent-line: rgba(111, 243, 190, 0.24);
  --red: #ff7b84;
  --red-soft: rgba(255, 123, 132, 0.10);
  --amber: #e8c26a;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.22);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --ui-micro: 11px;
  --ui-caption: 12px;
  --ui-text: 13px;
  --ui-control: 14px;
  --height-compact: 36px;
  --height-control: 46px;
  --height-action: 48px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 50% -180px, rgba(74, 206, 154, 0.12), transparent 72%),
    linear-gradient(180deg, #090c0a 0, #080a09 420px, #070908 100%);
  font-family: Inter, "SF Pro Display", "Segoe UI", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

button {
  color: inherit;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-symbol svg path {
  fill: currentColor;
  stroke: none;
}

[hidden],
.hidden {
  display: none !important;
}

.shell {
  width: 100%;
  min-height: 100vh;
}

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

h1,
h2,
h3,
h4,
strong {
  text-wrap: balance;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.032em;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.018em;
}

h4 {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 650;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.surface {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.016), transparent 32%),
    var(--surface);
  box-shadow: var(--shadow-sm), inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
}

.auth-card {
  position: relative;
  width: min(464px, calc(100% - 32px));
  margin: auto;
  padding: 38px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(111, 243, 190, 0.055), transparent 36%),
    rgba(13, 17, 15, 0.96);
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.54), inset 0 1px rgba(255, 255, 255, 0.04);
}

.auth-card::before {
  position: absolute;
  inset: 0 18% auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(111, 243, 190, 0.8), transparent);
}

body:has(.auth-card:not(.hidden)) .shell {
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 58px;
}

.brand-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.brand-symbol svg {
  width: 25px;
  height: 25px;
}

.brand-symbol.small {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.brand-name {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.auth-copy {
  margin-bottom: 34px;
}

.auth-copy h1 {
  font-size: 34px;
}

.auth-card .field-label {
  margin-bottom: 10px;
}

.auth-card input {
  height: 54px;
}

.auth-submit {
  width: 100%;
  min-height: 54px !important;
  margin-top: 16px;
  justify-content: space-between !important;
  padding: 0 18px 0 20px !important;
}

.auth-submit svg {
  width: 20px;
  height: 20px;
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: #ffa0a6;
  font-size: 12px;
  text-align: center;
}

.dashboard {
  width: 100%;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 82px;
  padding: 0 max(24px, calc((100vw - 1540px) / 2));
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(111, 243, 190, 0.045), transparent 38%),
    rgba(9, 12, 10, 0.8);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(24px) saturate(115%);
}

.brand-row,
.topbar-actions,
.topbar-center,
.console-actions,
.proxy-check-controls,
.csharp-session-counts,
.json-editor-actions {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 13px;
}

.brand-lockup > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-lockup strong {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0.1em;
}

.brand-lockup > div:first-child > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.brand-lockup small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.topbar-center {
  flex-direction: column;
  gap: 5px;
}

.topbar-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 8px;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.pulse-dot,
.live-indicator i,
.stat-card-primary small i,
.csharp-service-badge i {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5f6863;
}

.connection-badge.online {
  color: var(--accent);
}

.connection-badge.online .pulse-dot,
.live-indicator i,
.stat-card-primary small i,
.csharp-service-badge.online i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(111, 243, 190, 0.07), 0 0 12px rgba(111, 243, 190, 0.45);
}

.connection-badge.connecting {
  color: var(--amber);
}

.connection-badge.connecting .pulse-dot {
  background: var(--amber);
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.4; }
}

.utility-button,
.logout-button,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-close,
.icon-button,
.number-control button,
.csharp-session-action {
  border: 0;
  outline: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 120ms ease, opacity 160ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(111, 243, 190, 0.7);
  outline-offset: 2px;
}

.utility-button,
.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.utility-button svg,
.logout-button svg {
  width: 16px;
  height: 16px;
}

.utility-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.proxy-count-button {
  color: var(--accent);
  border-color: rgba(111, 243, 190, 0.16);
  background: rgba(111, 243, 190, 0.06);
}

.logout-button {
  min-width: 96px;
  margin-left: 4px;
  color: #07110c;
  border-color: transparent;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), #61d9a8);
  box-shadow: 0 8px 24px rgba(67, 207, 151, 0.14);
}

.logout-button:hover {
  background: linear-gradient(135deg, #86f7ca, #69e2b1);
}

.dashboard-body {
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 74px;
}

.overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.overview-copy > p:last-child {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.overview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(111, 243, 190, 0.16);
  border-radius: 7px;
  color: var(--accent);
  background: rgba(111, 243, 190, 0.055);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 158px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(18, 23, 20, 0.8);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  text-align: center;
}

.stat-card::after {
  position: absolute;
  right: -36px;
  bottom: -58px;
  width: 130px;
  height: 100px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  content: "";
}

.stat-card-primary {
  border-color: rgba(111, 243, 190, 0.2);
  background:
    linear-gradient(135deg, rgba(111, 243, 190, 0.12), rgba(111, 243, 190, 0.025) 62%),
    rgba(17, 23, 20, 0.9);
}

.stat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.stat-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
}

.stat-icon svg {
  width: 15px;
  height: 15px;
}

.stat-icon.online {
  color: var(--accent);
  border-color: rgba(111, 243, 190, 0.16);
  background: rgba(111, 243, 190, 0.07);
}

.stat-card > strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin: 11px 0 5px;
  font-size: clamp(38px, 3.2vw, 54px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
}

.stat-card-primary > strong {
  color: var(--accent);
}

.stat-card > small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.state-card > strong {
  margin-top: 11px;
  overflow: hidden;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-text.running {
  color: var(--accent);
}

.state-text.stopping {
  color: var(--amber);
}

.proxy-check-panel {
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(111, 243, 190, 0.07), rgba(16, 21, 18, 0.94) 34%);
  box-shadow: var(--shadow-sm);
}

.proxy-check-header,
.proxy-check-heading,
.surface-heading,
.console-header,
.scheduler-header,
.scheduler-heading,
.subsection-heading,
.csharp-sessions-header,
.csharp-pane-heading,
.json-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.proxy-check-heading,
.scheduler-heading {
  justify-content: flex-start;
}

.proxy-check-heading h2 {
  font-size: 17px;
}

.proxy-check-heading p,
.scheduler-heading p,
.subsection-heading p,
.json-editor-description {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.panel-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(111, 243, 190, 0.16);
  border-radius: 10px;
  color: var(--accent);
  background: rgba(111, 243, 190, 0.07);
}

.panel-icon svg {
  width: 17px;
  height: 17px;
}

.proxy-check-controls {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.proxy-concurrency-field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.proxy-concurrency-field input {
  width: 68px;
  height: 34px;
  padding: 0 8px;
  text-align: center;
}

.proxy-check-counts {
  gap: 6px;
}

.proxy-check-counts > span,
.csharp-session-counts > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
}

.proxy-check-counts .working,
.csharp-session-counts .working {
  color: var(--accent);
  background: var(--accent-soft);
}

.csharp-session-counts .starting {
  color: var(--amber);
  background: rgba(232, 194, 106, 0.09);
}

.proxy-check-counts .failed,
.csharp-session-counts .failed {
  color: #ff9ca3;
  background: var(--red-soft);
}

.proxy-check-counts .unknown {
  color: var(--amber);
  background: rgba(232, 194, 106, 0.09);
}

.icon-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
}

.icon-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.icon-close svg {
  width: 15px;
  height: 15px;
}

.proxy-check-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 300px;
  margin-top: 16px;
  padding-right: 3px;
  overflow: auto;
  scrollbar-color: #314039 transparent;
}

.proxy-check-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 50px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.13);
}

.proxy-check-row strong {
  overflow: hidden;
  font: 650 11px "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-check-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.proxy-check-row.working {
  border-color: rgba(111, 243, 190, 0.13);
}

.proxy-check-row.working span {
  color: #a7d9c5;
}

.proxy-check-row.failed {
  border-color: rgba(255, 123, 132, 0.13);
}

.proxy-check-row.failed span {
  color: #dca0a4;
}

.proxy-check-empty,
.schedule-empty,
.csharp-sessions-empty,
.console-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.proxy-check-empty {
  grid-column: 1 / -1;
  padding: 24px;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(500px, 0.82fr) minmax(660px, 1.18fr);
  align-items: start;
  gap: 18px;
}

.control-card {
  padding: 27px;
}

.surface-heading {
  align-items: flex-start;
}

.target-bubble {
  display: grid;
  min-width: 68px;
  height: 48px;
  padding: 0 14px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.target-control {
  margin-top: 28px;
}

.range {
  width: 100%;
  height: 5px;
  margin: 0;
  border-radius: 999px;
  outline: none;
  appearance: none;
  background: linear-gradient(90deg, var(--accent) 0 var(--range-progress, 0%), rgba(255, 255, 255, 0.09) var(--range-progress, 0%));
}

.range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #0d110f;
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(111, 243, 190, 0.45), 0 4px 15px rgba(111, 243, 190, 0.22);
}

.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #0d110f;
  border-radius: 50%;
  cursor: pointer;
  background: var(--accent);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  color: var(--muted);
  font: 600 10px "Cascadia Code", Consolas, monospace;
}

.target-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 19px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.target-input-row .field-label {
  margin: 0 0 3px;
}

.target-input-row small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.number-control {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 36px 68px 36px;
  align-items: center;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0d110f;
}

.number-control button {
  display: grid;
  height: 100%;
  padding: 0;
  place-items: center;
  color: var(--muted-strong);
  background: transparent;
}

.number-control button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.number-control button svg {
  width: 14px;
  height: 14px;
}

.number-control input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  background: transparent;
  box-shadow: none !important;
  appearance: textfield;
}

.number-control input::-webkit-outer-spin-button,
.number-control input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.control-divider {
  height: 1px;
  margin: 27px 0 23px;
  background: var(--line);
}

.transition-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}

.transition-heading span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.transition-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
}

.transition-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.transition-card-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.transition-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
}

.transition-icon svg {
  width: 14px;
  height: 14px;
}

.transition-icon.start {
  color: var(--accent);
  background: var(--accent-soft);
}

.transition-icon.stop {
  color: #ff939a;
  background: var(--red-soft);
}

.compact-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 650;
}

.input-with-unit {
  position: relative;
  display: block;
  width: 94px;
}

.input-with-unit input {
  height: 38px;
  padding: 0 34px 0 10px;
  text-align: right;
}

.input-with-unit b {
  position: absolute;
  top: 50%;
  right: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  transform: translateY(-50%);
  pointer-events: none;
}

.transition-target-options {
  display: grid;
  gap: 8px;
}

.checkbox-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

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

.check-ui {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-label input:checked + .check-ui {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox-label input:checked + .check-ui::after {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #07110c;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.transition-all-label {
  min-height: 35px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.11);
}

.transition-count-control,
.schedule-count-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.transition-count-control input {
  width: 72px;
  height: 35px;
  padding: 0 8px;
  text-align: center;
}

.transition-count-control.disabled,
.schedule-target-group.all-selected .schedule-count-control {
  opacity: 0.42;
}

.rcon-settings {
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.subsection-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.protocol-badge,
.scheduler-timezone {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--accent-line);
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
  font: 700 8px "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.08em;
}

.rcon-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(96px, 0.7fr));
  gap: 10px;
}

.rcon-password-field {
  grid-column: 1 / -1;
}

.field-label,
.input-group > .field-label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.input-group {
  display: block;
  min-width: 0;
}

input[type="password"],
input[type="text"],
input[type="number"],
input[type="time"],
select {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.026);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #56605b;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(111, 243, 190, 0.48);
  background: rgba(255, 255, 255, 0.042);
  box-shadow: 0 0 0 3px rgba(111, 243, 190, 0.07);
}

input:disabled,
select:disabled {
  color: #69736e;
  background: rgba(255, 255, 255, 0.012);
}

select {
  color-scheme: dark;
  cursor: pointer;
}

select option {
  color: var(--text);
  background: var(--surface-solid);
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 48px;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.icon-button:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.primary-button svg,
.secondary-button svg,
.danger-button svg,
.ghost-button svg {
  width: 16px;
  height: 16px;
}

.primary-button {
  color: #07110c;
  background: linear-gradient(135deg, var(--accent), #61dfa9);
  box-shadow: 0 10px 24px rgba(75, 222, 164, 0.13);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #85f7ca, #66e5ae);
}

.secondary-button {
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.danger-button {
  color: #ffadb3;
  border: 1px solid rgba(255, 123, 132, 0.2);
  background: var(--red-soft);
}

.danger-button:hover:not(:disabled) {
  color: #ffc1c5;
  background: rgba(255, 123, 132, 0.15);
}

.ghost-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  background: transparent;
  font-size: 10px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.button-row button {
  min-height: 48px;
}

.action-message {
  min-height: 16px;
  margin: 10px 0 -5px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.action-message.error {
  color: #ff9da4;
}

.monitor-column {
  min-width: 0;
}

.console-card {
  padding: 0;
}

.console-header {
  min-height: 86px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.console-actions {
  gap: 10px;
}

.compact-check {
  min-height: 34px;
  padding: 0 3px;
}

.server-metrics {
  display: grid;
  grid-template-columns: minmax(220px, 2.25fr) repeat(3, minmax(70px, 0.75fr));
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.11);
}

.server-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.server-metric:last-child {
  border-right: 0;
}

.server-metric-label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.server-metric-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font: 650 19px "Cascadia Code", Consolas, monospace;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.server-address-metric .server-metric-value {
  width: 100%;
  padding: 2px 0;
  overflow-x: auto;
  text-align: center;
  font-size: clamp(14px, 1.25vw, 18px);
  scrollbar-width: none;
}

.server-address-metric .server-metric-value::-webkit-scrollbar {
  display: none;
}

.web-metric .server-metric-value {
  color: var(--accent);
}

.console-output {
  height: 418px;
  padding: 16px 19px;
  overflow: auto;
  color: #c8d2cd;
  background:
    linear-gradient(180deg, rgba(111, 243, 190, 0.018), transparent 70px),
    #0a0d0b;
  scrollbar-color: #29342f transparent;
  scrollbar-width: thin;
}

.console-line {
  display: grid;
  grid-template-columns: 70px 52px minmax(0, 1fr);
  gap: 9px;
  padding: 3px 0;
  font: 10px/1.55 "Cascadia Code", Consolas, monospace;
}

.console-time {
  color: #55615b;
}

.console-level {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-level.info {
  color: #7daca0;
}

.console-level.success {
  color: var(--accent);
}

.console-level.warn {
  color: var(--amber);
}

.console-level.error {
  color: var(--red);
}

.console-line > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.console-empty {
  display: grid;
  height: 100%;
  place-items: center;
}

.command-form {
  display: none;
}

.scheduler-card {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.scheduler-header {
  padding: 21px 24px 17px;
}

.scheduler-heading h3 {
  font-size: 15px;
}

.schedule-form {
  display: grid;
  grid-template-columns: minmax(160px, 1.35fr) minmax(115px, 0.75fr) minmax(120px, 0.82fr) minmax(180px, 1.25fr) auto;
  align-items: end;
  gap: 9px;
  padding: 0 24px 19px;
}

.schedule-form input,
.schedule-form select {
  height: 42px;
}

.schedule-target-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.schedule-all-label {
  min-width: 0;
  line-height: 1.2;
}

.schedule-count-control {
  display: block;
  text-align: left;
}

.schedule-count-control > span {
  display: block;
  margin-bottom: 2px;
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.schedule-count-control input {
  height: 28px;
  padding: 0 7px;
  text-align: center;
}

.schedule-submit {
  min-height: 42px;
}

.schedule-list {
  max-height: 180px;
  padding: 0 24px 20px;
  overflow: auto;
  scrollbar-color: #29342f transparent;
}

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 9px 11px;
  border-top: 1px solid var(--line);
}

.schedule-info {
  min-width: 0;
}

.schedule-info strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.schedule-info span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-empty {
  padding: 12px 0 4px;
}

.schedule-remove {
  flex: 0 0 auto;
  color: #e39298;
}

.csharp-sessions-card,
.json-editor-card {
  margin-top: 18px;
}

.csharp-sessions-header,
.json-editor-header {
  align-items: flex-start;
  padding: 25px 27px;
  border-bottom: 1px solid var(--line);
}

.csharp-sessions-updated {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.csharp-service-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  font-weight: 650;
}

.csharp-service-badge.online {
  color: var(--accent);
  border-color: rgba(111, 243, 190, 0.18);
  background: var(--accent-soft);
}

.csharp-sessions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, 0.75fr);
  min-height: 420px;
}

.csharp-sessions-pane,
.csharp-session-history-pane {
  min-width: 0;
  padding: 22px 24px 24px;
}

.csharp-session-history-pane {
  border-left: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.09);
}

.csharp-pane-heading {
  min-height: 29px;
  margin-bottom: 15px;
}

.csharp-pane-heading h3 {
  font-size: 13px;
}

.csharp-session-counts {
  gap: 6px;
}

.history-caption {
  color: var(--muted);
  font-size: 9px;
}

.csharp-sessions-list,
.csharp-session-log {
  display: grid;
  gap: 7px;
  max-height: 460px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-color: #29342f transparent;
}

.csharp-session-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.4fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 66px;
  padding: 10px 12px 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.017);
}

.csharp-session-row:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.026);
}

.csharp-session-account,
.csharp-session-details {
  min-width: 0;
}

.csharp-session-account strong,
.csharp-session-account span,
.csharp-session-details small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csharp-session-account strong {
  margin-bottom: 5px;
  font-size: 12px;
}

.csharp-session-account span,
.csharp-session-details small {
  color: var(--muted);
  font: 9px "Cascadia Code", Consolas, monospace;
}

.csharp-session-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 750;
}

.csharp-session-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.csharp-session-state.working {
  color: var(--accent);
}

.csharp-session-state.working i {
  background: var(--accent);
  box-shadow: 0 0 9px rgba(111, 243, 190, 0.45);
}

.csharp-session-state.starting {
  color: var(--amber);
}

.csharp-session-state.starting i {
  background: var(--amber);
  box-shadow: 0 0 9px rgba(232, 194, 106, 0.35);
}

.csharp-session-state.failed {
  color: #ff9aa1;
}

.csharp-session-state.failed i {
  background: var(--red);
}

.csharp-session-action {
  min-width: 78px;
  min-height: 33px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
}

.csharp-session-action.stop {
  color: #ffa5ab;
  border: 1px solid rgba(255, 123, 132, 0.18);
  background: var(--red-soft);
}

.csharp-session-action.start {
  color: var(--accent);
  border: 1px solid rgba(111, 243, 190, 0.18);
  background: var(--accent-soft);
}

.csharp-session-action:hover:not(:disabled) {
  filter: brightness(1.2);
}

.csharp-history-row {
  position: relative;
  padding: 12px 12px 12px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.017);
}

.csharp-history-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  content: "";
  background: var(--red);
}

.csharp-history-row.working::before {
  background: var(--accent);
}

.csharp-history-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.csharp-history-row .csharp-history-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.csharp-history-row strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csharp-history-row time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
}

.csharp-history-row .csharp-history-steamid {
  overflow: hidden;
  color: var(--muted-strong);
  font-family: "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csharp-history-row > span {
  display: block;
  margin-bottom: 4px;
  color: #efa0a5;
  font-size: 9px;
  font-weight: 700;
}

.csharp-history-row.working > span {
  color: var(--accent);
}

.csharp-history-row small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.csharp-history-row .csharp-history-raw {
  margin-top: 5px;
  color: rgba(156, 166, 161, 0.72);
  font-family: "Cascadia Code", Consolas, monospace;
  overflow-wrap: anywhere;
}

.csharp-sessions-empty {
  padding: 42px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.json-editor-header {
  align-items: center;
}

.json-editor-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.json-editor-actions .ghost-button {
  min-height: var(--height-action);
  padding: 0 15px;
  border-color: var(--line-strong);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: var(--ui-control);
}

.json-workspace {
  background: #090c0a;
}

.json-editor-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 51px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.json-file-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  padding: 0 15px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: 600 10px "Cascadia Code", Consolas, monospace;
  cursor: pointer;
}

.json-file-tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
}

.json-file-tab > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4b544f;
}

.json-file-tab:hover {
  color: var(--text-soft);
}

.json-file-tab.active {
  color: var(--text);
}

.json-file-tab.active::after,
.json-file-tab.active > span {
  background: var(--accent);
}

.json-editor {
  display: block;
  width: 100%;
  min-height: 460px;
  padding: 21px 24px;
  resize: vertical;
  border: 0;
  outline: none;
  color: #cce1d7;
  background:
    linear-gradient(90deg, rgba(111, 243, 190, 0.022), transparent 120px),
    #090c0a;
  font: 11px/1.65 "Cascadia Code", Consolas, monospace;
  tab-size: 2;
  scrollbar-color: #29342f transparent;
}

.json-editor:focus {
  box-shadow: inset 0 0 0 1px rgba(111, 243, 190, 0.14);
}

.json-editor.invalid {
  box-shadow: inset 0 0 0 1px rgba(255, 123, 132, 0.38);
}

.json-editor-footer {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
}

.json-editor-status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.json-editor-status.success,
.json-editor-status.valid {
  color: var(--accent);
}

.json-editor-status.warning {
  color: var(--amber);
}

.json-editor-status.error,
.json-editor-status.invalid {
  color: #ff9da4;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(390px, calc(100% - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(111, 243, 190, 0.22);
  border-radius: 11px;
  color: #c9fbe6;
  background: rgba(18, 35, 28, 0.96);
  box-shadow: var(--shadow-lg);
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  color: #ffd0d3;
  border-color: rgba(255, 123, 132, 0.25);
  background: rgba(42, 20, 23, 0.97);
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .topbar-center {
    justify-self: center;
  }

  .operations-grid {
    grid-template-columns: minmax(440px, 0.75fr) minmax(570px, 1.25fr);
  }

  .schedule-form {
    grid-template-columns: minmax(160px, 1.2fr) repeat(2, minmax(110px, 0.72fr));
  }

  .schedule-target-group {
    grid-column: 1 / 3;
  }

  .schedule-submit {
    grid-column: 3;
  }
}

@media (max-width: 1120px) {
  .topbar-center {
    display: none;
  }

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

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

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

  .csharp-sessions-layout {
    grid-template-columns: 1fr;
  }

  .csharp-session-history-pane {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .console-output {
    height: 380px;
  }
}

@media (max-width: 780px) {
  .dashboard-body {
    width: min(100% - 24px, 1540px);
    padding-top: 28px;
  }

  .topbar {
    min-height: 72px;
    padding: 0 12px;
  }

  .brand-lockup small,
  .proxy-check-button span,
  .logout-button span {
    display: none;
  }

  .proxy-check-button {
    width: 38px;
    padding: 0;
  }

  .brand-symbol.small {
    width: 36px;
    height: 36px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .utility-button {
    min-height: 36px;
    padding: 0 9px;
  }

  .proxy-count-button {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logout-button {
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .overview {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .overview-meta {
    padding-bottom: 0;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    min-height: 138px;
    padding: 17px;
  }

  .stat-card > strong {
    font-size: 38px;
  }

  .state-card > strong {
    font-size: 21px;
  }

  .proxy-check-header,
  .proxy-check-controls,
  .json-editor-header,
  .csharp-sessions-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .proxy-check-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .proxy-check-results {
    grid-template-columns: 1fr;
  }

  .control-card {
    padding: 21px 17px;
  }

  .transition-fields {
    grid-template-columns: 1fr;
  }

  .rcon-fields {
    grid-template-columns: 1fr 1fr;
  }

  .server-address-field,
  .rcon-password-field {
    grid-column: 1 / -1;
  }

  .console-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 19px 17px;
  }

  .server-metrics {
    grid-template-columns: 1.65fr repeat(3, 0.7fr);
    overflow-x: auto;
  }

  .server-metric {
    padding: 10px;
  }

  .server-address-metric {
    min-width: 180px;
  }

  .console-output {
    height: 340px;
    padding: 14px;
  }

  .console-line {
    grid-template-columns: 58px 43px minmax(0, 1fr);
    gap: 6px;
    font-size: 9px;
  }

  .scheduler-header {
    align-items: flex-start;
    padding: 19px 17px 15px;
  }

  .schedule-form {
    grid-template-columns: 1fr 1fr;
    padding: 0 17px 17px;
  }

  .schedule-type-field,
  .schedule-target-group {
    grid-column: 1 / -1;
  }

  .schedule-submit {
    grid-column: 2;
  }

  .schedule-list {
    padding: 0 17px 17px;
  }

  .csharp-sessions-header,
  .json-editor-header {
    padding: 21px 18px;
  }

  .csharp-sessions-pane,
  .csharp-session-history-pane {
    padding: 18px;
  }

  .csharp-session-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .csharp-session-details {
    grid-column: 1;
    grid-row: 2;
  }

  .csharp-session-actions {
    grid-column: 2;
    grid-row: 1 / 3;
  }

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

.curve-heading-copy {
  min-width: 0;
}

.curve-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.curve-mode-button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: var(--ui-caption);
  font-weight: 750;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.curve-mode-button:hover {
  color: var(--text);
}

.curve-mode-button.active {
  color: #07110c;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(111, 243, 190, 0.16);
}

.authorization-transition-status {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.authorization-transition-status.active {
  border-color: rgba(111, 243, 190, 0.28);
  background: linear-gradient(105deg, rgba(111, 243, 190, 0.07), rgba(255, 255, 255, 0.025));
}

.transition-time-heading,
.transition-time-grid,
.transition-time-item,
.transition-time-progress {
  min-width: 0;
}

.transition-time-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: var(--ui-caption);
}

.transition-time-heading strong {
  color: var(--text-soft);
  font-size: var(--ui-caption);
}

.authorization-transition-status.active .transition-time-heading strong {
  color: var(--accent);
}

.transition-time-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr) minmax(150px, 1.25fr);
  align-items: center;
  gap: 16px;
  margin-top: 11px;
}

.transition-time-item {
  display: grid;
  gap: 4px;
}

.transition-time-item span,
.transition-time-progress span {
  color: var(--muted);
  font-size: var(--ui-micro);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.transition-time-item strong {
  color: var(--text);
  font: 700 var(--ui-caption) "Cascadia Code", Consolas, monospace;
}

.transition-time-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.transition-time-progress {
  display: grid;
  gap: 7px;
}

.transition-progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.transition-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 240ms ease;
}

.authorization-template-panel {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.template-heading h5 {
  margin: 0;
  color: var(--text-soft);
  font-size: var(--ui-text);
}

.template-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--ui-caption);
}

.template-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  gap: 14px;
  margin-top: 13px;
}

.template-save-form,
.template-apply-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.template-save-form > label,
.template-apply-group > label {
  color: var(--muted-strong);
  font-size: var(--ui-micro);
  font-weight: 750;
}

.template-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.template-control-row input,
.template-control-row select {
  min-width: 0;
  width: 100%;
  height: var(--height-control);
  min-height: var(--height-control);
}

.template-control-row button {
  flex: 0 0 auto;
  min-height: var(--height-control);
  white-space: nowrap;
}

.template-save-button {
  color: var(--accent);
  border-color: rgba(111, 243, 190, 0.24);
}

.template-save-button:hover {
  color: #07110c;
  background: var(--accent);
}

.template-action-button:disabled,
.template-delete-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.template-delete-button {
  color: #f2a3a3;
  border-color: rgba(239, 117, 117, 0.22);
}

.template-delete-button:hover:not(:disabled) {
  color: #210c0c;
  background: #ed9d9d;
}

.template-status {
  min-height: 16px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: var(--ui-caption);
}

@media (max-width: 780px) {
  .authorization-curve-header {
    gap: 16px;
  }

  .curve-mode-switch {
    margin-bottom: 10px;
  }

  .transition-time-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }

  .transition-time-divider {
    display: none;
  }

  .transition-time-progress {
    grid-column: 1 / -1;
  }

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

@media (max-width: 460px) {
  .curve-mode-button {
    padding: 0 9px;
  }

  .template-control-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .template-control-row input,
  .template-control-row select {
    flex: 1 1 100%;
  }

  .template-control-row button {
    flex: 1 1 auto;
  }
}

@media (max-width: 520px) {
  .auth-card {
    padding: 30px 22px;
    border-radius: 22px;
  }

  .auth-brand {
    margin-bottom: 45px;
  }

  .brand-lockup span,
  .proxy-count-button svg {
    display: none;
  }

  .brand-lockup strong {
    font-size: 14px;
  }

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

  .stat-card {
    min-height: 128px;
  }

  .target-input-row,
  .surface-heading,
  .subsection-heading,
  .scheduler-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .target-input-row .number-control {
    width: 100%;
    grid-template-columns: 1fr 1.2fr 1fr;
  }

  .rcon-fields,
  .button-row,
  .schedule-form {
    grid-template-columns: 1fr;
  }

  .rcon-fields > *,
  .schedule-form > *,
  .schedule-submit {
    grid-column: 1 / -1;
  }

  .server-metrics {
    grid-template-columns: 175px repeat(3, 64px);
  }

  .console-actions {
    width: 100%;
    justify-content: space-between;
  }

  .csharp-pane-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .csharp-session-row {
    grid-template-columns: 1fr;
  }

  .csharp-session-details,
  .csharp-session-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .csharp-session-action {
    width: 100%;
  }

  .json-editor-tabs {
    overflow-x: auto;
    padding: 0 8px;
  }

  .json-file-tab {
    flex: 0 0 auto;
  }

  .json-editor-actions button {
    flex: 1 1 auto;
  }
}

@media (max-width: 420px) {
  .brand-lockup {
    display: none;
  }

  .proxy-count-button {
    width: 38px;
    padding: 0;
    font-size: 0;
  }

  .proxy-count-button span {
    display: none;
  }

  .proxy-count-button svg {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: #090909;
  background-image:
    linear-gradient(rgba(9, 9, 9, 0.55), rgba(9, 9, 9, 0.55)),
    url("/assets/background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

body::before {
  display: none;
}

.surface {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 22, 21, 0.82);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.auth-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(18, 20, 19, 0.84);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px);
}

.auth-card::before {
  display: none;
}

.auth-brand {
  margin-bottom: 52px;
}

.brand-name {
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-name small {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.topbar {
  grid-template-columns: 1fr auto 1fr;
  min-height: 96px;
  padding: 0 max(32px, calc((100vw - 1652px) / 2));
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),
    linear-gradient(90deg, rgba(33, 242, 200, 0.2), rgba(44, 44, 44, 0.2));
  background-color: rgba(9, 9, 9, 0.54);
  box-shadow: none;
  backdrop-filter: blur(21px);
}

.brand-row {
  gap: 0;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-lockup > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.brand-lockup strong {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-lockup > div:first-child > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 500;
}

.brand-lockup .connection-badge {
  gap: 7px;
}

.connection-badge {
  min-height: 18px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
}

.connection-badge.online {
  color: rgba(111, 243, 190, 0.86);
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 14px;
}

.topbar-updated {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
}

.utility-button {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(10, 12, 11, 0.34);
}

.proxy-count-button {
  color: rgba(255, 255, 255, 0.76);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 11, 0.34);
}

.logout-button {
  min-width: 126px;
  min-height: 46px;
  border-radius: 37px;
  color: #07110c;
  background: linear-gradient(122deg, #bcffe4 0%, #6ff3be 54%, #6ff3be 100%);
  box-shadow: none;
}

.dashboard-body {
  width: min(1652px, calc(100% - 64px));
  padding: 32px 0 76px;
}

.stats-grid {
  gap: 20px;
  margin-bottom: 20px;
  transform: translateY(-5px);
}

.stat-card {
  display: flex;
  min-height: 112px;
  padding: 12px 18px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-color: transparent;
  border-radius: 20px;
  background: rgba(34, 34, 34, 0.62);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.stat-card::after {
  display: none;
}

.stat-card-primary {
  border-color: transparent;
  background: rgba(34, 34, 34, 0.62);
}

.stat-card h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.045em;
  text-align: center;
}

.stat-card > strong,
.state-card > strong {
  margin: 8px 0 0;
  overflow: visible;
  color: #fff;
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  text-align: center;
  white-space: nowrap;
}

.stat-card-primary > strong,
.state-text.running {
  color: var(--accent);
}

.state-card > strong {
  margin-top: 8px;
  font-size: 26px;
  letter-spacing: -0.045em;
}

.proxy-check-panel {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(20, 22, 21, 0.84);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.proxy-check-heading h2 {
  font-size: 18px;
}

.operations-grid {
  grid-template-columns: minmax(500px, 0.82fr) minmax(660px, 1.18fr);
  gap: 20px;
}

.control-card {
  padding: 28px;
}

.target-bubble {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 31px;
}

.target-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  min-height: 48px;
  margin-top: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.target-input-row small {
  font-size: 10px;
}

.number-control {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  width: 148px;
  height: 44px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(8, 10, 9, 0.36);
}

.number-control button,
.number-control input {
  width: 100%;
  height: 42px;
  min-height: 42px;
}

.number-control input {
  padding: 0;
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none !important;
  font-size: 16px;
  font-weight: 650;
  line-height: 42px;
  appearance: textfield;
}

.number-control input:focus {
  background: rgba(111, 243, 190, 0.045);
  box-shadow: none !important;
}

.transition-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(8, 10, 9, 0.18);
}

.transition-card {
  display: grid;
  grid-template-rows: 28px 44px 96px;
  gap: 10px;
  padding: 18px 20px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.transition-card + .transition-card {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.transition-card-heading {
  min-height: 28px;
  margin: 0;
}

.transition-card-heading h4 {
  font-size: 15px;
}

.compact-field,
.transition-count-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
}

.compact-field > span:first-child,
.transition-count-control > span {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.transition-card .input-with-unit {
  width: 96px;
}

.transition-card .input-with-unit input {
  width: 96px;
  height: 44px;
  padding: 0 32px 0 10px;
  text-align: right;
}

.transition-target-options {
  grid-template-rows: 44px 44px;
  gap: 8px;
}

.transition-all-label {
  min-height: 44px;
  padding: 0 11px;
  white-space: nowrap;
}

.transition-card .transition-count-control input {
  flex: 0 0 96px;
  width: 96px;
  height: 44px;
  padding: 0 10px;
  text-align: center;
}

.rcon-settings {
  margin-top: 26px;
}

.subsection-heading {
  margin-bottom: 17px;
}

.rcon-fields {
  align-items: end;
}

.console-header {
  min-height: 78px;
  padding: 20px 24px;
}

.console-header > h2 {
  margin: 0;
}

.server-metrics {
  grid-template-columns: minmax(240px, 2.4fr) repeat(3, minmax(76px, 0.7fr));
  min-height: 82px;
  overflow-x: auto;
  background: rgba(8, 10, 9, 0.18);
}

.server-address-metric {
  min-width: 240px;
}

.server-address-metric .server-metric-value {
  overflow-x: auto;
  text-overflow: clip;
}

.server-metric-label {
  font-size: 8px;
}

.result-metric .server-metric-value {
  color: var(--accent);
}

.scheduler-card {
  background: rgba(8, 10, 9, 0.08);
}

.scheduler-header {
  min-height: 78px;
  padding: 20px 24px 16px;
}

.scheduler-heading {
  gap: 0;
}

.schedule-form {
  grid-template-columns: minmax(170px, 1.35fr) minmax(118px, 0.75fr) minmax(128px, 0.82fr) minmax(245px, 1.35fr) auto;
  align-items: end;
  gap: 10px;
}

.schedule-form input,
.schedule-form select,
.schedule-submit {
  height: 44px;
  min-height: 44px;
}

.schedule-target-group {
  display: block;
  grid-column: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.schedule-target-control {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) 72px;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 6px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.schedule-all-label {
  min-width: 0;
  white-space: nowrap;
}

.schedule-target-control > input {
  width: 72px;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  text-align: center;
}

.schedule-target-group.all-selected .schedule-target-control > input {
  opacity: 0.42;
}

.schedule-submit {
  grid-column: auto;
  align-self: end;
}

.csharp-sessions-card,
.json-editor-card {
  background: rgba(20, 22, 21, 0.84);
}

.csharp-sessions-header,
.json-editor-header {
  min-height: 92px;
}

.json-workspace,
.json-editor {
  background-color: rgba(7, 9, 8, 0.78);
}

@media (max-width: 1560px) {
  .schedule-form {
    grid-template-columns: minmax(170px, 1.2fr) repeat(2, minmax(120px, 0.72fr));
  }

  .schedule-target-group {
    grid-column: 1 / 3;
  }

  .schedule-submit {
    grid-column: 3;
  }
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: 1fr auto 1fr;
    padding-right: 32px;
    padding-left: 32px;
  }

  .operations-grid {
    grid-template-columns: minmax(440px, 0.75fr) minmax(570px, 1.25fr);
  }

}

@media (min-width: 1121px) and (max-width: 1320px) {
  .transition-fields {
    grid-template-columns: 1fr;
  }

  .transition-card + .transition-card {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }
}

@media (max-width: 1120px) {
  .topbar-updated {
    display: none;
  }

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

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

@media (max-width: 780px) {
  body {
    background-position: 42% top;
  }

  .topbar {
    grid-template-columns: 1fr auto auto;
    column-gap: 8px;
    min-height: 82px;
    padding: 0 12px;
  }

  .brand-lockup strong {
    font-size: 22px;
  }

  .brand-lockup > div:first-child > span {
    font-size: 11px;
  }

  .connection-badge {
    font-size: 10px;
  }

  .topbar-tools {
    gap: 5px;
  }

  .proxy-check-button span,
  .logout-button span {
    display: none;
  }

  .proxy-check-button,
  .logout-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .dashboard-body {
    width: min(100% - 24px, 1652px);
    padding-top: 24px;
  }

  .stat-card {
    min-height: 132px;
  }

  .transition-card {
    padding: 16px;
  }

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

  .schedule-type-field,
  .schedule-target-group {
    grid-column: 1 / -1;
  }

  .schedule-submit {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .brand-lockup > div:first-child span,
  .proxy-count-button span {
    display: none;
  }

  .proxy-count-button {
    width: 38px;
    max-width: 38px;
    padding: 0;
    font-size: 0;
  }

  .proxy-count-button svg {
    display: block;
  }

  .topbar-tools {
    justify-self: end;
  }

  .brand-lockup .connection-badge {
    max-width: 116px;
  }

  .brand-lockup .connection-badge .pulse-dot {
    display: inline-block;
  }

  .brand-lockup .connection-badge span:last-child {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .server-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    overflow-x: visible;
  }

  .server-address-metric {
    grid-column: 1 / -1;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .server-address-metric + .server-metric {
    border-left: 0;
  }

  .target-input-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .number-control {
    width: 100%;
    grid-template-columns: 1fr 1.25fr 1fr;
  }

  .transition-fields {
    grid-template-columns: 1fr;
  }

  .transition-card + .transition-card {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }

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

  .schedule-form > *,
  .schedule-submit {
    grid-column: 1 / -1;
  }
}

.topbar {
  height: 96px;
  min-height: 96px;
  border-bottom: 0;
  box-shadow: inset 0 -1px rgba(255, 255, 255, 0.08);
}

.brand-lockup > div:first-child {
  transform: translateY(1px);
}

.brand-lockup .connection-badge {
  transform: translateY(-1px);
}

.topbar-tools {
  display: grid;
  grid-template-rows: 12px 40px;
  align-items: center;
  justify-items: center;
  row-gap: 5px;
}

.topbar-tools-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--ui-caption);
  font-weight: 650;
  line-height: 12px;
  letter-spacing: 0.04em;
}

.topbar-tools-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.topbar-updated {
  font-size: var(--ui-text);
}

.utility-button {
  min-height: 40px;
  font-size: var(--ui-text);
}

.stats-grid {
  align-items: stretch;
}

.stat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 22px 46px;
  align-content: center;
  align-items: start;
  justify-content: stretch;
  justify-items: center;
  row-gap: 8px;
  min-height: 112px;
  padding: 12px 18px;
}

.stat-card h2 {
  align-self: center;
  font-size: 18px;
  line-height: 22px;
}

.stat-card > strong,
.state-card > strong {
  display: flex;
  width: 100%;
  height: 46px;
  margin: 0;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.state-card > strong {
  font-size: 26px;
  transform: translateY(-2px);
}

.field-label,
.input-group > .field-label {
  margin-bottom: 8px;
  font-size: var(--ui-caption);
  line-height: 14px;
}

input[type="password"],
input[type="text"],
input[type="number"],
input[type="time"],
select {
  height: var(--height-control);
  min-height: var(--height-control);
  font-size: var(--ui-control);
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: var(--height-action);
  font-size: var(--ui-control);
}

.ghost-button {
  min-height: var(--height-compact);
  font-size: var(--ui-caption);
}

.surface-heading h2,
.console-header > h2 {
  font-size: 23px;
}

.target-input-row small,
.action-message {
  font-size: var(--ui-caption);
}

.number-control {
  height: var(--height-control);
}

.number-control button,
.number-control input {
  height: 44px;
  min-height: 44px;
}

.number-control input {
  font-size: 16px;
}

.transition-heading span,
.compact-field > span:first-child,
.transition-count-control > span {
  font-size: var(--ui-caption);
}

.transition-fields {
  overflow: hidden;
}

.transition-card {
  grid-template-rows: 30px 46px auto;
  gap: 12px;
  padding: 20px 22px 22px;
}

.transition-card-heading {
  min-height: 30px;
}

.transition-card-heading h4 {
  font-size: 16px;
}

.compact-field,
.transition-count-control {
  grid-template-columns: minmax(0, 1fr) 104px;
  min-height: var(--height-control);
}

.transition-card .input-with-unit,
.transition-card .input-with-unit input {
  width: 104px;
}

.transition-card .input-with-unit input {
  height: var(--height-control);
}

.input-with-unit b {
  font-size: var(--ui-caption);
}

.transition-target-options {
  grid-template-rows: 46px 46px;
  gap: 9px;
}

.transition-all-label {
  min-height: var(--height-control);
  padding: 0 12px;
  font-size: var(--ui-caption);
}

.transition-card .transition-count-control input {
  width: 104px;
  height: var(--height-control);
}

.checkbox-label {
  gap: 9px;
  font-size: var(--ui-caption);
}

.check-ui {
  position: relative;
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
}

.checkbox-label input:checked + .check-ui::after {
  position: static;
  width: 10px;
  height: 8px;
  border: 0;
  content: "";
  background: #07110c;
  clip-path: polygon(0 38%, 36% 70%, 100% 0, 100% 31%, 36% 100%, 0 65%);
  transform: none;
}

.checkbox-label input:focus-visible + .check-ui {
  outline: 2px solid rgba(111, 243, 190, 0.72);
  outline-offset: 2px;
}

.checkbox-label:has(input:disabled) {
  cursor: not-allowed;
}

.checkbox-label:has(input:disabled) {
  opacity: 0.55;
}

.authorization-curve-panel {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 24px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(111, 243, 190, 0.025), transparent 120px),
    rgba(3, 6, 5, 0.16);
}

.authorization-curve-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 18px;
}

.authorization-curve-header .curve-heading-copy {
  flex: 1 1 260px;
  min-width: min(100%, 260px);
}

.authorization-curve-header .curve-mode-switch {
  max-width: 100%;
}

.authorization-curve-header .curve-mode-button {
  flex: 1 1 auto;
}

.authorization-curve-header h4 {
  font-size: 17px;
}

.authorization-curve-header p {
  max-width: 430px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--ui-text);
  line-height: 1.5;
}

.curve-select-field {
  display: block;
  flex: 0 1 190px;
  width: min(100%, 190px);
}

.curve-select-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: var(--ui-caption);
  font-weight: 700;
}

.curve-select-field select {
  height: var(--height-control);
}

.authorization-curve-chart-shell {
  position: relative;
  width: 100%;
  height: 190px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background-color: rgba(5, 8, 7, 0.68);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 25% 25%;
}

.authorization-curve-chart {
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.curve-axis-line,
.curve-area,
.curve-line,
.curve-cursor,
.curve-point {
  vector-effect: non-scaling-stroke;
}

.curve-axis-line {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
}

.curve-area {
  fill: rgba(111, 243, 190, 0.1);
  stroke: none;
}

.curve-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(111, 243, 190, 0.18));
}

.curve-cursor {
  stroke: rgba(255, 255, 255, 0.38);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.curve-point {
  fill: #0b100d;
  stroke: var(--accent);
  stroke-width: 2;
}

.curve-point-editable {
  fill: var(--accent);
  cursor: ns-resize;
  touch-action: none;
}

.curve-point-editable:focus {
  outline: none;
  stroke: #fff;
  stroke-width: 3;
}

.curve-tooltip {
  position: absolute;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 8px 10px;
  border: 1px solid rgba(111, 243, 190, 0.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(9, 13, 11, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-size: var(--ui-text);
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
  transform: translate(-50%, calc(-100% - 12px));
  pointer-events: none;
}

.curve-tooltip.below {
  transform: translate(-50%, 12px);
}

.authorization-curve-axis {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: var(--muted-strong);
  font: 600 var(--ui-caption) "Cascadia Code", Consolas, monospace;
}

.authorization-curve-axis span {
  min-width: 0;
  line-height: 1.35;
}

.authorization-curve-axis span:last-child {
  text-align: right;
}

.authorization-curve-hint {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: var(--ui-text);
  line-height: 1.5;
}

.proxy-check-heading h2 {
  font-size: 19px;
}

.proxy-check-heading p,
.scheduler-heading p,
.subsection-heading p,
.json-editor-description {
  font-size: var(--ui-text);
}

.proxy-concurrency-field {
  font-size: var(--ui-caption);
}

.proxy-concurrency-field input {
  height: var(--height-compact);
  min-height: var(--height-compact);
}

.proxy-check-counts > span,
.csharp-session-counts > span {
  min-height: 30px;
  font-size: var(--ui-micro);
}

.proxy-check-row strong {
  font-size: var(--ui-text);
}

.proxy-check-row span,
.proxy-check-empty,
.csharp-sessions-empty,
.console-empty {
  font-size: var(--ui-caption);
}

.console-header,
.scheduler-header {
  min-height: 80px;
  padding: 0 24px;
}

.console-header {
  border-bottom: 0;
  box-shadow: inset 0 -1px var(--line);
}

.server-metric-label {
  font-size: var(--ui-micro);
}

.server-metric-value {
  font-size: 20px;
}

.server-address-metric .server-metric-value {
  font-size: clamp(16px, 1.25vw, 19px);
}

.console-output {
  padding: 18px 20px;
}

.console-line {
  grid-template-columns: 76px 58px minmax(0, 1fr);
  gap: 10px;
  font-size: 11px;
  line-height: 1.55;
}

.console-level {
  font-size: var(--ui-micro);
}

.scheduler-heading h3 {
  font-size: 17px;
}

.scheduler-timezone {
  min-height: 28px;
  font-size: var(--ui-micro);
}

.schedule-form {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.2fr) 132px;
  gap: 12px;
  padding: 0 24px 22px;
}

.schedule-form input,
.schedule-form select,
.schedule-submit {
  height: var(--height-control);
  min-height: var(--height-control);
}

.schedule-type-field {
  grid-column: 1 / 3;
  grid-row: 1;
}

.schedule-time-field {
  grid-column: 3;
  grid-row: 1;
}

.schedule-duration-field {
  grid-column: 4;
  grid-row: 1;
}

.schedule-curve-field {
  grid-column: 1 / 3;
  grid-row: 2;
}

.schedule-curve-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.schedule-curve-control select {
  min-width: 0;
}

.schedule-curve-capture {
  height: var(--height-control);
  min-height: var(--height-control);
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: var(--ui-caption);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.schedule-curve-capture:hover {
  border-color: rgba(111, 243, 190, 0.46);
  color: var(--text);
  background: rgba(111, 243, 190, 0.07);
}

.schedule-curve-capture.captured {
  border-color: rgba(111, 243, 190, 0.34);
  color: var(--accent);
  background: rgba(111, 243, 190, 0.08);
}

.schedule-curve-capture.stale {
  border-color: rgba(241, 188, 95, 0.38);
  color: var(--amber);
  background: rgba(241, 188, 95, 0.07);
}

.schedule-target-group {
  grid-column: 3;
  grid-row: 2;
}

.schedule-submit {
  grid-column: 4;
  grid-row: 2;
  align-self: end;
}

.schedule-form.is-deauthorization .schedule-target-group {
  grid-column: 1 / 4;
}

.schedule-target-control {
  height: var(--height-control);
}

.schedule-all-label {
  font-size: var(--ui-caption);
}

.schedule-target-control > input {
  height: 34px;
  min-height: 34px;
  font-size: var(--ui-text);
}

.schedule-info strong {
  font-size: var(--ui-text);
}

.schedule-info span,
.schedule-empty {
  font-size: var(--ui-caption);
}

.csharp-sessions-updated,
.history-caption,
.csharp-session-account span,
.csharp-session-details small,
.csharp-history-row small,
.csharp-history-row > span,
.csharp-history-row time {
  font-size: var(--ui-caption);
}

.csharp-service-badge {
  min-height: var(--height-compact);
  font-size: var(--ui-caption);
}

.csharp-pane-heading h3,
.csharp-session-account strong {
  font-size: var(--ui-control);
}

.csharp-session-state {
  font-size: var(--ui-caption);
}

.csharp-session-action {
  min-width: 88px;
  min-height: var(--height-compact);
  font-size: var(--ui-caption);
}

.icon-button,
.icon-close {
  width: var(--height-compact);
  height: var(--height-compact);
}

.csharp-history-row strong {
  font-size: var(--ui-text);
}

.json-file-tab {
  font-size: var(--ui-caption);
}

.json-editor {
  font-size: 12px;
}

.json-editor-status {
  font-size: var(--ui-caption);
}

@media (max-width: 1500px) {
  .schedule-form {
    grid-template-columns: minmax(170px, 1.1fr) minmax(210px, 1.25fr) 132px;
  }

  .schedule-type-field {
    grid-column: 1;
    grid-row: 1;
  }

  .schedule-time-field {
    grid-column: 2;
    grid-row: 1;
  }

  .schedule-duration-field {
    grid-column: 3;
    grid-row: 1;
  }

  .schedule-curve-field {
    grid-column: 1;
    grid-row: 2;
  }

  .schedule-target-group {
    grid-column: 2;
    grid-row: 2;
  }

  .schedule-submit {
    grid-column: 3;
    grid-row: 2;
  }

  .schedule-form.is-deauthorization .schedule-target-group {
    grid-column: 1 / 3;
  }
}

@media (min-width: 1121px) and (max-width: 1320px) {
  .transition-fields {
    grid-template-columns: 1fr;
  }

  .transition-card + .transition-card {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .schedule-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-type-field {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .schedule-time-field,
  .schedule-duration-field,
  .schedule-curve-field,
  .schedule-target-group,
  .schedule-submit {
    grid-row: auto;
  }

  .schedule-time-field,
  .schedule-curve-field {
    grid-column: 1;
  }

  .schedule-duration-field,
  .schedule-target-group,
  .schedule-submit {
    grid-column: 2;
  }

  .schedule-submit {
    grid-column: 1 / -1;
    width: 132px;
    justify-self: end;
  }

  .schedule-form.is-deauthorization .schedule-target-group {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .topbar {
    height: 88px;
    min-height: 88px;
  }

  .topbar-tools {
    grid-template-rows: 12px 38px;
    row-gap: 4px;
  }

  .topbar-tools-label {
    font-size: var(--ui-micro);
    line-height: 12px;
  }

  .topbar-tools-row {
    gap: 5px;
  }

  .connection-badge {
    font-size: var(--ui-caption);
  }

  .authorization-curve-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .curve-select-field {
    flex-basis: auto;
    width: 100%;
  }

  .authorization-curve-chart-shell {
    height: 170px;
  }

  .console-header,
  .scheduler-header {
    min-height: 80px;
    padding: 14px 18px;
  }

  .console-line {
    grid-template-columns: 70px 54px minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .stat-card {
    min-height: 108px;
  }

  .transition-card {
    padding: 18px;
  }

  .authorization-curve-panel {
    padding: 20px 18px;
  }

  .authorization-curve-chart-shell {
    height: 150px;
  }

  .authorization-curve-axis {
    font-size: var(--ui-micro);
  }

  .curve-tooltip {
    font-size: var(--ui-caption);
  }

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

  .schedule-form > *,
  .schedule-time-field,
  .schedule-duration-field,
  .schedule-curve-field,
  .schedule-target-group,
  .schedule-submit,
  .schedule-form.is-deauthorization .schedule-target-group {
    grid-column: 1;
    grid-row: auto;
  }

  .schedule-submit {
    width: 100%;
    justify-self: stretch;
  }

  .schedule-curve-control {
    grid-template-columns: 1fr;
  }

  .schedule-curve-capture {
    width: 100%;
  }

  .console-output {
    padding: 15px 14px;
  }

  .console-line {
    grid-template-columns: 66px 50px minmax(0, 1fr);
    gap: 7px;
    font-size: 11px;
  }
}

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

  .schedule-form > *,
  .schedule-time-field,
  .schedule-duration-field,
  .schedule-curve-field,
  .schedule-target-group,
  .schedule-submit,
  .schedule-form.is-deauthorization .schedule-target-group {
    grid-column: 1;
    grid-row: auto;
  }

  .schedule-submit {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 780px) {
  input[type="password"],
  input[type="text"],
  input[type="number"],
  input[type="time"],
  select {
    font-size: 16px;
  }
}

@media (min-width: 901px) {
  .schedule-form.is-deauthorization .schedule-curve-field {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .schedule-form.is-deauthorization .schedule-target-group {
    grid-column: 3;
    grid-row: 2;
  }

  .schedule-form.is-deauthorization .schedule-submit {
    grid-column: 4;
    grid-row: 2;
  }
}

@media (min-width: 901px) and (max-width: 1500px) {
  .schedule-form.is-deauthorization .schedule-curve-field {
    grid-column: 1;
  }

  .schedule-form.is-deauthorization .schedule-target-group {
    grid-column: 2;
  }

  .schedule-form.is-deauthorization .schedule-submit {
    grid-column: 3;
  }
}

.template-controls {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.template-control-row {
  display: grid;
  min-width: 0;
}

.template-save-form .template-control-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.template-apply-group .template-control-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.template-control-row input,
.template-control-row select {
  width: auto;
  min-width: 0;
}

.template-control-row select {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 780px) {
  .template-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .template-save-form .template-control-row,
  .template-apply-group .template-control-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .template-control-row button {
    width: 100%;
  }
}

.csharp-session-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.csharp-reconnect-toggle {
  min-height: var(--height-compact);
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  font-size: var(--ui-caption);
  line-height: 1.25;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.csharp-reconnect-toggle:hover:not(:has(input:disabled)) {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.csharp-reconnect-toggle:has(input:checked) {
  color: var(--accent);
  border-color: rgba(111, 243, 190, 0.18);
  background: var(--accent-soft);
}

.csharp-reconnect-toggle.pending {
  opacity: 0.72;
}

.csharp-reconnect-toggle.pending::after {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: csharp-policy-spin 700ms linear infinite;
}

@keyframes csharp-policy-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 780px) {
  .csharp-session-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  .csharp-reconnect-toggle {
    width: 100%;
  }
}
