:root {
  --bg: #090d12;
  --panel: rgba(19, 25, 34, .82);
  --panel-strong: #151c26;
  --line: rgba(255, 255, 255, .09);
  --text: #f4f7fb;
  --muted: #94a3b8;
  --accent: #7cf6c7;
  --accent-strong: #32dba0;
  --warning: #ffc86b;
  --danger: #ff7b87;
  --blue: #7db8ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--text); background: radial-gradient(circle at 50% -20%, #172434 0, var(--bg) 42%); }
button, input, select { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; width: 32rem; height: 32rem; filter: blur(110px); opacity: .08; pointer-events: none; border-radius: 50%; }
.ambient-one { background: var(--accent); top: -16rem; left: -10rem; }
.ambient-two { background: #5298ff; right: -16rem; bottom: -20rem; }
.topbar { position: sticky; z-index: 4; top: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(9, 13, 18, .76); backdrop-filter: blur(18px); }
.brand { display: flex; gap: 11px; align-items: center; font-weight: 760; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: #07110d; background: var(--accent); border-radius: 10px; box-shadow: 0 0 35px rgba(124,246,199,.18); }
.account { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.account a { text-decoration: none; }
main { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.login-view { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 64px 0; }
.panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 24px 90px rgba(0,0,0,.27); backdrop-filter: blur(18px); }
.login-card { width: min(720px, 100%); padding: clamp(34px, 7vw, 76px); border-radius: 30px; }
.login-card h1 { margin: 8px 0 24px; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.045em; }
.login-card > p:not(.eyebrow) { max-width: 570px; margin-bottom: 34px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .19em; }
.dashboard { padding: 70px 0 100px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 38px; }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 66px); letter-spacing: -.055em; }
.muted { margin: 8px 0 0; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; color: var(--text); background: transparent; cursor: pointer; font-weight: 720; text-decoration: none; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.primary { color: #06110c; background: var(--accent); box-shadow: 0 8px 30px rgba(50,219,160,.13); }
.button.primary:hover { background: #9bffdb; }
.button.subtle { border-color: var(--line); background: rgba(255,255,255,.035); }
.button.danger { color: var(--danger); border-color: rgba(255,123,135,.24); }
.button.large { min-height: 52px; padding: 0 22px; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.app-card { overflow: hidden; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(150deg, rgba(24,32,43,.96), rgba(14,20,27,.88)); box-shadow: 0 14px 50px rgba(0,0,0,.16); }
.app-card-head { display: flex; justify-content: space-between; gap: 16px; }
.app-card h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.domain-link { display: block; overflow: hidden; margin-top: 7px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 13px; text-decoration: none; }
.domain-link:hover { color: var(--accent); }
.status { display: inline-flex; height: 27px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 760; }
.status::before { width: 7px; height: 7px; background: currentColor; border-radius: 50%; content: ""; box-shadow: 0 0 10px currentColor; }
.status.running { color: var(--accent); }
.status.exited, .status.dead { color: var(--danger); }
.status.stopped, .status.missing { color: var(--warning); }
.card-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 25px 0 21px; border-block: 1px solid var(--line); }
.metric { padding: 15px 5px; }
.metric + .metric { border-left: 1px solid var(--line); padding-left: 15px; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 5px; font-size: 14px; }
.card-actions { display: flex; justify-content: space-between; gap: 8px; }
.card-actions-group { display: flex; gap: 7px; }
.card-actions .button { min-height: 36px; padding: 0 12px; font-size: 12px; }
.empty { padding: 70px 20px; border-radius: 22px; text-align: center; }
.empty-icon { display: inline-grid; width: 64px; height: 64px; place-items: center; color: var(--accent); background: rgba(124,246,199,.07); border: 1px solid rgba(124,246,199,.18); border-radius: 20px; font-size: 34px; }
.empty h2 { margin: 20px 0 8px; }
.empty p { margin: 0 0 24px; color: var(--muted); }
.notice { margin: -18px 0 24px; padding: 13px 16px; border: 1px solid rgba(255,123,135,.3); border-radius: 12px; color: #ffc2c8; background: rgba(255,123,135,.08); }
dialog { width: min(820px, calc(100% - 30px)); max-height: calc(100vh - 40px); overflow: auto; padding: 0; color: var(--text); border: 1px solid var(--line); border-radius: 24px; background: #111820; box-shadow: 0 40px 140px rgba(0,0,0,.65); }
dialog::backdrop { background: rgba(2,5,8,.74); backdrop-filter: blur(8px); }
.dialog-body { padding: 30px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 28px; }
.dialog-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.icon-button { width: 40px; height: 40px; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; font-size: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: grid; gap: 8px; color: #c4cfdd; font-size: 13px; font-weight: 700; }
label.wide { grid-column: 1 / -1; }
input, select { width: 100%; height: 46px; padding: 0 13px; color: var(--text); border: 1px solid var(--line); outline: none; border-radius: 11px; background: rgba(255,255,255,.035); }
input:focus, select:focus { border-color: rgba(124,246,199,.52); box-shadow: 0 0 0 3px rgba(124,246,199,.07); }
small { color: var(--muted); font-weight: 400; }
.form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.section-heading h3 { margin: 0; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.rows { display: grid; gap: 10px; margin-top: 15px; }
.row { display: grid; grid-template-columns: 1fr 1.35fr auto auto; gap: 9px; align-items: center; }
.volume-row { grid-template-columns: .8fr 1.5fr .6fr auto; }
.check { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.remove-row { width: 38px; height: 38px; color: var(--danger); border: 0; background: transparent; cursor: pointer; font-size: 19px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; }
.detail-body { min-height: 620px; }
.detail-status { margin: -14px 0 22px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 14px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--text); border-color: var(--accent); }
.tab-panel { padding: 24px 0 2px; }
.overview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-box { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.info-box span { display: block; color: var(--muted); font-size: 11px; }
.info-box strong { display: block; overflow-wrap: anywhere; margin-top: 5px; font-size: 13px; }
pre { min-height: 350px; max-height: 440px; overflow: auto; padding: 18px; color: #c8f7e3; border: 1px solid var(--line); border-radius: 13px; background: #080c10; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.inline-form { display: flex; gap: 10px; margin-top: 18px; }
.domain-list, .history-list { display: grid; gap: 10px; }
.domain-item, .history-item { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.domain-top, .history-top { display: flex; justify-content: space-between; gap: 12px; }
.domain-item code { display: block; margin-top: 10px; color: var(--accent); font-size: 11px; overflow-wrap: anywhere; }
.domain-actions { display: flex; gap: 6px; margin-top: 12px; }
.domain-actions .button { min-height: 34px; font-size: 11px; }
.history-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  main { width: min(100% - 26px, 1180px); }
  .topbar { padding-inline: 16px; }
  .dashboard { padding-top: 42px; }
  .hero { align-items: start; flex-direction: column; }
  .app-grid, .form-grid, .overview-grid { grid-template-columns: 1fr; }
  label.wide { grid-column: auto; }
  .row, .volume-row { grid-template-columns: 1fr; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
  .dialog-body { padding: 22px 18px; }
  .card-actions { align-items: stretch; flex-direction: column; }
  .card-actions-group { display: grid; grid-template-columns: repeat(3, 1fr); }
}
