:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #1b2437;
  --muted: #5f6b7a;
  --primary: #2e5bff;
  --secondary: #1c293f;
  --border: #dbe0ea;
  --success: #2d9f66;
  --danger: #ff5e5e;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.navbar {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

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

.button {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-secondary {
  background: rgba(46, 91, 255, 0.08);
  color: var(--primary);
}

.hero-header {
  background: linear-gradient(180deg, #eef2ff 0%, #f7fbff 100%);
  padding: 32px 0 60px;
}

.hero-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 14px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0 0 18px;
}

.hero-copy {
  max-width: 540px;
  color: var(--muted);
  margin-bottom: 28px;
}

.search-panel {
  position: relative;
  width: min(680px, 100%);
}

.search-input-group {
  display: flex;
  gap: 12px;
}

#search-input {
  flex: 1;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 18px;
  background: #fff;
}

#search-button {
  min-width: 120px;
}

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  list-style: none;
  z-index: 10;
}

.suggestions li {
  padding: 12px 18px;
  cursor: pointer;
  color: var(--text);
}

.suggestions li:hover {
  background: #f6f8ff;
}

.hidden {
  display: none;
}

.hero-image {
  position: relative;
  min-height: 320px;
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
  border-radius: 32px;
  padding: 28px;
  display: grid;
  place-items: center;
}

.hero-card {
  background: #fff;
  border-radius: 26px;
  padding: 26px;
  min-height: 220px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(46, 91, 255, 0.08);
  color: var(--secondary);
  text-align: center;
  font-size: 1.05rem;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}

.section-header {
  max-width: 640px;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin: 10px 0 0;
}

.section-copy {
  color: var(--muted);
  max-width: 680px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.service-card,
.info-card {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.service-card .icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 18px;
  background: rgba(46, 91, 255, 0.1);
}

.service-card h3 {
  margin: 0 0 12px;
}

.service-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.info-card h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

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

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .nav-actions {
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .navbar {
    padding: 16px 0;
  }

  .hero-content {
    gap: 24px;
  }

  #search-input {
    min-height: 50px;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    justify-content: center;
  }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.08);
}

.auth-header h1 {
  margin: 0 0 12px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 10px;
}

.form-group label {
  font-size: 0.95rem;
  color: var(--secondary);
}

.form-group input,
.form-group select {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 16px;
  background: #fff;
}

.message {
  min-height: 24px;
  font-size: 0.95rem;
}

.auth-footer {
  margin-top: 18px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--primary);
}

  .profile-manage-card {
    max-width: 900px;
  }

  .profile-form textarea,
  .profile-form input,
  .profile-form input[type="file"] {
    width: 100%;
  }

  .image-preview {
    min-height: 160px;
    border-radius: 16px;
    background: #f4f6ff;
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    padding: 16px;
    margin-top: 8px;
  .profile-avatar-wrapper {
    display: grid;
    place-items: center;
    background: #eef3ff;
    border-radius: 24px;
    min-height: 180px;
  }

  .profile-image {
    width: 100%;
    height: auto;
    border-radius: 24px;
    object-fit: cover;
  }

  .profile-contact {
    margin: 18px 0 0;
    display: grid;
    gap: 6px;
    color: var(--muted);
  }

}

.dashboard-section {
  min-height: calc(100vh - 120px);
}

.dashboard-card {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  background: #fff;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.08);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.dashboard-box {
  background: #f7f9ff;
  border-radius: 22px;
  padding: 24px;
}

.dashboard-box h3 {
  margin-top: 0;
}

.dashboard-box a {
  color: var(--primary);
}

@media (max-width: 920px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.booking-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.booking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

  .timeline-list {
    display: grid;
    gap: 12px;
  }

  .timeline-item {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  }

  /* Booking notification under navbar */
  .booking-notification {
    width: 100%;
    background: #fff7ed;
    border-bottom: 1px solid rgba(17,24,39,0.06);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }
  .booking-notification.hidden { display: none; }
  .booking-notification .notice { color: #92400e; font-weight: 700; }
  .booking-notification .notice small { display:block; font-weight:400; color:#7a5a3a; }
  .booking-notification .notice a { margin-left: 12px; text-decoration: underline; color: var(--primary); }
  gap: 24px;
  align-items: start;
}

.booking-form {
  display: grid;
  gap: 18px;
}

.booking-summary-card,
.dashboard-box {
  background: #f7f9ff;
  border-radius: 24px;
  padding: 24px;
}

.booking-summary-card h3 {
  margin-top: 0;
}

.booking-form textarea {
  min-height: 130px;
  resize: vertical;
}

.form-full {
  grid-column: 1 / -1;
}

.dashboard-full {
  grid-column: 1 / -1;
}

.booking-item {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding: 14px 0;
}

.booking-item:first-child {
  border-top: none;
}

@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-image {
    min-height: 260px;
    padding: 20px;
  }

  .section {
    padding: 40px 0;
  }

  .dashboard-grid,
  .booking-grid,
  .profile-grid,
  .workers-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .filters-row {
    gap: 16px;
  }

  .service-card,
  .info-card,
  .dashboard-card,
  .booking-summary-card,
  .profile-card,
  .profile-panel,
  .review-card {
    padding: 20px;
  }

  .worker-card {
    padding: 20px;
  }

  .search-input-group {
    flex-direction: column;
  }

  #search-input,
  #search-button,
  .button,
  .form-group input,
  .form-group select,
  .booking-form textarea {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .navbar {
    padding: 16px 14px;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    justify-content: center;
  }

  .nav-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-header {
    padding: 24px 0 40px;
  }

  .hero-copy,
  .section-header h2 {
    text-align: center;
  }

  .hero-card {
    font-size: 1rem;
    min-height: auto;
  }

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

  .booking-grid,
  .profile-grid,
  .dashboard-grid {
    gap: 18px;
  }

  .section {
    width: calc(100% - 24px);
  }
}

.page-header {
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.filters-row select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
}

.workers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.worker-card {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.worker-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.worker-avatar,
.review-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  object-fit: cover;
}

.worker-avatar-image {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.save-popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 50;
  transition: opacity 0.2s ease;
}

.save-popup.hidden {
  opacity: 0;
  pointer-events: none;
}

.save-popup-content {
  background: #fff;
  border-radius: 20px;
  padding: 26px 30px;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
  color: #111827;
  font-weight: 700;
  min-width: 280px;
  text-align: center;
}

.worker-description,
.profile-card p,
.review-card p {
  color: var(--muted);
  margin: 0;
}

.worker-stats,
.worker-details,
.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
}

.worker-details {
  font-weight: 600;
  color: var(--secondary);
}

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

.profile-card {
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.profile-header {
  margin-bottom: 36px;
}

.profile-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.profile-panel {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-list li {
  color: var(--muted);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--muted);
}

.reviews-section h2 {
  margin-top: 0;
}

.reviews-list {
  display: grid;
  gap: 16px;
}

.review-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.05);
}

.review-name {
  font-weight: 700;
  margin: 0 0 4px;
}

.review-rating {
  margin: 0 0 12px;
  color: var(--primary);
}

.alert-message {
  background: #fff4e5;
  color: #8a5a15;
  border: 1px solid #f1d2a3;
  padding: 22px;
  border-radius: 20px;
}

@media (max-width: 900px) {
  .profile-card,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
