/* ══════════════════════════════════════════════════════════════
   Init1 Security — Shared Theme
   Dark theme with red accent for all platform pages
   ══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  min-height: 100vh;
}
a { color: #e63946; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* ── Color Tokens ─────────────────────────────────────────── */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --border: #21262d;
  --border-light: #30363d;
  --accent: #e63946;
  --accent-hover: #c22a36;
  --accent-glow: rgba(230, 57, 70, 0.15);
  --text-primary: #e6edf3;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --text-faint: #484f58;
  --success: #238636;
  --code-bg: #1a1e24;
}

/* ── Site Header ──────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header .brand:hover { text-decoration: none; }
.site-header .brand-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.site-header .brand-text {
  font-size: 15px; color: var(--text-primary); font-weight: 600;
}
.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  border: none;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-faint);
  background: var(--bg-tertiary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-large {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus { border-color: var(--accent); }
.form-input.error { border-color: var(--accent); }
.form-error {
  font-size: 12px;
  color: var(--accent);
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

/* ── Toast Notification ───────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-tertiary); color: var(--text-secondary);
  border: 1px solid var(--border-light); border-left: 3px solid var(--accent);
  padding: 12px 20px; border-radius: 6px;
  font-size: 13px; z-index: 9999;
  opacity: 0; transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateY(0); }

/* ── Loading Spinner ──────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Badge / Pill ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.badge-accent {
  background: var(--accent-glow);
  color: var(--accent);
}
.badge-success {
  background: rgba(35, 134, 54, 0.15);
  color: var(--success);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-primary); }

/* ── Utility ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .site-header { padding: 14px 18px; }
  .site-header .brand-text { display: none; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .btn-large { padding: 11px 22px; font-size: 14px; }
}
