:root {
  --bg: #0a0c0f;
  --surface: #11151a;
  --surface-raised: #171c22;
  --surface-soft: #1c222a;
  --border: #29313b;
  --border-light: #35404d;
  --text: #f4f6f8;
  --muted: #939eaa;
  --subtle: #687481;
  --accent: #f04a3a;
  --accent-hover: #ff6253;
  --success: #3ddc97;
  --danger: #ff6b6b;
  --warning: #f8c15c;
  --radius: 16px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .32);
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed; inset: 0; z-index: -2; content: "";
  background: radial-gradient(circle at 82% 0%, rgba(240,74,58,.12), transparent 31rem), radial-gradient(circle at 10% 30%, rgba(65,83,104,.12), transparent 28rem);
}
body::after {
  position: fixed; inset: 0; z-index: -1; content: ""; opacity: .14; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 40px 40px;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:hover { color: inherit; text-decoration: none; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .65rem 1rem; background: white; color: #111; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.app-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.app-nav { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(240,74,58,.55); border-radius: 11px; background: linear-gradient(145deg, rgba(240,74,58,.24), rgba(240,74,58,.04)); color: #fff; font-size: .78rem; font-weight: 900; font-style: italic; letter-spacing: -.08em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .95rem; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.nav-label { color: var(--subtle); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.page-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; padding: 56px 0 30px; }
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 1.16rem; letter-spacing: -.015em; }
h3 { margin-bottom: 0; font-size: .95rem; }
.page-subtitle, .panel-heading p:not(.section-kicker) { margin: 0; color: var(--muted); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 750; font-size: .86rem; text-decoration: none; transition: transform .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, .upload-dropzone:focus-within { outline: 3px solid rgba(240,74,58,.28); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .4; }
.button-primary { background: var(--accent); color: white; box-shadow: 0 8px 25px rgba(240,74,58,.18); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary, .button-quiet { border-color: var(--border-light); background: transparent; color: var(--text); }
.button-secondary:hover:not(:disabled), .button-quiet:hover:not(:disabled) { background: var(--surface-soft); border-color: #465362; }
.button-danger-soft { border-color: rgba(255,107,107,.25); background: rgba(255,107,107,.09); color: #ff8f8f; }
.button-install { background: rgba(61,220,151,.11); border-color: rgba(61,220,151,.22); color: #67e8ad; }
.button-small { min-height: 36px; padding: 0 13px; font-size: .78rem; }
.button-block { width: 100%; }
.button-loader { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .65s linear infinite; }
.is-loading .button-loader { display: inline-block; }
.is-loading .button-label { opacity: .72; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { position: relative; display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 13px 44px 13px 14px; border: 1px solid; border-radius: 11px; font-size: .88rem; animation: notice-in .25s ease-out; }
.notice-success { color: #9af1c9; background: rgba(61,220,151,.08); border-color: rgba(61,220,151,.22); }
.notice-error { color: #ffaaaa; background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.22); }
.notice-icon { display: grid; flex: 0 0 24px; height: 24px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 900; font-size: .72rem; }
.notice-close { position: absolute; right: 10px; border: 0; background: transparent; color: currentColor; font-size: 1.25rem; cursor: pointer; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-5px); } }
.dashboard-grid { display: grid; grid-template-columns: minmax(250px, .68fr) minmax(0, 1.6fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(23,28,34,.98), rgba(15,19,24,.98)); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.panel-heading-wide { align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.status-pill.is-online { background: rgba(61,220,151,.1); color: var(--success); }
.status-pill.is-offline { background: rgba(255,107,107,.1); color: #ff8585; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status-main { display: flex; align-items: center; gap: 16px; margin: 33px 0; }
.status-main strong, .status-main small { display: block; }
.status-main strong { font-size: 1.05rem; }
.status-main small { color: var(--muted); }
.status-orbit { display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--danger); box-shadow: inset 0 0 18px rgba(255,107,107,.1); }
.status-orbit.is-online { color: var(--success); box-shadow: inset 0 0 18px rgba(61,220,151,.1); }
.status-orbit span { width: 13px; height: 13px; border-radius: 50%; background: currentColor; box-shadow: 0 0 18px currentColor; }
.config-list { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); margin: 0; }
.config-list > div { padding: 0 18px; border-left: 1px solid var(--border); }
.config-list > div:first-child { padding-left: 0; border-left: 0; }
.config-list dt, .field-label { margin-bottom: 5px; color: var(--subtle); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.config-list dd { margin: 0; font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.car-roster { margin-top: 27px; padding-top: 20px; border-top: 1px solid var(--border); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; max-height: 84px; overflow-y: auto; padding-right: 4px; }
.car-tag { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: rgba(255,255,255,.025); color: #b8c1cb; font-family: "SFMono-Regular", Consolas, monospace; font-size: .7rem; }
.configuration-panel, .packages-panel { margin-bottom: 18px; }
.restart-note, .package-count { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.restart-note { padding: 7px 10px; border: 1px solid rgba(248,193,92,.19); border-radius: 7px; background: rgba(248,193,92,.07); color: var(--warning); }
.form-grid { display: grid; gap: 16px; }
.form-grid-wide { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
.form-grid-times { grid-template-columns: repeat(3, 1fr); }
.field-group label { display: block; margin-bottom: 7px; color: #dce2e8; font-size: .79rem; font-weight: 750; }
.field-group label span { color: var(--subtle); font-weight: 500; }
.field-group small { display: block; margin-top: 6px; color: var(--subtle); font-size: .72rem; }
input, select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--border-light); border-radius: 9px; background: #0d1115; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, select:hover { border-color: #475463; }
input::placeholder { color: #55616e; }
select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg,transparent 50%,#7e8994 50%),linear-gradient(135deg,#7e8994 50%,transparent 50%); background-position: calc(100% - 17px) 19px,calc(100% - 12px) 19px; background-size:5px 5px; background-repeat:no-repeat; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-actions p { margin: 0; color: var(--subtle); font-size: .75rem; }
.upload-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 26px; }
.upload-form > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-dropzone { display: flex; min-height: 78px; align-items: center; gap: 15px; margin: 0; padding: 13px 14px; border: 1px dashed #3e4a57; border-radius: 11px; background: rgba(255,255,255,.018); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-dropzone:hover, .upload-dropzone.is-dragging { border-color: var(--accent); background: rgba(240,74,58,.045); }
.upload-icon { display: grid; flex: 0 0 42px; height: 42px; place-items: center; border-radius: 9px; background: rgba(240,74,58,.1); color: var(--accent); font-size: 1.25rem; }
.upload-copy { min-width: 0; flex: 1; }
.upload-copy strong, .upload-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-copy strong { font-size: .88rem; }
.upload-copy small { color: var(--subtle); font-size: .72rem; }
.upload-submit { align-self: stretch; }
.package-list { border-top: 1px solid var(--border); }
.package-row { position: relative; display: grid; grid-template-columns: 45px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.file-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: #0d1115; color: var(--accent); font-size: .62rem; font-weight: 900; }
.package-details { min-width: 0; }
.package-details h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.package-details p, .package-warning { margin: 3px 0 0; color: var(--subtle); font-size: .72rem; }
.package-actions { display: flex; gap: 8px; }
.package-warning { grid-column: 2; color: var(--warning); }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state > span { display: grid; width: 45px; height: 45px; margin: 0 auto 12px; place-items: center; border: 1px solid var(--border); border-radius: 11px; }
.empty-state p { margin: 4px 0 0; color: var(--subtle); font-size: .8rem; }
.app-footer { display: flex; justify-content: center; align-items: center; gap: 9px; padding: 24px 0 38px; color: #596470; font-size: .7rem; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.login-page { display: grid; place-items: center; padding: 20px; }
.login-shell { width: min(980px, 100%); }
.login-main { display: grid; min-height: calc(100vh - 180px); place-items: center; padding: 35px 0; }
.login-card { display: grid; grid-template-columns: .9fr 1.1fr; width: min(780px, 100%); min-height: 480px; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.login-visual { position: relative; overflow: hidden; background: radial-gradient(circle at 32% 35%, rgba(240,74,58,.32), transparent 9rem), linear-gradient(145deg,#1b2027,#0c0f13); }
.login-visual::after { position: absolute; inset: 0; content: ""; background: linear-gradient(110deg,transparent 40%,rgba(255,255,255,.035) 40.2%,transparent 40.6%); }
.track-line { position: absolute; width: 280px; height: 130px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; transform: rotate(-35deg); }
.track-line-one { left: -70px; top: 110px; }
.track-line-two { left: 60px; top: 235px; border-color: rgba(240,74,58,.35); }
.login-badge { position: absolute; left: 28px; bottom: 25px; color: rgba(255,255,255,.08); font-size: 6rem; font-weight: 900; line-height: 1; letter-spacing: -.08em; }
.login-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 6vw, 58px); }
.login-content h1 { font-size: 2.25rem; }
.login-intro { margin-bottom: 25px; color: var(--muted); }
.login-form { margin-top: 3px; }
.password-field { position: relative; }
.password-field input { padding-right: 62px; }
.password-toggle { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 800; }
.security-note { margin: 18px 0 0; color: var(--subtle); font-size: .7rem; text-align: center; }
.security-note span { color: var(--success); }
@media (max-width: 760px) {
  .app-shell { width: min(100% - 24px, 1180px); }
  .app-nav { height: 76px; }
  .nav-label { display: none; }
  .page-heading { align-items: flex-start; padding: 38px 0 24px; }
  .page-heading .button { width: 42px; padding: 0; font-size: 0; }
  .page-heading .button span { font-size: 1rem; }
  .dashboard-grid, .form-grid-wide, .form-grid-times { grid-template-columns: 1fr; }
  .config-list { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .config-list > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .panel { padding: 19px; }
  .panel-heading-wide { align-items: flex-start; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .upload-form { grid-template-columns: 1fr; }
  .upload-dropzone .button { display: none; }
  .upload-submit { min-height: 46px; }
  .package-row { grid-template-columns: 42px minmax(0,1fr); }
  .package-actions { grid-column: 1 / -1; }
  .package-actions > *, .package-actions .button { flex: 1; width: 100%; }
  .package-warning { grid-column: 1 / -1; }
  .login-card { grid-template-columns: 1fr; min-height: 0; }
  .login-visual { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.code-input { height: 58px; text-align: center; font-family: "SFMono-Regular", Consolas, monospace; font-size: 1.55rem; font-weight: 800; letter-spacing: .32em; padding-left: calc(13px + .32em); }
.login-secondary-link { display: block; margin-top: 15px; color: var(--muted); font-size: .76rem; text-align: center; text-decoration: none; }
.login-secondary-link:hover { color: var(--text); }
.login-form .field-group { margin-bottom: 16px; }
