:root {
  color-scheme: dark;
  --background: #131116;
  --surface: #1c1921;
  --text: #FFFFFF;
  --muted: #aaa2b4;
  --line: #39333f;
  --field-line: #716978;
  --accent: #AA00AA;
  --radius: 9px;
  --shadow: 0 12px 32px rgb(0 0 0 / 18%);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--background);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, input:focus-visible, pre:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 4px; }
h1, p { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 550; letter-spacing: -.025em; line-height: 1.3; }
.muted { color: var(--muted); }
.intro { margin: 9px 0 27px; font-size: .9375rem; }
.window { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.primary { border: 1px solid transparent; border-radius: 5px; background: var(--accent); color: #FFFFFF; padding: 10px 19px; font-weight: 600; min-height: 44px; }
.primary:hover { background: #950095; }
.wide { width: 100%; }
.quiet { color: var(--muted); background: transparent; border: 0; padding: 10px; min-height: 44px; border-radius: 4px; }
.quiet:hover { color: var(--text); background: #29252f; }
label { display: block; font-size: .875rem; margin-bottom: 8px; }
input:not([type="file"]) { width: 100%; border: 1px solid var(--field-line); background: #141217; color: var(--text); border-radius: 5px; padding: 11px 12px; min-height: 46px; }
input::placeholder { color: #938b9d; }
.message { color: #efb6b9; font-size: .875rem; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message.success { color: #bddab5; }
.login-view { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; }
.login-brand { margin-bottom: 18px; line-height: 0; }
.login-window { width: min(100%, 400px); padding: 30px; }
.login-window input { margin-bottom: 20px; }
.login-window .message { margin: 0 0 18px; }
#code { font-variant-numeric: tabular-nums; letter-spacing: .18em; }
.panel-view { max-width: 1140px; margin: 0 auto; padding: 24px 32px; }
.panel-view.console-active { height: 100dvh; display: flex; flex-direction: column; }
.console-active .panel-header { flex-shrink: 0; }
.console-active .panel-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.panel-header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; font-size: 1.0625rem; font-weight: 600; }
.brand img { object-fit: contain; }
.brand .muted { font-weight: 400; }
.account { display: flex; align-items: center; gap: 14px; font-size: .875rem; }
.tabs { grid-column: 1 / -1; display: flex; gap: 28px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 10px 0 15px; min-height: 46px; background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }
.panel-content { padding-top: 30px; }
.upload-window { max-width: 620px; padding: 30px; }
input[type="file"] { display: block; width: 100%; min-height: 46px; color: var(--muted); font-size: .875rem; background: #141217; border: 1px solid var(--field-line); border-radius: 5px; overflow: hidden; }
input::file-selector-button { background: #302a38; color: var(--text); border: none; border-right: 1px solid var(--line); padding: 12px 14px; margin-right: 12px; cursor: pointer; font: inherit; }
.file-note { font-size: .8125rem; margin: 10px 0 26px; }
.upload-window .message { margin-top: 20px; }
.console-panel, .console-window { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.console-window { overflow: hidden; }
#console-output { margin: 0; flex: 1; min-height: 0; padding: 22px; overflow: auto; color: #dcd5e4; background: #151218; font: 13px/1.75 Consolas, "Liberation Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
#console-output:focus-visible { outline-offset: -4px; }
.console-form { display: flex; align-items: center; flex-shrink: 0; gap: 12px; padding: 14px; border-top: 1px solid var(--line); }
.console-form input { flex: 1; min-width: 0; background: transparent; border-color: transparent; padding-left: 0; }
.prompt { color: var(--accent); font: 18px Consolas, monospace; padding-left: 8px; }
#console-message { margin-top: 12px; flex-shrink: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.maintenance-page { min-height: 100dvh; display: grid; place-items: center; padding: 32px 24px; }
.maintenance { text-align: center; transform: translateY(-20px); }
.maintenance-logo { display: block; width: clamp(180px, 30vw, 280px); height: auto; margin: 0 auto 30px; }
.maintenance h1 { font-size: clamp(1.1rem, 3.5vw, 1.625rem); font-weight: 450; letter-spacing: -.025em; }
.server-address { margin-top: 16px; color: var(--muted); font: 14px/1.5 Consolas, "Liberation Mono", monospace; letter-spacing: .025em; }
@media (max-width: 600px) {
  .panel-view { padding: 18px 16px; }
  .panel-header { gap: 18px; }
  .brand { gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .account { gap: 4px; }
  .tabs { gap: 24px; }
  .panel-content { padding-top: 22px; }
  .upload-window, .login-window { padding: 24px; }
  #console-output { padding: 16px; font-size: 12px; }
  .console-form { gap: 8px; padding: 10px; }
  .console-form input { font-size: .875rem; }
  .console-form .primary { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
@media (max-width: 420px) {
  .account { flex-direction: column; align-items: flex-end; gap: 0; }
  .account .quiet { padding: 6px 0; min-height: 36px; }
}
