/* ═══════════════════════════════════════════════════════════════
   CHECKPOINT K — COMPONENTS.CSS
   Buttons, panels, tables, forms, header chrome, footer
   ═══════════════════════════════════════════════════════════════ */

/* ─── THE TECH-BRACKET HEADER ─── */
/* Signature nav chrome — angled cuts, glowing accents */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(3, 5, 9, 0.95) 0%, rgba(3, 5, 9, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header::before,
.site-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice), transparent);
  box-shadow: 0 0 8px var(--ice-glow);
  opacity: 0.6;
}
.site-header::before { left: 0; width: 40%; }
.site-header::after { right: 0; width: 40%; }

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.brand-logo {
  width: 44px; height: 44px;
  filter: drop-shadow(0 0 12px var(--ice-glow));
  transition: filter 0.2s var(--ease);
}
.brand:hover .brand-logo { filter: drop-shadow(0 0 20px var(--ice-glow)); }

.brand-text {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
.brand-text .k { color: var(--ice); }

.nav-links {
  display: flex;
  gap: var(--sp-5);
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: var(--sp-2) 0;
  position: relative;
  transition: color 0.15s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--ice);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--ice);
  box-shadow: 0 0 8px var(--ice-glow);
}

.nav-search input {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--sans);
  border-radius: var(--r-sm);
  min-width: 180px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-search input:focus {
  outline: 0;
  border-color: var(--ice-deep);
  box-shadow: 0 0 0 1px var(--ice-deep), 0 0 12px var(--ice-glow-soft);
}
.nav-search input::placeholder { color: var(--text-faint); }

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.nav-user img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}
.nav-user .name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.nav-user .sub {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-user .sub a { color: var(--text-dim); }
.nav-user .sub a:hover { color: var(--ice); }

.admin-badge {
  display: inline-block;
  padding: 1px 5px;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(217, 174, 71, 0.12);
  border: 1px solid rgba(217, 174, 71, 0.4);
  border-radius: var(--r-sm);
  margin-left: 6px;
  vertical-align: 1px;
  text-shadow: 0 0 6px var(--gold-glow);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 11px 22px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--ice-deep);
  color: var(--ice-bright);
  background: var(--bg-raised);
  box-shadow: 0 0 16px var(--ice-glow-soft);
}

.btn-primary {
  background: linear-gradient(180deg, var(--ice-deep) 0%, var(--ice-dark) 100%);
  border-color: var(--ice-mid);
  color: var(--ice-bright);
  box-shadow: 0 0 16px var(--ice-glow-soft), inset 0 1px 0 rgba(168, 221, 255, 0.15);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--ice-mid) 0%, var(--ice-deep) 100%);
  border-color: var(--ice);
  color: #fff;
  box-shadow: 0 0 28px var(--ice-glow);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover {
  border-color: var(--ice-deep);
  color: var(--ice);
  background: var(--ice-glow-soft);
}

.btn-gold {
  background: linear-gradient(180deg, rgba(217, 174, 71, 0.2), rgba(217, 174, 71, 0.08));
  border-color: rgba(217, 174, 71, 0.5);
  color: var(--gold-bright);
}
.btn-gold:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.btn-danger {
  background: rgba(255, 90, 90, 0.1);
  border-color: rgba(255, 90, 90, 0.4);
  color: var(--red);
}
.btn-danger:hover {
  background: rgba(255, 90, 90, 0.15);
  border-color: var(--red);
  color: #fff;
}

.btn-sm { padding: 7px 14px; font-size: 11px; }
.btn-lg { padding: 14px 28px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }

/* ─── PANELS ─── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  transition: border-color 0.15s, box-shadow 0.2s;
}
.panel.hoverable:hover,
a.panel:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-panel), 0 0 24px var(--ice-glow-soft);
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}

/* ─── Card (for grid use) ─── */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all 0.2s var(--ease);
  display: block;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--glow-panel), 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 32px var(--ice-glow-soft);
}

.card .img {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-deep);
  position: relative;
}
.card .img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 5, 9, 0.85) 100%);
}
.card .body { padding: var(--sp-4) var(--sp-5); }
.card h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: var(--sp-2);
  color: var(--text);
}
.card .eyebrow { margin-bottom: var(--sp-2); }
.card p { color: var(--text-dim); font-size: 14px; }

/* ─── TABLES ─── */
table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}
table th, table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table th {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-strong);
}
table tr:hover td {
  background: rgba(126, 201, 255, 0.03);
}
table tr:last-child td { border-bottom: 0; }

/* ─── FORMS ─── */
.form-group {
  margin-bottom: var(--sp-4);
}
.form-group label {
  display: block;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: 6px;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
textarea, select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--sans);
  border-radius: var(--r-sm);
  transition: all 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--ice-deep);
  box-shadow: 0 0 0 1px var(--ice-deep), 0 0 14px var(--ice-glow-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { font-family: var(--mono); min-height: 160px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--ice);
  margin-right: 6px;
}

/* ─── ALERTS ─── */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border-left: 3px solid var(--ice);
  background: rgba(126, 201, 255, 0.08);
  color: var(--text);
  margin-bottom: var(--sp-4);
  font-size: 14px;
}
.alert-info { border-color: var(--ice); }
.alert-success { border-color: var(--green); background: rgba(90, 217, 158, 0.08); }
.alert-error { border-color: var(--red); background: rgba(255, 90, 90, 0.08); }
.alert-warn { border-color: var(--gold); background: rgba(217, 174, 71, 0.08); }

/* ─── TAGS ─── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--bg-raised);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.tag-ice { color: var(--ice); background: var(--ice-glow-soft); border-color: var(--ice-dark); }
.tag-gold { color: var(--gold-bright); background: rgba(217, 174, 71, 0.1); border-color: rgba(217, 174, 71, 0.3); }
.tag-green { color: var(--green); background: rgba(90, 217, 158, 0.08); border-color: rgba(90, 217, 158, 0.3); }
.tag-red { color: var(--red); background: rgba(255, 90, 90, 0.08); border-color: rgba(255, 90, 90, 0.3); }

/* ─── Status dot ─── */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: baseline;
  background: var(--text-faint);
}
.dot-on { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.dot-off { background: var(--red-dim); }
.dot-pending { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }

/* ─── FOOTER ─── */
.site-footer {
  margin-top: var(--sp-9);
  border-top: 1px solid var(--border);
  padding: var(--sp-7) 0 var(--sp-6) 0;
  background: linear-gradient(180deg, transparent, rgba(7, 16, 27, 0.6));
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice), transparent);
  box-shadow: 0 0 8px var(--ice-glow);
}
.foot-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.foot-brand {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text);
  margin-bottom: var(--sp-2);
}
.foot-brand .k { color: var(--ice); }
.foot-links {
  margin-top: var(--sp-4);
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.foot-links a {
  color: var(--text-dim);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.foot-links a:hover { color: var(--ice); }

/* ─── HERO TREATMENTS ─── */
.hero {
  text-align: center;
  padding: var(--sp-9) var(--sp-5) var(--sp-8);
  position: relative;
}
.hero-logo {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--sp-5);
  filter: drop-shadow(0 0 40px var(--ice-glow));
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 84px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: var(--sp-4);
  text-shadow: 0 0 40px var(--ice-glow-soft);
}
.hero-sub {
  font-size: clamp(14px, 1.5vw, 18px);
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
}
.hero-cta {
  display: inline-flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* Content hero (for article pages) — image with logo watermark */
.content-hero {
  position: relative;
  height: 380px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-deep);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  border: 1px solid var(--border);
}
.content-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 5, 9, 0.3) 0%, rgba(3, 5, 9, 0.85) 100%);
}
.content-hero .watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  opacity: 0.8;
  filter: drop-shadow(0 0 32px rgba(126, 201, 255, 0.5));
  z-index: 1;
}
.content-hero .hero-meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  z-index: 2;
}

/* ─── Login page ─── */
.login-wrap {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}
.login-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--glow-panel), 0 0 48px var(--ice-glow-soft);
}
.login-card .logo {
  width: 120px; height: 120px;
  margin: 0 auto var(--sp-4);
  filter: drop-shadow(0 0 24px var(--ice-glow));
}
.login-card h1 {
  font-size: 28px;
  margin-bottom: var(--sp-2);
}
.login-card .sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: var(--sp-6);
}

.steam-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, #1b2838 0%, #0f1822 100%);
  border: 1px solid #3a5a7a;
  color: #fff;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: all 0.2s;
}
.steam-btn:hover {
  background: linear-gradient(180deg, #2a3b50 0%, #1b2838 100%);
  border-color: var(--ice);
  color: #fff;
  box-shadow: 0 0 24px var(--ice-glow-soft);
}
.steam-btn svg { width: 24px; height: 24px; flex-shrink: 0; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-search { display: none; }
  .nav-inner { gap: var(--sp-3); }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: var(--sp-7) var(--sp-3); }
  .hero-logo { width: 140px; height: 140px; }
}
