/* Return2Sleep - Main Styles */

:root {
  /* National Lottery inspired color scheme */
  --primary: #e30b5d;
  --primary-hover: #c40a52;
  --primary-light: #fff0f5;
  --accent: #00a99d;
  --accent-hover: #008f84;
  --navy: #1b1464;
  --navy-light: #2a237a;
  --yellow: #ffd100;
  --yellow-hover: #e6bc00;
  --purple: #6f2c91;
  --teal: #00b7c6;
  --background: #ffffff;
  --card: #ffffff;
  --foreground: #1b1464;
  --foreground-muted: #5a5580;
  --border: #e0ddf0;
  --destructive: #ef4444;
  --destructive-hover: #dc2626;
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(27,20,100,0.05);
  --shadow: 0 1px 3px rgba(27,20,100,0.1), 0 1px 2px rgba(27,20,100,0.06);
  --shadow-md: 0 4px 6px rgba(27,20,100,0.1), 0 2px 4px rgba(27,20,100,0.06);
  --shadow-lg: 0 10px 15px rgba(27,20,100,0.1), 0 4px 6px rgba(27,20,100,0.05);
  --radius: 8px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .container {
    padding: 0 24px;
  }
}

/* Typography - Mobile First */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

@media (min-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

@media (min-width: 900px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-secondary {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--background);
}

.btn-danger {
  background: var(--destructive);
  color: white;
}

.btn-danger:hover {
  background: var(--destructive-hover);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.0625rem;
}

.btn-full {
  width: 100%;
}

/* Header - Mobile First */
.site-header {
  background: var(--navy);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.logo-icon {
  width: 24px;
  height: 24px;
}

/* Desktop nav - hidden on mobile */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

.desktop-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.desktop-nav a:hover {
  color: white;
}

.desktop-nav .btn-primary {
  background: var(--yellow);
  color: var(--navy);
}

.desktop-nav .btn-primary:hover {
  background: var(--yellow-hover);
}

/* Mobile menu button - visible on mobile */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: white;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

/* Mobile navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy);
  overflow-y: auto;
  z-index: 99;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-content {
  padding: 20px;
}

.mobile-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--yellow);
  color: var(--navy);
  margin-bottom: 24px;
  font-size: 1.125rem;
  padding: 14px 24px;
}

.mobile-cta:hover {
  background: var(--yellow-hover);
}

.mobile-nav-section {
  margin-bottom: 24px;
}

.mobile-nav-section h3 {
  color: var(--yellow);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-section a {
  display: block;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 10px 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-nav-section a:hover {
  color: var(--yellow);
}

/* Desktop styles */
@media (min-width: 769px) {
  .site-header .container {
    height: 64px;
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    width: 28px;
    height: 28px;
  }
  
  .desktop-nav {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: none;
  }
  
  .mobile-nav {
    display: none !important;
  }
}

/* Footer */
.site-footer {
  background: var(--foreground);
  color: white;
  padding: 64px 0 32px;
  margin-top: 80px;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
}

.footer-tagline {
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
}

.footer-links h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.5);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.affiliate-disclosure {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.copyright {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

/* Hero Section - Mobile First */
.hero {
  padding: 48px 0 60px;
  background: linear-gradient(135deg, var(--primary) 0%, #c40a52 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: var(--primary);
  border-radius: 0 0 0 50%;
  z-index: 0;
  display: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 1.75rem;
  margin-bottom: 16px;
  color: white;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin: 0 auto 24px;
  max-width: 500px;
}

.hero-note {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.8);
}

.hero .btn-primary {
  background: white;
  color: var(--primary);
  font-weight: 600;
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
}

.hero .btn-primary:hover {
  background: rgba(255,255,255,0.9);
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Hero tablet+ */
@media (min-width: 600px) {
  .hero {
    padding: 60px 0 80px;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero .btn-primary {
    width: auto;
  }
  
  .hero-stats {
    flex-direction: row;
    gap: 40px;
    padding: 32px;
  }
}

/* Hero desktop */
@media (min-width: 900px) {
  .hero {
    padding: 80px 0 100px;
  }
  
  .hero::before {
    display: block;
  }
  
  .hero .container {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    text-align: left;
  }
  
  .hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    margin: 0 0 32px 0;
  }
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

/* How It Works */
.how-it-works {
  padding: 80px 0;
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

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

.step-card {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 20px;
}

.step-card h3 {
  margin-bottom: 12px;
}

.step-card p {
  color: var(--foreground-muted);
  font-size: 0.9375rem;
}

/* Features */
.features-section {
  padding: 80px 0;
  background: var(--primary-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

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

.feature-card {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--foreground-muted);
  font-size: 0.9375rem;
}

/* Mattress Categories - Mobile First */
.mattress-categories {
  padding: 48px 0;
  background: #f8f7fc;
}

.mattress-categories h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.category-column {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.category-column h3 {
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.category-column a {
  display: block;
  color: var(--foreground);
  text-decoration: none;
  padding: 8px 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s ease;
}

.category-column a:last-child {
  border-bottom: none;
}

.category-column a:hover {
  color: var(--primary);
}

@media (min-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .mattress-categories {
    padding: 80px 0;
  }
  
  .mattress-categories h2 {
    font-size: 1.875rem;
    margin-bottom: 40px;
  }
  
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Search Icon (legacy support) */
.search-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  width: 100%;
  height: 100%;
}

.search-text {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: var(--primary);
  text-align: center;
}

.cta-content h2 {
  color: white;
  margin-bottom: 16px;
}

.cta-content p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  font-size: 1.125rem;
}

.cta-section .btn-primary {
  background: white;
  color: var(--primary);
}

.cta-section .btn-primary:hover {
  background: rgba(255,255,255,0.9);
}

/* Landing Pages */
.landing-hero {
  padding: 60px 0 80px;
  background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
  text-align: center;
}

.landing-hero h1 {
  margin-bottom: 16px;
}

.landing-subtitle {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.landing-content {
  padding: 60px 0;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.content-wrapper h2 {
  margin-top: 40px;
  margin-bottom: 20px;
}

.content-wrapper p {
  margin-bottom: 20px;
  color: var(--foreground);
}

.content-wrapper ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.content-wrapper li {
  margin-bottom: 8px;
}

/* How Matching Works */
.how-matching-works {
  padding: 60px 0;
  background: var(--background);
}

.how-matching-works h2 {
  text-align: center;
  margin-bottom: 40px;
}

.matching-steps {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.matching-step {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 300px;
}

.matching-step-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matching-step-icon svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

.matching-step p {
  font-size: 0.9375rem;
  color: var(--foreground-muted);
}

/* Related Searches */
.related-searches {
  padding: 60px 0;
}

.related-searches h2 {
  text-align: center;
  margin-bottom: 32px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.related-link {
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  color: var(--foreground);
  font-size: 0.9375rem;
  transition: all 0.15s ease;
}

.related-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Quiz */
.quiz-section {
  padding: 40px 0 80px;
  min-height: calc(100vh - 64px);
}

.quiz-container {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-header {
  text-align: center;
  margin-bottom: 40px;
}

.quiz-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.quiz-header p {
  color: var(--foreground-muted);
  margin-bottom: 24px;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
  width: 12.5%;
}

.progress-text {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
}

.quiz-form {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

@media (max-width: 600px) {
  .quiz-form {
    padding: 24px;
  }
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
}

.quiz-step h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.step-description {
  color: var(--foreground-muted);
  margin-bottom: 32px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.option-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.option-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

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

.option-card {
  cursor: pointer;
}

.option-card input {
  position: absolute;
  opacity: 0;
}

.option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.option-card:hover .option-content {
  border-color: var(--primary);
}

.option-card input:checked + .option-content {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-icon svg {
  width: 100%;
  height: 100%;
}

.option-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.option-description {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.input-group input {
  flex: 1;
  padding: 14px 16px;
  font-size: 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  max-width: 200px;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-suffix {
  font-size: 1rem;
  color: var(--foreground-muted);
}

.input-hint {
  font-size: 0.875rem;
  color: var(--foreground-muted);
  margin-bottom: 32px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.quiz-loading {
  text-align: center;
  padding: 60px 40px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Results */
.results-section {
  padding: 60px 0;
}

.results-header {
  text-align: center;
  margin-bottom: 48px;
}

.results-header h1 {
  margin-bottom: 12px;
}

.results-subtitle {
  color: var(--foreground-muted);
  font-size: 1.125rem;
}

.results-grid {
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.result-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.result-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.result-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
}

.result-card.featured .result-badge {
  background: var(--accent);
}

.result-content {
  padding: 28px;
}

.result-title {
  font-size: 1.375rem;
  margin-bottom: 12px;
}

.result-explanation {
  color: var(--foreground-muted);
  margin-bottom: 20px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.result-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.attribute-badge {
  padding: 4px 12px;
  background: var(--background);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--foreground-muted);
}

.attribute-badge.cooling {
  background: #dcfce7;
  color: #166534;
}

.result-highlights {
  margin-bottom: 24px;
  padding-left: 20px;
}

.result-highlights li {
  font-size: 0.9375rem;
  margin-bottom: 6px;
  color: var(--foreground);
}

.result-cta {
  width: 100%;
}

.no-link-notice {
  display: block;
  text-align: center;
  color: var(--foreground-muted);
  font-size: 0.875rem;
}

.results-footer {
  max-width: 900px;
  margin: 48px auto 0;
  text-align: center;
}

.disclaimer {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
  margin-bottom: 24px;
  padding: 16px;
  background: var(--background);
  border-radius: var(--radius);
}

.no-results {
  text-align: center;
  padding: 60px 40px;
  background: var(--card);
  border-radius: var(--radius-lg);
}

/* Admin Styles */
.admin-body {
  background: #f1f5f9;
}

.admin-login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.admin-login-header {
  text-align: center;
  margin-bottom: 32px;
}

.admin-login-header h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.admin-login-header p {
  color: var(--foreground-muted);
}

.admin-login-form .form-group {
  margin-bottom: 20px;
}

.admin-login-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.admin-login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.admin-login-form input:focus {
  outline: none;
  border-color: var(--primary);
}

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

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: var(--foreground);
  color: white;
  display: flex;
  flex-direction: column;
}

.admin-sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

.admin-badge {
  font-size: 0.6875rem;
  padding: 2px 8px;
  background: var(--primary);
  border-radius: 100px;
}

.admin-nav {
  flex: 1;
  padding: 16px 12px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  margin-bottom: 4px;
  transition: all 0.15s ease;
}

.admin-nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-nav-link.active {
  background: var(--primary);
  color: white;
}

.admin-nav-link svg {
  width: 18px;
  height: 18px;
}

.admin-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: var(--card);
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}

.admin-header h1 {
  font-size: 1.375rem;
}

.admin-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* Admin Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.quick-actions h2,
.recent-section h2 {
  font-size: 1.125rem;
  margin-bottom: 20px;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .actions-grid {
    grid-template-columns: 1fr;
  }
}

.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--foreground);
  transition: all 0.15s ease;
}

.action-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.action-card svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
}

.action-card span {
  font-weight: 500;
}

.recent-section {
  margin-top: 40px;
}

/* Admin Tables */
.table-container {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--background);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.admin-table td {
  font-size: 0.9375rem;
}

.admin-table td a {
  color: var(--primary);
  text-decoration: none;
}

.admin-table td a:hover {
  text-decoration: underline;
}

.actions-cell {
  display: flex;
  gap: 8px;
}

/* Admin Mattresses */
.admin-mattresses .page-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.empty-state {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--foreground-muted);
  margin-bottom: 16px;
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--foreground-muted);
  margin-bottom: 24px;
}

/* Admin Form */
.admin-form-page {
  max-width: 900px;
}

.mattress-form {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-section {
  padding: 28px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  border-bottom: none;
}

.form-section h2 {
  font-size: 1.125rem;
  margin-bottom: 20px;
}

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

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

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
  margin-bottom: 16px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9375rem;
}

.extraction-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.extraction-status.loading {
  background: #fef3c7;
  color: #92400e;
}

.extraction-status.success {
  background: #dcfce7;
  color: #166534;
}

.extraction-status.error {
  background: #fef2f2;
  color: #991b1b;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 28px;
  background: var(--background);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
