/* ═══════════════════════════════════════════════════════════════════════════
   DiscoverWashingtonLiving.com — PNW-Inspired Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --color-evergreen: #2D5F2D;
  --color-evergreen-light: #3A7A3A;
  --color-slate: #4A5568;
  --color-mountain: #2B6CB0;
  --color-sunset: #D97706;
  --color-fog: #F7FAFC;
  --color-cedar: #8B5E3C;
  --bg-page: #FAFAF7;
  --bg-card: #FFFFFF;
  --radius: 12px;
  --shadow: 0 2px 20px rgba(45,95,45,0.08);
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-slate);
  background: var(--bg-page);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-evergreen); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-evergreen-light); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #1a202c;
  line-height: 1.3;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Flash Messages ─────────────────────────────────────────────────────── */
.flash-messages { padding: 0.5rem 1.5rem; }
.flash { padding: 0.75rem 1.25rem; border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.95rem; }
.flash-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.flash-error { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.flash-info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-evergreen);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-logo:hover { color: var(--color-evergreen-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-slate);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-evergreen); }

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -0.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 240px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s;
  z-index: 999;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}
.nav-dropdown-menu a:hover { background: var(--color-fog); }

.nav-cta {
  background: var(--color-sunset);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: #b45309; color: #fff !important; transform: translateY(-1px); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-slate);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-120%);
    transition: transform 0.3s;
  }
  .nav-links.active { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.75rem 0; border-bottom: 1px solid #f0f0f0; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  .nav-cta { display: block; text-align: center; margin-top: 0.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
              url('/static/images/hero-pnw.jpg') center/cover no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 3rem 1.5rem;
}

.hero h1 {
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 1rem;
  max-width: 700px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.hero-cta {
  display: inline-block;
  background: var(--color-sunset);
  color: #fff;
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.05rem;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta:hover { background: #b45309; color: #fff; transform: translateY(-2px); }

/* Post hero */
.post-hero {
  background-size: cover;
  background-position: center;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.post-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.65));
}
.post-hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WHY SECTION (home page tiles)
   ═══════════════════════════════════════════════════════════════════════════ */

.section { padding: 4rem 0; }
.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.why-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
}
.why-card:hover { transform: translateY(-4px); }
.why-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.why-card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.why-card p { font-size: 0.95rem; color: #718096; }

/* ═══════════════════════════════════════════════════════════════════════════
   POST CARDS / GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 4px 30px rgba(45,95,45,0.12); }

.post-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-body { padding: 1.25rem; }

.post-card-cat {
  display: inline-block;
  background: #ebf8ff;
  color: var(--color-mountain);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.post-card-title a { color: #1a202c; }
.post-card-title a:hover { color: var(--color-evergreen); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: #718096;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-size: 0.82rem;
  color: #a0aec0;
  margin-top: 0.75rem;
}

/* Featured post card */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.featured-card-img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.featured-card-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.featured-card-body h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.featured-card-body p { color: #718096; margin-bottom: 1.25rem; }

@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORIES GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s;
  border: 2px solid transparent;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--color-evergreen); }
.cat-card h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.cat-card .count { font-size: 0.85rem; color: #a0aec0; }

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE POST PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.breadcrumb {
  font-size: 0.85rem;
  color: #a0aec0;
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--color-mountain); }

.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.post-content h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.post-content h2 { font-size: 1.6rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--color-evergreen); }
.post-content h3 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
  border-left: 4px solid var(--color-evergreen);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #f0fff4;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content a { color: var(--color-mountain); text-decoration: underline; }
.post-content strong { color: #1a202c; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.post-content th, .post-content td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  text-align: left;
}
.post-content th { background: var(--color-fog); font-weight: 600; }

/* TL;DR box */
.tldr-box {
  background: #ebf8ff;
  border-left: 4px solid var(--color-mountain);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.tldr-box strong { color: var(--color-mountain); }

/* FAQ section */
.faq-item { margin-bottom: 1.5rem; }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* Post meta bar */
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  color: #a0aec0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Top CTA banner */
.post-cta-banner {
  background: linear-gradient(135deg, #f0fff4, #ebf8ff);
  border: 1px solid #c6f6d5;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 0.95rem;
}
.post-cta-banner a { font-weight: 600; }

/* Bottom CTA box */
.post-cta-box {
  background: var(--color-evergreen);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
}
.post-cta-box h2 { color: #fff; margin-bottom: 1rem; font-size: 1.5rem; }
.post-cta-box p { opacity: 0.9; margin-bottom: 1.5rem; }
.post-cta-box .btn { margin: 0 0.5rem; }

/* Share buttons */
.share-row {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
}
.share-btn:hover { opacity: 0.85; color: #fff; }
.share-btn-x { background: #000; }
.share-btn-fb { background: #1877f2; }
.share-btn-copy { background: var(--color-slate); }

/* Author credit */
.author-credit {
  font-size: 0.9rem;
  color: #a0aec0;
  text-align: center;
  margin: 2rem 0;
  font-style: italic;
}

/* Related posts */
.related-section { margin-top: 3rem; border-top: 1px solid #e2e8f0; padding-top: 2rem; }
.related-section h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s;
  text-align: center;
}

.btn-primary { background: var(--color-evergreen); color: #fff; }
.btn-primary:hover { background: var(--color-evergreen-light); color: #fff; transform: translateY(-1px); }

.btn-sunset { background: var(--color-sunset); color: #fff; }
.btn-sunset:hover { background: #b45309; color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--color-evergreen);
  border: 2px solid var(--color-evergreen);
}
.btn-outline:hover { background: var(--color-evergreen); color: #fff; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-white { background: #fff; color: var(--color-evergreen); }
.btn-white:hover { background: #f0fff4; color: var(--color-evergreen); }

/* ═══════════════════════════════════════════════════════════════════════════
   LEAD CAPTURE WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */

.lead-widget {
  background: linear-gradient(135deg, #f0fff4, #ebf8ff);
  border: 2px solid #c6f6d5;
  border-radius: var(--radius);
  padding: 2.5rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.lead-widget-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.lead-widget-header h3 {
  font-size: 1.4rem;
  color: var(--color-evergreen);
  margin-bottom: 0.5rem;
}
.lead-widget-header p { color: #718096; font-size: 0.95rem; }

/* Progress dots */
.quiz-progress {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.quiz-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #cbd5e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a0aec0;
  transition: all 0.3s;
}
.quiz-dot.active { border-color: var(--color-evergreen); color: var(--color-evergreen); background: #f0fff4; }
.quiz-dot.done { border-color: var(--color-evergreen); color: #fff; background: var(--color-evergreen); }

/* Quiz step */
.quiz-step { display: none; }
.quiz-step.active { display: block; }

.quiz-step h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #1a202c;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.quiz-pill {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  color: var(--color-slate);
}
.quiz-pill:hover { border-color: var(--color-evergreen); color: var(--color-evergreen); }
.quiz-pill.selected {
  border-color: var(--color-evergreen);
  background: var(--color-evergreen);
  color: #fff;
}

/* Contact form within widget */
.lead-form {
  max-width: 480px;
  margin: 0 auto;
}

.lead-form .form-group {
  margin-bottom: 1rem;
}

.lead-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #1a202c;
}

.lead-form input,
.lead-form select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.lead-form input:focus,
.lead-form select:focus {
  outline: none;
  border-color: var(--color-evergreen);
}

.lead-form .consent-label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.8rem;
  color: #718096;
  line-height: 1.4;
  cursor: pointer;
}
.lead-form .consent-label input[type="checkbox"] { width: auto; margin-top: 3px; }

.lead-form .disclaimer-text {
  font-size: 0.72rem;
  color: #a0aec0;
  margin-top: 0.75rem;
  line-height: 1.4;
}

.lead-form .submit-btn {
  width: 100%;
  background: var(--color-sunset);
  color: #fff;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.lead-form .submit-btn:hover { background: #b45309; }
.lead-form .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.lead-success {
  text-align: center;
  padding: 2rem;
}
.lead-success h3 { color: var(--color-evergreen); margin-bottom: 0.5rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.page-header {
  background: var(--color-fog);
  padding: 3rem 0;
  margin-bottom: 2rem;
}
.page-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-header p { color: #718096; font-size: 1rem; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #a0aec0;
}
.empty-state h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT / CONTACT / STATIC PAGES
   ═══════════════════════════════════════════════════════════════════════════ */

.static-page { padding: 3rem 0; }
.static-page h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.static-page h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--color-evergreen); }
.static-page p { margin-bottom: 1rem; }
.static-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.static-page li { margin-bottom: 0.5rem; }

/* Contact page trust items */
.trust-items {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Agent card */
.agent-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}
.agent-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}
.agent-card h3 { margin-bottom: 0.25rem; }
.agent-card p { font-size: 0.9rem; color: #718096; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
  background: #1a202c;
  color: #cbd5e0;
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer a { color: #a0aec0; font-size: 0.9rem; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.4rem; }

.footer-about {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2d3748;
  text-align: center;
  font-size: 0.8rem;
  color: #718096;
}

.footer-disclaimer {
  max-width: 800px;
  margin: 1rem auto 0;
  font-size: 0.72rem;
  color: #4a5568;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-content h1 { font-size: 1.7rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════════════════════════ */

.error-page {
  text-align: center;
  padding: 5rem 1.5rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.error-page h1 { font-size: 5rem; color: var(--color-evergreen); margin-bottom: 0.5rem; }
.error-page h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.error-page p { color: #718096; margin-bottom: 2rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.admin-body { background: #f5f7fa; }

.admin-nav {
  background: var(--color-evergreen);
  color: #fff;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-nav a { color: #fff; }
.admin-nav-links { display: flex; gap: 1.5rem; align-items: center; }
.admin-nav-links a { font-size: 0.9rem; opacity: 0.85; }
.admin-nav-links a:hover { opacity: 1; }

.admin-container { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-evergreen);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 0.25rem;
}

/* Admin post cards */
.admin-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.25rem;
}

.admin-post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-post-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.admin-post-card-body { padding: 1rem; }

.admin-post-card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.admin-post-card-title a { color: #1a202c; }

.admin-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #a0aec0;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: #f0fff4; color: #276749; }
.badge-yellow { background: #fffff0; color: #975a16; }
.badge-red { background: #fff5f5; color: #c53030; }
.badge-blue { background: #ebf8ff; color: #2b6cb0; }
.badge-gray { background: #f7fafc; color: #718096; }

.rating-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.rating-badge {
  font-size: 0.78rem;
  font-weight: 600;
}

.toggle-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}
.toggle-btn {
  cursor: pointer;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  transition: all 0.2s;
}
.toggle-btn.active { background: var(--color-evergreen); color: #fff; border-color: var(--color-evergreen); }

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.admin-actions .btn { font-size: 0.8rem; padding: 0.35rem 0.85rem; }

/* Admin status badges */
.improve-status {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
}
.improve-status-idle { background: #f7fafc; color: #a0aec0; }
.improve-status-running { background: #ebf8ff; color: #2b6cb0; }
.improve-status-done { background: #f0fff4; color: #276749; }
.improve-status-failed { background: #fff5f5; color: #c53030; }

/* Generate button panel */
.generate-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.generate-panel .gen-status {
  font-size: 0.9rem;
  color: #718096;
}

/* Post editor */
.edit-form { max-width: 1000px; margin: 0 auto; }
.edit-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.edit-form .form-group { margin-bottom: 1.25rem; }
.edit-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #1a202c;
}
.edit-form input,
.edit-form select,
.edit-form textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.edit-form input:focus,
.edit-form select:focus,
.edit-form textarea:focus {
  outline: none;
  border-color: var(--color-evergreen);
}
.edit-form textarea.content-editor {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.88rem;
  min-height: 600px;
  line-height: 1.6;
  resize: vertical;
}
.edit-form .image-preview {
  max-width: 300px;
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

/* Grok rewrite panel */
.grok-panel {
  background: #fffff0;
  border: 2px solid #fefcbf;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}
.grok-panel h3 { margin-bottom: 1rem; }
.grok-panel textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: var(--font-body);
  margin-bottom: 1rem;
  resize: vertical;
}

/* Admin leads */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-slate);
  background: var(--bg-card);
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--color-evergreen); }
.filter-tab.active { background: var(--color-evergreen); color: #fff; border-color: var(--color-evergreen); }

.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.leads-table th, .leads-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.88rem;
}
.leads-table th {
  background: var(--color-fog);
  font-weight: 600;
  color: #1a202c;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.leads-table tr:hover { background: #fafafa; }

/* Lead detail page */
.lead-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.dnc-panel {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.dnc-green { background: #f0fff4; border: 1px solid #c6f6d5; color: #276749; }
.dnc-yellow { background: #fffff0; border: 1px solid #fefcbf; color: #975a16; }
.dnc-red { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }

.detail-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.detail-item {
  margin-bottom: 0.75rem;
}
.detail-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #a0aec0;
  margin-bottom: 0.15rem;
}
.detail-value { font-size: 0.95rem; color: #1a202c; }

.status-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.notes-area {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

/* Billing page */
.billing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.billing-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
}
.invoice-table th, .invoice-table td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.88rem;
}
.invoice-table th { font-size: 0.8rem; text-transform: uppercase; color: #718096; }

/* Admin login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2D5F2D, #1a3d1a);
}
.login-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-card h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}
.login-card .subtitle {
  text-align: center;
  color: #a0aec0;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
.login-card .form-group { margin-bottom: 1rem; }
.login-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
}
.login-card input:focus {
  outline: none;
  border-color: var(--color-evergreen);
}
.login-card .btn { width: 100%; }

@media (max-width: 768px) {
  .admin-posts-grid { grid-template-columns: 1fr; }
  .edit-form .form-row { grid-template-columns: 1fr; }
  .lead-detail-grid { grid-template-columns: 1fr; }
  .billing-grid { grid-template-columns: 1fr; }
}
