﻿@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #f8f4ef;
  --bg-deep: #e9dfd0;
  --ink: #13231f;
  --muted: #4c5b55;
  --accent: #e66b2d;
  --accent-dark: #b54f20;
  --teal: #0e2f2a;
  --mint: #6fc7b5;
  --card: #fff8f0;
  --shadow: 0 18px 40px rgba(15, 25, 20, 0.18);
  --radius: 20px;
  --dot-size: clamp(6px, 1.6vw, 8px);
  --dot-gap: clamp(2px, 0.8vw, 4px);
  --calendar-gap: clamp(4px, 1.2vw, 8px);
  --calendar-cell-padding: clamp(4px, 1vw, 8px);
  --calendar-cell-min-h: clamp(68px, 12vw, 84px);
}

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

.hidden {
  display: none !important;
}

body {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, #fef6ea 0%, var(--bg) 45%, #f2eadf 100%);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  padding: 0 6vw 48px;
}

.profile-badge {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.95);
  border: 1px solid rgba(19, 35, 31, 0.1);
  box-shadow: 0 10px 24px rgba(15, 25, 20, 0.12);
  backdrop-filter: blur(8px);
}

.profile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0e3d4;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.profile-meta {
  display: grid;
  line-height: 1.1;
}

.profile-meta #profileName {
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-meta #profileRole {
  font-size: 0.78rem;
}

.profile-status {
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .profile-badge {
    right: 12px;
    top: 12px;
    gap: 8px;
    padding: 6px 10px;
  }

  .profile-meta #profileName {
    font-size: 0.85rem;
  }

  .profile-meta #profileRole {
    font-size: 0.72rem;
  }
}

h1, h2, h3 {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.7;
}

.bg-shape-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(111, 199, 181, 0.35), rgba(111, 199, 181, 0));
  top: -120px;
  left: -120px;
}

.bg-shape-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(230, 107, 45, 0.35), rgba(230, 107, 45, 0));
  bottom: -180px;
  right: -180px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  padding: 48px 0 28px;
}

.hero-content {
  max-width: 560px;
  animation: floatIn 0.9s ease both;
}

.pill {
  display: inline-flex;
  background: var(--teal);
  color: #f4f8f6;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 2.8vw, 3.1rem);
  margin: 18px 0 12px;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 40px;
  min-width: 140px;
  height: 40px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card .btn {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(230, 107, 45, 0.32);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(230, 107, 45, 0.35);
}

.btn.ghost {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal);
}

.btn.secondary {
  background: #f4ebe1;
  border-color: #d7c6b2;
  color: #453f35;
}

.driver-card {
  background: linear-gradient(160deg, rgba(14, 47, 42, 0.95), rgba(28, 75, 64, 0.92));
  color: #f8faf9;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  animation: floatIn 1.1s ease both;
  animation-delay: 0.1s;
}

.avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6fc7b5, #e66b2d);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.12em;
  position: relative;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  display: block;
}

.avatar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.avatar.has-photo span {
  opacity: 0;
}

.driver-info ul {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.95rem;
}

.driver-cta {
  display: flex;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 18px;
  align-items: start;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 16px 28px rgba(15, 25, 20, 0.08);
  border: 1px solid rgba(19, 35, 31, 0.05);
  display: grid;
  gap: 16px;
  animation: floatIn 0.9s ease both;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--muted);
}

.month-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(19, 35, 31, 0.2);
  background: #fff;
  cursor: pointer;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.driver-switcher {
  display: grid;
  gap: 8px;
}

.driver-switcher select {
  width: 100%;
}

.dot {
  width: min(var(--dot-size), 100%);
  height: min(var(--dot-size), 100%);
  border-radius: 50%;
  display: inline-block;
  margin-right: 0;
}

.legend .dot {
  margin-right: 6px;
}

.dot.available { background: #4bbf9d; }
.dot.pending { background: #f2b14a; }
.dot.reserved { background: #e45a4f; }
.dot.unavailable { background: #b2b2b2; }

.calendar {
  display: grid;
  gap: 12px;
}

.calendar-head,
.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--calendar-gap);
  font-size: 0.85rem;
}

.calendar-head span {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.calendar-day {
  background: #fff;
  border-radius: 16px;
  padding: var(--calendar-cell-padding);
  min-height: var(--calendar-cell-min-h);
  display: grid;
  gap: 6px;
  cursor: pointer;
  border: 1px solid rgba(19, 35, 31, 0.08);
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
  overflow: hidden;
}

.calendar-day:hover {
  border-color: rgba(14, 47, 42, 0.3);
  transform: translateY(-2px);
}

.calendar-day.disabled {
  background: transparent;
  border: none;
  cursor: default;
}

.calendar-day.active {
  outline: 2px solid rgba(230, 107, 45, 0.6);
}

.calendar-day.past {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f6f0e7;
}

.calendar-day:disabled {
  cursor: not-allowed;
}

.day-number {
  font-weight: 600;
  font-size: clamp(0.82rem, 2.4vw, 0.95rem);
  justify-self: center;
}

.day-dots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--dot-gap);
  justify-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.muted {
  color: var(--muted);
}

.date-pill {
  background: #f0e3d4;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.slot {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(19, 35, 31, 0.2);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.slot.active {
  background: rgba(75, 191, 157, 0.2);
  border-color: #4bbf9d;
}

.slot.reserved {
  background: rgba(228, 90, 79, 0.12);
  border-color: #e45a4f;
  color: #a03025;
  cursor: not-allowed;
}

.slot.pending {
  background: rgba(242, 177, 74, 0.16);
  border-color: #f2b14a;
  color: #8a5b12;
  cursor: not-allowed;
}

.slot:disabled {
  opacity: 0.6;
}

.divider {
  height: 1px;
  background: rgba(19, 35, 31, 0.1);
  margin: 4px 0;
}

.booking-list ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.booking-item {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(19, 35, 31, 0.1);
  display: grid;
  gap: 8px;
}

.booking-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.google-connect {
  display: grid;
  gap: 10px;
}

.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ical-block {
  display: grid;
  gap: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(19, 35, 31, 0.08);
  color: var(--muted);
}

.status-pill.pending {
  background: rgba(242, 177, 74, 0.2);
  color: #8a5b12;
}

.status-pill.confirmed {
  background: rgba(111, 199, 181, 0.25);
  color: #1f5e52;
}

.status-pill.rejected,
.status-pill.canceled {
  background: rgba(228, 90, 79, 0.18);
  color: #a03025;
}

.status {
  background: rgba(111, 199, 181, 0.2);
  color: #1f5e52;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.api-config {
  display: grid;
  gap: 10px;
}

.auth-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.account-body {
  display: grid;
  gap: 18px;
}

#accountCard.account-compact {
  padding: 16px 20px;
}

#accountCard.account-compact .card-header {
  display: none;
}

#accountCard.account-compact .account-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

#accountCard.account-compact #accountUser {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
}

#accountCard.account-compact #accountWelcome,
#accountCard.account-compact #accountMessage {
  display: none;
}

#accountCard.account-compact .account-details {
  margin: 0;
}

#accountCard.account-compact .account-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-details {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  background: #f0e3d4;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.favorites-list {
  display: grid;
  gap: 8px;
}

.favorite-item {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(19, 35, 31, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.favorite-item button {
  white-space: nowrap;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-driver-item {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(19, 35, 31, 0.1);
  display: grid;
  gap: 6px;
}

.admin-driver-item .muted {
  font-size: 0.85rem;
}

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

.favorite-form > .btn {
  width: auto;
  justify-self: start;
}

form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(19, 35, 31, 0.2);
  background: #fff;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(111, 199, 181, 0.6);
  border-color: transparent;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.estimate-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.time-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-select select {
  flex: 1;
  min-width: 0;
}

.time-sep {
  color: #9a8f86;
  font-weight: 600;
}

.payment-box {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(19, 35, 31, 0.2);
  background: #fff;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.upcoming {
  display: grid;
  gap: 0;
}

.upcoming-card {
  background: transparent;
  border-radius: 0;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid rgba(19, 35, 31, 0.08);
  font-size: 0.88rem;
  line-height: 1.3;
  display: grid;
  gap: 4px;
}

.upcoming-card:last-child {
  border-bottom: none;
}

.upcoming-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upcoming-top strong {
  font-size: 0.9rem;
}

.upcoming-meta,
.upcoming-route {
  color: var(--muted);
  font-size: 0.8rem;
}

.upcoming-route {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.85rem;
}

.noscript {
  text-align: center;
  margin-top: 18px;
  color: #a03025;
}

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

@media (max-width: 720px) {
  body {
    padding: 0 5vw 42px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .month-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .slots {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 920px) {
  #accountCard {
    grid-column: 1 / -1;
  }

  #accountCard.account-compact {
    grid-column: auto;
  }

  .account-body {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
  }
}

@media (max-width: 420px) {
  .calendar-head span {
    font-size: 0.78rem;
  }
}
