:root {
  --bg: #eef0f3;
  --bg-2: {{BG_2}};
  --bg-card: #ffffff;
  --line: #c4c8cf;
  --line-2: {{LINE_2}};
  --ink: #191e26;
  --ink-2: {{INK_2}};
  --ink-3: {{INK_3}};
  --accent: #2a3f5a;
  --accent-2: {{ACCENT_2}};
  --accent-soft: #d8dee8;
  --green: #2e7d4f;
  --green-soft: #d4ebd9;
  --orange: #c75e1a;
  --section-pad: 56px;
  --container-pad: 32px;
  --base-lh: 1.55;
  --font-display: 'Roboto', -apple-system, sans-serif;
  --font-body: 'Roboto', -apple-system, sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

a { color: inherit; }

/* === Topbar === */
.topbar {
  background: var(--ink);
  color: white;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border-bottom: 2px solid var(--accent);
}

.topbar-left, .topbar-right { display: flex; align-items: stretch; }

.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  background: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: white;
  letter-spacing: 0;
}

.logo-meta { display: flex; flex-direction: column; line-height: 1.15; }

.logo-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-left: 1px solid rgba(255,255,255,0.1);
  background: rgba(46, 125, 79, 0.15);
}

.status-led {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.5; }
}

.status-text {
  color: #4ade80;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.topbar-time {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  border-left: 1px solid rgba(255,255,255,0.1);
}

.topbar-time .sep { opacity: 0.4; }

/* === Subnav === */
.subnav {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  font-size: 11px;
}

.subnav a {
  display: inline-block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}

.subnav a:hover { background: var(--bg); color: var(--accent); }

.subnav a.active {
  color: var(--accent);
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}

/* === Main === */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 16px;
}

/* === Panel === */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.panel-id {
  font-size: 11px;
  font-weight: 600;
  background: var(--ink);
  color: white;
  padding: 2px 6px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.panel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.panel-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
}

/* === Overview === */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line-2);
}

.metric {
  padding: 16px 20px;
  border-right: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric:last-child { border-right: none; }

.metric-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.metric-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.metric.metric-ok .metric-value { color: var(--green); }

.banner {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: var(--accent-soft);
  border-top: 1px solid var(--accent);
}

.banner-tag {
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--bg-card);
  padding: 3px 8px;
  border: 1px solid var(--accent);
}

.banner-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* === Operations === */
.primary-op {
  padding: 20px;
  border-bottom: 1px solid var(--line-2);
}

.op-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.op-tag {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: white;
}

.op-tag-primary { background: var(--ink); }

.op-content { flex: 1; }

.op-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 6px;
}

.op-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.ops-table-wrap {
  background: var(--bg-card);
}

.ops-table-head {
  display: grid;
  grid-template-columns: 60px 1fr;
  background: var(--bg-2);
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}

.th-num, .th-desc { padding: 8px 16px; }
.th-num { border-right: 1px solid var(--line); }

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ops-table tr { border-bottom: 1px solid var(--line-2); }
.ops-table tr:last-child { border-bottom: none; }
.ops-table tr:nth-child(even) { background: var(--bg-2); }
.ops-table tr:hover { background: var(--accent-soft); }

.ops-table td {
  padding: 10px 16px;
  vertical-align: top;
  color: var(--ink);
}

.ops-table td.num {
  width: 60px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  border-right: 1px solid var(--line-2);
  font-weight: 500;
}

/* === Registry === */
.reg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.reg-table thead { background: var(--bg-2); }

.reg-table th {
  text-align: left;
  padding: 10px 20px;
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}

.reg-table td {
  padding: 10px 20px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
  color: var(--ink);
}

.reg-table tr:last-child td { border-bottom: none; }
.reg-table tr:hover { background: var(--accent-soft); }

.reg-k {
  width: 240px;
  color: var(--ink-3);
  font-size: 12px;
  border-right: 1px solid var(--line-2);
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
}

.pill-ok {
  color: var(--green);
  background: var(--green-soft);
}

/* === Location === */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.loc-cell {
  padding: 16px 20px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.loc-cell:nth-child(3n) { border-right: none; }
.loc-cell:nth-last-child(-n+3) { border-bottom: none; }

.loc-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 6px;
}

.loc-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* === Contact === */
.ct-rows {
  display: grid;
  gap: 0;
}

.ct-row {
  display: grid;
  grid-template-columns: 100px 200px 1fr auto;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  align-items: center;
}

.ct-row:last-child { border-bottom: none; }
.ct-row:hover { background: var(--accent-soft); }

.ct-label {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  font-weight: 600;
}

.ct-type {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}

.ct-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.ct-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.ct-link:hover { color: var(--accent-2); }

/* === Footer === */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  padding: 24px 0 16px;
  border-top: 2px solid var(--accent);
  margin-top: 16px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
}

.footer-block { display: flex; flex-direction: column; gap: 4px; }

.footer-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.footer-value {
  font-size: 13px;
  color: white;
}

.footer-bottom {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 12px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-align: center;
}

/* === Responsive === */
@media (max-width: 900px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-right { justify-content: flex-start; }
  .topbar-time { display: none; }
  .main { padding: 12px; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { border-right: 1px solid var(--line-2) !important; border-bottom: 1px solid var(--line-2); }
  .metric:nth-child(2n) { border-right: none !important; }
  .metric:nth-last-child(-n+2) { border-bottom: none; }
  .loc-grid { grid-template-columns: 1fr 1fr; }
  .loc-cell:nth-child(3n) { border-right: 1px solid var(--line-2) !important; }
  .loc-cell:nth-child(2n) { border-right: none !important; }
  .ct-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
