/* ==========================================================================
   style.css — shared visual styling on top of Tailwind utility classes.
   ========================================================================== */

:root {
  --indigo: #4f46e5;
  --indigo-dark: #4338ca;
}

* { font-family: 'Inter', system-ui, sans-serif; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand-badge {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background .15s ease, transform .1s ease;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--indigo-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; border-radius: 0.75rem; }

.btn-secondary {
  background: #fff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 0.55rem 1.1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.btn-secondary:hover { background: #f8fafc; }

.btn-ghost {
  color: #475569;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: #1e293b; }

.btn-danger {
  background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
  padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.btn-danger:hover { background: #fee2e2; }

.hero { background: radial-gradient(circle at top right, #eef2ff, #f8fafc 60%); }

.hero-card { display: flex; justify-content: center; }
.hero-card-inner {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 20px 45px -15px rgba(30,41,59,0.25);
  width: 100%;
  max-width: 360px;
  border: 1px solid #eef2ff;
}
.mock-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: #334155; }

.badge-status-booked { background: #e0e7ff; color: #4338ca; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge-status-completed { background: #d1fae5; color: #047857; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge-status-cancelled { background: #fee2e2; color: #b91c1c; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }

.feature-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.5rem; text-align: center; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: #eef2ff; color: #4f46e5; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin: 0 auto; }

.pricing-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 2rem; }
.pricing-card-highlight { border-color: #4f46e5; box-shadow: 0 10px 30px -10px rgba(79,70,229,0.35); }

/* Auth pages */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f8fafc; padding: 1.5rem; }
.auth-card { background: #fff; border-radius: 1rem; box-shadow: 0 20px 45px -20px rgba(30,41,59,0.2); padding: 2rem; width: 100%; max-width: 460px; border: 1px solid #e2e8f0; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: #334155; margin-bottom: 0.3rem; }
.form-input {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 0.55rem; padding: 0.55rem 0.75rem;
  font-size: 0.9rem; outline: none; transition: border-color .15s ease;
}
.form-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 0.85rem; padding: 0.6rem 0.8rem; border-radius: 0.5rem; }
.form-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-size: 0.85rem; padding: 0.6rem 0.8rem; border-radius: 0.5rem; }

/* Owner app shell */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 240px; background: #111827; color: #cbd5e1; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 1.25rem 1rem;
}
.app-sidebar .brand { color: #fff; font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; padding: 0 0.5rem 1.25rem; }
.app-nav a {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.75rem; border-radius: 0.55rem;
  font-size: 0.88rem; font-weight: 500; color: #cbd5e1; margin-bottom: 0.15rem; text-decoration: none;
}
.app-nav a:hover { background: #1f2937; color: #fff; }
.app-nav a.active { background: #4f46e5; color: #fff; }
.app-main { flex: 1; min-width: 0; background: #f8fafc; }
.app-topbar {
  background: #fff; border-bottom: 1px solid #e2e8f0; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
}
.app-content { padding: 1.5rem; max-width: 1200px; margin: 0 auto; }

.mobile-topbar { display: none; }

@media (max-width: 900px) {
  .app-sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s ease; z-index: 50; }
  .app-sidebar.open { transform: translateX(0); }
  .mobile-topbar { display: flex; }
  .app-content { padding: 1rem; }
}

.stat-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 0.9rem; padding: 1.1rem 1.25rem;
}
.stat-card .stat-label { font-size: 0.78rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-card .stat-value { font-size: 1.55rem; font-weight: 800; color: #0f172a; margin-top: 0.25rem; }

.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 0.9rem; }

.table-simple th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; padding: 0.6rem 0.9rem; border-bottom: 1px solid #e2e8f0; }
.table-simple td { padding: 0.75rem 0.9rem; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; color: #334155; }
.table-simple tr:last-child td { border-bottom: none; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: 60px repeat(7, 1fr); border: 1px solid #e2e8f0; border-radius: 0.75rem; overflow: hidden; background: #fff; }
.cal-head { background: #f8fafc; font-size: 0.75rem; font-weight: 700; color: #475569; padding: 0.5rem; text-align: center; border-bottom: 1px solid #e2e8f0; border-left: 1px solid #e2e8f0; }
.cal-head:first-child { border-left: none; }
.cal-time-label { font-size: 0.68rem; color: #94a3b8; padding: 0.2rem 0.35rem; text-align: right; border-top: 1px solid #f1f5f9; }
.cal-cell { border-left: 1px solid #e2e8f0; border-top: 1px solid #f1f5f9; min-height: 42px; position: relative; padding: 2px; }
.cal-cell:first-child { border-left: none; }

.appt-chip {
  background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; border-radius: 0.4rem;
  padding: 0.2rem 0.4rem; font-size: 0.72rem; font-weight: 600; margin-bottom: 2px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.appt-chip:hover { background: #e0e7ff; }
.appt-chip.status-Completed { background: #d1fae5; border-color: #a7f3d0; color: #047857; }
.appt-chip.status-Cancelled { background: #fee2e2; border-color: #fecaca; color: #b91c1c; text-decoration: line-through; }

.day-col-scroll { max-height: 640px; overflow-y: auto; }

.month-cell { border: 1px solid #e2e8f0; min-height: 96px; padding: 0.35rem; background: #fff; }
.month-cell.other-month { background: #f8fafc; color: #cbd5e1; }
.month-cell .date-num { font-size: 0.78rem; font-weight: 700; color: #64748b; }

/* Public booking page */
.book-shell { max-width: 720px; margin: 0 auto; padding: 1.25rem; }
.svc-option {
  border: 1.5px solid #e2e8f0; border-radius: 0.75rem; padding: 0.9rem 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; transition: all .12s ease;
}
.svc-option:hover { border-color: #a5b4fc; }
.svc-option.selected { border-color: #4f46e5; background: #eef2ff; }
.svc-checkbox { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #cbd5e1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.svc-option.selected .svc-checkbox { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.date-chip {
  border: 1.5px solid #e2e8f0; border-radius: 0.7rem; padding: 0.6rem 0.4rem; text-align: center; cursor: pointer;
  min-width: 68px; flex-shrink: 0; transition: all .12s ease;
}
.date-chip:hover { border-color: #a5b4fc; }
.date-chip.selected { border-color: #4f46e5; background: #4f46e5; color: #fff; }
.date-chip .dow { font-size: 0.68rem; text-transform: uppercase; opacity: 0.7; }
.date-chip .dnum { font-size: 1.05rem; font-weight: 700; }

.time-chip {
  border: 1.5px solid #e2e8f0; border-radius: 0.6rem; padding: 0.55rem 0.5rem; text-align: center; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; transition: all .12s ease;
}
.time-chip:hover { border-color: #a5b4fc; }
.time-chip.selected { border-color: #4f46e5; background: #4f46e5; color: #fff; }

.step-dot { width: 26px; height: 26px; border-radius: 999px; background: #e2e8f0; color: #64748b; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-dot.active { background: #4f46e5; color: #fff; }
.step-dot.done { background: #4338ca; color: #fff; }

.upgrade-banner {
  background: linear-gradient(135deg, #4f46e5, #4338ca); color: #fff; border-radius: 0.9rem; padding: 1.1rem 1.25rem;
}

.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; background: #0f172a; color: #fff; padding: 0.75rem 1.1rem;
  border-radius: 0.6rem; font-size: 0.88rem; box-shadow: 0 10px 25px -8px rgba(0,0,0,0.35); z-index: 100;
  max-width: 320px;
}

.spinner { border: 3px solid #e2e8f0; border-top-color: #4f46e5; border-radius: 50%; width: 28px; height: 28px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 1rem; }
.modal-box { background: #fff; border-radius: 1rem; max-width: 480px; width: 100%; padding: 1.5rem; max-height: 90vh; overflow-y: auto; }
