/* puppyKRON Community Portal — shared styles */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #020617;
  --bg-card: rgba(7, 17, 31, 0.82);
  --bg-card-2: rgba(15, 23, 42, 0.9);
  --bg-card-border: rgba(251, 191, 36, 0.2);
  --accent-gold: #fbbf24;
  --accent-orange: #f97316;
  --accent-coral: #fb7185;
  --accent-violet: #7c3aed;
  --accent-green: #10b981;
  --accent-amber: #fbbf24;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --font-display: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 700px at 80% -8%, rgba(251, 191, 36, 0.12), transparent 58%),
    radial-gradient(900px 600px at 0% 100%, rgba(251, 113, 133, 0.1), transparent 55%),
    var(--bg-deep);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 3px; }

#nav-mount { position: relative; z-index: 1000; }

.nav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.12);
  flex-wrap: wrap; gap: 12px;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo:hover { text-decoration: none; }

.logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: conic-gradient(from 180deg, var(--accent-gold), var(--accent-orange), var(--accent-violet), var(--accent-gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
}

.logo-text {
  font-weight: 800; font-size: 15px; letter-spacing: -0.02em; color: var(--text-primary);
}

.logo-text span {
  display: block; font-size: 9px; letter-spacing: 0.18em;
  color: var(--accent-gold); font-weight: 600; text-transform: uppercase;
}

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; margin-left: auto;
  border: 1px solid rgba(251, 191, 36, 0.25); border-radius: 10px;
  background: rgba(251, 191, 36, 0.06); cursor: pointer; flex-shrink: 0;
}

.nav-toggle span {
  display: block; width: 100%; height: 2px; background: var(--accent-gold);
  border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: flex; gap: 6px; align-items: center; list-style: none;
  flex-wrap: wrap; margin: 0; padding: 0;
}

.nav-links li { display: flex; align-items: center; }

.nav-links a {
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary); background: rgba(251, 191, 36, 0.08); text-decoration: none;
}

.nav-links a.active { color: var(--accent-gold); background: rgba(251, 191, 36, 0.1); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: all 0.2s ease; text-decoration: none; white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  color: #111827; box-shadow: 0 0 24px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04); color: var(--text-primary);
  border-color: rgba(251, 191, 36, 0.25);
}

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-sm { padding: 7px 13px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap-narrow { max-width: 840px; }

.page-head { margin-bottom: 28px; }

.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 14px;
}

h1 {
  font-weight: 800; font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15; letter-spacing: -0.03em;
}

h2 { font-weight: 700; font-size: clamp(20px, 3vw, 28px); margin-bottom: 8px; }
h3 { font-weight: 700; font-size: 18px; }

.muted { color: var(--text-secondary); }
.lead { color: var(--text-secondary); font-size: 16px; max-width: 680px; }

.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.card h3 { margin-bottom: 6px; }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .label {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.stat .value { font-weight: 700; font-size: 24px; color: var(--text-primary); }
.stat .value.gold { color: var(--accent-gold); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 20px; border: 1px solid transparent;
  text-transform: uppercase;
}

.badge.gray { background: rgba(156, 163, 175, 0.12); color: var(--text-secondary); border-color: rgba(156, 163, 175, 0.25); }
.badge.gold { background: rgba(251, 191, 36, 0.1); color: var(--accent-gold); border-color: rgba(251, 191, 36, 0.3); }
.badge.green { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border-color: rgba(16, 185, 129, 0.3); }
.badge.amber { background: rgba(251, 191, 36, 0.1); color: var(--accent-amber); border-color: rgba(251, 191, 36, 0.3); }
.badge.coral { background: rgba(251, 113, 133, 0.1); color: var(--accent-coral); border-color: rgba(251, 113, 133, 0.3); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field.full { grid-column: 1 / -1; }

label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 10px; padding: 12px 14px; transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

textarea { min-height: 110px; resize: vertical; }
select option { background: #0f172a; color: var(--text-primary); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; font-size: 13px; color: var(--text-secondary);
}

.checkbox-row input { width: auto; margin-top: 3px; }
.hint { font-size: 12px; color: var(--text-muted); }

.alert { border-radius: 12px; padding: 14px 16px; font-size: 13px; margin: 14px 0; border: 1px solid; }
.alert.info { background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.3); color: #bae6fd; }
.alert.warn { background: rgba(251, 191, 36, 0.07); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }
.alert.danger { background: rgba(248, 113, 113, 0.07); border-color: rgba(248, 113, 113, 0.3); color: #fecaca; }
.alert.success { background: rgba(16, 185, 129, 0.07); border-color: rgba(16, 185, 129, 0.3); color: #a7f3d0; }
.alert strong { display: block; margin-bottom: 4px; font-weight: 700; letter-spacing: 0.02em; }

.mono { font-family: var(--font-mono); }
.addr { font-family: var(--font-mono); font-size: 12px; word-break: break-all; color: var(--accent-gold); }

.divider { height: 1px; background: rgba(251, 191, 36, 0.12); margin: 28px 0; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 2000; padding: 12px 20px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.96); border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(16, 185, 129, 0.4); color: #a7f3d0; }
.toast.error { border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }

.portal-footer {
  padding: 28px 24px 40px; text-align: center;
  font-size: 12px; color: var(--text-muted);
  border-top: 1px solid rgba(251, 191, 36, 0.08);
}

.portal-footer a { color: var(--accent-gold); }

.checklist { list-style: none; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px; color: var(--text-secondary);
}

.checklist li.done { color: var(--text-primary); }
.checklist .check {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  border: 1px solid rgba(251, 191, 36, 0.3);
  display: grid; place-items: center; font-size: 12px;
}

.checklist li.done .check {
  background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: var(--accent-green);
}

@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: 12px 0 4px; border-top: 1px solid rgba(251, 191, 36, 0.1);
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 14px; }
}
