/* Kentucky State Roleplay site + portal. Navy palette from the server logo. */
:root {
  --bg: #040b1d;
  --bg-2: #071533;
  --surface: #0a1c42;
  --surface-2: #0f2858;
  --navy: #03205c;
  --line: rgba(160, 190, 255, 0.12);
  --line-strong: rgba(160, 190, 255, 0.22);
  --text: #eaf0ff;
  --muted: #8fa3cf;
  --accent: #4f8cff;
  --accent-2: #7aa8ff;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(47, 107, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(3, 32, 92, 0.55), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05; }
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--text); font: 600 14px var(--font);
  cursor: pointer; transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, #5b96ff, #2f6bff); border-color: #6aa0ff; color: #fff; box-shadow: 0 6px 24px rgba(47, 107, 255, 0.35); }
.btn.primary:hover { background: linear-gradient(180deg, #6ea1ff, #3a76ff); }
.btn.danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #ffb4b4; }
.btn.danger:hover { background: rgba(248, 113, 113, 0.22); }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }

/* ---------- site header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: rgba(4, 11, 29, 0.72); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-links .btn { margin-left: 8px; color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(79, 140, 255, 0.1); color: var(--accent-2); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); animation: pulse 2s infinite; }
.dot.off { background: var(--bad); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
.hero h1 { margin: 22px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p.lead { max-width: 560px; font-size: 1.1rem; color: #b9c7e6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art::before { content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(47, 107, 255, 0.45), transparent 68%); filter: blur(30px); }
.hero-art img { position: relative; width: min(380px, 80%); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)); }

/* ---------- cards ---------- */
.card { background: linear-gradient(180deg, rgba(15, 40, 88, 0.62), rgba(10, 28, 66, 0.62)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.flat { background: var(--surface); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.stat .value { font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1.1; margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: 13px; }

section.block { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-head p { color: var(--muted); max-width: 560px; margin-top: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dept { display: flex; flex-direction: column; gap: 14px; transition: transform 0.15s, border-color 0.15s; }
.dept:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.dept img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--navy); }
.dept p { color: #aebde0; font-size: 14px; flex: 1; }
.feature .num { font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.feature p { color: #aebde0; margin-top: 8px; font-size: 14px; }
.cta-band { text-align: center; padding: 56px 24px; background: linear-gradient(135deg, var(--navy), #0b3a8f); border: 1px solid var(--line-strong); border-radius: 22px; }
.cta-band p { color: #c6d4f2; margin: 12px auto 24px; max-width: 520px; }
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); font-size: 13.5px; margin-top: 40px; }
.site-footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(4, 11, 29, 0.7); color: var(--text); font: 14px var(--font); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2); }
textarea { min-height: 96px; resize: vertical; }
select option { background: var(--bg-2); }
.check { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; color: #c6d4f2; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.hint { color: var(--muted); font-size: 12.5px; }

/* ---------- badges + tables ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.07); color: #c6d4f2; }
.badge.ok { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.badge.warn { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.badge.bad { background: rgba(248, 113, 113, 0.14); color: #fca5a5; }
.badge.blue { background: rgba(79, 140, 255, 0.16); color: #9dc0ff; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10, 28, 66, 0.45); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 16px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* ---------- portal ---------- */
.portal { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(4, 11, 29, 0.85); backdrop-filter: blur(10px); }
.side .brand { padding: 6px 10px 18px; }
.side .brand img { width: 34px; height: 34px; }
.side .brand span { font-size: 1.05rem; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side .group { margin: 14px 10px 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #b6c4e6; font-weight: 500; }
.side nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side nav a.active { background: rgba(79, 140, 255, 0.16); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.side nav svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.userchip img, .userchip .ph { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); object-fit: cover; flex: none; }
.userchip .who { flex: 1; min-width: 0; line-height: 1.25; }
.userchip .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip .who small { color: var(--muted); font-size: 11.5px; text-transform: capitalize; }
.main { padding: 30px 36px 60px; min-width: 0; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { font-size: 2.3rem; }
.page-head p { color: var(--muted); margin-top: 6px; }
.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cols.three { grid-template-columns: repeat(3, 1fr); }
.stack > * + *, .main > div > * + * { margin-top: 16px; }
.card h3 { margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed li:last-child { border: 0; }
.feed small { display: block; color: var(--muted); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); width: fit-content; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { padding: 7px 16px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 13.5px var(--font); cursor: pointer; }
.tabs button.active { background: rgba(79, 140, 255, 0.2); color: #fff; }
.results { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.results button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(255, 255, 255, 0.03); border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: 14px var(--font); cursor: pointer; text-align: left; }
.results button:last-child { border-bottom: 0; }
.results button:hover { background: rgba(79, 140, 255, 0.14); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); text-align: center; padding: 38px 32px; }
.login-card img { width: 92px; margin: 0 auto 18px; }
.login-card p { color: var(--muted); margin: 10px 0 24px; }
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); color: #ffc2c2; font-size: 14px; }
.notice.warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }

/* ---------- modal + toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(2, 6, 18, 0.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(480px, 100%); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.modal h3 { margin-bottom: 6px; }
.modal .sub { color: var(--muted); margin-bottom: 16px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); font-size: 14px; animation: rise 0.2s ease; }
.toast.ok { border-color: rgba(52, 211, 153, 0.5); }
.toast.bad { border-color: rgba(248, 113, 113, 0.55); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.loading { color: var(--muted); padding: 30px; text-align: center; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: 200px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .cols, .cols.three { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .portal { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; order: 3; }
  .side .group { display: none; }
  .main { padding: 22px 16px 50px; }
}
