/* NexTech Network - single stylesheet. Dark theme, brand gradient #6366f1 -> #8b5cf6 */
:root {
  --bg: #07070f; --bg-2: #0d0d1a; --surface: #12121f; --surface-2: #1a1a2b; --border: #26263a;
  --text: #e8e8f2; --muted: #a3a3bd; --brand: #6366f1; --brand-2: #8b5cf6;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --dev: #f97316; --dev-2: #fb923c; --cad: #06b6d4; --cad-2: #14b8a6;
  --ok: #22c55e; --warn: #f59e0b; --err: #f87171;
  --radius: 14px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(99,102,241,.18), transparent 60%),
                    radial-gradient(700px 400px at -10% 10%, rgba(139,92,246,.12), transparent 60%);
  background-repeat: no-repeat; }
img { max-width: 100%; height: auto; }
a { color: #a5b4fc; text-underline-offset: 3px; }
a:hover { color: #c7d2fe; }
:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(560px, 100% - 2.5rem); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }
main { display: block; min-height: 60vh; outline: none; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-cad { background: linear-gradient(135deg, var(--cad), var(--cad-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 9px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1.25rem; border-radius: 10px; border: 1px solid transparent; background: var(--grad); color: #fff; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; box-shadow: 0 6px 20px rgba(99,102,241,.3); transition: transform .15s, box-shadow .15s; font-family: inherit; }
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(99,102,241,.4); }
.btn-sm { padding: .45rem .9rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.page-head { padding-block: 3rem 1.5rem; }
.lead { font-size: 1.15rem; color: #c9c9dc; max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: #a5b4fc; margin-bottom: .6rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.req { color: var(--brand-2); }
.input, select.input, textarea.input { width: 100%; padding: .7rem .85rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; }
.input:focus { border-color: var(--brand); outline: 2px solid rgba(99,102,241,.45); outline-offset: 0; }
.field-check { flex-direction: row; align-items: flex-start; gap: .6rem; flex-wrap: wrap; }
.field-check label { font-weight: 500; flex: 1; }
.check { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--brand); }
.field-check .field-error { flex-basis: 100%; }
.field-hint { margin: 0; color: var(--muted); font-size: .85rem; }
.field-error { margin: 0; color: var(--err); font-size: .88rem; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.table tfoot th, .table tfoot td { border-bottom: 0; }
.flashes { padding-top: 1rem; }
.flash, .notice { padding: .85rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); margin: 0 0 .6rem; }
.flash-success { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.08); }
.flash-error { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.08); }
.flash-info, .notice { border-color: rgba(99,102,241,.5); background: rgba(99,102,241,.08); }
/* status page */
.status-overall { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid rgba(99,102,241,.5); background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(139,92,246,.12)); margin: .5rem 0 .75rem; font-size: 1.1rem; }
.status-overall-degraded { border-color: rgba(245,158,11,.55); }
.status-overall-partial, .status-overall-offline { border-color: rgba(248,113,113,.55); }
.status-list { display: grid; gap: 1rem; padding-bottom: 3rem; }
.status-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.status-head .h3 { margin-bottom: .2rem; }
.status-head p { margin: 0; }
.status-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--muted); flex: none; }
.status-online { background: var(--ok); box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.status-degraded { background: var(--warn); box-shadow: 0 0 0 4px rgba(245,158,11,.18); }
.status-offline { background: var(--err); box-shadow: 0 0 0 4px rgba(248,113,113,.18); }
.status-unknown { background: #6b6b85; }
.status-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .75rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.status-pill-online { color: #86efac; } .status-pill-degraded { color: #fcd34d; } .status-pill-offline { color: #fca5a5; } .status-pill-unknown { color: var(--muted); }
.uptime-bar { list-style: none; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; padding: 0; margin: 1rem 0 .4rem; }
.uptime-bar li { height: 30px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.uptime-bar .uptime-online { background: var(--grad); border-color: transparent; }
.uptime-bar .uptime-degraded { background: var(--warn); border-color: transparent; }
.uptime-bar .uptime-offline { background: var(--err); border-color: transparent; }
.uptime-bar .uptime-unknown { background: #3a3a52; }
.uptime-legend { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }

/* standalone status app */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7,7,15,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.nav-links { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: #c9c9dc; text-decoration: none; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current] { color: #fff; }
.narrow-md { width: min(780px, 100% - 2.5rem); margin-inline: auto; }
.footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: #c9c9dc; }
.form { display: grid; gap: 1rem; }
.flash-token { border-color: rgba(245,158,11,.6); background: rgba(245,158,11,.08); word-break: break-all; }
.incident { border-left: 4px solid var(--brand); }
.incident-minor, .incident-maintenance { border-left-color: var(--warn); }
.incident-major { border-left-color: var(--err); }
.incident-resolved { opacity: .75; }
.incident h2 { margin-bottom: .25rem; }
.incident p { margin: .4rem 0 0; white-space: pre-line; }
.incident-list { display: grid; gap: .8rem; margin-bottom: 1.25rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.row-actions { display: flex; gap: .8rem; align-items: center; }
.linklike { background: none; border: 0; padding: 0; color: #a5b4fc; cursor: pointer; font: inherit; text-decoration: underline; }
.danger { color: #fca5a5; }
code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; }
.admin-wrap { padding-block: 2rem 3rem; }
/* maintenance */
.status-maintenance { background: #60a5fa; }
.status-pill-maintenance { color: #93c5fd; }
.uptime-bar .uptime-maintenance { background: #60a5fa; border-color: transparent; }
.status-overall-maintenance { border-color: rgba(96,165,250,.55); }
.incident-maintenance { border-left-color: #60a5fa; }
