/* ── GreenAI Design System ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #16a34a;
  --green-dark:   #15803d;
  --green-light:  #dcfce7;
  --green-50:     #f0fdf4;
  --orange:       #f97316;
  --orange-dark:  #ea6e0a;
  --orange-light: #ffedd5;
  --purple:       #7c3aed;
  --purple-dark:  #6d28d9;
  --purple-light: #ede9fe;
  --purple-50:    #f5f3ff;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-700:     #374151;
  --gray-900:     #111827;
  --red:          #dc2626;
  --red-light:    #fef2f2;
  --surface:      #ffffff;
  --bg:           #f8faff;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Navbar ── */
.navbar {
  background: var(--green);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(22,163,74,.3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-icon { font-size: 20px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.15);
  color: white;
}
.nav-user {
  position: relative;
  cursor: pointer;
}
.nav-user-name {
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
}
.nav-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.nav-user:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 14px;
  transition: background .15s;
}
.nav-dropdown a:hover { background: var(--gray-50); color: var(--green); }

/* ── Messages ── */
.messages-bar {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.alert-success { background: var(--green-light); color: #14532d; border: 1px solid #86efac; }
.alert-error    { background: var(--red-light); color: #7f1d1d; border: 1px solid #fca5a5; }
.alert-info     { background: var(--purple-light); color: #3b0764; border: 1px solid #c4b5fd; }
.alert-warning  { background: var(--orange-light); color: #7c2d12; border: 1px solid #fdba74; }
.alert-close {
  background: none; border: none; cursor: pointer;
  color: inherit; font-size: 14px; opacity: .6; flex-shrink: 0;
  line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* ── Layout ── */
.main-content { flex: 1; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.container--narrow { max-width: 680px; }
.container--result { max-width: 900px; margin: 0 auto; padding: 0 24px 48px; }

/* ── Page header ── */
.page-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 24px;
  margin-bottom: 32px;
}
.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 24px; font-weight: 800; color: var(--gray-900); }
.page-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 4px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.breadcrumb a { color: var(--green); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Cards ── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 24px;
  margin-bottom: 24px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card--danger {
  border-color: #fca5a5;
  background: #fff5f5;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-orange {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-purple {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}
.btn-purple:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.btn-outline {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-300, #d1d5db);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); background: var(--green-50); }
.btn-ghost {
  background: none;
  color: var(--gray-500);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-danger { background: var(--red); color: white; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-label-inline { font-size: 14px; color: var(--gray-700); font-weight: 500; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.optional { font-weight: 400; color: var(--gray-400); font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-section { margin-bottom: 24px; }
.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.form-group--checkbox { display: flex; align-items: center; gap: 8px; }
.form-error-box {
  background: var(--red-light);
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--red);
  margin-bottom: 16px;
}
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; }

/* Style all form inputs */
input[type="text"], input[type="email"], input[type="number"],
input[type="password"], input[type="tel"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: white;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); }
textarea { resize: vertical; min-height: 80px; }

/* ── Auth pages ── */
body.auth-page {
  background: linear-gradient(135deg, var(--green-50) 0%, var(--purple-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
body.auth-page .main-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.auth-container--wide { max-width: 680px; }
.auth-brand {
  text-align: center;
}
.auth-brand-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}
.auth-brand-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
}
.auth-brand-tagline { color: var(--gray-500); font-size: 14px; }
.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-subtitle { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }
.auth-footer-link {
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 20px;
}
.auth-footer-link a { color: var(--green); text-decoration: none; font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Dashboard ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 640px) { .stats-row { grid-template-columns: 1fr; } }
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  border-left: 4px solid;
}
.stat-card--green { border-left-color: var(--green); }
.stat-card--orange { border-left-color: var(--orange); }
.stat-card--purple { border-left-color: var(--purple); }
.stat-value { font-size: 36px; font-weight: 800; color: var(--gray-900); }
.stat-label { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-top: 4px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 18px; font-weight: 700; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.project-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.project-card--inactive { opacity: .7; }
.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.project-card-name { font-size: 16px; font-weight: 700; }
.project-card-desc { font-size: 13px; color: var(--gray-500); margin-bottom: 12px; }
.project-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 14px;
}
.project-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.quick-test-card {
  background: linear-gradient(135deg, var(--orange-light), #fff7ed);
  border: 1px solid #fdba74;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.quick-test-text h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.quick-test-text p { font-size: 13px; color: var(--gray-600, #4b5563); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge--green { background: var(--green-light); color: var(--green-dark); }
.badge--orange { background: var(--orange-light); color: #9a3412; }
.badge--purple { background: var(--purple-light); color: var(--purple-dark); }
.badge--gray { background: var(--gray-100); color: var(--gray-500); }

/* ── Tables ── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-form { display: flex; gap: 8px; }
.search-input {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  width: 260px;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--green); }
.record-count { font-size: 13px; color: var(--gray-500); }
.table-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 24px;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  font-size: 14px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.table-link { color: var(--green); font-weight: 600; text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.table-sub { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.table-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.text-muted { color: var(--gray-500); }

/* ── Link banner (project detail) ── */
.link-banner {
  background: linear-gradient(135deg, var(--purple-50), var(--green-50));
  border: 1px solid #c4b5fd;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.link-banner-label { font-size: 13px; font-weight: 600; color: var(--purple); flex-shrink: 0; }
.link-banner-url {
  font-family: monospace;
  font-size: 13px;
  color: var(--gray-700);
  word-break: break-all;
  flex: 1;
}

/* ── Info box (project form) ── */
.info-box {
  background: var(--purple-light);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.info-box strong { display: block; font-size: 13px; margin-bottom: 6px; color: var(--purple); }
.link-display {
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 8px;
  color: var(--gray-700);
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-500);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ── Danger card ── */
.danger-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--red); }
.danger-text { font-size: 15px; color: var(--gray-700); margin-bottom: 24px; line-height: 1.6; }

/* ── Measure pages ── */
body.measure-page .main-content { background: var(--bg); }
.measure-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--purple) 100%);
  color: white;
  padding: 48px 24px 40px;
  text-align: center;
}
.measure-hero-inner { max-width: 700px; margin: 0 auto; }
.measure-hero-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.measure-hero-sub { font-size: 16px; opacity: .9; margin-bottom: 16px; }
.guest-notice {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  backdrop-filter: blur(4px);
}
.guest-badge {
  background: var(--orange);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 6px;
}
.guest-notice a { color: white; font-weight: 600; }
.project-chip {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.measure-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) { .measure-layout { grid-template-columns: 1fr; } }

.measure-form-panel {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--gray-200);
}

/* ── Drop zones ── */
.drop-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  min-height: 140px;
  position: relative;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--green); background: var(--green-50); }
.drop-zone.has-file { border-style: solid; border-color: var(--green); min-height: 180px; }
.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  pointer-events: none;
}
.drop-icon { font-size: 32px; }
.drop-zone-content p { font-size: 14px; color: var(--gray-500); }
.drop-zone-content small { font-size: 12px; color: var(--gray-400); }
.drop-link { color: var(--green); text-decoration: underline; cursor: pointer; }
.drop-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: none;
  padding: 8px;
}
.drop-zone.has-file .drop-preview { display: block; }
.drop-zone.has-file .drop-zone-content { display: none; }
.drop-remove {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,.5);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.drop-remove:hover { background: var(--red); }

.height-wrap { display: flex; align-items: center; gap: 8px; max-width: 160px; }
.height-wrap input { max-width: 120px; }
.unit-label { font-size: 14px; color: var(--gray-500); font-weight: 500; }

/* Submit button with spinner */
.btn-submit { margin-top: 8px; font-size: 16px; padding: 14px; }
.btn-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.submit-note { font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 8px; }

/* ── Tips panel ── */
.tips-card, .accuracy-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.tips-title, .accuracy-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
}
.tips-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}
.tip-icon {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  width: 20px;
  text-align: center;
}
.tip-icon--green { color: var(--green); }
.tip-icon--orange { color: var(--orange); }
.measurement-list-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.measurement-list-preview span {
  background: var(--purple-light);
  color: var(--purple);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Results page ── */
body.result-page .main-content { background: var(--bg); }
.result-hero {
  background: linear-gradient(135deg, var(--green) 0%, #10b981 100%);
  color: white;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 32px;
}
.result-hero-inner { max-width: 600px; margin: 0 auto; }
.result-success-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.result-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.result-sub { font-size: 15px; opacity: .9; }

.result-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 28px;
  margin-bottom: 24px;
}
.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.result-card-header h2 { font-size: 18px; font-weight: 700; }

.measurements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.m-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.m-item--highlight {
  background: var(--green-light);
  border-color: #86efac;
}
.m-item--primary {
  background: var(--purple-light);
  border-color: #c4b5fd;
}
.m-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 4px;
}
.m-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--green-dark);
}
.m-item--highlight .m-value { color: var(--green-dark); }
.m-item--primary .m-value { color: var(--purple); }
.m-unit { font-size: 14px; font-weight: 500; color: var(--gray-500); }

.size-suggestion {
  background: linear-gradient(135deg, var(--orange-light), #fff7ed);
  border: 1px solid #fdba74;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.size-suggestion strong { font-size: 13px; color: #7c2d12; font-weight: 700; flex-shrink: 0; }
.size-chip {
  background: var(--orange);
  color: white;
  font-size: 20px;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 8px;
}
.size-note { font-size: 13px; color: #7c2d12; }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.debug-section { margin-top: 16px; }
.debug-block {
  background: #1e1e2e;
  color: #a6e3a1;
  border-radius: var(--radius);
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
  overflow-x: auto;
  margin-top: 10px;
}

/* ── Detail page ── */
.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.detail-list dt { font-weight: 600; color: var(--gray-500); white-space: nowrap; }
.detail-list dd { color: var(--gray-900); }

/* ── Footer ── */
.footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 16px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  flex-wrap: wrap;
}
.footer-sep { color: var(--gray-200); }
