* {
  box-sizing: border-box;
}

:root {
  --bg: #f8f4ea;
  --surface: #ffffff;
  --surface-warm: #fff8eb;
  --text: #172033;
  --muted: #64748b;
  --border: #e5e7eb;
  --gold: #f4c95d;
  --gold-soft: #fff4cf;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --green-border: #86efac;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fee2e2;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.10);
  --shadow-soft: 0 10px 28px rgba(23, 32, 51, 0.08);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 201, 93, 0.35), transparent 34rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 35%, #f7f3ea 100%);
  color: var(--text);
  padding: 22px;
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: auto;
}

.message-box {
  position: sticky;
  top: 12px;
  z-index: 200;
  padding: 15px 18px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.message-box.success {
  background: var(--green-soft);
  color: #166534;
  border: 1px solid var(--green-border);
}

.message-box.error {
  background: var(--red-soft);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,246,221,0.94)),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.10), transparent 22rem);
  border: 1px solid rgba(244, 201, 93, 0.75);
  border-radius: 32px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -70px -90px auto;
  width: 220px;
  height: 220px;
  background: rgba(244, 201, 93, 0.25);
  border-radius: 999px;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b45309;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 12px;
  font-size: 0.78rem;
  background: var(--gold-soft);
  border: 1px solid rgba(244, 201, 93, 0.7);
  border-radius: 999px;
  padding: 8px 11px;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 4.6rem);
  line-height: 0.95;
  margin: 0 0 16px;
  color: #0f172a;
  letter-spacing: -2px;
}

h2 {
  margin-top: 0;
  color: #0f172a;
  letter-spacing: -0.5px;
}

h3 {
  color: #0f172a;
}

.hero-subtitle {
  max-width: 660px;
  font-size: clamp(1.03rem, 2.5vw, 1.18rem);
  line-height: 1.65;
  margin: 0 0 18px;
  color: #475569;
}

.quote {
  display: inline-block;
  background: #111827;
  color: white;
  padding: 13px 16px;
  border-radius: 999px;
  font-weight: 900;
  margin: 8px 0 0;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.20);
}

.mechanic-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.88);
  border-radius: 26px;
  padding: 28px 22px;
  text-align: center;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-content: center;
}

.mechanic-graphic {
  font-size: clamp(4rem, 10vw, 5.4rem);
  margin-bottom: 12px;
  filter: drop-shadow(0 12px 18px rgba(23, 32, 51, 0.12));
}

.mechanic-card h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.mechanic-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.info-card,
.booking-section,
.lookup-section,
.form-card,
.admin-panel,
.admin-header {
  background: rgba(255,255,255,0.94);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.info-card {
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
}

.steps-list {
  margin: 0;
  padding-left: 0;
  counter-reset: steps;
  list-style: none;
}

.steps-list li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.steps-list li::before {
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #111827;
  color: white;
  font-weight: 900;
}

.steps-list strong {
  display: block;
  color: #0f172a;
  margin-bottom: 3px;
}

.steps-list span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-tags span {
  background: var(--surface-warm);
  border: 1px solid rgba(244, 201, 93, 0.75);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 6px 16px rgba(23, 32, 51, 0.05);
}

.small-note {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.section-header {
  margin-bottom: 18px;
}

.section-header p,
.admin-header p {
  color: var(--muted);
  margin-top: -6px;
  line-height: 1.5;
}

#calendar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.date-card {
  background:
    linear-gradient(180deg, #fffdf8, var(--surface-warm));
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(244, 201, 93, 0.85);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.date-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.times-container {
  display: grid;
  gap: 10px;
}

.time-button {
  background: var(--blue);
  color: white;
  padding: 13px;
  margin: 0;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.time-button:hover,
.selected-time {
  background: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 14px 14px;
  margin: 8px 0;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  font-size: 1rem;
  font-family: inherit;
}

input,
textarea,
select {
  background: #ffffff;
  color: var(--text);
  transition: border 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  background: var(--blue);
  color: white;
  cursor: pointer;
  border: none;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.hidden {
  display: none;
}

.request {
  background: #f8fafc;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.04);
}

.request h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.request p {
  margin: 8px 0;
  color: #334155;
  line-height: 1.45;
}

.empty-message {
  color: var(--muted);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 15px;
}

.admin-header {
  margin-bottom: 20px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  gap: 20px;
}

.spacing-top {
  margin-top: 28px;
}

.slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface-warm);
  border: 1px solid rgba(244, 201, 93, 0.75);
  border-radius: 16px;
  padding: 13px;
  margin-bottom: 10px;
}

.slot-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.small-button,
.small-save-button {
  width: auto;
  padding: 10px 14px;
  margin: 0;
  white-space: nowrap;
}

.small-save-button {
  margin-top: 0;
  background: var(--green);
}

.small-save-button:hover {
  background: #15803d;
}

.danger-button {
  background: var(--red);
}

.danger-button:hover {
  background: var(--red-dark);
}

.logout-button {
  margin-top: 18px;
  background: #111827;
}

.logout-button:hover {
  background: #374151;
}

.admin-note-label {
  display: block;
  font-weight: 900;
  margin-top: 14px;
  margin-bottom: 4px;
}

.admin-note-box {
  min-height: 78px;
  background: var(--surface-warm);
}

/* Appointment lookup */
.lookup-section {
  margin-bottom: 24px;
}

.lookup-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.lookup-box input {
  margin: 0;
}

.lookup-box button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.appointment-card {
  background:
    linear-gradient(180deg, #fffdf8, var(--surface-warm));
  border: 1px solid rgba(244, 201, 93, 0.85);
  border-radius: 22px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.appointment-card h3 {
  margin-top: 0;
  color: #0f172a;
}

.error-card {
  background: var(--red-soft);
  border-color: #fca5a5;
}

.countdown-box {
  background: var(--green-soft);
  color: #166534;
  border: 1px solid var(--green-border);
  border-radius: 16px;
  padding: 13px 14px;
  margin: 12px 0 16px;
  font-weight: 900;
}

.calendar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.calendar-button {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--blue);
  color: white;
  padding: 13px;
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
  transition: transform 0.18s ease, background 0.18s ease;
}

.calendar-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.apple-button {
  background: #111827;
}

.apple-button:hover {
  background: #374151;
}

/* Free address autocomplete */
.address-wrapper {
  position: relative;
}

.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  z-index: 50;
}

.address-suggestion {
  padding: 13px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
}

.address-suggestion:hover {
  background: var(--surface-warm);
}

.address-suggestion.muted {
  color: var(--muted);
  cursor: default;
}

.address-suggestion.muted:hover {
  background: white;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(5px);
}

.modal.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 26px 70px rgba(0,0,0,0.28);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.reschedule-choice {
  background: var(--surface-warm);
  color: var(--text);
  border: 1px solid rgba(244, 201, 93, 0.75);
  text-align: left;
  box-shadow: none;
}

.reschedule-choice:hover {
  background: #fef3c7;
  color: #0f172a;
}

/* Mobile */
@media (max-width: 880px) {
  body {
    padding: 14px;
  }

  .hero,
  .info-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .mechanic-card {
    min-height: 230px;
  }

  #calendar {
    grid-template-columns: 1fr;
  }

  .booking-section,
  .lookup-section,
  .form-card,
  .admin-panel,
  .admin-header,
  .info-card {
    padding: 20px;
  }
}

@media (max-width: 700px) {
  .lookup-box,
  .calendar-actions,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .lookup-box button {
    width: 100%;
  }

  .slot-row {
    align-items: stretch;
    flex-direction: column;
  }

  .small-button,
  .small-save-button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 2.35rem;
    letter-spacing: -1px;
  }

  .hero {
    border-radius: 24px;
    padding: 20px;
  }

  .quote {
    border-radius: 16px;
  }

  .mechanic-graphic {
    font-size: 3.8rem;
  }

  input,
  textarea,
  select,
  button {
    font-size: 0.96rem;
  }

  .service-tags span {
    width: 100%;
    border-radius: 14px;
  }
}


/* Fix: How it works text layout */
.steps-list li {
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 14px;
}

.steps-list li::before {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.steps-list strong {
  grid-column: 2;
  grid-row: 1;
}

.steps-list span {
  grid-column: 2;
  grid-row: 2;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
}

/* Fix: soften admin page bottom/section line */
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(244, 201, 93, 0.30), transparent 34rem),
    linear-gradient(180deg, #fffaf0 0%, #f8f4ea 45%, #f8f4ea 100%);
}

.admin-grid {
  align-items: start;
}

.admin-panel {
  min-height: auto;
}

/* Mobile cleanup for step layout */
@media (max-width: 460px) {
  .steps-list li {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .steps-list span {
    font-size: 0.98rem;
    line-height: 1.45;
  }
}
