:root {
  --bg: #081018;
  --panel: #0d1822;
  --panel-2: #101f2b;
  --line: #203241;
  --text: #eaf3f8;
  --muted: #8fa6b5;
  --accent: #38bdf8;
  --accent-2: #22d3a6;
  --danger: #f59e0b;
  --shadow: 0 18px 50px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at 85% 5%, rgba(56,189,248,.08), transparent 32%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(310px, 420px) 1fr; }
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: auto;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(8,16,24,.88);
  backdrop-filter: blur(12px);
}
.brand-row, .panel-head, .hero-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 25px; }
h2 { font-size: clamp(22px, 2.4vw, 34px); }
h3 { font-size: 20px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; margin-bottom: 6px; }
.icon-btn, .ghost-btn, .ont-buttons button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #10202c;
  border-radius: 10px;
}
.icon-btn { width: 42px; height: 42px; font-size: 24px; }
.icon-btn:hover, .ghost-btn:hover, .ont-buttons button:hover { border-color: var(--accent); }
.status-line { margin: 18px 0 14px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 4px rgba(100,116,139,.08); }
.status-dot.online { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(34,211,166,.08); }
.status-dot.fallback { background: var(--danger); box-shadow: 0 0 0 4px rgba(245,158,11,.08); }
.search, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a141d;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,.08); }
.search { margin-bottom: 15px; }
.warning { font-size: 12px; color: #ffd18a; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.22); padding: 10px; border-radius: 10px; margin-bottom: 14px; white-space: pre-line; }
.hidden { display: none !important; }
.sto-list { display: grid; gap: 12px; }
.sto-card { border: 1px solid var(--line); background: rgba(13,24,34,.78); border-radius: 13px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.sto-head { padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.sto-name { font-weight: 800; letter-spacing: .08em; }
.sto-count { color: var(--muted); font-size: 11px; }
.olt-item { padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 1px solid rgba(32,50,65,.6); cursor: pointer; }
.olt-item:last-child { border-bottom: 0; }
.olt-item:hover { background: rgba(56,189,248,.06); }
.olt-item.active { background: rgba(56,189,248,.12); box-shadow: inset 3px 0 var(--accent); }
.olt-name { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.olt-ip { color: var(--muted); font-size: 11px; align-self: center; }
.workspace { padding: clamp(20px, 3vw, 44px); max-width: 1500px; width: 100%; margin: 0 auto; }
.hero-card, .panel { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(16,31,43,.96), rgba(10,20,29,.96)); box-shadow: var(--shadow); }
.hero-card { padding: 20px; border-radius: 16px; margin-bottom: 20px; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.pill { border: 1px solid var(--line); background: rgba(8,16,24,.7); color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.summary { color: var(--muted); font-size: 13px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { border-radius: 16px; padding: 20px; }
.panel-head { margin-bottom: 20px; }
.ghost-btn { padding: 8px 12px; font-size: 12px; }
label { display: block; color: #c6d7e1; font-size: 12px; font-weight: 700; margin: 16px 0 7px; }
.field-row { display: grid; gap: 8px; }
.field-row.two { grid-template-columns: 1fr 1fr; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.output { background: #071018; border-color: #29485b; color: #c8f3ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.textarea { min-height: 180px; resize: vertical; line-height: 1.45; }
.ont-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ont-buttons button { padding: 10px 8px; font-size: 11px; }
.ont-buttons button.active { border-color: var(--accent-2); background: rgba(34,211,166,.13); }
.hint { color: var(--muted); font-size: 11px; margin-top: 8px; }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 10px 14px; border-radius: 10px; background: #e8f9ff; color: #06131c; font-weight: 800; box-shadow: var(--shadow); }
.empty { color: var(--muted); padding: 20px 8px; text-align: center; }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; max-height: 48vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .field-row.three, .field-row.two, .ont-buttons { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; }
  .workspace { padding: 14px; }
  .sidebar { padding: 14px; }
}
