/* ===================================================================
   Yui dashboard styles
   =================================================================== */

:root {
  --bg: #0b0e14;
  --bg-2: #11151f;
  --panel: #151b27;
  --panel-2: #1a2130;
  --border: #232c3d;
  --border-soft: #1c2433;
  --text: #e7ecf3;
  --text-dim: #8b97ab;
  --muted: #67728a;
  --accent: #6c8cff;
  --accent-2: #8b5cf6;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(108, 140, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(139, 92, 246, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { background: var(--bg-2); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand-logo {
  font-size: 26px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(108,140,255,0.25), rgba(139,92,246,0.25));
  border: 1px solid var(--border);
  border-radius: 12px;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: 0.2px; }
.brand-sub { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.nav-item span { font-size: 15px; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(108,140,255,0.18), rgba(139,92,246,0.12));
  border-color: var(--border);
  color: #fff;
}

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-pill.online .dot { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-pill.offline .dot { background: var(--danger); }
.version { font-size: 11px; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  z-index: 5;
}
.topbar h2 { font-size: 20px; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.model-chip {
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-dim);
}

.view { display: none; padding: 26px 30px; animation: fade 0.25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text);
  cursor: pointer; transition: all 0.15s ease;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.btn-success { background: linear-gradient(135deg, #10b981, #34d399); border-color: transparent; color: #04150e; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f87171); border-color: transparent; color: #200606; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel); }

/* ---------- Overview ---------- */
.control-card {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.control-status { display: flex; align-items: center; gap: 16px; }
.big-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); position: relative;
}
.big-dot.online { background: var(--success); box-shadow: 0 0 0 6px rgba(52,211,153,0.15); }
.big-dot.online::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--success); opacity: 0.5;
  animation: pulse 2s ease-out infinite;
}
.big-dot.offline { background: var(--danger); box-shadow: 0 0 0 6px rgba(248,113,113,0.12); }
.big-dot.starting { background: var(--warning); box-shadow: 0 0 0 6px rgba(251,191,36,0.15); }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.8); opacity: 0; } }
.control-title { font-size: 19px; font-weight: 700; }
.control-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 20px 0;
}
.stat-card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  font-weight: 650; font-size: 14px;
}
.panel-body { padding: 16px 18px; }
.empty { padding: 20px 4px; text-align: center; font-size: 13px; }

.usage-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.usage-name { width: 150px; font-size: 13px; font-weight: 600; }
.usage-bar { flex: 1; height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.usage-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.usage-count { width: 34px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-dim); }

.log-mini { max-height: 260px; overflow-y: auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.log-mini .line { padding: 4px 0; border-bottom: 1px solid var(--border-soft); color: var(--text-dim); }
.log-mini .line:last-child { border: none; }

/* ---------- Config ---------- */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.config-grid .panel:last-child { grid-column: 1 / -1; }
.form-body { display: flex; flex-direction: column; gap: 14px; }
.form-body label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-dim); }
/* All text-like inputs (incl. inputs with no explicit type) + textareas + selects. */
.form-body input:not([type=checkbox]):not([type=radio]):not([type=range]),
.form-body textarea, .form-body select {
  font-family: inherit; font-size: 14px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 500; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-body input:focus, .form-body textarea:focus, .form-body select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,140,255,0.15); }
.form-body textarea { resize: vertical; line-height: 1.5; }
.form-body input[type=range] { accent-color: var(--accent); }
.form-body label.check { flex-direction: row; align-items: center; gap: 9px; color: var(--text); cursor: pointer; }
.form-body label.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.config-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.saved-flash { color: var(--success); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity 0.3s; }
.saved-flash.show { opacity: 1; }

/* ---------- Tools ---------- */
.tool-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 4px; border-bottom: 1px solid var(--border-soft);
}
.tool-row:last-child { border: none; }
.tool-info { min-width: 0; }
.tool-name { font-weight: 650; font-size: 14px; }
.tool-name code { margin-left: 8px; font-weight: 500; color: var(--accent); background: rgba(108,140,255,0.1); }
.tool-desc { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 999px; transition: 0.2s;
}
.slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: var(--muted); border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.switch input:checked + .slider::before { transform: translateX(20px); background: #fff; }

/* ---------- Voice ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-body select {
  font-family: inherit; font-size: 14px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 500;
}
.form-body select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,140,255,0.15); }
.cap-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; font-size: 14px; }
.cap-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.cap-icon.ok { background: rgba(52,211,153,0.15); color: var(--success); }
.cap-icon.bad { background: rgba(248,113,113,0.15); color: var(--danger); }
.cap-ready { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); font-weight: 650; font-size: 13px; }
.cap-ready.ok { color: var(--success); }
.cap-ready.bad { color: var(--warning); }
.vc-guild { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 12px 0 4px; }
.vc-guild:first-child { margin-top: 0; }
#voice-transcript { max-height: 300px; }

/* ---------- Chat (legacy) ---------- */
.chat-panel { display: flex; flex-direction: column; height: calc(100vh - 150px); }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 78%; padding: 12px 15px; border-radius: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.thinking { color: var(--muted); font-style: italic; }
.bubble-tools { margin-top: 8px; font-size: 11px; color: rgba(255,255,255,0.75); }
.bubble.bot .bubble-tools { color: var(--accent); }
.chat-input { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border-soft); }
.chat-input input { flex: 1; font-family: inherit; font-size: 14px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); color: var(--text); }
.chat-input input:focus { outline: none; border-color: var(--accent); }

/* ---------- Logs ---------- */
.logs-panel { height: calc(100vh - 150px); display: flex; flex-direction: column; }
.log-controls { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.check.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.ws-state { font-size: 12px; color: var(--warning); font-weight: 600; }
.ws-state.open { color: var(--success); }
.ws-state.closed { color: var(--danger); }
.log-console { flex: 1; overflow-y: auto; padding: 14px 18px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.7; }
.log-line { display: flex; gap: 12px; padding: 1px 0; }
.log-line .ts { color: var(--muted); flex-shrink: 0; }
.log-line .lvl { flex-shrink: 0; width: 62px; font-weight: 700; }
.log-line .src { color: var(--accent); flex-shrink: 0; width: 90px; }
.log-line .msg { color: var(--text-dim); word-break: break-word; }
.log-line.INFO .lvl { color: var(--success); }
.log-line.WARNING .lvl { color: var(--warning); }
.log-line.ERROR .lvl { color: var(--danger); }
.log-line.DEBUG .lvl { color: var(--muted); }

/* ---------- Login ---------- */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; }
.login-card {
  width: 340px; padding: 34px 30px; text-align: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.login-logo { font-size: 44px; }
.login-card h1 { font-size: 24px; }
.login-card input { font-family: inherit; font-size: 15px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); color: var(--text); text-align: center; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); z-index: 200; animation: toastIn 0.25s ease;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---------- User dashboard: login screen ---------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.btn-discord {
  width: 100%; justify-content: center; gap: 8px; margin-top: 8px;
  background: linear-gradient(180deg, #5865f2, #4752c4); border: none;
}
.btn-discord:hover { filter: brightness(1.08); }

/* ---------- User dashboard: server sidebar ---------- */
.server-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.server-list { display: flex; flex-direction: column; gap: 4px; }
.server-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: 1px solid transparent; color: var(--text-dim);
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
}
.server-item:hover { background: var(--panel); color: var(--text); }
.server-item.active { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.server-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-icon { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; flex: none; }
.server-icon-fallback {
  display: grid; place-items: center; background: var(--panel-2);
  color: var(--text-dim); font-weight: 700; text-transform: uppercase;
}
.dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.dot-on { background: var(--success); }
.dot-off { background: var(--muted); }
.server-add {
  display: grid; place-items: center; margin-top: 4px; padding: 8px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border); color: var(--text-dim); font-size: 20px; text-decoration: none; cursor: pointer;
}
.server-add:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- User dashboard: account + plan ---------- */
.account { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 999px; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; text-transform: uppercase; }
.account-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.account-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-badge {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 1px 7px; border-radius: 999px; width: max-content;
}
.plan-free { background: rgba(139, 151, 171, 0.18); color: var(--text-dim); }
.plan-pro { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #fff; }
.plan-info { font-size: 14px; }
.redeem-row { gap: 8px; align-items: center; }
.redeem-row input { flex: 1; }

/* ---------- User dashboard: per-server form bits ---------- */
.warn-banner {
  background: rgba(251, 191, 36, 0.10); border: 1px solid rgba(251, 191, 36, 0.35);
  color: #f7d488; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5;
}
.field-label { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.channel-check-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 14px;
  max-height: 190px; overflow-y: auto; padding: 8px 10px; margin-top: 4px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.channel-check-list .check { margin: 0; }

/* ---------- Shared: data tables (admin) ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
.data-table select { padding: 4px 8px; }

/* ---------- Unsaved-changes save bar ---------- */
.save-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 18px; border-radius: 999px;
  background: rgba(21, 27, 39, 0.92); backdrop-filter: blur(12px);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  z-index: 60; opacity: 0; transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), opacity 0.3s;
}
.save-bar.show { transform: translate(-50%, 0); opacity: 1; }
.save-bar .save-bar-text { font-size: 13.5px; font-weight: 600; color: var(--text); }
.save-bar .btn { padding: 8px 16px; }

/* ---------- Motion / polish ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view.active { animation: viewIn 0.28s ease both; }
.panel { transition: border-color 0.15s, transform 0.15s; }
.btn { transition: transform 0.12s ease, filter 0.15s ease, background 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.nav-item { transition: background 0.15s, color 0.15s; }
.stat-card { transition: transform 0.15s, border-color 0.15s; }
.stat-card:hover { transform: translateY(-2px); border-color: var(--border); }
.server-item, .server-add { transition: background 0.15s, color 0.15s, border-color 0.15s; }
@media (prefers-reduced-motion: reduce) { *, .view.active { animation: none !important; transition: none !important; } }

/* progress meter (rate-limit usage) */
.meter { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--border-soft); }
.meter > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.4s ease; }
.meter.warn > span { background: linear-gradient(90deg, var(--warning), var(--danger)); }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 4px; }
.mini-stat { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.mini-stat .n { font-size: 20px; font-weight: 700; }
.mini-stat .l { font-size: 12px; color: var(--muted); }

/* ---------- Billing actions (user dashboard) ---------- */
.billing-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===================================================================
   Public landing page + status page
   =================================================================== */
.landing { max-width: 1040px; margin: 0 auto; padding: 0 22px 60px; }

.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 2px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.lp-brand .brand-logo { width: 38px; height: 38px; font-size: 22px; }
.lp-nav-links { display: flex; align-items: center; gap: 18px; }
.lp-nav-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600; }
.lp-nav-links a:hover { color: var(--text); }
.lp-nav-links a.btn { color: #fff; }

.lp-hero { text-align: center; padding: 54px 0 40px; }
.lp-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -0.5px; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-sub { color: var(--text-dim); font-size: 17px; line-height: 1.6; max-width: 640px; margin: 18px auto 0; }
.lp-sub.small { font-size: 14px; }
.lp-cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.lp-cta .btn { padding: 12px 22px; font-size: 14px; }

.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 30px 0; }
.lp-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; }
.lp-card .lp-ico { font-size: 26px; }
.lp-card h3 { font-size: 16px; margin: 10px 0 6px; }
.lp-card p { color: var(--text-dim); font-size: 14px; line-height: 1.55; }

.lp-plans { text-align: center; margin-top: 46px; }
.lp-plans h2 { font-size: 28px; font-weight: 750; }
.lp-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; text-align: left; max-width: 720px; margin-left: auto; margin-right: auto; }
.lp-plan { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.lp-plan-pro { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.lp-plan-name { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.lp-tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; letter-spacing: 0.4px; }
.lp-price { font-size: 32px; font-weight: 800; margin: 12px 0 4px; }
.lp-per { font-size: 14px; font-weight: 500; color: var(--muted); }
.lp-feats { list-style: none; margin: 14px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.lp-feats li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-dim); border-bottom: 1px solid var(--border-soft); padding-bottom: 9px; }
.lp-feats li:last-child { border: none; }
.lp-feats li b { color: var(--text); font-variant-numeric: tabular-nums; }
.lp-plan-cta { margin-top: auto; text-align: center; text-decoration: none; }

.lp-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 14px; }
.lp-foot-links { display: flex; gap: 18px; }
.lp-foot-links a { color: var(--text-dim); text-decoration: none; }
.lp-foot-links a:hover { color: var(--text); }

/* ---------- Status page ---------- */
.status-wrap { max-width: 680px; margin: 30px auto 0; }
.status-banner { border-radius: var(--radius); padding: 22px 24px; font-size: 20px; font-weight: 700; border: 1px solid var(--border); background: var(--panel); }
.status-banner.s-operational { border-color: rgba(52,211,153,0.5); color: var(--success); background: rgba(52,211,153,0.08); }
.status-banner.s-degraded { border-color: rgba(251,191,36,0.5); color: var(--warning); background: rgba(251,191,36,0.08); }
.status-banner.s-down { border-color: rgba(248,113,113,0.5); color: var(--danger); background: rgba(248,113,113,0.08); }
.status-banner.s-unknown { color: var(--text-dim); }
.status-list { margin-top: 18px; background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.status-row:last-child { border: none; }
.status-name { font-weight: 650; font-size: 15px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-badge.s-operational { color: var(--success); } .status-badge.s-operational .status-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-badge.s-degraded { color: var(--warning); } .status-badge.s-degraded .status-dot { background: var(--warning); }
.status-badge.s-down { color: var(--danger); } .status-badge.s-down .status-dot { background: var(--danger); }
.status-badge.s-unknown { color: var(--text-dim); }
.status-foot { margin-top: 14px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .two-col, .config-grid { grid-template-columns: 1fr; }
  .save-bar { left: 12px; right: 12px; transform: translateY(140%); width: auto; }
  .save-bar.show { transform: translateY(0); }
}
