/* 唐云Cloud · 服务器监控 —— 深空科技风 */
:root {
  --bg0:#0a1120; --bg1:#0d1628; --bg2:#111c33;
  --panel:rgba(15,26,46,.72); --panel2:rgba(18,30,53,.9);
  --line:rgba(96,140,200,.14); --line2:rgba(96,140,200,.24);
  --txt:#e2eaf6; --txt2:#8b9bb4; --txt3:#5d6d88;
  --cyan:#22d3ee; --blue:#3b82f6; --green:#34d399; --red:#f87171; --amber:#fbbf24;
  --glow:0 0 18px rgba(34,211,238,.16);
}
* { box-sizing:border-box; margin:0; padding:0; }
html { color-scheme: dark; }
body { font:14px/1.55 "PingFang SC","Microsoft YaHei",system-ui,sans-serif; color:var(--txt);
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(59,130,246,.13), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(34,211,238,.07), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(120,160,220,.035) 63px 64px),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(120,160,220,.035) 63px 64px),
    var(--bg0);
  background-attachment:fixed; }
a { color:#5eb6f8; text-decoration:none; }
a:hover { color:var(--cyan); }
.layout { display:flex; min-height:100vh; }

/* ---------- 侧栏 ---------- */
.sidebar { width:224px; background:linear-gradient(180deg, rgba(13,22,40,.97), rgba(10,17,32,.97));
  border-right:1px solid var(--line); color:#9fb0c8; flex-shrink:0; position:sticky; top:0; height:100vh; backdrop-filter:blur(6px); }
.brand { display:flex; align-items:center; gap:11px; padding:19px 16px 24px; }
.brand-logo { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:17px; font-weight:700; color:#eafcff;
  background:linear-gradient(135deg,#1d4ed8,#0ea5b7); box-shadow:0 0 16px rgba(34,211,238,.45), inset 0 0 8px rgba(255,255,255,.15); }
.brand-text b { display:block; color:#fff; font-size:15.5px; letter-spacing:.5px;
  background:linear-gradient(90deg,#e8f6ff,#9adcf5); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.brand-text span { font-size:9.5px; letter-spacing:2.5px; color:#54708f; }
.menu-group { font-size:11px; color:#4e6580; padding:10px 16px 6px; letter-spacing:1px; }
.menu a { display:flex; align-items:center; gap:10px; padding:11.5px 16px; color:#9fb0c8; font-size:13.5px;
  border-left:3px solid transparent; position:relative; transition:all .18s; }
.menu a:hover { background:rgba(56,130,246,.07); color:#dceaf8; }
.menu a.on { background:linear-gradient(90deg, rgba(34,211,238,.10), transparent 65%); color:#fff; border-left-color:var(--cyan);
  box-shadow:inset 12px 0 20px -14px rgba(34,211,238,.55); }
.ic { width:16px; height:16px; border:1.6px solid currentColor; border-radius:4px; flex-shrink:0; position:relative; opacity:.9; }
.ic::after { content:''; position:absolute; }
.ic-grid::after { inset:2px; border-radius:1px; border-top:0; border-left:0; box-shadow:-4px -4px 0 -2.5px currentColor inset; }
.ic-off::after { width:6px; height:6px; border-radius:50%; left:4px; top:4px; border:0; background:currentColor; opacity:.8; }
.ic-list::after { left:2px; right:2px; top:3px; height:8px; border-top:1.5px solid currentColor; border-bottom:1.5px solid currentColor; }
.ic-eye::after { width:8px; height:8px; border-radius:50%; left:3px; top:2px; }
.ic-user::after { width:7px; height:7px; border-radius:50%; left:3.5px; top:1px; border-bottom:0; box-shadow:0 8px 0 -4px currentColor; }
.ic-tg::after { width:8px; height:8px; left:3px; top:3px; clip-path:polygon(0 0,100% 50%,0 100%,15% 50%); background:currentColor; border:0; }
.ic-cog::after { width:8px; height:8px; border-radius:50%; left:3px; top:3px; }

/* ---------- 主区 ---------- */
.main { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar { height:54px; background:rgba(12,20,37,.75); backdrop-filter:blur(10px); border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; padding:0 24px; position:sticky; top:0; z-index:5; }
.crumb { color:var(--txt2); font-size:13.5px; }
.crumb span:last-child { color:#e6f1ff; }
.crumb .sep { margin:0 8px; color:#3b4c66; }
.top-right { display:flex; align-items:center; gap:18px; font-size:13.5px; }
.uname { color:#b7c6dd; } .role-tag { font-style:normal; font-size:11px; color:#7dd3fc; border:1px solid rgba(56,189,248,.4); border-radius:4px; padding:0 5px; margin-left:6px; }
.logout { color:#5eb6f8; }
.content { padding:22px 26px 44px; flex:1; }

.page-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
.page-sub { font-size:11px; letter-spacing:2px; color:#3f7fae; margin-bottom:3px; }
.page-head h1 { font-size:22px; font-weight:650; color:#f0f7ff; text-shadow:0 0 24px rgba(59,130,246,.25); }
.page-desc { color:var(--txt2); margin-top:6px; font-size:13.5px; }

/* 统计卡 */
.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px; }
.stat-card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px 18px;
  backdrop-filter:blur(8px); box-shadow:0 10px 26px rgba(3,9,22,.45); position:relative; overflow:hidden; transition:all .2s; }
.stat-card::before { content:''; position:absolute; inset:0 0 auto 0; height:1px;
  background:linear-gradient(90deg, transparent, rgba(34,211,238,.5), transparent); }
.stat-card:hover { border-color:var(--line2); box-shadow:0 10px 30px rgba(3,9,22,.6), var(--glow); transform:translateY(-1px); }
.stat-label { color:#a9bad2; font-size:13.5px; display:flex; align-items:center; gap:7px; }
.stat-num { font-size:32px; font-weight:700; margin:8px 0 12px; letter-spacing:1px;
  background:linear-gradient(120deg,#f1f7ff,#7dd3fc 90%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  text-shadow:0 0 30px rgba(125,211,252,.18); }
.stat-foot { color:#556a89; font-size:12.5px; }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; }
.dot.green { background:var(--green); box-shadow:0 0 8px rgba(52,211,153,.9); }
.dot.red { background:var(--red); box-shadow:0 0 8px rgba(248,113,113,.9); }
.dot.amber { background:var(--amber); box-shadow:0 0 8px rgba(251,191,36,.9); }

/* 卡片与表格 */
.card { background:var(--panel); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 12px 28px rgba(3,9,22,.45); backdrop-filter:blur(8px); }
.table-card { padding:0; }
.table-head { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; gap:12px; flex-wrap:wrap; }
.table-title { font-weight:650; font-size:15px; color:#e8f2ff; }
.upd-time { color:#556a89; font-weight:400; font-size:12px; margin-left:10px; }
.table-tools { display:flex; gap:10px; }
.input { border:1px solid var(--line2); border-radius:8px; padding:7px 11px; font:inherit; color:var(--txt);
  background:rgba(9,15,28,.75); width:100%; }
.input::placeholder { color:#4f617e; }
.input:focus { outline:none; border-color:rgba(34,211,238,.6); box-shadow:0 0 0 3px rgba(34,211,238,.12); }
.input.sel { width:118px; color:#a9bad2; }
.input.mono { font-family:ui-monospace,Consolas,monospace; font-size:12.5px; }
option { background:#0f1a30; }
.tbl { width:100%; border-collapse:collapse; }
.tbl th { text-align:left; color:#7e93b3; font-weight:500; font-size:12.5px; padding:9px 18px;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:rgba(12,21,40,.85); letter-spacing:.4px; }
.tbl td { padding:12px 18px; border-bottom:1px solid rgba(96,140,200,.08); vertical-align:top; font-size:13.5px; color:#cdd9ea; }
.tbl tbody tr:hover td { background:rgba(56,130,246,.05); }
.tbl tr:last-child td { border-bottom:0; }
.tbl .empty { text-align:center; color:#4f617e; padding:30px; }
.th-sub { font-weight:400; color:#485a75; }
.svr-name { font-weight:600; color:#eaf3ff; }
.svr-ip { color:#7e93b3; font-weight:400; margin-left:8px; font-size:12.5px; }
.svr-grp { color:#556a89; font-size:12px; margin-top:3px; }
.sub { color:#4f617e; font-size:11.5px; margin-top:2px; }
.st-ok { color:#4ade80; text-shadow:0 0 14px rgba(74,222,128,.35); } .st-bad { color:#f87171; text-shadow:0 0 14px rgba(248,113,113,.3); }
.badge { display:inline-block; padding:2px 10px; border-radius:11px; font-size:12px; border:1px solid transparent; }
.badge.amber { background:rgba(251,191,36,.12); color:#fcd34d; border-color:rgba(251,191,36,.35); }
.badge.green { background:rgba(52,211,153,.12); color:#5ee9b5; border-color:rgba(52,211,153,.35); }
.badge.red { background:rgba(248,113,113,.12); color:#fca5a5; border-color:rgba(248,113,113,.35); }
.badge.grey { background:rgba(148,163,184,.1); color:#a9b8cc; border-color:rgba(148,163,184,.25); }
.badge.blue { background:rgba(59,130,246,.14); color:#93c5fd; border-color:rgba(59,130,246,.4); }
.ta-r { text-align:right; }
.ops a { white-space:nowrap; font-size:13px; }
.op-sep { color:#33445f; margin:0 6px; }
.danger-link { color:var(--red); }
.mono { font-family:ui-monospace,Consolas,monospace; }
.table-note { padding:11px 18px; background:rgba(10,18,34,.7); border-top:1px solid var(--line); color:#5d708f; font-size:12px; border-radius:0 0 12px 12px; }

/* 按钮 */
.btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line2); background:rgba(17,28,51,.8);
  color:#c3d3e8; border-radius:8px; padding:8px 16px; font:inherit; font-size:13.5px; cursor:pointer; transition:all .18s; }
.btn:hover { border-color:#3f6fae; color:#fff; }
.btn.primary { background:linear-gradient(120deg,#2563eb,#0891b2); border:1px solid rgba(34,211,238,.5); color:#fff;
  box-shadow:0 4px 18px rgba(37,99,235,.35); }
.btn.primary:hover { filter:brightness(1.12); box-shadow:0 4px 22px rgba(8,145,178,.5); }
.btn.danger { color:#fca5a5; border-color:rgba(248,113,113,.4); }
.btn.small { padding:4px 10px; font-size:12.5px; }
.btn.full { width:100%; justify-content:center; }
.btn:disabled { opacity:.55; }

/* 表单 */
.form label { display:block; font-size:13px; color:#9db1cc; margin:0 0 6px; }
.form label em { color:var(--red); font-style:normal; }
.form .row { margin-bottom:14px; }
.form .row2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form .row2 .row { margin-bottom:14px; }
.hint { color:#5d708f; font-size:12px; margin-top:6px; }
.grey { color:#5d708f; }
.muted { color:#8b9bb4; }
.check { display:flex; align-items:center; gap:8px; margin:8px 0; cursor:pointer; font-size:13.5px; color:#c3d3e8; }
.check input { width:15px; height:15px; accent-color:var(--cyan); }
.fieldset { border:1px solid var(--line); border-radius:8px; padding:10px 14px 6px; margin-top:4px; }
.fieldset legend { padding:0 6px; color:#7e93b3; font-size:12.5px; }

/* 弹窗 */
.modal { display:none; position:fixed; inset:0; background:rgba(4,9,20,.72); z-index:50; overflow:auto; padding:40px 16px; backdrop-filter:blur(3px); }
.modal.show { display:flex; align-items:flex-start; justify-content:center; }
.modal-box { background:linear-gradient(180deg,#0f1a31,#0c1526); border:1px solid var(--line2); border-radius:14px; width:640px; max-width:96vw; margin:auto;
  box-shadow:0 30px 80px rgba(2,6,16,.7), var(--glow); }
.modal-box.wide { width:860px; }
.modal-box.narrow { width:460px; }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line); font-size:15px; color:#eaf3ff; }
.modal-head .x { cursor:pointer; color:#5d708f; font-size:20px; line-height:1; }
.modal-head .x:hover { color:#fff; }
.modal-body { padding:18px; max-height:70vh; overflow:auto; }
.modal-foot { display:flex; justify-content:flex-end; gap:10px; padding:14px 18px; border-top:1px solid var(--line); }
.codebox { background:#060b16; color:#9be3ff; border:1px solid rgba(34,211,238,.18); font-family:ui-monospace,Consolas,monospace;
  font-size:12px; padding:12px 14px; border-radius:8px; margin:8px 0; white-space:pre-wrap; word-break:break-all; text-shadow:0 0 8px rgba(34,211,238,.2); }

/* toast */
.toast { position:fixed; top:18px; left:50%; transform:translate(-50%,-46px); background:rgba(13,22,40,.95); color:#eaf3ff;
  border:1px solid var(--line2); padding:9px 18px; border-radius:8px; font-size:13.5px; opacity:0; transition:all .25s; z-index:99; pointer-events:none;
  box-shadow:0 10px 30px rgba(2,6,16,.6); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.toast.err { background:rgba(52,16,22,.95); color:#fecaca; border-color:rgba(248,113,113,.5); }
.toast.ok { background:rgba(6,42,31,.95); color:#a7f3d0; border-color:rgba(52,211,153,.5); }

/* 登录 */
.login-body { background:
  radial-gradient(900px 500px at 75% 8%, rgba(59,130,246,.2), transparent 55%),
  radial-gradient(700px 500px at 12% 92%, rgba(34,211,238,.12), transparent 55%),
  repeating-linear-gradient(0deg, transparent 0 47px, rgba(120,160,220,.05) 47px 48px),
  repeating-linear-gradient(90deg, transparent 0 47px, rgba(120,160,220,.05) 47px 48px),
  linear-gradient(160deg,#0a1120,#0d1b33); display:flex; align-items:center; justify-content:center; }
.login-card { background:rgba(14,24,45,.8); border:1px solid rgba(96,140,200,.25); width:390px; padding:34px; border-radius:16px;
  backdrop-filter:blur(14px); box-shadow:0 30px 80px rgba(2,6,16,.7), 0 0 40px rgba(34,211,238,.1); }
.login-brand { display:flex; gap:12px; align-items:center; margin-bottom:22px; }
.brand-logo.big { width:46px; height:46px; font-size:22px; }
.login-brand b { font-size:17px; display:block; color:#fff; letter-spacing:.5px; }
.login-brand span { font-size:9.5px; letter-spacing:2.5px; color:#54708f; }
.login-card h2 { font-size:16px; font-weight:600; margin-bottom:16px; color:#dceaf8; }
.login-card label { display:block; font-size:13px; color:#9db1cc; margin:12px 0 6px; }
.login-card .input { margin-bottom:2px; }
.login-card .btn { margin-top:20px; }
.login-tip { text-align:center; color:#5d708f; font-size:12px; margin-top:16px; }
.alert-err { background:rgba(248,113,113,.12); color:#fca5a5; border:1px solid rgba(248,113,113,.35); border-radius:8px; padding:8px 12px; font-size:13px; margin-bottom:10px; }

/* 双列 */
.grid2 { display:grid; grid-template-columns:1.1fr .9fr; gap:16px; align-items:start; }
.panel { padding:18px 20px; }
.panel h3 { font-size:15px; margin-bottom:14px; color:#eaf3ff; }
.panel .tips p { color:#a9bad2; font-size:13.5px; margin:10px 0; }
.callout { background:rgba(251,191,36,.08); border:1px solid rgba(251,191,36,.3); color:#e9c46a; border-radius:8px; padding:10px 13px; font-size:12.5px; margin:12px 0; }

/* 终端 */
.term-wrap { display:flex; flex-direction:column; gap:10px; height:calc(100vh - 96px); }
.term-bar { display:flex; align-items:center; gap:14px; }
.term-bar .srv { font-weight:600; color:#eaf3ff; }
.term-box { flex:1; background:rgba(6,11,22,.96); border:1px solid rgba(34,211,238,.22); border-radius:10px; padding:8px; overflow:hidden; min-height:320px; box-shadow:inset 0 0 40px rgba(2,6,16,.8); }
.term-fallback { width:100%; height:100%; background:transparent; border:0; color:#d7e4f5; font:13px/1.5 ui-monospace,Consolas,monospace; outline:none; resize:none; }
.status-tip { color:#5d8bb0; font-size:12.5px; }

/* 文件管理 */
.file-bar { display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.path { font-family:ui-monospace,Consolas,monospace; font-size:13px; background:rgba(9,15,28,.8); border:1px solid var(--line); color:#9be3ff; border-radius:6px; padding:6px 12px; }
.fpath { padding:10px 18px; border-bottom:1px solid var(--line); font-weight:600; color:#9be3ff; font-family:ui-monospace,Consolas,monospace; }
.file-grid { display:grid; grid-template-columns:minmax(340px,1fr) minmax(380px,1.2fr); gap:16px; align-items:start; }
.editor textarea { width:100%; min-height:380px; font:12.5px/1.5 ui-monospace,Consolas,monospace; border:1px solid var(--line2); border-radius:8px;
  padding:10px; margin-top:10px; background:rgba(6,11,22,.9); color:#c3e8ff; outline:none; }
.editor textarea:focus { border-color:rgba(34,211,238,.6); }
.dirlink { cursor:pointer; }
h4 { margin:14px 0 8px; font-size:13.5px; color:#9db1cc; }

@media (max-width:900px){ .stats{grid-template-columns:1fr 1fr;} .grid2,.file-grid{grid-template-columns:1fr;} .sidebar{width:64px;} .sidebar .brand-text,.sidebar .menu-group,.menu a span{display:none;} }
