:root {
  --bg: #0a0d10;
  --panel: #11161a;
  --panel-2: #171d22;
  --panel-3: #1d252b;
  --line: #263038;
  --line-soft: #1b2329;
  --text: #f1f5f2;
  --muted: #8e9a98;
  --muted-2: #7f8b88;
  --lime: #c9f24d;
  --lime-soft: rgba(201, 242, 77, .12);
  --green: #53d890;
  --amber: #f4b85d;
  --red: #f06c69;
  --blue: #6da7ff;
  --shadow: 0 26px 70px rgba(0, 0, 0, .32);
  --radius: 18px;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.3fr) minmax(390px, .7fr); }
.login-art { position: relative; overflow: hidden; padding: 68px; background: #0d1215; border-right: 1px solid var(--line); display: flex; align-items: flex-end; }
.login-art::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(circle at 52% 36%, rgba(201,242,77,.16), transparent 24%), radial-gradient(circle at 15% 80%, rgba(72,143,255,.08), transparent 30%); }
.grid-glow { position: absolute; inset: 0; opacity: .24; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.grid-glow::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(201,242,77,.5); border-radius: 50%; top: 16%; left: 35%; box-shadow: 0 0 0 42px rgba(201,242,77,.025), 0 0 0 88px rgba(201,242,77,.018); }
.hero-copy { position: relative; z-index: 2; max-width: 620px; margin-bottom: 3vh; }
.hero-copy h1 { font-size: clamp(44px, 5.2vw, 82px); line-height: .98; letter-spacing: -.055em; margin: 14px 0 24px; font-weight: 640; }
.hero-copy p { color: #aeb9b5; font-size: 17px; max-width: 470px; line-height: 1.75; }
.eyebrow, .section-kicker { color: var(--lime); letter-spacing: .16em; font-size: 10px; font-weight: 750; margin: 0 0 7px; }
.signal-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 238px; background: rgba(17,22,26,.88); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.signal-card-a { top: 19%; left: 10%; }
.signal-card-b { top: 36%; right: 9%; }
.signal-card strong, .signal-card small { display: block; }
.signal-card strong { font-size: 12px; }
.signal-card small { margin-top: 4px; color: var(--muted); }
.signal-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.signal-dot.online { background: var(--green); box-shadow: 0 0 14px var(--green); }
.mini-wave { margin-left: auto; color: var(--lime); font-size: 26px; }
.login-panel { display: grid; place-items: center; padding: 48px; background: #f2f3ee; color: #111715; }
.login-form { width: min(390px, 100%); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; font-size: 18px; letter-spacing: -.02em; }
.brand-dark { margin-bottom: 74px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--lime); color: #10150d; font-weight: 900; transform: skew(-5deg); }
.login-heading { margin-bottom: 32px; }
.login-heading .section-kicker { color: #6d860d; }
.login-heading h2 { font-size: 36px; letter-spacing: -.04em; margin: 6px 0 10px; }
.login-heading p:last-child { color: #6c756f; }
label { display: grid; gap: 8px; margin: 18px 0; font-weight: 650; font-size: 12px; }
input, select { width: 100%; border: 1px solid var(--line); background: #0d1215; color: var(--text); padding: 12px 14px; border-radius: 10px; outline: none; transition: border-color .2s, box-shadow .2s; }
.login-panel input { background: #fff; color: #101512; border-color: #d3d8d2; padding: 14px 15px; }
input:focus, select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201,242,77,.13); }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; font-weight: 720; cursor: pointer; display: inline-flex; gap: 9px; justify-content: center; align-items: center; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--lime); color: #11170b; }
.btn-primary:hover { background: #d7ff5c; }
.btn-secondary { background: var(--panel-2); border-color: var(--line); }
.btn-danger { background: var(--red); color: #170807; }
.btn-wide { width: 100%; justify-content: space-between; margin-top: 8px; padding: 15px 18px; }
.form-error { color: #d74843; min-height: 19px; font-size: 12px; }
.security-note { color: #7a837d; text-align: center; font-size: 11px; margin-top: 26px; }
.security-note span { color: #6d860d; margin-right: 5px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { height: 100vh; position: sticky; top: 0; padding: 28px 18px 20px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; background: #0c1013; z-index: 20; }
.sidebar .brand { padding: 0 10px; margin-bottom: 44px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; background: transparent; color: var(--muted); padding: 11px 12px; border-radius: 9px; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-weight: 620; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { background: var(--lime-soft); color: var(--lime); }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 2px 6px; background: var(--panel-3); border-radius: 10px; color: var(--muted); font-size: 10px; text-align: center; }
.sidebar-foot { margin-top: auto; }
.secure-pill { display: flex; align-items: center; gap: 8px; margin: 0 10px 14px; font-size: 10px; color: var(--muted); }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(83,216,144,.1); }
.user-chip { width: 100%; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; background: var(--panel-3); border-radius: 9px; color: var(--lime); font-weight: 800; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 11px; }
.user-chip small { color: var(--muted); margin-top: 3px; font-size: 9px; }
.logout-icon { margin-left: auto; color: var(--muted-2); }
.workspace { min-width: 0; }
.topbar { height: 102px; padding: 0 34px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: rgba(10,13,16,.9); backdrop-filter: blur(18px); z-index: 15; }
.topbar h1 { font-size: 23px; margin: 0; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.last-refresh { color: var(--muted-2); font-size: 10px; margin-right: 4px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 17px; }
.icon-button:hover { color: var(--text); border-color: #3b474f; }
.mobile-menu { display: none; }
.content { padding: 30px 34px 50px; max-width: 1700px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; animation: page-in .25s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.summary-card { position: relative; min-height: 132px; overflow: hidden; border: 1px solid var(--line-soft); background: var(--panel); border-radius: var(--radius); padding: 23px; display: flex; align-items: flex-start; gap: 17px; }
.summary-card > div:nth-child(2) { display: grid; }
.summary-card span { color: var(--muted); font-size: 11px; }
.summary-card strong { font-size: 34px; line-height: 1; margin: 8px 0; letter-spacing: -.04em; }
.summary-card small { color: var(--muted-2); font-size: 9px; }
.summary-icon { width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; color: var(--lime); background: var(--lime-soft); }
.icon-green { color: var(--green); background: rgba(83,216,144,.1); }
.icon-amber { color: var(--amber); background: rgba(244,184,93,.1); }
.icon-blue { color: var(--blue); background: rgba(109,167,255,.1); }
.summary-total { border-color: rgba(201,242,77,.22); }
.card-accent { position: absolute; right: -28px; bottom: -44px; width: 120px; height: 120px; border: 1px solid rgba(201,242,77,.14); border-radius: 50%; box-shadow: 0 0 0 20px rgba(201,242,77,.025); }
.panel { border: 1px solid var(--line-soft); background: var(--panel); border-radius: var(--radius); }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .7fr); gap: 18px; margin-bottom: 18px; }
.panel-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-size: 16px; margin: 0; letter-spacing: -.02em; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.text-button:hover { color: var(--lime); }
.text-button:disabled { color: var(--muted-2); cursor: not-allowed; opacity: .5; }
.text-button:disabled:hover { color: var(--muted-2); }
.fleet-preview { min-height: 275px; }
.fleet-row { display: grid; grid-template-columns: minmax(160px, 1.5fr) 84px repeat(3, minmax(72px,.55fr)) 28px; gap: 16px; align-items: center; min-height: 68px; padding: 9px 22px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.fleet-row:last-child { border-bottom: 0; }
.fleet-row:hover { background: rgba(255,255,255,.018); }
.device-ident { display: flex; align-items: center; min-width: 0; gap: 12px; }
.os-badge { width: 35px; height: 35px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 11px; color: var(--blue); font-weight: 800; }
.os-badge.ubuntu { color: #ef835d; }
.device-ident strong, .device-ident small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-ident strong { font-size: 12px; }
.device-ident small { color: var(--muted-2); margin-top: 4px; font-size: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 8px; border-radius: 12px; font-size: 9px; background: rgba(83,216,144,.08); color: var(--green); }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.offline, .status-pill.disabled { color: var(--muted); background: rgba(142,154,152,.08); }
.status-pill.warning { color: var(--amber); background: rgba(244,184,93,.08); }
.metric-cell span, .metric-cell strong { display: block; }
.metric-cell span { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.metric-cell strong { font-size: 11px; margin-top: 4px; }
.row-arrow { color: var(--muted-2); }
.health-label { color: var(--green); font-size: 10px; }
.health-body { min-height: 221px; display: flex; align-items: center; justify-content: center; gap: 34px; padding: 20px; }
.health-ring { --health: 0; width: 140px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--lime) calc(var(--health) * 1%), var(--panel-3) 0); position: relative; }
.health-ring::before { content: ""; position: absolute; inset: 11px; background: var(--panel); border-radius: 50%; }
.health-ring > div { position: relative; text-align: center; display: grid; }
.health-ring strong { font-size: 32px; letter-spacing: -.04em; }
.health-ring span { color: var(--muted); font-size: 9px; }
.health-legend { display: grid; gap: 14px; min-width: 100px; }
.health-legend > div { display: grid; grid-template-columns: 9px 1fr auto; gap: 8px; align-items: center; color: var(--muted); font-size: 10px; }
.health-legend strong { color: var(--text); }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-green { background: var(--green); }.dot-red { background: var(--red); }.dot-amber { background: var(--amber); }
.panel-note { color: var(--muted-2); font-size: 9px; padding: 0 22px 18px; margin: 0; }
.recent-panel { min-height: 190px; }
.timeline { padding: 2px 22px 16px; }
.timeline-row { min-height: 56px; display: grid; grid-template-columns: 10px minmax(150px,1fr) auto auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line-soft); }
.timeline-row:last-child { border: 0; }
.timeline-icon { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; }
.timeline-row strong { font-size: 11px; }
.timeline-row small { color: var(--muted); font-size: 9px; }
.empty-line { color: var(--muted-2); min-height: 110px; display: grid; place-items: center; font-size: 11px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 13px 0 5px; font-size: 14px; }
.empty-state p { margin: 0; font-size: 10px; }
.empty-state.compact { padding: 70px 20px; }
.empty-orbit { width: 48px; height: 48px; border: 1px dashed #3b464d; border-radius: 50%; display: grid; place-items: center; color: var(--lime); font-size: 19px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.search-box { position: relative; width: min(420px, 100%); }
.search-box span { position: absolute; left: 14px; top: 11px; color: var(--muted); font-size: 18px; }
.search-box input { padding-left: 42px; background: var(--panel); }
.filter-tabs { display: flex; padding: 3px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; }
.filter-tab { border: 0; background: transparent; color: var(--muted); padding: 8px 13px; border-radius: 7px; cursor: pointer; font-size: 10px; }
.filter-tab.active { background: var(--panel-3); color: var(--text); }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.device-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.device-table th { height: 45px; padding: 0 18px; text-align: left; color: var(--muted-2); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.device-table td { height: 68px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.device-table tr:last-child td { border-bottom: 0; }
.device-table tbody tr { cursor: pointer; }
.device-table tbody tr:hover { background: rgba(255,255,255,.018); }
.usage { min-width: 80px; }
.usage-line { width: 72px; height: 3px; background: var(--panel-3); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.usage-line i { display: block; height: 100%; background: var(--lime); border-radius: inherit; }
.activity-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.activity-list { padding: 5px 20px 14px; max-height: calc(100vh - 225px); overflow: auto; }
.activity-row { padding: 14px 2px; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line-soft); }
.activity-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--panel-2); color: var(--blue); }
.activity-row strong, .activity-row small { display: block; }
.activity-row strong { font-size: 11px; }
.activity-row small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.command-status { padding: 4px 7px; border-radius: 8px; background: var(--panel-3); color: var(--muted); font-size: 8px; }
.command-status.succeeded { color: var(--green); }.command-status.failed { color: var(--red); }.command-status.queued, .command-status.dispatched, .command-status.running { color: var(--blue); }
.access-grid { display: grid; grid-template-columns: minmax(260px,.55fr) 1.45fr; gap: 18px; }
.access-card { padding: 26px; align-self: start; }
.access-card h2 { margin: 8px 0; }.access-card p:not(.section-kicker) { color: var(--muted); line-height: 1.7; font-size: 11px; }.access-card .btn { margin-top: 14px; }
.access-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: var(--lime-soft); color: var(--lime); font-size: 22px; margin-bottom: 28px; }
.user-list { padding: 4px 20px 14px; }
.access-note { padding-top: 16px; padding-bottom: 6px; }
.user-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.user-row:last-child { border-bottom: 0; }
.user-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.54); backdrop-filter: blur(3px); z-index: 30; }
.drawer { position: fixed; z-index: 31; top: 0; right: 0; height: 100vh; width: min(560px, 100vw); background: #0d1215; border-left: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .25s ease; overflow: hidden; }
.drawer.open { transform: translateX(0); }
.drawer-head { height: 88px; padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h2 { margin: 0; font-size: 19px; }
.drawer-content { height: calc(100vh - 88px); overflow: auto; padding: 22px 24px 40px; }
.device-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.device-hero .os-badge { width: 46px; height: 46px; }
.device-hero h3 { margin: 0 0 5px; }.device-hero p { margin: 0; color: var(--muted); font-size: 10px; }
.drawer-section { margin-top: 26px; }
.drawer-section h4 { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; margin: 0 0 12px; }
.drawer-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.drawer-section-head h4 { margin: 0; }
.drawer-section-head small { color: var(--muted-2); font-size: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric-box { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px; padding: 14px; }
.metric-box span { color: var(--muted); font-size: 8px; }.metric-box strong { display: block; font-size: 19px; margin-top: 7px; }
.action-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.action-button { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 13px; text-align: left; cursor: pointer; }
.action-button:hover { border-color: #425059; }.action-button strong { display: block; font-size: 10px; }.action-button span { display: block; color: var(--muted); font-size: 8px; margin-top: 4px; }
.action-button.danger strong { color: var(--red); }
.gpu-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px; padding: 13px; margin-bottom: 8px; }
.gpu-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 10px; }
.gpu-card-head > strong { min-width: 0; overflow-wrap: anywhere; }
.gpu-card-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; }
.gpu-table-list { display: grid; gap: 4px; min-width: 104px; }
.gpu-table-item { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 6px; white-space: nowrap; }
.gpu-table-item strong { font-size: 9px; }
.gpu-table-item small { color: var(--muted); font-size: 8px; }
.gpu-table-oc { padding: 1px 4px; font-size: 8px; }
.gpu-stats { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 9px; }
.device-gpu-oc-target { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 15px 0; padding: 13px 15px; border: 1px solid rgba(201,242,77,.25); border-radius: 11px; background: rgba(201,242,77,.045); }
.device-gpu-oc-target span { color: var(--muted); font-size: 9px; }
.device-gpu-oc-target strong { color: var(--lime); font-size: 11px; overflow-wrap: anywhere; text-align: right; }
.device-gpu-oc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.device-gpu-oc-grid label { min-width: 0; margin: 0; }
.device-gpu-oc-grid label small { display: block; margin-top: 5px; color: var(--muted-2); font-size: 8px; }
.chart-box { height: 120px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px; padding: 8px; }
.chart-box canvas { width: 100%; height: 100%; }
.tag-list { display: flex; gap: 5px; flex-wrap: wrap; }.tag { color: var(--muted); background: var(--panel-3); padding: 4px 7px; border-radius: 6px; font-size: 8px; }
.alert-list { display: grid; gap: 7px; }.alert-item { border-left: 2px solid var(--amber); padding: 8px 10px; background: rgba(244,184,93,.06); color: #e8c78e; font-size: 9px; }

.modal { border: 0; padding: 0; background: transparent; color: var(--text); width: min(510px, calc(100vw - 28px)); max-height: calc(100vh - 30px); }
.modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.modal-card { background: #11171b; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-copy { color: var(--muted); line-height: 1.7; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.success-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #12200b; background: var(--lime); font-size: 22px; margin-bottom: 15px; }
.secret-box { display: flex; align-items: center; gap: 8px; padding: 11px 12px; background: #090d0f; border: 1px solid var(--line); border-radius: 10px; }
.secret-box code { flex: 1; color: var(--lime); overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.expiry-text, .field-hint { color: var(--muted-2); font-size: 9px; }
.field-hint { display: block; font-weight: 400; line-height: 1.55; }
.btn-small { padding: 8px 11px; border-radius: 8px; font-size: 10px; }
.command-box { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-all; background: #090d0f; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px; color: #b8c4be; font-size: 9px; line-height: 1.6; }
.toast-region { position: fixed; z-index: 100; bottom: 22px; right: 22px; display: grid; gap: 8px; }
.toast { min-width: 250px; max-width: 360px; background: #1a2227; border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease; }
.toast.error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid, .activity-grid { grid-template-columns: 1fr; }
  .health-panel { min-height: 320px; }
  .login-art { padding: 44px; }
  .signal-card-b { display: none; }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { min-height: 34vh; padding: 28px; }
  .hero-copy { margin: 0; }.hero-copy h1 { font-size: 42px; }.hero-copy p, .signal-card { display: none; }
  .login-panel { min-height: 66vh; padding: 32px 24px; }.brand-dark { margin-bottom: 38px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; transform: translateX(-105%); transition: transform .2s; width: 238px; }.sidebar.mobile-open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .topbar { height: 86px; padding: 0 18px; }.topbar .section-kicker, .last-refresh, .topbar-actions .icon-button { display: none; }.topbar h1 { font-size: 19px; }
  .content { padding: 20px 16px 36px; }
  .summary-grid { gap: 10px; }.summary-card { min-height: 115px; padding: 16px; }.summary-card strong { font-size: 28px; }
  .split-grid { gap: 12px; }.fleet-row { grid-template-columns: 1fr 72px 25px; }.fleet-row .metric-cell { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }.search-box { width: 100%; }.filter-tabs { overflow-x: auto; }
  .access-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 440px) {
  .summary-grid { grid-template-columns: 1fr; }.summary-card { min-height: 100px; }
  .health-body { gap: 20px; }.health-ring { width: 125px; }
  .topbar .btn { padding: 10px; }.topbar .btn span:first-child { display: none; }
}


button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.spinning { animation: control-spin .7s linear infinite; }
@keyframes control-spin { to { transform: rotate(360deg); } }

.device-ident small,
.metric-cell span,
.device-table th,
.activity-row small,
.panel-note,
.tag,
.command-status { font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
/* Wallet, miner-package, flight-sheet, and GPU profile management */
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d1215;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  resize: vertical;
  line-height: 1.55;
}
textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201,242,77,.13); }
.resource-panel { overflow: hidden; }
.resource-head { padding: 22px 24px 0; }
.resource-table td { vertical-align: middle; }
.table-subline { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9px; }
.address-cell { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9d1cf; }
.setting-list { display: grid; gap: 5px; min-width: 250px; }
.setting-list code { color: #c9d1cf; font-size: 9px; white-space: nowrap; }
.danger-text { color: #ef7771; }
.table-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }
.mining-control-button { padding: 4px 2px; }
.security-banner { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; padding: 16px 18px; border: 1px solid rgba(109,167,255,.25); border-radius: 13px; background: rgba(109,167,255,.06); }
.security-banner > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 9px; background: rgba(109,167,255,.13); color: var(--blue); font-weight: 800; }
.security-banner strong { display: block; font-size: 12px; }
.security-banner p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.security-banner.warning { border-color: rgba(244,184,93,.28); background: rgba(244,184,93,.06); }
.security-banner.warning > span { background: rgba(244,184,93,.14); color: var(--amber); }
.security-inline { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid rgba(109,167,255,.24); border-radius: 11px; background: rgba(109,167,255,.05); }
.security-inline strong { font-size: 11px; }
.security-inline span { color: var(--muted); font-size: 9px; line-height: 1.55; }
.security-inline.warning { border-color: rgba(244,184,93,.28); background: rgba(244,184,93,.06); }
.inline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-grid label { margin-bottom: 0; }
.code-textarea { font-family: Consolas, "SFMono-Regular", monospace; font-size: 10px; }
.code-input, .hash-cell { font-family: Consolas, "SFMono-Regular", monospace; }
.modal-large { width: min(900px, calc(100vw - 28px)); }
.modal-flight { width: min(980px, calc(100vw - 28px)); }
.modal-flight .modal-card { max-height: calc(100vh - 30px); overflow-y: auto; }
.miner-package-table, .flight-table { min-width: 1180px; }
.package-url { max-width: 340px; }
.hash-cell { color: #c9d1cf; white-space: nowrap; }
.package-source-picker { margin: 20px 0 6px; padding: 0; border: 0; }
.package-source-picker legend { margin-bottom: 10px; font-size: 12px; font-weight: 650; }
.source-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.source-choice { grid-template-columns: auto 1fr; align-items: start; gap: 10px; margin: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.015); cursor: pointer; }
.source-choice:has(input:checked) { border-color: rgba(201,242,77,.5); background: var(--lime-soft); }
.source-choice input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--lime); }
.source-choice strong, .source-choice small { display: block; }
.source-choice strong { font-size: 11px; }
.source-choice small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.5; }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button { margin-right: 11px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.package-source.uploaded { color: var(--lime); }
.package-source.imported { color: var(--blue); }
.flight-help { margin: 18px 0 22px; border: 1px solid rgba(201,242,77,.24); border-radius: 13px; background: rgba(201,242,77,.035); overflow: hidden; }
.flight-help summary { padding: 13px 16px; color: var(--lime); font-size: 11px; font-weight: 750; cursor: pointer; }
.flight-help > div { padding: 0 16px 15px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.flight-help p { margin: 7px 0; }
.flight-help ol { margin: 8px 0; padding-left: 20px; }
.flight-help code { color: #dce8da; }
.flight-section { min-width: 0; margin: 22px 0; padding: 8px 18px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255,255,255,.014); }
.flight-section legend { padding: 0 9px; }
.flight-section legend span, .flight-section legend small { display: block; }
.flight-section legend span { font-size: 12px; font-weight: 750; }
.flight-section legend small { margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.secondary-section { border-color: rgba(109,167,255,.25); background: rgba(109,167,255,.035); }
.miner-version-compat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: -3px 0 15px; }
.miner-version-compat.warning { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid rgba(240,108,105,.32); border-radius: 10px; background: rgba(240,108,105,.055); color: #efaaa7; }
.miner-version-compat.warning strong, .miner-version-compat.warning span { font-size: 9px; line-height: 1.5; }
.platform-asset { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(255,255,255,.018); }
.platform-asset strong { color: #d5ddda; font-size: 9px; }
.platform-asset code { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.platform-asset.available { border-color: rgba(201,242,77,.18); }
.platform-asset.available::before { content: "●"; color: var(--lime); font-size: 7px; }
.platform-asset.unavailable { opacity: .58; }
.platform-asset.unavailable::before { content: "○"; color: var(--muted-2); font-size: 7px; }
.miner-specific-panel { margin: 17px 0 3px; padding: 0 14px 14px; border: 1px solid rgba(109,167,255,.2); border-radius: 12px; background: rgba(109,167,255,.025); }
.miner-specific-panel > .field-hint { margin: -4px 0 12px; }
.warning-text { color: #efaaa7 !important; }
.toggle-field { grid-template-columns: auto 1fr; align-items: start; gap: 11px; padding: 14px 16px; border: 1px solid rgba(109,167,255,.25); border-radius: 12px; background: rgba(109,167,255,.05); cursor: pointer; }
.toggle-field input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--lime); }
.toggle-field span, .toggle-field strong { display: block; }
.toggle-field .field-hint { margin-top: 4px; }
.dual-summary { display: grid; gap: 4px; min-width: 190px; }
.dual-summary .tag { width: fit-content; }
.dual-summary strong { font-size: 10px; }
.dual-summary code { display: block; max-width: 230px; overflow: hidden; color: #c9d1cf; text-overflow: ellipsis; white-space: nowrap; }
.dual-summary small { color: var(--muted-2); font-size: 9px; }
.subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.subsection-head div { display: grid; gap: 3px; }
.subsection-head strong { font-size: 12px; }
.subsection-head small { color: var(--muted-2); font-size: 9px; }
.gpu-settings { display: grid; gap: 9px; max-height: 330px; overflow: auto; padding-right: 3px; }
.gpu-setting-row { display: grid; min-width: 1120px; grid-template-columns: 76px repeat(6, minmax(132px,1fr)) 36px; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255,255,255,.018); }
.flight-gpu-oc-row { min-width: 940px; grid-template-columns: 76px repeat(5, minmax(132px, 1fr)) 36px; }
.gpu-setting-row label { min-width: 0; margin: 0; font-size: 9px; }
.gpu-setting-row input { min-width: 0; padding: 10px 9px; }
.gpu-setting-row label small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 7px; font-weight: 400; line-height: 1.35; }
.remove-setting { margin-bottom: 1px; color: #ef7771; }
.action-button.accent { border-color: rgba(201,242,77,.25); background: rgba(201,242,77,.045); }
.action-button.accent:hover { border-color: rgba(201,242,77,.55); }
.mining-status-card { padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); }
.mining-status-card.unavailable { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mining-status-card.unavailable p { max-width: 340px; margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.mining-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mining-status-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.mining-status-head strong { font-size: 11px; }
.mining-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mining-detail-grid > div { min-width: 0; padding: 10px; border-radius: 9px; background: rgba(255,255,255,.018); }
.mining-detail-grid span, .mining-detail-grid strong { display: block; }
.mining-detail-grid span { color: var(--muted-2); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.mining-detail-grid strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 9px; line-height: 1.5; }
.mining-detail-grid > .mining-hashrate-panel { grid-column: 1 / -1; }
.mining-hashrate-list { display: grid; gap: 7px; margin-top: 7px; }
.mining-hashrate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 8px; background: rgba(0,0,0,.1); }
.mining-hashrate-copy { min-width: 0; }
.mining-hashrate-copy b, .mining-hashrate-copy small { display: block; overflow-wrap: anywhere; }
.mining-hashrate-copy b { color: var(--text); font-size: 9px; }
.mining-hashrate-copy small { margin-top: 3px; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.mining-hashrate-row > strong { margin-top: 0; color: var(--lime); font-size: 11px; white-space: nowrap; }
.mining-updated { display: block; margin-top: 11px; color: var(--muted-2); font-size: 8px; }
.mining-error { margin-top: 10px; padding: 9px 10px; border-left: 2px solid var(--red); background: rgba(240,108,105,.06); color: #efaaa7; font-size: 9px; line-height: 1.5; }
.miner-log-view { display: grid; gap: 9px; }
.miner-log-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel); }
.miner-log-summary strong { font-size: 10px; }
.miner-log-summary small { margin-left: auto; color: var(--muted-2); font-size: 8px; }
.miner-log-source { min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 10px; background: #090d0f; }
.miner-log-source > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
.miner-log-source strong { min-width: 0; overflow: hidden; color: #cdd8d3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.miner-log-source .tag.warning { flex: 0 0 auto; color: var(--amber); background: rgba(244,184,93,.1); }
.miner-log-source pre { max-height: 260px; margin: 0; overflow: auto; padding: 11px; color: #aebbb5; font: 9px/1.55 Consolas, "SFMono-Regular", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.miner-log-empty, .miner-log-message { padding: 12px 13px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.miner-log-message { display: flex; align-items: center; gap: 8px; border-style: solid; background: var(--panel); }
.miner-log-message.warning { border-color: rgba(244,184,93,.28); color: #e8c78e; background: rgba(244,184,93,.05); }
.miner-log-message.error { border-color: rgba(240,108,105,.28); color: #efaaa7; background: rgba(240,108,105,.05); }
.miner-log-actions { display: flex; align-items: center; gap: 7px; }
.miner-live-dialog .modal-card { height: min(760px, calc(100vh - 30px)); display: flex; flex-direction: column; overflow: hidden; }
.miner-live-dialog .modal-head { flex: 0 0 auto; margin-bottom: 14px; }
.miner-live-dialog .modal-head h2 { overflow-wrap: anywhere; }
.miner-live-toolbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel); }
.miner-live-toolbar > div { min-width: 0; }
.miner-live-toolbar strong, .miner-live-toolbar small { display: block; }
.miner-live-toolbar small { margin-top: 4px; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.miner-live-toolbar > small { flex: 0 0 auto; max-width: 260px; margin: 0; text-align: right; }
.miner-live-status { position: relative; padding-left: 13px; font-size: 10px; }
.miner-live-status::before { content: ""; position: absolute; top: 50%; left: 0; width: 7px; height: 7px; border-radius: 50%; background: currentColor; transform: translateY(-50%); }
.miner-live-status.is-active { color: var(--green); }
.miner-live-status.is-error { color: var(--amber); }
.miner-live-output { flex: 1 1 auto; min-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; background: #070a0c; color: #aebbb5; font: 10px/1.55 Consolas, "SFMono-Regular", monospace; scrollbar-color: #354149 #090d0f; }
.miner-live-empty { min-height: 100%; display: grid; place-items: center; padding: 30px; color: var(--muted-2); text-align: center; }
.miner-live-line { display: grid; grid-template-columns: 45px 64px 58px minmax(0, 1fr); align-items: start; min-width: 0; padding: 3px 9px; border-left: 2px solid transparent; }
.miner-live-line:nth-child(even) { background: rgba(255,255,255,.012); }
.miner-live-line:hover { background: rgba(255,255,255,.035); }
.miner-live-kind { align-self: center; justify-self: start; padding: 1px 4px; border-radius: 4px; color: var(--muted-2); background: rgba(255,255,255,.04); font-size: 8px; font-weight: 700; }
.miner-live-time, .miner-live-source { color: #596662; font-size: 8px; line-height: 1.95; }
.miner-live-source { overflow: hidden; padding-right: 8px; text-overflow: ellipsis; white-space: nowrap; }
.miner-live-text { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.miner-live-line.is-error { border-left-color: var(--red); color: #ffaaa7; background: rgba(240,108,105,.055); }
.miner-live-line.is-warning { border-left-color: var(--amber); color: #eecb91; background: rgba(244,184,93,.04); }
.miner-live-line.is-success { border-left-color: var(--green); color: #8ee7b6; }
.miner-live-line.is-share { border-left-color: var(--lime); color: #d8f77b; background: rgba(201,242,77,.035); }
.miner-live-line.is-hashrate { border-left-color: var(--blue); color: #96bdff; }
.miner-live-line.is-pool { border-left-color: #a88cff; color: #c4b4ff; }
.miner-live-line.is-error .miner-live-kind, .miner-live-legend .is-error { color: var(--red); background: rgba(240,108,105,.12); }
.miner-live-line.is-warning .miner-live-kind, .miner-live-legend .is-warning { color: var(--amber); background: rgba(244,184,93,.12); }
.miner-live-line.is-success .miner-live-kind, .miner-live-legend .is-success { color: var(--green); background: rgba(83,216,144,.12); }
.miner-live-line.is-share .miner-live-kind, .miner-live-legend .is-share { color: var(--lime); background: rgba(201,242,77,.12); }
.miner-live-line.is-hashrate .miner-live-kind, .miner-live-legend .is-hashrate { color: var(--blue); background: rgba(109,167,255,.12); }
.miner-live-line.is-pool .miner-live-kind, .miner-live-legend .is-pool { color: #b39aff; background: rgba(179,154,255,.12); }
.miner-live-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.miner-live-footer .modal-actions { margin-top: 12px; }
.miner-live-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.miner-live-legend span { padding: 3px 6px; border-radius: 5px; font: 700 8px/1.2 Consolas, monospace; }
.spinner-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(201,242,77,.4); animation: miner-log-pulse 1.1s infinite; }
@keyframes miner-log-pulse { 70% { box-shadow: 0 0 0 7px rgba(201,242,77,0); } 100% { box-shadow: 0 0 0 0 rgba(201,242,77,0); } }
.agent-details-form { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); }
.agent-details-form label { margin: 0; }
.agent-details-form .btn { justify-self: end; }
.device-note-card { padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--panel); color: var(--muted); font-size: 10px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .resource-head { padding: 18px 16px 0; }
  .inline-grid { grid-template-columns: 1fr; gap: 0; }
  .source-choice-grid { grid-template-columns: 1fr; }
  .miner-version-compat { grid-template-columns: 1fr; }
  .miner-version-compat.warning { display: grid; }
  .gpu-setting-row { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flight-gpu-oc-row { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpu-setting-row .remove-setting { grid-column: 1 / -1; width: 100%; }
  .modal-large .modal-card { padding: 18px; }
  .modal-flight .modal-card { padding: 18px; }
  .miner-live-dialog .modal-card { padding: 18px; }
  .miner-live-toolbar { align-items: flex-start; flex-direction: column; }
  .miner-live-toolbar > small { max-width: none; text-align: left; }
  .miner-live-line { grid-template-columns: 43px 57px minmax(0, 1fr); }
  .miner-live-source { display: none; }
  .miner-live-footer { align-items: flex-end; flex-direction: column; }
  .device-gpu-oc-grid { grid-template-columns: 1fr; }
  .device-gpu-oc-target { align-items: flex-start; flex-direction: column; }
  .device-gpu-oc-target strong { text-align: left; }
  .flight-section { padding: 7px 12px 13px; }
}
