/* AXON HOST — панель серверов. Стиль в духе axon-project.ru: тёмно-синий фон, стеклянные карточки, бирюзовый акцент. */
:root {
  --bg: #0b0f16; --bg2: #0e131c;
  --card: rgba(20, 27, 38, .72); --card-solid: #141b26; --card-hi: rgba(28, 37, 52, .85);
  --line: rgba(255, 255, 255, .07); --line-hi: rgba(255, 255, 255, .13);
  --text: #eef3f7; --text-2: #b6c2cc; --muted: #7d8a96;
  --acc: #29a3ab; --acc-2: #4fd1d9; --acc-blue: #3b7bf6;
  --acc-low: rgba(41, 163, 171, .1); --acc-mid: rgba(41, 163, 171, .28);
  --grad: linear-gradient(135deg, #2bb3bb 0%, #2f8fd8 100%);
  --green: #5fd38a; --green-low: rgba(95, 211, 138, .12);
  --orange: #f6b949; --orange-low: rgba(246, 185, 73, .12);
  --red: #ff5a52; --red-low: rgba(255, 90, 82, .1); --red-mid: rgba(255, 90, 82, .35);
  --input: rgba(8, 11, 17, .7);
  --radius: 16px; --radius-sm: 10px;
  --font-head: 'Unbounded', sans-serif; --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --side-w: 248px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 14px/1.5 var(--font);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(47, 143, 216, .13), transparent 60%),
    radial-gradient(700px 420px at 10% 0%, rgba(41, 163, 171, .10), transparent 60%);
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
a { color: var(--acc-2); text-decoration: none; }
a:hover { color: #7fe4ea; }
form { margin: 0; }
::selection { background: var(--acc-mid); }

/* иконки */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-sm { width: 15px; height: 15px; } .i-lg { width: 22px; height: 22px; }

/* ===== каркас ===== */
.shell { display: flex; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: none;
  display: flex; flex-direction: column; gap: 6px; padding: 22px 14px;
  background: rgba(10, 14, 21, .82); border-right: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; color: var(--text); }
.brand img { height: 30px; width: auto; }
.brand b { font: 700 15px/1 var(--font-head); letter-spacing: .04em; }
.brand small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.nav-label { padding: 12px 12px 6px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.nav a.on { background: var(--acc-low); color: var(--text); box-shadow: inset 2px 0 0 var(--acc); }
.nav a.on .i { color: var(--acc-2); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--grad); color: #04191b; font: 700 14px/1 var(--font-head); text-transform: uppercase; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text-2); border: 1px solid transparent; background: transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--red); background: var(--red-low); }

.main { flex: 1; min-width: 0; }
.container { max-width: 1120px; margin: 0 auto; padding: 32px 32px 64px; }
.container.narrow { max-width: 760px; }

/* верхняя полоса для телефона */
.topbar { display: none; }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: sticky; top: 0; z-index: 30; padding: 12px 16px;
    background: rgba(10, 14, 21, .9); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .topbar .brand { padding: 0; }
  .topbar nav { display: flex; gap: 2px; }
  .container { padding: 20px 16px 48px; }
}

/* ===== заголовок страницы ===== */
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--text); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* ===== карточки ===== */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px rgba(0, 0, 0, .22);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h3 { display: flex; align-items: center; gap: 10px; }
.card-head h3 .i { color: var(--acc-2); }
.card > p.muted:first-child, .card-head + p.muted { margin-top: -6px; }
.card.danger-zone { border-color: var(--red-mid); background: linear-gradient(180deg, rgba(255, 90, 82, .05), transparent 70%), var(--card); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card { margin-bottom: 0; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ===== кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-hi);
  background: rgba(255, 255, 255, .04); color: var(--text); cursor: pointer;
  font: 500 14px/1.2 var(--font); white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s, color .15s;
}
.btn:hover { background: rgba(255, 255, 255, .08); border-color: var(--acc-mid); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, .tab-btn:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .38; cursor: not-allowed; transform: none; }
.btn-accent { background: var(--grad); border-color: transparent; color: #041a1d; font-weight: 600; box-shadow: 0 6px 18px rgba(41, 163, 171, .25); }
.btn-accent:hover { background: var(--grad); filter: brightness(1.08); border-color: transparent; color: #041a1d; box-shadow: 0 8px 24px rgba(41, 163, 171, .35); }
.btn-danger { background: var(--red-low); border-color: var(--red-mid); color: #ff8a84; }
.btn-danger:hover { background: rgba(255, 90, 82, .18); border-color: var(--red); color: #ffb0ab; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); border-color: var(--line); }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 15px; }

/* ===== статусы ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-on { background: var(--green-low); color: var(--green); border-color: rgba(95, 211, 138, .2); }
.pill-on::before { box-shadow: 0 0 0 3px rgba(95, 211, 138, .18); animation: pulse 2s infinite; }
.pill-off { background: var(--red-low); color: var(--red); border-color: rgba(255, 90, 82, .2); }
.pill-warn { background: var(--orange-low); color: var(--orange); border-color: rgba(246, 185, 73, .22); }
.pill-acc { background: var(--acc-low); color: var(--acc-2); border-color: var(--acc-mid); }
.pill-plain::before { display: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(95, 211, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .pill-on::before { animation: none; } * { transition: none !important; } }

/* ===== формы ===== */
label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.field { margin-bottom: 16px; }
.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-hi);
  background: var(--input); color: var(--text); font: 400 14px/1.3 var(--font);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #5d6873; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-low); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8a96' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select option { background: var(--card-solid); }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--acc); cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 9px; margin: 0; color: var(--text); font-weight: 400; cursor: pointer; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form > input, .inline-form > select { flex: 1 1 180px; width: auto; }
.inline-form > .btn { flex: none; }
textarea.code { font: 12.5px/1.65 var(--mono); min-height: 420px; resize: vertical; background: #070a0f; }

/* поле загрузки файла */
.drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px;
  border: 1.5px dashed var(--line-hi); background: rgba(255, 255, 255, .02); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--acc); background: var(--acc-low); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .drop-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-low); color: var(--acc-2); flex: none; }
.drop b { display: block; font-weight: 600; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop .drop-name { color: var(--acc-2); }

/* ===== списки ===== */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.list-row .lr-title { font-weight: 500; overflow-wrap: anywhere; }
.list-row .lr-sub { font-size: 12.5px; color: var(--muted); }
.list-row .lr-actions { display: flex; gap: 6px; flex: none; }
.lr-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .04); color: var(--text-2); }
.lr-ico.acc { background: var(--acc-low); color: var(--acc-2); }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); }
.empty .i { width: 30px; height: 30px; display: block; margin: 0 auto 8px; opacity: .6; }

/* ===== мелочи ===== */
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
pre {
  margin: 0; background: #070a0f; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  white-space: pre-wrap; word-break: break-word; font: 12.5px/1.6 var(--mono); color: #c3cfd8; max-height: 360px; overflow: auto;
}
.meter { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.meter.warn > i { background: linear-gradient(90deg, #f6b949, #ff8a52); }
.meter.bad > i { background: linear-gradient(90deg, #ff7a52, #ff4940); }

/* уведомления */
.flash { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; border-radius: 12px; border: 1px solid var(--acc-mid); background: var(--acc-low); color: var(--text); }
.flash .i { color: var(--acc-2); }
.flash .icon-btn { margin-left: auto; width: 28px; height: 28px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px;
  background: var(--card-solid); border: 1px solid var(--acc-mid); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .i { color: var(--green); }

/* ===== авторизация ===== */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo img { height: 56px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 8px 24px rgba(41, 163, 171, .35)); }
.auth-logo b { font: 700 20px/1 var(--font-head); letter-spacing: .05em; }
.auth-logo span { display: block; margin-top: 8px; color: var(--muted); }
.auth .card { padding: 28px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-wrap .icon-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; }
