:root {
  color-scheme: dark;
  font: 16px/1.5 system-ui, sans-serif;
  color: #f3eefa;
  background: #15101f;
  --surface: #21182e;
  --line: #4a385e;
  --muted: #c9b8db;
  --accent: #dfb9ff;
  --pink: #ffacd9;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
[hidden] { display: none !important; }
.topbar, .console-bar, .account, .brand { display: flex; align-items: center; gap: .75rem; }
.topbar { justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 750; }
.mark { padding: .2rem .45rem; color: var(--pink); background: #422654; border-radius: .4rem; font: bold 1rem ui-monospace, monospace; }
.product, .account, #status { color: var(--muted); font-size: .9rem; }
.workspace { display: grid; grid-template-columns: minmax(16rem,19rem) minmax(0,1fr); gap: 1rem; padding: 1rem 1.5rem; }
.panel, .console, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; }
.panel { padding: 1.25rem; }
h1 { margin: 0 0 1rem; font-size: 1.38rem; }
h2 { margin: 0 0 .75rem; font-size: 1rem; }
label, input, select { display: block; }
label { margin-bottom: .85rem; font-size: .9rem; }
input, select, button, .button { font: inherit; border: 1px solid var(--line); border-radius: .4rem; color: inherit; background: #181122; padding: .5rem .7rem; }
label > input:not([type=checkbox]), select { width: 100%; margin-top: .25rem; }
.save-toggle { display: flex; gap: .45rem; align-items: center; }
button, .button { cursor: pointer; font-size: .9rem; text-decoration: none; }
button:disabled { opacity: .48; cursor: default; }
button:not(:disabled):hover { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary { display: inline-block; font-weight: 700; color: #271331; background: linear-gradient(110deg, var(--accent), var(--pink)); border-color: transparent; }
.primary:hover { filter: brightness(1.09); }
.add-target { margin: -.25rem 0 1rem; color: var(--pink); }
.saved { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
#profiles { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
#profiles li { display: flex; gap: .4rem; align-items: center; margin-bottom: .45rem; }
#profiles li > button:first-child { flex: 1; text-align: left; overflow-wrap: anywhere; }
.console { display: flex; flex-direction: column; min-width: 0; }
.console-bar { justify-content: space-between; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
#terminal { height: max(24rem, calc(100dvh - 10rem)); background: #100b18; padding: .8rem; }
#error { margin: 0; padding: .7rem .85rem; color: #ffc9b8; overflow-wrap: anywhere; }
.login-page { display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at 18% 15%, #39234d, transparent 56%), radial-gradient(ellipse at 92% 80%, #3b1b38, transparent 50%), #15101f; }
.login-card { width: min(100%, 28rem); padding: clamp(1.4rem, 5vw, 2.4rem); box-shadow: 0 1.2rem 5rem #10091b90; border-top: 2px solid var(--pink); }
.login-card h1 { margin: 1.4rem 0 .4rem; font-size: clamp(1.8rem, 6vw, 2.45rem); letter-spacing: -.035em; }
.login-card p { color: var(--muted); margin: 0 0 1.5rem; }
.login-card .button { display: block; text-align: center; padding: .7rem; }
dialog { width: min(calc(100% - 1.4rem), 32rem); padding: 1.35rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); color: inherit; }
dialog::backdrop { background: #10091bb5; }
dialog h2 { font-size: 1.24rem; margin-bottom: 1rem; }
.address-fields { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: .75rem; }
.hint { margin: -.4rem 0 1rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; }
#target-error { color: #ffc9b8; font-size: .9rem; }
@media (max-width: 720px) {
  .workspace { grid-template-columns: 1fr; padding: .7rem; }
  .topbar { padding: .7rem; }
  #user { display: none; }
  #terminal { height: 55dvh; }
}
