:root {
  color-scheme: dark;
  --bg: #070a12;
  --surface: rgba(17, 22, 37, .82);
  --surface-solid: #111625;
  --surface-raised: #171d2f;
  --line: rgba(255,255,255,.085);
  --text: #f7f8ff;
  --muted: #8d96ad;
  --blue: #4379ff;
  --blue-light: #6f98ff;
  --violet: #856cff;
  --cyan: #35c7e8;
  --green: #31d49d;
  --red: #ff6577;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background:
  radial-gradient(circle at 85% 5%, rgba(65,104,255,.13), transparent 27rem),
  radial-gradient(circle at 48% 100%, rgba(89,61,205,.08), transparent 32rem), var(--bg); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px 22px; display: flex; flex-direction: column; background: rgba(10,13,23,.78); border-right: 1px solid var(--line); backdrop-filter: blur(22px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: 46px; object-fit: cover; border-radius: 13px; box-shadow: 0 10px 30px rgba(53,101,255,.24); }
.brand-name, .brand-caption { display: block; }
.brand-name { font-weight: 760; letter-spacing: -.02em; }
.brand-caption { color: var(--muted); font-size: 12px; margin-top: 3px; }
.navigation { display: grid; gap: 6px; margin-top: 46px; }
.nav-item { width: 100%; border: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); border-radius: 12px; padding: 12px 14px; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav-item.active { color: #fff; background: linear-gradient(100deg, rgba(62,111,255,.23), rgba(65,111,255,.08)); box-shadow: inset 3px 0 var(--blue); }
.nav-icon { width: 20px; text-align: center; color: var(--blue-light); font-size: 18px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 16px; }
.privacy-card { padding: 14px; border: 1px solid rgba(74,118,255,.18); border-radius: 14px; background: rgba(49,80,170,.09); display: flex; gap: 10px; }
.privacy-icon { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: rgba(49,212,157,.14); color: var(--green); }
.privacy-card strong, .privacy-card span { display: block; }
.privacy-card strong { font-size: 12px; }
.privacy-card div span { margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.logout { color: #9da5b9; }
.content { min-width: 0; padding: 42px clamp(28px,4vw,64px) 64px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-bottom: 28px; }
.eyebrow { color: var(--blue-light); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 760; }
h1,h2,h3,p { margin-top: 0; }
.topbar h1 { margin: 6px 0 7px; font-size: clamp(28px,3vw,40px); letter-spacing: -.045em; }
.topbar p, .panel-header p { margin-bottom: 0; color: var(--muted); }
.button { min-height: 44px; border: 0; border-radius: 12px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff; font-weight: 680; cursor: pointer; transition: transform .17s ease, filter .17s ease, background .17s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button:active { transform: translateY(0); }
.button.primary { background: linear-gradient(135deg, #3c72ff, #6155e8); box-shadow: 0 12px 30px rgba(59,103,255,.25); }
.button.secondary { background: #21283b; border: 1px solid var(--line); }
.button.text { background: transparent; color: var(--muted); }
.button.full { width: 100%; }
.summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.summary-card { position: relative; overflow: hidden; min-height: 154px; padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg, rgba(24,30,50,.88), rgba(14,18,31,.9)); box-shadow: 0 15px 40px rgba(0,0,0,.12); }
.summary-card::after { content: ""; position: absolute; width: 140px; height: 140px; right: -54px; top: -56px; border-radius: 50%; filter: blur(2px); opacity: .13; }
.accent-blue::after { background: var(--blue); }.accent-violet::after { background: var(--violet); }.accent-cyan::after { background: var(--cyan); }
.summary-label { color: var(--muted); font-size: 13px; }
.summary-card strong { display: block; margin: 17px 0 14px; font-size: 32px; letter-spacing: -.04em; }
.summary-card strong.server-name { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-detail { display: flex; align-items: center; gap: 7px; color: #a7afc2; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }.status-dot.online { background: var(--green); box-shadow: 0 0 12px rgba(49,212,157,.8); }
.panel { border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(16px); }
.panel-header { padding: 23px 24px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin-bottom: 6px; font-size: 20px; }.panel-header p { font-size: 13px; }
.search { min-width: 210px; display: flex; align-items: center; gap: 8px; color: var(--muted); background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; }
.search input { min-width: 0; width: 100%; height: 39px; border: 0; outline: 0; color: var(--text); background: transparent; }
.table-wrap { min-height: 260px; position: relative; }
table { width: 100%; border-collapse: collapse; }
th,td { padding: 16px 24px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.055); }
th { color: #737d95; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
td { font-size: 13px; color: #b8bfd0; }
td:first-child { color: var(--text); font-weight: 650; }
tbody tr { transition: background .15s ease; } tbody tr:hover { background: rgba(255,255,255,.025); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 99px; font-size: 11px; }
.status.active { color: #6ee6b9; background: rgba(49,212,157,.09); }.status.inactive { color: #a5adbf; background: rgba(160,170,194,.08); }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.small-button { border: 1px solid var(--line); border-radius: 9px; color: #aeb6ca; background: rgba(255,255,255,.035); padding: 7px 10px; cursor: pointer; }
.small-button.danger { color: #ff8795; }.small-button:hover { background: rgba(255,255,255,.07); }
.empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; text-align: center; padding: 32px; }
.empty-state h3 { margin: 15px 0 7px; }.empty-state p { color: var(--muted); margin-bottom: 18px; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: var(--blue-light); background: rgba(67,121,255,.12); font-size: 25px; }
.hidden { display: none !important; }
.alert { margin: 14px 24px 0; border: 1px solid rgba(255,101,119,.2); border-radius: 11px; padding: 11px 13px; color: #ff9baa; background: rgba(255,101,119,.08); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

dialog { width: min(92vw,480px); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: #111624; box-shadow: 0 40px 110px rgba(0,0,0,.65); }
dialog::backdrop { background: rgba(2,4,10,.76); backdrop-filter: blur(8px); }
.dialog-card { padding: 25px; display: grid; gap: 11px; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; }.dialog-header h2 { margin: 5px 0 0; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #1a2031; font-size: 22px; cursor: pointer; }
.muted { color: var(--muted); line-height: 1.55; }
label { color: #bfc5d4; font-size: 12px; font-weight: 620; margin-top: 6px; }
input,select { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--text); background: #0c101b; padding: 0 13px; transition: border .15s ease, box-shadow .15s ease; }
input:focus,select:focus { border-color: rgba(79,124,255,.75); box-shadow: 0 0 0 3px rgba(67,121,255,.1); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.result-card { text-align: center; }.result-card label { text-align: left; }.result-card h2 { margin: 0; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 5px; border-radius: 18px; color: #79edc1; background: rgba(49,212,157,.12); font-size: 26px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.copy-row input { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 11px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 26px; transform: translate(-50%,20px); padding: 11px 16px; border: 1px solid var(--line); border-radius: 99px; color: #fff; background: #20263a; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

.auth-page { display: grid; place-items: center; min-height: 100vh; background:
  linear-gradient(120deg, rgba(6,9,17,.93), rgba(8,11,21,.72)),
  radial-gradient(circle at 25% 45%, rgba(55,96,239,.25), transparent 28rem), var(--bg); }
.auth-shell { width: min(1180px,92vw); min-height: 680px; display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(10,14,25,.68); box-shadow: 0 45px 120px rgba(0,0,0,.48); backdrop-filter: blur(24px); }
.auth-intro { padding: 54px; display: flex; flex-direction: column; position: relative; overflow: hidden; background:
  linear-gradient(145deg, rgba(39,71,177,.16), rgba(12,16,29,.14)),
  radial-gradient(circle at 75% 55%, rgba(74,99,255,.2), transparent 18rem); }
.auth-intro::after { content: ""; position: absolute; right: -140px; bottom: -200px; width: 460px; height: 460px; border: 1px solid rgba(105,140,255,.13); border-radius: 46%; transform: rotate(24deg); box-shadow: 0 0 0 50px rgba(85,113,255,.025), 0 0 0 100px rgba(85,113,255,.02); }
.brand-large .brand-logo { width: 54px; height: 54px; border-radius: 16px; }
.brand-large .brand-name { font-size: 20px; }.brand-large .brand-caption { font-size: 13px; }
.hero-copy { margin: auto 0; max-width: 580px; position: relative; z-index: 1; }
.hero-copy h1 { margin: 14px 0 20px; font-size: clamp(40px,5vw,67px); line-height: 1.02; letter-spacing: -.06em; }
.hero-copy p { max-width: 520px; color: #a5aec3; line-height: 1.7; font-size: 16px; }
.trust-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 14px 22px; color: #7f8ba6; font-size: 11px; }.trust-row span::before { content: "✓"; color: var(--green); margin-right: 7px; }
.auth-card-wrap { display: grid; place-items: center; padding: 46px; background: rgba(9,12,21,.42); }
.auth-card { width: min(100%,390px); }.auth-card h2 { margin: 9px 0 6px; font-size: 30px; letter-spacing: -.035em; }
.stack-form { display: grid; gap: 11px; margin-top: 25px; }.stack-form .button { margin-top: 8px; }
.security-note { color: #69738b; font-size: 11px; text-align: center; margin-top: 20px; }
.mobile-brand { display: none; }
.auth-card .alert { margin: 18px 0 0; }

@media (max-width: 900px) {
  .app-shell { display: block; }.sidebar { height: auto; position: static; padding: 18px 22px; flex-direction: row; align-items: center; }.navigation,.privacy-card { display: none; }.sidebar-bottom { margin: 0 0 0 auto; }.logout { padding: 10px; }.logout .nav-icon { display: none; }
  .content { padding: 28px 20px 48px; }.summary-grid { grid-template-columns: 1fr; }.summary-card { min-height: 132px; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; width: min(520px,92vw); }.auth-intro { display: none; }.auth-card-wrap { padding: 46px 28px; }.mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
}
@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; }.topbar .button { width: 100%; }.panel-header { align-items: stretch; flex-direction: column; }.search { min-width: 0; }
  th:nth-child(3),td:nth-child(3) { display: none; } th,td { padding: 14px 13px; }.actions { flex-direction: column; }
  .brand-caption { display: none; }.sidebar .brand-logo { width: 40px; height: 40px; }.content { padding-inline: 14px; }
}
