/* v3.1 - 2026-03-19 */
:root {
  --bg-top: #f5f8f1;
  --bg-bottom: #e8eee2;
  --panel: rgba(255, 255, 255, 0.97);
  --panel-strong: #ffffff;
  --line: rgba(40, 40, 40, 0.08);
  --line-strong: rgba(78, 143, 20, 0.22);
  --ink: #182110;
  --muted: #465643;
  --accent: #4e8f14;
  --accent-strong: #295d05;
  --accent-soft: rgba(78, 143, 20, 0.14);
  --success: linear-gradient(180deg, #67b933 0%, #295d05 100%);
  --warn: linear-gradient(180deg, #dff0c8 0%, #a8cd75 100%);
  --danger: linear-gradient(180deg, #ff8a8a 0%, #e45555 100%);
  --shell-shadow: 0 18px 42px rgba(25, 33, 45, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background:
    radial-gradient(circle at top left, rgba(78, 143, 20, 0.18), transparent 24%),
    radial-gradient(circle at 100% 12%, rgba(78, 143, 20, 0.10), transparent 18%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body.programari2-page {
  padding: 18px 0 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(100% - 20px, 1040px);
  margin: 0 auto;
}

.hero-card,
.glass-card,
.week-card,
.form-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shell-shadow);
  overflow: visible;
}

.hero-card {
  margin-top: 14px;
  padding: 24px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 241, 0.97)),
    var(--panel);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.lead {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.glass-card,
.form-card,
.week-card {
  margin-top: 14px;
  padding: 20px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.12;
  color: var(--ink);
}

.section-title-main {
  margin-bottom: 18px;
  font-size: 28px;
  color: var(--ink);
}

.section-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
  align-items: start;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

.field-intro {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.55;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-group .checkbox-field {
  align-items: center;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid rgba(78, 143, 20, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 238, 0.98));
  box-shadow: 0 10px 20px rgba(25, 33, 45, 0.06);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: 0 0 18px;
}

.choice-group .checkbox-field input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 22px;
}

.choice-group .checkbox-field span {
  font-size: 15px;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .choice-group {
    flex-direction: column;
  }

  .choice-group .checkbox-field {
    width: 100%;
    min-height: 60px;
    padding: 15px 18px;
  }

  .choice-group .checkbox-field span {
    font-size: 16px;
  }
}

.checkbox-field a {
  color: var(--accent-strong);
  text-decoration: underline;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 16px;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(78, 143, 20, 0.58);
  box-shadow: 0 0 0 4px rgba(78, 143, 20, 0.14);
}

.textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.button-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.button {
  background: linear-gradient(180deg, #67b933 0%, #295d05 100%);
  box-shadow: 0 14px 26px rgba(78, 143, 20, 0.26);
  color: #f7fff3;
}

.button-secondary {
  color: #2a313a;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(40, 40, 40, 0.08);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.summary-strip {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 248, 238, 0.99));
  color: #365d0f;
  font-size: 14px;
  line-height: 1.6;
}

.week-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--ink);
}

.week-empty,
.alert-card {
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.week-empty,
.alert-warning {
  border: 1px solid rgba(78, 143, 20, 0.24);
  background: rgba(236, 248, 220, 0.96);
  color: #365d0f;
}

.alert-error {
  border: 1px solid rgba(203, 80, 80, 0.28);
  background: rgba(255, 237, 237, 0.96);
  color: #8b1e1e;
}

.alert-success,
.success-box {
  border: 1px solid rgba(78, 143, 20, 0.20);
  background: rgba(236, 248, 220, 0.96);
  color: #21480e;
}

.autocomplete {
  position: relative;
  z-index: 40;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 25;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 18px 32px rgba(24, 33, 16, 0.12);
}

.autocomplete-list.active {
  display: block;
}

.autocomplete-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.autocomplete-item:hover,
.autocomplete-item:focus {
  background: rgba(78, 143, 20, 0.08);
  color: var(--accent-strong);
  transform: none;
}

.autocomplete-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.helper-note {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(78, 143, 20, 0.12);
  border: 1px solid rgba(78, 143, 20, 0.16);
  color: #365d0f;
  font-size: 13px;
  line-height: 1.45;
}

.helper-note.active {
  display: block;
}

.inline-status {
  display: none;
  align-self: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.inline-status.active {
  display: inline-block;
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.schedule-table thead th {
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #4b5c47;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schedule-table thead th:first-child {
  text-align: left;
}

.schedule-table tbody th {
  padding: 14px 12px;
  text-align: left;
  border-radius: 18px;
  background: #f7faf3;
  border: 1px solid rgba(78, 143, 20, 0.10);
  font-size: 13px;
}

.slot {
  margin: 2px;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(78, 143, 20, 0.12);
}

.slot span,
.slot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  width: 100%;
}

.slot-link {
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.slot-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.slot-recommended .slot-link,
.slot-recommended span {
  color: #f7fff3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)),
    var(--success);
}

.slot-available .slot-link,
.slot-available span {
  color: #21480e;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    var(--warn);
}

.slot-busy span {
  color: #ffffff;
  background: var(--danger);
}

.success-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 12px);
  }

  .hero-card,
  .glass-card,
  .week-card,
  .form-card {
    border-radius: 22px;
  }

  .hero-card {
    padding: 22px 16px;
  }

  .schedule-table,
  .schedule-table thead,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table th,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tbody tr {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(78, 143, 20, 0.14);
  }

  .schedule-table tbody th {
    margin-bottom: 8px;
  }

  .schedule-table td::before {
    content: attr(data-label);
    display: block;
    padding: 10px 12px 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-strong);
    text-align: center;
    background: rgba(244, 248, 238, 0.96);
    border-bottom: 1px solid rgba(78, 143, 20, 0.16);
  }

  .slot {
    margin-top: 10px;
  }

  .button,
  .button-secondary {
    width: 100%;
  }

  .inline-status {
    width: 100%;
  }

  .address-row {
    grid-template-columns: 1fr;
  }
}

.programari2-page td.liber,
.programari2-page td.ocupat,
.programari2-page td.finalizat {
  min-width: 118px;
  margin-top: 10px;
  padding: 0;
  text-align: center;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(78, 143, 20, 0.14);
  box-shadow: 0 12px 28px rgba(25, 33, 45, 0.08);
}

.programari2-page td.liber {
  color: #f7fff3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)),
    var(--success);
}

.programari2-page td.liber.recomandat {
  color: #f7fff3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    var(--success);
}

.programari2-page td.liber.disponibil {
  color: #21480e;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    var(--warn);
}

.programari2-page td.ocupat {
  color: #ffffff;
  background: var(--danger);
}

.programari2-page td.finalizat {
  color: #ffffff;
  background: linear-gradient(180deg, #8d9885 0%, #68755d 100%);
}

.programari2-page td.liber .slot-link,
.programari2-page td.ocupat span,
.programari2-page td.finalizat span {
  min-height: 74px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: inherit;
}
