:root {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #11192b;
  --surface-2: #151f34;
  --border: #25314a;
  --text: #f3f6fc;
  --muted: #94a3bb;
  --blue: #4388ff;
  --green: #47d69b;
  --red: #ff6e79;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 70% -15%, #1b2a4a 0, transparent 45%), var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; padding: 27px 18px 18px; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: rgba(11, 16, 32, .88); }
.brand-lockup { display: flex; gap: 12px; align-items: center; padding: 0 7px 35px; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font-size: 14px; letter-spacing: .01em; }
.brand-lockup small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .14em; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #528cff80; border-radius: 12px; background: linear-gradient(145deg, #4388ff, #2351c8); box-shadow: 0 8px 25px #2765df44; font-size: 15px; font-weight: 800; letter-spacing: -.08em; }
nav { display: grid; gap: 7px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 9px; color: #a6b2c7; background: transparent; text-align: left; font-size: 13px; transition: .15s ease; }
.nav-item span { width: 19px; color: #8291aa; text-align: center; font-size: 17px; }
.nav-item:hover, .nav-item.active { border-color: #273a5e; color: white; background: #182640; }
.nav-item.active span { color: #68a0ff; }
.sidebar-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 14px 6px 4px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.secure-dot, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #47d69b88; }
.logout-button { margin-left: auto; border: 0; color: #a7b4ca; background: none; font-size: 11px; }
.main-area { max-width: 1450px; min-height: 100vh; margin-left: 250px; padding: 0 42px 25px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 30px 0 27px; border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.03em; }
.eyebrow { margin: 0; color: #7f91ad; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 7px; font-size: 19px; letter-spacing: -.03em; }
h3 { margin: 5px 0 0; font-size: 15px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.page { padding-top: 28px; }
.welcome-row, .section-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.welcome-row p, .section-intro p { margin-bottom: 0; }
.status-pill, .server-chip, .saved-indicator { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; color: #b9c7dc; background: #11192b; font-size: 11px; }
.status-pill.offline .status-dot { background: var(--red); box-shadow: 0 0 12px #ff6e7988; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(125px, 1fr)); gap: 13px; margin-bottom: 15px; }
.card, .stat-card { border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(150deg, #141d30, #101727); box-shadow: 0 12px 35px #04091626; }
.stat-card { min-height: 112px; padding: 17px; }
.stat-card .label { color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin-top: 12px; font-size: 26px; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 4px; color: #8191aa; font-size: 10px; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.card { padding: 19px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.card-heading .eyebrow { margin-bottom: 7px; }
.card-heading .muted { margin: 5px 0 0; }
.heading-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #2e4269; border-radius: 10px; color: #7eacff; background: #1a2c4b; }
.checklist { display: grid; gap: 11px; }
.check-item { display: flex; align-items: center; gap: 9px; color: #bdc9da; font-size: 12px; }
.check-mark { color: var(--green); }
.check-mark.missing { color: #f0b85c; }
.button { min-height: 36px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px; color: #dce5f4; background: #18243a; font-size: 12px; font-weight: 650; transition: .15s ease; }
.button:hover { border-color: #527bc0; filter: brightness(1.1); }
.button.primary { border-color: #4388ff; color: white; background: linear-gradient(135deg, #4388ff, #326dd9); }
.button.secondary { background: #131c2e; }
.button.full { width: 100%; margin-top: 14px; }
.notice { margin: 18px 0 -5px; padding: 11px 14px; border: 1px solid #285f4b; border-radius: 9px; color: #a9f0d1; background: #10271f; font-size: 12px; }
.notice.error { border-color: #633440; color: #ffc1c5; background: #2b1720; }
.section-intro { align-items: flex-end; }
.server-chip { flex: 0 0 auto; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.setting-field { min-width: 0; }
.setting-field label, .field-label, .login-card label { display: block; margin-bottom: 7px; color: #b6c3d7; font-size: 11px; font-weight: 650; }
.setting-field select, .inline-form select, .inline-form input, .login-card input { width: 100%; min-height: 37px; padding: 0 10px; border: 1px solid #2a3955; border-radius: 7px; outline: none; color: #eaf0fa; background: #0c1322; font-size: 12px; }
select:focus, input:focus, textarea:focus { border-color: #4388ff; box-shadow: 0 0 0 3px #4388ff20; }
.panel-grid.server-panels { margin: 15px 0; }
.inline-form { display: flex; align-items: center; gap: 9px; }
.inline-form select { flex: 1; }
.inline-form input { max-width: 110px; }
#xp-ignored { width: 100%; padding: 8px; border: 1px solid #2a3955; border-radius: 7px; color: #eaf0fa; background: #0c1322; font-size: 12px; }
#xp-ignored option { padding: 5px; }
.spaced { margin-top: 10px; }
.level-card { margin-top: 0; }
.level-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 10px; margin-bottom: 9px; }
.level-row span { color: #c3cee0; font-size: 12px; }
.add-level { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--border); }
.config-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 15px; }
.config-nav { padding: 13px; }
.config-nav .eyebrow { padding: 5px 7px 10px; }
.config-section { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid transparent; border-radius: 7px; color: #a9b6ca; background: transparent; text-align: left; font-size: 11px; }
.config-section:hover, .config-section.active { border-color: #2b4169; color: white; background: #192842; }
.editor-card { min-width: 0; }
.saved-indicator { padding: 6px 9px; border-color: #28654e; color: #8fe0bd; background: #10271f; font-size: 10px; }
.saved-indicator.unsaved { border-color: #77572a; color: #ffd38a; background: #2a2113; }
.button:disabled { cursor: default; opacity: .48; }
.editor-modes { display: flex; align-items: center; gap: 6px; margin: 3px 0 17px; padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: #0b1220; }
.mode-button { padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; color: #98a8bf; background: transparent; font-size: 11px; }
.mode-button.active { border-color: #2d436a; color: white; background: #192842; }
.editor-modes > span { margin-left: auto; padding-right: 7px; color: #76869f; font-size: 10px; }
.friendly-editor, .friendly-fields { display: grid; gap: 12px; }
.friendly-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.friendly-field { display: grid; align-content: start; gap: 7px; min-width: 0; color: #aebbd0; font-size: 11px; }
.friendly-field > span { font-weight: 650; }
.friendly-field input:not([type="checkbox"]), .friendly-field textarea { width: 100%; min-height: 37px; padding: 9px 10px; border: 1px solid #2a3955; border-radius: 7px; outline: none; color: #eaf0fa; background: #0c1322; font-size: 12px; }
.friendly-field textarea { resize: vertical; line-height: 1.5; }
.friendly-field input[type="color"] { width: 100%; height: 37px; padding: 4px; border: 1px solid #2a3955; border-radius: 7px; background: #0c1322; }
.friendly-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 37px; padding: 8px 10px; border: 1px solid #2a3955; border-radius: 7px; background: #0c1322; }
.friendly-toggle input { width: 17px; height: 17px; accent-color: var(--blue); }
.friendly-group { grid-column: 1 / -1; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: #11192a; }
.friendly-group > summary { padding: 12px; color: #dce5f4; cursor: pointer; font-size: 12px; font-weight: 700; list-style-position: inside; }
.friendly-group > .friendly-fields { padding: 0 12px 12px; }
.array-section { display: grid; gap: 10px; }
.array-heading, .repeat-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.array-heading h4 { margin: 0; color: #e4ebf7; font-size: 13px; }
.array-count { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.repeat-card { padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: #0e1626; }
.repeat-card-heading { margin-bottom: 12px; }
.repeat-card-heading strong { min-width: 0; overflow-wrap: anywhere; color: #dce5f4; font-size: 12px; }
.repeat-card .friendly-fields { gap: 10px; }
.repeat-card .friendly-group { background: #101a2c; }
.remove-button { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #613742; border-radius: 6px; color: #ff9da5; background: #291820; font-size: 10px; }
.empty-list { margin: 0; padding: 17px; border: 1px dashed #34425b; border-radius: 8px; color: var(--muted); text-align: center; font-size: 11px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px; }
.catalog-grid > .card { min-width: 0; }
.catalog-list { display: grid; gap: 10px; }
.catalog-item { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #0e1626; }
.catalog-item-heading, .catalog-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.catalog-item-heading { margin-bottom: 12px; }
.catalog-item-heading strong { min-width: 0; overflow-wrap: anywhere; color: #dce5f4; font-size: 12px; }
.catalog-actions { display: flex; gap: 6px; }
.catalog-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.catalog-item-footer { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); }
.catalog-item-footer > span { overflow-wrap: anywhere; color: #8191aa; font: 10px "Cascadia Code", Consolas, monospace; }
.catalog-add-form { display: grid; gap: 13px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.catalog-add-form h4 { margin: 0; color: #e2eaf6; font-size: 12px; }
#config-editor { width: 100%; min-height: 460px; resize: vertical; padding: 14px; border: 1px solid #283750; border-radius: 8px; outline: none; color: #c5d7f3; background: #0a101d; font: 12px/1.6 "Cascadia Code", "SFMono-Regular", Consolas, monospace; tab-size: 2; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
code { color: #a9caff; }
.footer { padding: 30px 0 6px; color: #64728a; text-align: center; font-size: 10px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 370px); padding: 30px; border: 1px solid var(--border); border-radius: 15px; background: #11192b; box-shadow: 0 25px 80px #02040b88; }
.login-card .brand-mark { margin-bottom: 24px; }
.login-card h1 { margin: 7px 0; font-size: 25px; letter-spacing: -.04em; }
.login-card > .muted { margin-bottom: 25px; }
.login-card input { min-height: 42px; }
.error-text { min-height: 16px; margin: 12px 0 0; color: #ff969d; font-size: 11px; }

@media (max-width: 1050px) {
  .main-area { padding-right: 25px; padding-left: 25px; }
  .stat-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 15px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand-lockup { padding: 0 3px 11px; }
  nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .nav-item { justify-content: center; gap: 5px; padding: 9px 3px; font-size: 9px; }
  .nav-item span { width: auto; font-size: 13px; }
  .sidebar-bottom { display: none; }
  .main-area { margin-left: 0; padding: 0 15px 20px; }
  .topbar { padding: 20px 0; }
  .topbar h1 { font-size: 19px; }
  .welcome-row, .section-intro { align-items: flex-start; flex-direction: column; }
  .panel-grid, .settings-grid, .config-layout { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { min-height: 94px; padding: 13px; }
  .stat-card strong { margin-top: 8px; font-size: 22px; }
  .config-nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .config-nav .eyebrow { width: 100%; }
  .config-section { width: auto; }
  .friendly-fields { grid-template-columns: 1fr; }
  .catalog-form-grid { grid-template-columns: 1fr; }
  .editor-modes { flex-wrap: wrap; }
  .editor-modes > span { flex-basis: 100%; padding: 5px 7px; }
  #config-editor { min-height: 380px; }
  .editor-footer { align-items: flex-start; flex-direction: column; }
  .editor-footer button { width: 100%; }
  .server-chip { align-self: flex-start; }
}

/* Polished control-room visual system */
:root {
  --bg: #080b14;
  --surface: #101522;
  --surface-2: #151c2d;
  --border: #263149;
  --text: #f5f7ff;
  --muted: #a0abc0;
  --blue: #568cff;
  --green: #4ee0ad;
  --red: #ff7184;
  --violet: #a879ff;
  --aqua: #59dfef;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 82% -15%, #325cb52c 0, transparent 40%),
    radial-gradient(ellipse at 20% 75%, #603fa00f 0, transparent 36%),
    var(--bg);
}

body::before, body::after {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  content: "";
  filter: blur(100px);
  opacity: .13;
  pointer-events: none;
  animation: ambient-drift 18s ease-in-out infinite alternate;
}
body::before { top: 8%; right: 2%; background: #397bff; }
body::after { bottom: -15%; left: 12%; background: #8a48ff; animation-delay: -8s; }

.sidebar {
  z-index: 4;
  border-right-color: #263149aa;
  background: linear-gradient(180deg, #0e1421f2, #0b101af5);
  box-shadow: 15px 0 55px #02050c32;
  backdrop-filter: blur(24px);
}
.brand-lockup { position: relative; }
.brand-lockup::after {
  position: absolute;
  right: 6px;
  bottom: 17px;
  left: 6px;
  height: 1px;
  background: linear-gradient(90deg, #548cff70, #a879ff44, transparent);
  content: "";
}
.brand-mark {
  position: relative;
  overflow: hidden;
  border-color: #79a9ff7a;
  border-radius: 14px;
  background: linear-gradient(140deg, #67a2ff, #4775f0 54%, #8557dc);
  box-shadow: 0 8px 28px #3b73ff4a, inset 0 1px #ffffff55;
}
.brand-mark::after {
  position: absolute;
  inset: -90% auto -90% -35%;
  width: 22px;
  transform: rotate(25deg);
  background: #ffffff35;
  content: "";
  animation: logo-shimmer 6s ease-in-out infinite;
}
.brand-lockup strong { letter-spacing: .025em; }
nav { gap: 6px; }
.nav-item {
  position: relative;
  overflow: hidden;
  min-height: 43px;
  border-radius: 10px;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.nav-item:hover { transform: translateX(3px); }
.nav-item.active {
  border-color: #4979d348;
  background: linear-gradient(100deg, #24427a72, #23274754);
  box-shadow: inset 3px 0 #69a1ff, 0 7px 24px #111e3d42;
}
.nav-item.active::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50px;
  background: linear-gradient(90deg, transparent, #8e7aff0b);
  content: "";
  pointer-events: none;
}
.sidebar-bottom { border-top-color: #2a3650; }
.main-area { max-width: 1500px; }
.topbar {
  position: relative;
  border-bottom-color: #29344a;
}
.topbar::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, #6a9cff, #a879ff);
  content: "";
}
.topbar h1 { font-size: 24px; }
.eyebrow { color: #91a2c0; letter-spacing: .16em; }
.page:not([hidden]) { animation: page-enter .4s cubic-bezier(.2,.75,.25,1) both; }
.welcome-row { padding: 3px 1px 0; }
.welcome-row h2, .section-intro h2 { font-size: 22px; letter-spacing: -.045em; }
.status-pill, .server-chip {
  border-color: #34574280;
  background: linear-gradient(110deg, #14231f, #111922);
  box-shadow: inset 0 1px #ffffff09, 0 5px 20px #0000001c;
}
.status-dot, .secure-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px #4ee0ad12, 0 0 14px #4ee0ad8c;
  animation: status-pulse 2.8s ease-in-out infinite;
}
.status-pill.offline { border-color: #693845; background: #24151e; }
.status-pill.offline .status-dot { background: var(--red); box-shadow: 0 0 0 4px #ff718412, 0 0 14px #ff71848c; }
.stat-grid { gap: 14px; }
.stat-card, .card {
  position: relative;
  overflow: hidden;
  border-color: #29364e;
  border-radius: 14px;
  background: linear-gradient(150deg, #151d2c, #101622 78%);
  box-shadow: 0 16px 42px #02050c3d, inset 0 1px #ffffff08;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.stat-card::before, .card::before {
  position: absolute;
  top: 0;
  left: 22px;
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, #68a0ff8c, #9e79ff42, transparent);
  content: "";
}
.stat-card:hover, .card:hover {
  transform: translateY(-3px);
  border-color: #455a7c;
  box-shadow: 0 20px 48px #02050c52, inset 0 1px #ffffff0c;
}
.stat-card { animation: card-arrive .55s both; }
.stat-card:nth-child(2) { animation-delay: .05s; }
.stat-card:nth-child(3) { animation-delay: .1s; }
.stat-card:nth-child(4) { animation-delay: .15s; }
.stat-card:nth-child(5) { animation-delay: .2s; }
.stat-card .label { color: #aebbd1; }
.stat-card strong {
  background: linear-gradient(100deg, #fff 10%, #bed2ff 70%, #cbafff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card small { color: #8f9db4; }
.card { padding: 21px; }
.heading-icon {
  border-color: #4966a271;
  border-radius: 11px;
  background: linear-gradient(145deg, #1d3760, #252441);
  box-shadow: inset 0 1px #ffffff10, 0 7px 18px #111d394c;
}
.button {
  position: relative;
  overflow: hidden;
  border-color: #34415a;
  border-radius: 9px;
  background: linear-gradient(140deg, #1c2940, #151d2d);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); border-color: #6a8bc4; box-shadow: 0 7px 18px #050a1640; }
.button:active { transform: translateY(0) scale(.98); }
.button.primary {
  border-color: #6798ff;
  background: linear-gradient(115deg, #4789ff, #626bfa 57%, #8a63ea);
  box-shadow: 0 8px 22px #456eff3a, inset 0 1px #ffffff55;
}
.button.primary::after {
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -60%;
  width: 35%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, #ffffff3b, transparent);
  content: "";
  transition: left .55s ease;
}
.button.primary:hover::after { left: 130%; }
.button.secondary { background: linear-gradient(140deg, #1a2437, #121a29); }
.notice { box-shadow: 0 8px 26px #07150f50; animation: page-enter .25s ease both; }
.check-mark { filter: drop-shadow(0 0 7px #4ee0ad66); }
.setting-field select, .inline-form select, .inline-form input, .friendly-field input:not([type="checkbox"]), .friendly-field textarea, .catalog-item input, .catalog-item textarea, #xp-ignored, .login-card input {
  border-color: #303d56;
  border-radius: 9px;
  background-color: #0b111d;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
select:focus, input:focus, textarea:focus {
  border-color: #7197ff;
  background-color: #10182a;
  box-shadow: 0 0 0 3px #658bff20, 0 0 22px #577dff12;
}
.friendly-group, .repeat-card, .catalog-item {
  border-color: #2b3850;
  border-radius: 11px;
  background: linear-gradient(145deg, #121b2a, #0e1521);
}
.friendly-group[open] > summary { color: #dce7ff; }
.config-section { border-radius: 8px; transition: .18s ease; }
.config-section:hover { transform: translateX(2px); }
.config-section.active { background: linear-gradient(100deg, #24427a55, #23274742); box-shadow: inset 2px 0 #69a1ff; }
.saved-indicator { box-shadow: inset 0 1px #ffffff09; }
.editor-modes { border-color: #303c54; background: #0c121e; }
.mode-button.active { border-color: #435d89; background: linear-gradient(130deg, #213c6d, #292747); }
.remove-button {
  border-color: #633b4b;
  border-radius: 7px;
  background: linear-gradient(140deg, #321e2a, #261820);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.remove-button:hover { transform: translateY(-1px); border-color: #bb5c74; background: #3b1d29; }
.footer { color: #8390a8; }

.login-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  padding: 35px;
  background:
    radial-gradient(ellipse at 24% 16%, #3f71df31, transparent 42%),
    radial-gradient(ellipse at 82% 82%, #844de52b, transparent 42%),
    linear-gradient(135deg, #080b14, #0c1020 52%, #0a0c18);
}
.login-screen::before, .login-screen::after {
  position: absolute;
  z-index: -1;
  width: 560px;
  height: 560px;
  border: 1px solid #93afff10;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  animation: orbit-breathe 14s ease-in-out infinite alternate;
}
.login-screen::before { top: -300px; left: -160px; box-shadow: 0 0 0 50px #879fff06, 0 0 0 100px #879fff04; }
.login-screen::after { right: -350px; bottom: -420px; border-color: #d0a1ff13; animation-delay: -5s; }
.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, .92fr);
  width: min(100%, 1000px);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid #4b5e83a3;
  border-radius: 24px;
  background: #101522d9;
  box-shadow: 0 40px 120px #0009, 0 0 100px #416cff19, inset 0 1px #ffffff16;
  backdrop-filter: blur(24px);
  animation: login-arrive .75s cubic-bezier(.2,.75,.25,1) both;
}
.login-visual {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 590px;
  padding: 47px;
  background:
    radial-gradient(ellipse at 50% 39%, #5076e935, transparent 42%),
    radial-gradient(ellipse at 88% 6%, #aa75ff24, transparent 37%),
    linear-gradient(155deg, #18243b, #101522 67%, #151329);
}
.login-visual::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px);
  background-position: center;
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(180deg, #0008, transparent 70%);
  pointer-events: none;
}
.login-visual-top { position: absolute; inset: 30px 30px auto; display: flex; justify-content: space-between; }
.secure-badge {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #7896ce3b;
  border-radius: 999px;
  color: #c0cbe0;
  background: #111a2b99;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .11em;
  backdrop-filter: blur(10px);
}
.secure-badge .secure-dot { width: 6px; height: 6px; }
.login-brand-art {
  position: absolute;
  top: 85px;
  left: 50%;
  display: grid;
  width: 230px;
  height: 230px;
  place-items: center;
  transform: translateX(-50%);
}
.login-brand-art::before, .login-brand-art::after {
  position: absolute;
  inset: 16px;
  border: 1px solid #a2baff2b;
  border-radius: 50%;
  content: "";
  animation: art-rotate 18s linear infinite;
}
.login-brand-art::after { inset: 0; border-color: #bd9aff24; animation-direction: reverse; animation-duration: 26s; }
.login-brand-art img {
  position: relative;
  z-index: 1;
  width: 142px;
  height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 0 25px #5284ff85);
  animation: logo-float 4.8s ease-in-out infinite;
}
.art-glow {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #547bff52;
  filter: blur(48px);
  animation: glow-pulse 4s ease-in-out infinite;
}
.login-visual > .eyebrow { position: relative; z-index: 1; color: #a7b5d1; }
.login-visual h2 { position: relative; z-index: 1; margin: 12px 0; font-size: clamp(33px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.06em; }
.login-visual h2 span { background: linear-gradient(100deg, #82b5ff, #b69cff 75%, #ffaad9); background-clip: text; -webkit-text-fill-color: transparent; }
.login-visual-copy { position: relative; z-index: 1; max-width: 355px; margin-bottom: 21px; color: #a5b1c8; font-size: 12px; line-height: 1.75; }
.login-feature-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 15px; color: #b7c4d9; font-size: 10px; }
.login-feature-row span { display: inline-flex; align-items: center; gap: 7px; }
.login-feature-row i { color: #92aaff; font-size: 14px; font-style: normal; }
.visual-footer { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 37px; color: #7988a3; font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.visual-line { width: 26px; height: 1px; background: linear-gradient(90deg, #6b9bff, #aa7cff); }
.login-card {
  align-self: center;
  width: 100%;
  padding: 53px clamp(32px, 5vw, 60px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-card > .eyebrow { color: #93aaff; }
.login-card h1 { margin-top: 11px; font-size: 34px; letter-spacing: -.055em; }
.login-card > .muted { margin-bottom: 37px; }
.login-card label { margin-bottom: 9px; color: #c0cbe0; }
.password-wrap { position: relative; }
.login-card .password-wrap input { min-height: 48px; padding: 0 65px 0 14px; border-color: #384762; background: #0b111d; font-size: 13px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 5px 7px;
  transform: translateY(-50%);
  border: 0;
  color: #94a9cf;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}
.password-toggle:hover { color: white; }
.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 47px;
  margin-top: 16px;
  padding: 0 16px;
  font-size: 12px;
}
.login-submit span:last-child { font-size: 18px; transition: transform .2s ease; }
.login-submit:hover span:last-child { transform: translateX(3px); }
.login-security { display: flex; align-items: center; gap: 9px; margin-top: 31px; padding-top: 19px; border-top: 1px solid #2b354a; color: #8997af; font-size: 10px; }
.login-security .secure-dot { width: 6px; height: 6px; }
.login-mobile-mark { display: none; }
.error-text:not(:empty) { margin-top: 14px; padding: 10px 11px; border: 1px solid #703d4b; border-radius: 8px; background: #311b24; }

@keyframes ambient-drift { from { transform: translate3d(-20px, -12px, 0) scale(.9); } to { transform: translate3d(35px, 28px, 0) scale(1.12); } }
@keyframes logo-shimmer { 0%, 75%, 100% { transform: translateX(0) rotate(25deg); opacity: 0; } 82% { opacity: 1; } 92% { transform: translateX(240px) rotate(25deg); opacity: 0; } }
@keyframes status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes login-arrive { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes orbit-breathe { from { transform: scale(.92) rotate(0); opacity: .5; } to { transform: scale(1.08) rotate(16deg); opacity: 1; } }
@keyframes art-rotate { to { transform: rotate(360deg); } }
@keyframes logo-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.025); } }
@keyframes glow-pulse { 0%, 100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: minmax(0, .95fr) minmax(340px, 1.05fr); min-height: 540px; }
  .login-visual { min-height: 540px; padding: 35px; }
  .login-brand-art { top: 70px; transform: translateX(-50%) scale(.84); }
  .login-card { padding-right: 35px; padding-left: 35px; }
}

@media (max-width: 640px) {
  .login-screen { padding: 16px; }
  .login-shell { display: block; width: min(100%, 430px); min-height: 0; border-radius: 20px; }
  .login-visual { display: none; }
  .login-card { padding: 34px 27px 26px; }
  .login-mobile-mark { display: grid; width: 70px; height: 70px; place-items: center; margin: 0 auto 23px; border: 1px solid #6b92ee68; border-radius: 20px; background: linear-gradient(145deg, #182a4c, #272044); box-shadow: 0 0 35px #567cff26; }
  .login-mobile-mark img { width: 55px; height: 55px; object-fit: contain; filter: drop-shadow(0 0 10px #568bff6e); }
  .login-card > .eyebrow, .login-card h1, .login-card > .muted { text-align: center; }
  .login-card h1 { font-size: 30px; }
}

@media (max-width: 760px) {
  .stat-card:hover, .card:hover { transform: none; }
  .nav-item:hover, .config-section:hover { transform: none; }
  .main-area { padding-right: 17px; padding-left: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
