/* ============================================
   GREST — Stylesheet
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

/* --- Variables --- */
:root {
  --primary: #f97316;
  --primary-hover: #ea6c0a;
  --primary-rgb: 249, 115, 22;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --nav-bg: rgba(255,255,255,0.92);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.12);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --nav-height: 64px;
  --t: 200ms ease;
  --max-w: 1200px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --nav-bg: rgba(15,23,42,0.92);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
}

/* --- Base --- */
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--t), color var(--t);
}

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.3rem); }
p { color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
strong { color: var(--text); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

main { flex: 1; padding-top: var(--nav-height); }

.section { padding: 3rem 0; }
@media (min-width: 768px) { .section { padding: 5rem 0; } }

.section-title    { text-align: center; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1.05rem; }

.bg-alt { background: var(--bg-alt); }
.text-center { text-align: center; }

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--t), border-color var(--t);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary) !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-brand em { font-style: normal; color: var(--text); }

.nav-links {
  display: none;
  list-style: none;
  gap: 0.15rem;
  align-items: center;
}
@media (min-width: 800px) { .nav-links { display: flex; } }

.nav-links a {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
  font-size: 1rem;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (min-width: 800px) { .hamburger { display: none !important; } }

.hamburger { flex-direction: column; gap: 4px; }
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: all var(--t);
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 0.75rem 1rem;
  flex-direction: column;
  gap: 0.2rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--t), color var(--t);
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--t);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover {
  background: var(--primary-hover); color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.4);
}
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 600px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* --- Hero --- */
.hero {
  min-height: calc(88vh - var(--nav-height));
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -40%; right: -10%;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 3rem;
  width: 100%;
}
.hero-content { flex: 1; min-width: 0; max-width: 680px; }
.hero-logo-wrap { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.hero-logo { width: 220px; height: auto; }

@media (max-width: 768px) {
  .hero-inner { flex-direction: column-reverse; gap: 1.5rem; text-align: center; }
  .hero-logo { width: 140px; }
  .hero-actions { justify-content: center; }
  .hero > .container > .hero-inner > .hero-content > p { max-width: 100%; }
}

/* --- Home photo band --- */
.home-photo-band {
  position: relative;
  width: 100%;
}

.home-photo-band-img {
  width: 100%;
  height: auto;
  display: block;
}

.home-photo-band-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 2rem;
}

.home-photo-band-caption {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
  .home-photo-band { height: 240px; }
  .home-photo-band-caption { font-size: 1rem; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 0.82rem; font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero > .container > .hero-content > p {
  font-size: 1.1rem; margin-bottom: 2rem; max-width: 520px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* --- Info icon cards --- */
.info-card { text-align: center; }
.info-icon { font-size: 2.25rem; margin-bottom: 0.75rem; display: block; }
.info-card h3 { margin-bottom: 0.4rem; }
.info-card p { text-align: justify; }

/* --- Page header --- */
.page-header {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0.4rem; }
.page-header p { font-size: 1.05rem; }

/* --- News grid --- */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }

.news-card-link { text-decoration: none; color: inherit; display: flex; }
.news-card-link:hover .news-card { box-shadow: 0 4px 18px rgba(0,0,0,0.10); transform: translateY(-2px); }
.news-card { display: flex; flex-direction: column; gap: 0; overflow: hidden; transition: box-shadow 0.18s, transform 0.18s; width: 100%; }
.news-card-img { width: 100%; height: 180px; object-fit: cover; display: block; flex-shrink: 0; }
.news-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.news-date { font-size: 0.78rem; color: var(--text-muted); }
.news-title { font-size: 1.1rem; font-weight: 700; color: var(--text); line-height: 1.35; margin: 0; }
.news-excerpt { font-size: 0.88rem; color: var(--text-muted); flex: 1; }
.news-read-more { font-size: 0.83rem; font-weight: 600; color: var(--primary); margin-top: 0.25rem; }
.news-detail-img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; margin-bottom: 1.5rem; }
.news-detail-content { line-height: 1.7; }
.news-detail-content strong { font-weight: 700; }
.news-detail-content em { font-style: italic; }
.news-detail-content h3 { font-size: 1.15rem; font-weight: 700; margin: 1rem 0 0.5rem; }
.news-detail-content p { margin-bottom: 1rem; }
.news-detail-content ul, .news-detail-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.news-detail-content li { margin-bottom: 0.3rem; }

/* --- Gite --- */
.gite-list { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 700px) { .gite-list { grid-template-columns: repeat(2, 1fr); } }

.gita-detail-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.gita-detail-header { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.gita-detail-body { padding: 1rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.gita-detail-title { font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0; }
.gita-detail-title a { color: var(--primary); text-decoration: none; }
.gita-detail-title a:hover { text-decoration: underline; }
.gita-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 0.78rem; font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  width: fit-content;
}
.gita-luogo { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.gita-desc  { font-size: 0.9rem; line-height: 1.6; margin: 0; }
.gita-quota { font-size: 0.9rem; margin: 0; }
.gita-quota-badge { display: inline-block; background: rgba(var(--primary-rgb),.1); color: var(--primary); font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: var(--radius-full); margin-left: 0.4rem; }

/* --- Orari table --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead { background: var(--primary); color: #fff; }
th {
  padding: 0.8rem 1rem;
  text-align: left; font-weight: 600;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-alt); }
.badge-giorno {
  display: inline-block;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 0.78rem; font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

/* --- Form --- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin: 0 auto;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.25rem; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-label .req { color: var(--primary); }

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); }

.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 580px) {
  .form-row { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .form-row .form-group { margin-bottom: 0; }
}

/* --- Alert --- */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
[data-theme="dark"] .alert-success { background: rgba(22,101,52,.2);  color: #86efac; border-color: rgba(22,101,52,.3); }
[data-theme="dark"] .alert-error   { background: rgba(153,27,27,.2);  color: #fca5a5; border-color: rgba(153,27,27,.3); }
[data-theme="dark"] .alert-info    { background: rgba(30,64,175,.2);  color: #93c5fd; border-color: rgba(30,64,175,.3); }

.registration-closed-banner {
  display: block;
  align-items: start;
  padding: 1rem 1.1rem;
}

.registration-closed-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.registration-closed-copy strong {
  font-size: 0.92rem;
}

.registration-closed-copy span {
  color: inherit;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .registration-closed-banner {
    padding: 0.9rem 0.95rem;
  }

  .registration-closed-copy strong {
    font-size: 0.9rem;
  }

  .registration-closed-copy span {
    font-size: 0.84rem;
  }
}

/* --- Empty state --- */
.empty-state {
  text-align: center; padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.empty-state h3 { color: var(--text-muted); font-weight: 600; margin-bottom: 0.4rem; }

/* --- Contatti --- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 600px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

.contact-item { display: flex; align-items: flex-start; gap: 0.9rem; }
.contact-icon {
  font-size: 1.3rem; flex-shrink: 0;
  width: 42px; height: 42px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.contact-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.contact-value { font-weight: 500; color: var(--text); font-size: 0.9rem; }

/* --- Footer --- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-inner {
  display: grid; grid-template-columns: 1fr;
  gap: 2rem; margin-bottom: 2rem;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }

.footer-brand { font-weight: 800; font-size: 1.2rem; color: var(--primary); display: block; margin-bottom: 0.4rem; }
.footer-desc  { font-size: 0.85rem; }
.footer-col-title {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text); margin-bottom: 0.6rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: color var(--t); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted); text-align: center;
}

/* --- Timeline --- */
.timeline-wrap {
  max-width: 700px; margin: 0 auto;
  position: relative;
}
.timeline-item {
  display: grid;
  grid-template-columns: 80px 20px 1fr;
  gap: 0 1rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  position: relative;
}
.timeline-item--last { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(80px + 1rem + 9px);
  top: 10px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item--last::before { display: none; }

.timeline-time {
  font-size: 0.82rem; font-weight: 700;
  color: var(--primary); text-align: right;
  padding-top: 0.1rem; line-height: 1.3;
}
.timeline-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
  flex-shrink: 0; margin-top: 0.05rem;
  position: relative; z-index: 1;
}
.timeline-content {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}
.timeline-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }
.timeline-content strong { color: var(--text); display: block; margin-bottom: 0.2rem; }
.timeline-content p { font-size: 0.85rem; margin: 0; }

@media (max-width: 480px) {
  .timeline-item { grid-template-columns: 70px 16px 1fr; gap: 0 0.6rem; }
  .timeline-item::before { left: calc(70px + 0.6rem + 7px); }
  .timeline-dot { width: 16px; height: 16px; }
}

/* --- Form section title --- */
.form-section-title {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 1.75rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.form-section-title:first-child { margin-top: 0; }

/* --- Form select --- */
.form-select { cursor: pointer; }
.form-select option { background: var(--bg); color: var(--text); }

/* --- Form checkbox --- */
.form-check-group { margin-bottom: 1rem; }
.form-check {
  display: flex; gap: 0.75rem; align-items: flex-start;
  cursor: pointer; font-size: 0.875rem; color: var(--text-muted);
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  margin-top: 0.1rem; accent-color: var(--primary);
  cursor: pointer;
}
.form-check span { line-height: 1.5; }
.form-check a { font-weight: 600; }

/* --- Laboratori (public) --- */
.lab-card { display: flex; flex-direction: column; }
.lab-badge {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  flex-shrink: 0;
}
.lab-badge-ok   { background: #dcfce7; color: #166534; }
.lab-badge-warn { background: #fef3c7; color: #92400e; }
.lab-badge-full { background: #fee2e2; color: #991b1b; }

.lab-posti { margin-top: auto; padding-top: 0.75rem; }
.lab-bar-track {
  height: 6px; border-radius: var(--radius-full);
  background: var(--border); overflow: hidden;
}
.lab-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 300ms; }

/* --- Spacing utils --- */
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.home-cta {
  max-width: 480px;
  margin: 0.75rem auto 2rem;
}
.home-cta a[href^="tel"] { white-space: nowrap; }

.lab-card-dimmed {
  opacity: 0.6;
}

.lab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.lab-title {
  margin: 0;
}

.lab-desc {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.lab-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.lab-row-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lab-row-value {
  font-size: 0.78rem;
  font-weight: 700;
}

.lab-row-full { color: #dc2626; }
.lab-row-warning { color: #d97706; }
.lab-row-ok { color: #16a34a; }

.lab-intro {
  margin-bottom: 1rem;
}

/* --- Lab detail page --- */
.lab-list { display: flex; flex-direction: column; gap: 1.25rem; }

.lab-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.lab-detail-header { margin-bottom: 1rem; }

.lab-detail-title-wrap {
  display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 0.5rem;
}

.lab-detail-title { font-size: 1.1rem; font-weight: 700; margin: 0; }

.lab-detail-desc { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.lab-detail-posti-label {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem;
}

.lab-sett-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.lab-sett-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.lab-sett-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.lab-sett-count { font-size: 1.05rem; font-weight: 700; }

@media (max-width: 640px) {
  .lab-sett-grid { grid-template-columns: 1fr; }
}

/* Finance + new views */
.alert-quota-info { margin-bottom: 1.2rem; }
.week3-hint { margin-top: 0.5rem; }
