/* =============================================
   PUPPY WEIGHT PREDICTOR — STYLES
   Clean veterinary aesthetic: navy, white, teal accents
   ============================================= */

:root {
  --navy: #0D1B2A;
  --navy-mid: #1B2E42;
  --teal: #00A896;
  --teal-light: #00BFA5;
  --teal-dark: #007A6D;
  --gold: #E8A84C;
  --white: #FFFFFF;
  --off-white: #F7F9FC;
  --light-gray: #EEF2F7;
  --mid-gray: #B0BEC5;
  --text-dark: #1A2332;
  --text-mid: #4A5568;
  --text-light: #718096;
  --danger: #E53E3E;
  --success: #38A169;
  --warning: #D69E2E;
  --border: #DDE3EA;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', Arial, sans-serif;
  --transition: all 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; transition: var(--transition); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== NAV ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: var(--navy);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 68px;
  max-width: 1140px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
}

.logo-icon {
  color: var(--teal);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.logo-accent { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.btn-nav-login {
  background: var(--teal);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-nav-login:hover { background: var(--teal-light); }

.user-area {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(13,27,42,0.88) 0%, rgba(0,168,150,0.3) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 120px 24px 80px;
  margin: 0 auto 0 8%;
}

.hero-badge {
  display: inline-block;
  background: rgba(0,168,150,0.25);
  border: 1px solid rgba(0,168,150,0.5);
  color: #7FE8DF;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 36px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--teal-light);
}

.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,168,150,0.35);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.5);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* ===================== SECTIONS ===================== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--navy);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===================== PREDICTOR TOOL ===================== */
.predictor-section {
  padding: 80px 0;
  background: var(--off-white);
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 780px;
  margin: 0 auto 48px;
}

.mode-tabs {
  display: flex;
  border-bottom: 2px solid var(--light-gray);
}

.mode-tab {
  flex: 1;
  padding: 18px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.mode-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  background: rgba(0,168,150,0.04);
}

.mode-tab:hover:not(.active) {
  color: var(--navy);
  background: var(--light-gray);
}

.tab-icon { font-size: 1.1rem; }

.mode-panel { padding: 28px 28px 8px; }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--teal);
  background: rgba(0,168,150,0.03);
}

.upload-icon { font-size: 3rem; margin-bottom: 12px; }

.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.upload-hint {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.btn-upload {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.photo-preview {
  text-align: center;
}

.photo-preview img {
  max-height: 240px;
  border-radius: var(--radius);
  margin: 0 auto 16px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.btn-remove-photo {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-mid);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-photo:hover { border-color: var(--danger); color: var(--danger); }

.detected-breed-display {
  margin: 12px 0;
  padding: 14px 20px;
  background: rgba(0,168,150,0.08);
  border: 1px solid rgba(0,168,150,0.2);
  border-radius: var(--radius-sm);
}

.detection-result {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detection-label {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 500;
}

.detection-breed {
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 1rem;
}

.detection-confidence {
  font-size: 0.8rem;
  color: var(--text-light);
  background: var(--light-gray);
  padding: 2px 10px;
  border-radius: 50px;
}

/* Shared Inputs */
.shared-inputs { padding: 0 28px 24px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 120px;
  gap: 16px;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.form-input, .form-select-small {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,168,150,0.12);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 4px;
}

.weight-input-row {
  display: flex;
  gap: 8px;
}

.weight-input-row .form-input {
  flex: 1;
}

.form-select-small {
  width: auto;
  min-width: 70px;
}

.tool-error {
  margin: 0 28px 16px;
  padding: 12px 16px;
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.9rem;
}

.predict-btn-wrap {
  padding: 0 28px 28px;
}

.btn-predict {
  width: 100%;
  background: var(--teal);
  color: var(--white);
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-predict:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,168,150,0.3);
}

.btn-predict:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-loader { font-style: italic; }

/* ===================== RESULTS ===================== */
.results-section { max-width: 780px; margin: 0 auto; }

.results-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header {
  background: var(--navy);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.results-breed {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 10px;
}

.results-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-size { background: rgba(0,168,150,0.2); color: #7FE8DF; }
.badge-confidence { background: rgba(232,168,76,0.2); color: var(--gold); }

.weight-prediction-hero {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--light-gray);
}

.weight-display, .maturity-display {
  flex: 1;
  padding: 32px;
  text-align: center;
}

.maturity-display {
  border-left: 1px solid var(--light-gray);
}

.weight-label, .maturity-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.weight-value {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--navy);
  font-weight: 700;
}

.weight-value-kg {
  font-size: 1rem;
  color: var(--text-mid);
  margin-top: 4px;
}

.maturity-value {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--teal-dark);
  font-weight: 700;
}

/* Chart */
.chart-container {
  padding: 28px 32px;
  border-bottom: 1px solid var(--light-gray);
}

.chart-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 20px;
}

/* Top Matches */
.top-matches {
  padding: 24px 32px;
  border-bottom: 1px solid var(--light-gray);
}

.matches-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-breed {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.match-bar-wrap {
  flex: 2;
  background: var(--light-gray);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
}

.match-bar {
  height: 100%;
  background: var(--teal);
  border-radius: 50px;
  transition: width 0.6s ease;
}

.match-pct {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  min-width: 40px;
  text-align: right;
}

/* Methodology */
.methodology-section {
  padding: 24px 32px;
  border-bottom: 1px solid var(--light-gray);
  background: var(--off-white);
}

.methodology-title {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.methodology-text {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 8px;
}

.data-source {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

/* Breed Notes */
.breed-notes-section {
  padding: 24px 32px;
  border-bottom: 1px solid var(--light-gray);
}

.breed-notes-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.breed-notes-text {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* Save Section */
.save-section {
  padding: 24px 32px;
  text-align: center;
}

.save-prompt {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 14px;
}

.btn-save {
  background: var(--navy);
  color: var(--white);
  padding: 12px 32px;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.save-status {
  display: block;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--success);
}

/* ===================== HOW IT WORKS ===================== */
.how-it-works {
  padding: 80px 0;
  background: var(--white);
}

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

.step-card {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step-number {
  width: 52px;
  height: 52px;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ===================== SCIENCE ===================== */
.science-section {
  padding: 80px 0;
  background: var(--navy);
}

.science-section .section-title { color: var(--white); }

.science-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.science-tag {
  display: inline-block;
  background: rgba(0,168,150,0.2);
  border: 1px solid rgba(0,168,150,0.35);
  color: #7FE8DF;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.science-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 28px;
}

.science-sources {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  line-height: 1.5;
}

.source-dot {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.science-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ===================== BREED GUIDE TABLE ===================== */
.breed-guide-section {
  padding: 80px 0;
  background: var(--off-white);
}

.size-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.size-table th {
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.size-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--light-gray);
  font-size: 0.92rem;
  color: var(--text-mid);
}

.size-table tr:last-child td { border-bottom: none; }

.size-table tr:hover td { background: rgba(0,168,150,0.04); }

.size-badge {
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.size-badge.toy { background: #FFF0F6; color: #C03A8E; }
.size-badge.small { background: #F0F4FF; color: #3B5BDB; }
.size-badge.medium { background: #F0FFF4; color: #276749; }
.size-badge.large { background: #FFF4E6; color: #CC6706; }
.size-badge.giant { background: #FFF0F0; color: #C53030; }

.table-note {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

/* ===================== FAQ ===================== */
.faq-section {
  padding: 80px 0;
  background: var(--white);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}

.faq-item {
  padding: 28px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}

.faq-q {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ===================== FOOTER ===================== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-links-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.footer-links-col a {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-links-col a:hover { color: var(--teal-light); }

.footer-disclaimer {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===================== AUTH MODALS ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,42,0.7);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--light-gray);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-mid);
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); }

.modal-header { margin-bottom: 24px; }

.modal-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 0.9rem;
  color: var(--text-mid);
}

.btn-auth-submit {
  width: 100%;
  background: var(--teal);
  color: var(--white);
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.btn-auth-submit:hover { background: var(--teal-dark); }

.auth-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 12px;
}

.auth-link, .auth-link-small {
  font-size: 0.88rem;
  color: var(--teal-dark);
  text-align: center;
  display: block;
  margin-top: 12px;
}

.auth-link a { color: var(--teal-dark); font-weight: 600; }
.auth-link a:hover { color: var(--teal); }

.auth-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 10px;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.82rem;
  color: var(--text-light);
}

.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-mid);
}

.auth-switch a { color: var(--teal-dark); font-weight: 600; }

.otp-message {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 16px;
  text-align: center;
}

.verify-text {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 16px;
}

.btn-resend {
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ===================== DASHBOARD ===================== */
.dashboard-section {
  padding: 120px 0 80px;
  min-height: 80vh;
  background: var(--off-white);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-title {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--navy);
}

.dashboard-sub { color: var(--text-mid); font-size: 0.95rem; }

.predictions-loading {
  text-align: center;
  padding: 60px;
  color: var(--text-mid);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.predictions-empty {
  text-align: center;
  padding: 80px 24px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.predictions-empty h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.predictions-empty p {
  color: var(--text-mid);
  margin-bottom: 24px;
}

.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.prediction-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.prediction-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pred-card-header {
  background: var(--navy);
  padding: 20px 24px;
}

.pred-card-breed {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 4px;
}

.pred-card-date {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

.pred-card-body {
  padding: 20px 24px;
}

.pred-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.pred-card-label { color: var(--text-light); }

.pred-card-value {
  font-weight: 700;
  color: var(--teal-dark);
}

.pred-card-delete {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  border-top: 1px solid var(--light-gray);
  color: var(--text-light);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.pred-card-delete:hover { color: var(--danger); background: #FFF5F5; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .science-grid { grid-template-columns: 1fr; }
  .science-image { order: -1; }
  .science-image img { height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--navy);
    padding: 20px 24px;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-logo { font-size: 1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .hero-content { margin-left: 0; padding: 100px 16px 60px; }
  .hero-cta { flex-direction: column; }
  .hero-stats { gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .weight-prediction-hero { flex-direction: column; }
  .maturity-display { border-left: none; border-top: 1px solid var(--light-gray); }
  .mode-panel { padding: 20px 16px 8px; }
  .shared-inputs { padding: 0 16px 16px; }
  .predict-btn-wrap { padding: 0 16px 20px; }
  .results-header { padding: 20px; }
  .weight-display, .maturity-display { padding: 20px; }
  .chart-container, .methodology-section, .breed-notes-section, .save-section { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .modal-box { padding: 28px 20px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .size-table th, .size-table td { padding: 12px 14px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .hero-subtitle { font-size: 0.92rem; }
  .hero-badge { font-size: 0.7rem; }
}
