/* NameSpace — Stylesheet
   Aesthetic: Warm editorial / academic reference site
   Fonts: Playfair Display (headings) + DM Sans (UI/body)
   Palette: warm paper, deep navy, warm gold accents
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #F8F6F1;
  --bg-card:    #FFFFFF;
  --bg-subtle:  #F0ECE4;
  --border:     #DDD8CC;
  --border-light: #EDEAE3;
  --navy:       #1C3557;
  --navy-mid:   #2A4A78;
  --navy-light: #EBF0F7;
  --gold:       #8A6920;
  --gold-light: #F5EDD8;
  --text:       #1A1A1A;
  --text-mid:   #4A4A4A;
  --text-muted: #7A7670;
  --accent-red: #8B2020;
  --radius:     6px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  --max-w:      780px;
  --max-w-wide: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--navy-mid); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--navy); }

/* ─── Site Header ────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 0;
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo .logo-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-logo .logo-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Header search bar (compact) */
.header-search {
  flex: 1;
  min-width: 220px;
  max-width: 480px;
}

.header-search form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 40px;
  padding: 0 6px 0 16px;
  transition: background .2s, border-color .2s;
}

.header-search form:focus-within {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
}

.header-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 8px 0;
}

.header-search input::placeholder { color: rgba(255,255,255,0.50); }

.header-search button {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 40px;
  color: #fff;
  cursor: pointer;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background .15s;
  white-space: nowrap;
}

.header-search button:hover { background: rgba(255,255,255,0.25); }

/* Web search bar in header */
.header-websearch {
  flex-shrink: 0;
}

.header-websearch form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-websearch input {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 7px 12px;
  outline: none;
  width: 180px;
  transition: background .2s, border-color .2s;
}

.header-websearch input::placeholder { color: rgba(255,255,255,0.45); }
.header-websearch input:focus { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.40); }

.header-websearch button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 4px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  padding: 7px 12px;
  transition: all .15s;
}

.header-websearch button:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  align-items: center;
}

.nav-inner a {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-mid);
  padding: 12px 16px;
  display: block;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  letter-spacing: 0.01em;
}

.nav-inner a:hover, .nav-inner a.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
  text-decoration: none;
}

/* ─── Hero / Landing Search ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, #243D68 55%, #1C3557 100%);
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: #C4A96E;
}

.hero p.tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.70);
  margin-bottom: 40px;
  font-weight: 300;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero search form */
.hero-search {
  max-width: 560px;
  margin: 0 auto;
}

.hero-search form {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  padding: 6px 6px 6px 24px;
  gap: 8px;
}

.hero-search input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--text);
  padding: 10px 0;
}

.hero-search input[type="text"]::placeholder {
  color: #BBB5A8;
  font-style: italic;
}

.hero-search button {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.hero-search button:hover { background: var(--navy-mid); }
.hero-search button:active { transform: scale(0.97); }

.hero-hint {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.hero-hint a { color: rgba(255,255,255,0.65); }
.hero-hint a:hover { color: rgba(255,255,255,0.90); }

/* ─── Page Layout ────────────────────────────────────────────────────────── */
.page-content {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ─── Name Result Page ───────────────────────────────────────────────────── */
.name-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.name-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, #C4A96E 50%, var(--navy) 100%);
}

.name-display {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.name-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 40px;
  border: 1px solid;
}

.badge-origin {
  background: var(--navy-light);
  color: var(--navy);
  border-color: #BFD0E8;
}

.badge-gender-f {
  background: #FDF0F5;
  color: #7D2C5E;
  border-color: #E8C0D8;
}

.badge-gender-m {
  background: #EEF5FF;
  color: #2048A0;
  border-color: #BBCFEE;
}

.badge-gender-u {
  background: var(--bg-subtle);
  color: var(--text-mid);
  border-color: var(--border);
}

.name-meaning-block {
  background: var(--gold-light);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin-bottom: 4px;
}

.name-meaning-block .meaning-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.name-meaning-block p {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.12rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

.name-poem-block {
  background: linear-gradient(135deg, #f5f0ff 0%, #ede6ff 100%);
  border-left: 3px solid #9b6fd4;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin-top: 10px;
}

.name-poem-block .meaning-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #7c4dbd;
  margin-bottom: 6px;
}

.name-poem {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

/* ─── Content Sections ───────────────────────────────────────────────────── */
.content-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-card h2 .section-icon {
  width: 22px;
  height: 22px;
  background: var(--navy-light);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--navy);
  flex-shrink: 0;
}

.content-card p {
  color: var(--text-mid);
  font-size: 0.96rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

.content-card p:last-child { margin-bottom: 0; }

/* Name pills (variants/related) */
.name-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.name-pill {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 5px 14px;
  font-size: 0.88rem;
  color: var(--navy-mid);
  font-weight: 500;
  transition: background .15s, border-color .15s;
  text-decoration: none;
}

.name-pill:hover {
  background: var(--navy-light);
  border-color: #BFD0E8;
  text-decoration: none;
  color: var(--navy);
}

/* Famous bearers */
.bearer-list { list-style: none; }

.bearer-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.bearer-list li:last-child { border-bottom: none; padding-bottom: 0; }

.bearer-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
  font-family: 'Playfair Display', serif;
}

.bearer-info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.bearer-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Fun fact block */
.fun-fact-block {
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.fun-fact-block .ff-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.fun-fact-block p {
  font-size: 0.91rem;
  color: var(--navy);
  margin-bottom: 0;
  font-style: italic;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {}

.sidebar-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

/* Web search box in sidebar */
.websearch-card {}

.websearch-card form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.websearch-card .ws-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.websearch-card input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}

.websearch-card input:focus { border-color: var(--navy-mid); background: #fff; }

.websearch-card button {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.websearch-card button:hover { background: var(--navy-mid); }

/* ─── Google-style Search Block ──────────────────────────────────────────── */
.google-search-block {
  margin-top: 56px;
  padding: 40px 24px 36px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* Google-Logo */
.google-logo {
  font-family: 'Product Sans', 'Google Sans', Arial, sans-serif;
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 24px;
  user-select: none;
}

/* Suchfeld-Wrapper (Pill) */
.google-search-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.google-input-wrap {
  position: relative;
  width: 100%;
  max-width: 580px;
  display: flex;
  align-items: center;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #fff;
  box-shadow: none;
  transition: box-shadow .15s, border-color .15s;
}

.google-input-wrap:hover,
.google-input-wrap:focus-within {
  box-shadow: 0 1px 6px rgba(32,33,36,.28);
  border-color: rgba(223,225,229,0);
}

.google-search-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 0 12px 0 16px;
}

.google-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: #202124;
  padding: 12px 16px 12px 0;
  caret-color: #4285F4;
}

.google-input::placeholder {
  color: #9aa0a6;
}

/* Button-Reihe */
.google-btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.google-btn {
  background: #f8f9fa;
  border: 1px solid #f8f9fa;
  border-radius: 4px;
  color: #3c4043;
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  padding: 9px 20px;
  cursor: pointer;
  transition: box-shadow .1s, border-color .1s, background .1s;
}

.google-btn:hover {
  box-shadow: 0 1px 3px rgba(60,64,67,.3);
  border-color: #dadce0;
  background: #f8f9fa;
  color: #202124;
}

.google-hint {
  font-size: 0.78rem;
  color: #9aa0a6;
  margin-top: 12px;
}

/* Sidebar-Variante */
.google-logo--sm {
  font-size: 2rem;
  margin-bottom: 14px;
}

.google-sidebar-card {
  text-align: center;
}

.google-input-wrap--sidebar {
  max-width: 100%;
  width: 100%;
}

.google-btn--full {
  width: 100%;
  justify-content: center;
  padding: 10px;
  font-size: 0.875rem;
}

/* Quick name links */
.quick-links { list-style: none; }
.quick-links li { border-bottom: 1px solid var(--border-light); }
.quick-links li:last-child { border-bottom: none; }
.quick-links a {
  display: block;
  padding: 8px 0;
  font-size: 0.90rem;
  color: var(--navy-mid);
  transition: color .15s;
}
.quick-links a:hover { color: var(--navy); text-decoration: none; padding-left: 4px; }

/* ─── Landing: Popular Names Grid ────────────────────────────────────────── */
.section-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.section-sub {
  font-size: 0.90rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.name-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 16px 14px;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: box-shadow .2s, transform .15s, border-color .2s;
  box-shadow: var(--shadow-sm);
}

.name-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--border);
  text-decoration: none;
}

.name-card .nc-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}

.name-card .nc-origin {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ─── Popularity bar ─────────────────────────────────────────────────────── */
.pop-bar-wrap {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pop-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pop-bar-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

.pop-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 10px;
  overflow: hidden;
}

.pop-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-mid), var(--gold));
  border-radius: 10px;
  animation: barGrow .8s ease-out forwards;
  transform-origin: left;
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: #1A1A1A;
  color: rgba(255,255,255,0.50);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.82rem;
  line-height: 1.7;
}

.site-footer a { color: rgba(255,255,255,0.60); }
.site-footer a:hover { color: rgba(255,255,255,0.85); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ─── Admin Area ─────────────────────────────────────────────────────────── */
.admin-body {
  background: #F4F6F9;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.admin-header {
  background: var(--navy);
  color: #fff;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.admin-header .admin-badge {
  background: var(--gold);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.admin-header .admin-nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.admin-header .admin-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}

.admin-header .admin-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}

.admin-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.admin-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.admin-card h2 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E8ECF2;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-box .stat-val {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  display: block;
}

.stat-box .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 4px;
}

/* Log table */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.log-table th {
  text-align: left;
  padding: 8px 12px;
  background: #F4F6F9;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.log-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-mid);
  vertical-align: top;
}

.log-table tr:last-child td { border-bottom: none; }
.log-table tr:hover td { background: var(--bg); }

.log-table .ev-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.ev-api_send    { background: #D1FAE5; color: #065F46; }
.ev-trigger_eval{ background: #DBEAFE; color: #1E40AF; }
.ev-name_resolve{ background: #FEF3C7; color: #92400E; }
.ev-trigger_skip{ background: #F3F4F6; color: #6B7280; }
.ev-google_search{ background: #EDE9FE; color: #5B21B6; }
.ev-name_search { background: #FCE7F3; color: #9D174D; }

/* Admin login */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}

.admin-login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}

.admin-login-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.admin-login-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-group input[type="password"],
.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy-mid);
  background: #fff;
}

.btn-primary {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  letter-spacing: 0.02em;
}

.btn-primary:hover { background: var(--navy-mid); }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }

/* ─── Utilities & Responsive ─────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 600px) {
  .header-inner { gap: 16px; padding: 14px 16px; }
  .header-websearch { display: none; }
  .hero { padding: 48px 16px 56px; }
  .name-hero { padding: 28px 22px; }
  .content-card { padding: 24px 20px; }
  .page-content { padding: 24px 16px 60px; }
  .admin-main { padding: 20px 16px 60px; }
  .admin-card { padding: 20px 18px; }
  .two-col { gap: 24px; }
}
