:root {
  --bg: #131313;
  --sidebar: #171717;
  --surface: #1e1e1e;
  --surface-2: #242424;
  --border: #2f2f2f;
  --text: #f4f4f5;
  --muted: #9898a1;
  --blue: #0070ff;
  --blue-soft: rgba(0,112,255,.14);
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; }
.admin-body { min-height: 100vh; color: var(--text); background: var(--bg); }
.admin-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: 256px; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; height: 72px; padding: 0 24px; color: #fff; font-size: 17px; font-weight: 750; text-decoration: none; border-bottom: 1px solid var(--border); letter-spacing: -.02em; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; color: #fff; background: var(--blue); border-radius: 9px; }
.material-symbols-outlined { font-size: 20px; vertical-align: -5px; }
.sidebar-nav { display: grid; gap: 5px; padding: 22px 14px; }
.sidebar-label { padding: 0 10px 8px; color: #6f6f78; font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; color: #a9a9b2; border-radius: 9px; font-size: 14px; font-weight: 550; text-decoration: none; transition: .15s ease; }
.nav-item:hover { color: white; background: #222; }
.nav-item.active { color: #fff; background: var(--blue); box-shadow: 0 7px 18px rgba(0,112,255,.2); }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); }
.logout-button { width: 100%; justify-content: flex-start !important; }
.admin-main { min-height: 100vh; margin-left: 256px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 34px; background: rgba(19,19,19,.92); border-bottom: 1px solid var(--border); }
.topbar-context { color: var(--muted); font-size: 13px; }
.admin-profile { display: flex; align-items: center; gap: 10px; color: #c9c9ce; font-size: 13px; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; color: #b9d4ff; background: #1c3556; border: 1px solid #315b93; border-radius: 50%; font-size: 12px; font-weight: 800; }
.admin-content { max-width: 1540px; margin: 0 auto; padding: 34px; }
.flash { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; padding: 13px 15px; color: #b9f6db; background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.32); border-radius: 10px; font-size: 14px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-title { margin: 0; color: #fff; font-size: 28px; font-weight: 750; letter-spacing: -.035em; }
.page-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; transition: .15s ease; }
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(0,112,255,.2); }
.btn-primary:hover { background: #1b7eff; }
.btn-secondary { color: #ddd; background: #292929; border-color: #383838; }
.btn-secondary:hover { color: white; background: #333; }
.btn-ghost { min-height: 34px; padding: 0 10px; color: #b9b9c0; background: transparent; border-color: #373737; }
.btn-ghost:hover { color: white; background: #2a2a2a; }
.btn-danger { color: #ffb4b4; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); }
.panel { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.panel-title { margin: 0; color: #f5f5f6; font-size: 15px; font-weight: 750; }
.panel-description { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { padding: 19px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-icon { color: #7bb3ff; }
.metric-value { margin-top: 11px; color: #fff; font-size: 28px; font-weight: 760; letter-spacing: -.04em; }
.metric-note { margin-top: 6px; color: #74747c; font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.status::before { width: 7px; height: 7px; content: ""; border-radius: 50%; }
.status-online { color: #6ee7b7; }.status-online::before { background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,.7); }
.status-offline { color: #fda4a4; }.status-offline::before { background: var(--red); }
.status-invalid_login, .status-maintenance { color: #fcd34d; }.status-invalid_login::before, .status-maintenance::before { background: var(--yellow); }
.status-unknown { color: #a1a1aa; }.status-unknown::before { background: #71717a; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th { padding: 13px 18px; color: #777781; background: #1a1a1a; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px 18px; color: #d1d1d6; border-bottom: 1px solid #292929; font-size: 13px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.012); }
.server-name { color: #f5f5f7; font-weight: 700; }.server-url { display: block; max-width: 260px; overflow: hidden; color: #85858f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }.actions form, .order-controls form { margin: 0; }
.order-cell { display: flex; align-items: center; gap: 12px; }.order-value { min-width: 18px; color: #b9b9c1; font-variant-numeric: tabular-nums; }
.order-controls { display: flex; gap: 5px; }.order-button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; color: #a6b8d0; background: #252525; border: 1px solid #303030; border-radius: 7px; cursor: pointer; }.order-button:hover { color: #fff; background: #303030; }.order-button:disabled { cursor: not-allowed; opacity: .32; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }.form-grid .span-2 { grid-column: span 2; }
.field { display: grid; gap: 8px; }.field label { color: #d6d6dc; font-size: 12px; font-weight: 700; }.field-help { color: #797982; font-size: 12px; }
.text-input, .select-input, .textarea { width: 100%; min-height: 42px; padding: 0 12px; color: #ececf0; background: #171717; border: 1px solid #373737; border-radius: 8px; outline: none; font: inherit; font-size: 13px; }.textarea { min-height: 92px; padding: 11px 12px; resize: vertical; }.text-input:focus, .select-input:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,112,255,.14); }
.checkbox-row { display: flex; align-items: center; gap: 9px; color: #d8d8dd; font-size: 13px; }.checkbox-row input { width: 16px; height: 16px; accent-color: var(--blue); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.stack { display: grid; gap: 24px; }.empty-state { padding: 40px 20px; color: var(--muted); text-align: center; font-size: 14px; }
.login-body { display: grid; min-height: 100vh; place-items: center; padding: 22px; color: var(--text); background: radial-gradient(circle at 50% 0%, #132849 0, #131313 45%); }.login-card { width: min(100%, 410px); padding: 32px; background: rgba(30,30,30,.96); border: 1px solid #343434; border-radius: 17px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; color: white; font-size: 19px; font-weight: 800; }.login-error { margin-bottom: 18px; padding: 11px; color: #fecaca; background: rgba(239,68,68,.11); border: 1px solid rgba(239,68,68,.3); border-radius: 8px; font-size: 13px; }.login-card .btn { width: 100%; margin-top: 8px; }
@media (max-width: 900px) { .admin-sidebar { width: 70px; }.brand { justify-content: center; padding: 0; }.brand span:last-child, .sidebar-label, .nav-item span:last-child, .sidebar-footer .logout-text { display: none; }.sidebar-nav { padding: 18px 10px; }.nav-item { justify-content: center; padding: 12px; }.admin-main { margin-left: 70px; }.admin-topbar, .admin-content { padding-left: 20px; padding-right: 20px; }.metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .admin-sidebar { display: none; }.admin-main { margin-left: 0; }.admin-topbar { height: 58px; padding: 0 16px; }.admin-content { padding: 22px 16px; }.page-header { flex-direction: column; }.metric-grid, .form-grid { grid-template-columns: 1fr; }.form-grid .span-2 { grid-column: auto; }.page-title { font-size: 24px; }.admin-profile span:not(.avatar) { display: none; } }
