/* Site-wide dark theme. Defines the body, typography, links, form
   controls, and the top nav. Per-page CSS still ships inline in each
   .aspx for layout, but should not redefine body/h1/a/code rules
   (this file owns them). */

:root {
  --bg:           #0a0a0a;
  --bg-2:         #050505;
  --panel:        #161616;
  --panel-2:      #1c1c1c;
  --panel-3:      #222;
  --border:       #2a2a2a;
  --border-2:     #3a3a3a;

  --text:         #d8d8d8;
  --text-strong:  #f0f0f0;
  --text-muted:   #8a8a8a;
  --text-dim:     #6b6b6b;

  --accent:       #4af;
  --accent-2:     #6cf;
  --ok:           #5d5;
  --warn:         #fb3;
  --err:          #f55;
  --info:         #4af;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.page { padding: 22px 28px 40px; max-width: 1200px; margin: 0 auto; }

/* Headings */
h1 { color: var(--text-strong); font-size: 20px; font-weight: 600; margin: 0 0 16px; letter-spacing: .2px; }
h2 { color: var(--text-strong); font-size: 16px; font-weight: 600; margin: 22px 0 10px; }
h3 { color: var(--text-strong); font-size: 14px; font-weight: 600; margin: 18px 0 8px; }

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

/* Tables */
table { border-collapse: collapse; }
td, th { padding: 4px 12px 4px 0; vertical-align: top; color: var(--text); }

/* Semantic helpers */
.label, .muted { color: var(--text-muted); }
.small { color: var(--text-muted); font-size: 12px; }
.dim   { color: var(--text-dim); }
.ok    { color: var(--ok); }
.err, .stale { color: var(--err); }
.warn  { color: var(--warn); }
.info  { color: var(--info); }

/* Code / preformatted */
code, kbd, samp {
  background: #111;
  color: #cdd;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
}
pre {
  background: #0e0e0e;
  color: #d8d8d8;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Form controls */
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=search], input[type=url], textarea, select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 13px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
input[readonly] { background: #141414; color: #aaa; }
textarea { font-family: Consolas, Menlo, monospace; resize: vertical; }

button {
  background: var(--accent);
  color: #001020;
  border: 0;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--accent-2); }
button:disabled { opacity: 0.5; cursor: wait; }
button.ghost {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  font-weight: 500;
}
button.ghost:hover { background: #2a2a2a; color: var(--text-strong); }

hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---- Top nav (Controls/SiteNav.ascx) ---- */
.site-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  font-size: 13px;
}
.site-nav .brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: .3px;
  padding: 12px 16px 12px 0;
  margin-right: 8px;
  border-right: 1px solid var(--border);
}
.site-nav .brand:hover { color: var(--accent-2); text-decoration: none; }
.site-nav .brand-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 8px rgba(68,170,255,.6);
}
.site-nav a.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 14px;
  color: #aaa;
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.site-nav a.nav-link:hover {
  color: var(--text-strong);
  background: #101010;
  text-decoration: none;
}
.site-nav a.nav-link.active {
  color: var(--text-strong);
  border-bottom-color: var(--accent);
  background: #0e0e0e;
}
