:root {
  --rose: #f43f5e;
  --rose-light: #fecdd3;
  --navy: #0f172a;
  --bg: #fafafa;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
}

/* Dashboard needs bottom nav clearance */
#dashboardScreen .container {
  padding-bottom: 84px;
}

/* Top Bar */
.topbar {
  background: var(--navy);
  color: white;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h1 { margin: 0; font-size: 1.35rem; }
.topbar p { margin: 4px 0 0; opacity: 0.85; font-size: 0.85rem; }
.topbar-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}
.topbar-btn:hover { background: rgba(255,255,255,0.25); }

/* Container */
.container {
  padding: 12px;
  max-width: 760px;
  margin: 0 auto;
}

/* Cards */
.card, .mini-card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
}
h2 { margin: 0 0 12px; font-size: 1.05rem; }
h3 { margin: 0 0 8px; font-size: 0.95rem; }

/* Hero Card */
.hero-card {
  background: linear-gradient(135deg, var(--rose), #ec4899);
  color: white;
  text-align: center;
  padding: 24px 16px;
}
.hero-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.hero-sub { font-size: 0.9rem; opacity: 0.9; margin-bottom: 12px; line-height: 1.4; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Comparison table */
.comparison { font-size: 0.85rem; }
.comp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.comp-row:last-child { border-bottom: none; }
.comp-label { font-weight: 600; }
.comp-them { color: var(--danger); font-size: 0.8rem; }
.comp-us { color: var(--success); font-weight: 600; font-size: 0.8rem; }

/* Forms */
input, select, textarea, button, .btn-link {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 16px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244,63,94,0.1);
}
textarea { min-height: 80px; resize: vertical; }
button, .btn-link {
  background: var(--rose);
  color: white;
  border: none;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
button:hover, .btn-link:hover { opacity: 0.9; }
button:active { transform: scale(0.98); }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.form-label input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-right: 6px;
}
.login-helper {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

/* Stats */
.stats-row {
  display: flex;
  gap: 8px;
}
.stat {
  flex: 1;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.stat-num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--rose); }
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.action-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  padding: 12px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.action-btn:hover { background: var(--rose-light); border-color: var(--rose); }

/* Mini cards (appointments, clients) */
.mini-card {
  border-left: 4px solid var(--rose);
  padding: 12px;
  margin-bottom: 8px;
}
.mini-card strong { font-size: 0.95rem; }
.mini-card p { margin: 2px 0; font-size: 0.85rem; color: var(--muted); }
.mini-card .status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-booked { background: #dbeafe; color: #1d4ed8; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-no_show { background: #fef3c7; color: #92400e; }
.status-pending { background: #e0e7ff; color: #3730a3; }

/* Appointment action buttons */
.appt-actions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.appt-actions button {
  padding: 4px 10px;
  min-height: 32px;
  font-size: 0.75rem;
  border-radius: 6px;
  width: auto;
  margin: 0;
}
.btn-complete { background: var(--success); }
.btn-noshow { background: var(--warning); }
.btn-cancel { background: var(--danger); }

/* Booking link */
.booking-link {
  display: flex;
  gap: 8px;
  align-items: center;
}
.booking-link code {
  flex: 1;
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  word-break: break-all;
  border: 1px solid var(--border);
}
.copy-btn {
  width: auto;
  padding: 8px 16px;
  min-height: 38px;
  font-size: 0.85rem;
}

/* Report */
.report-filters {
  margin-bottom: 12px;
}
.report-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.report-stat {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.report-stat .big { font-size: 1.4rem; font-weight: 700; color: var(--success); }
.report-stat .label { font-size: 0.75rem; color: var(--muted); }
.report-monthly {
  margin-top: 12px;
}
.month-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.hmrc-note {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.8rem;
  color: #065f46;
  margin-top: 12px;
}

/* Service list */
.svc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.svc-item:last-child { border-bottom: none; }
.svc-price { font-weight: 700; color: var(--rose); }

/* Reminder list */
.reminder-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.reminder-status { font-size: 0.75rem; font-weight: 600; }
.reminder-queued { color: var(--warning); }
.reminder-sent { color: var(--success); }

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  z-index: 100;
}
.nav-btn {
  background: none;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 1.2rem;
  min-height: auto;
  padding: 4px 12px;
  width: auto;
  margin: 0;
}
.nav-btn span { font-size: 0.65rem; font-weight: 600; }
.nav-btn.active { color: var(--rose); }

/* Utility */
.muted { color: var(--muted); font-size: 0.85rem; }
.text-center { text-align: center; }
hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* Table (admin) */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; }

/* Responsive */
@media (min-width: 768px) {
  .container { padding: 20px; }
  .quick-actions { grid-template-columns: 1fr 1fr 1fr; }
  .report-summary { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 400px) {
  .stats-row { flex-direction: column; }
}

/* =====================================================
   LANDING PAGE STYLES
   ===================================================== */

/* Landing container — no bottom nav padding needed */
.landing-container {
  padding-bottom: 0;
}

/* Hero Card enhancements */
.hero-social-proof {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.35);
}

.hero-cta {
  display: block;
  background: white;
  color: var(--rose);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  margin-top: 18px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.hero-cta:active { transform: scale(0.98); }

/* Fresha Switching Banner */
.fresha-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  border: 1px solid rgba(244,63,94,0.3) !important;
  padding: 16px !important;
}
.fresha-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fresha-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.fresha-text {
  flex: 1;
  min-width: 0;
}
.fresha-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px;
}
.fresha-sub {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.4;
}
.fresha-btn {
  display: inline-block;
  background: var(--rose);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.fresha-btn:hover { opacity: 0.9; }

/* Comparison Table */
.comparison-card h2 { margin-bottom: 16px; }

.comparison-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.85rem;
}

.comp-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  background: var(--navy);
  color: white;
}
.comp-header > div {
  padding: 10px 12px;
  font-weight: 700;
}
.comp-feature-col { /* empty top-left corner */ }
.comp-col { text-align: center; }
.comp-brand {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
}
.them-brand { color: #fca5a5; }
.us-brand { color: #6ee7b7; }

.comp-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  border-top: 1px solid var(--border);
  background: white;
}
.comp-row:nth-child(even) { background: #fafafa; }
.comp-row-last { /* no special style needed */ }

.comp-feature {
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
}
.comp-them {
  padding: 10px 8px;
  color: var(--danger);
  font-size: 0.8rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}
.comp-us {
  padding: 10px 8px;
  color: var(--success);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 150, 105, 0.05);
  line-height: 1.3;
}

/* Login Card */
.login-card {
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(15,23,42,0.08) !important;
}
.login-header {
  text-align: center;
  margin-bottom: 20px;
}
.login-header h2 {
  margin-bottom: 4px;
  font-size: 1.2rem;
}
.login-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}
.login-form {
  display: flex;
  flex-direction: column;
}
.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.login-form input {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244,63,94,0.12);
}
.login-btn {
  width: 100%;
  min-height: 50px;
  background: var(--rose);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0;
  letter-spacing: 0.2px;
  transition: opacity 0.15s, transform 0.1s;
}
.login-btn:hover { opacity: 0.92; }
.login-btn:active { transform: scale(0.99); }

.login-msg {
  font-size: 0.85rem;
  color: var(--danger);
  text-align: center;
  min-height: 20px;
  margin-top: 8px;
}
.login-helper {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
  margin-bottom: 0;
}

/* Landing Footer */
.landing-footer {
  background: var(--navy);
  color: #9ca3af;
  padding: 28px 16px 24px;
  text-align: center;
  margin-top: 8px;
}
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
}
.footer-brand {
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 12px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: white; }
.footer-copy {
  font-size: 0.75rem;
  margin: 0;
  color: #6b7280;
}

/* =====================================================
   RESPONSIVE — LANDING
   ===================================================== */

/* Stack Fresha banner on very small screens */
@media (max-width: 480px) {
  .fresha-banner-inner {
    flex-wrap: wrap;
  }
  .fresha-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
  }

  /* Comparison table — collapse on tiny screens */
  .comp-header,
  .comp-row {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .comp-feature,
  .comp-them,
  .comp-us {
    padding: 9px 6px;
    font-size: 0.75rem;
  }
  .comp-brand { font-size: 0.78rem; }
}

@media (min-width: 600px) {
  .hero-cta {
    display: inline-block;
    width: auto;
    padding: 14px 32px;
  }
  .hero-card { padding: 32px 24px; }
  .hero-card h2 { font-size: 1.6rem; }
  .hero-sub { font-size: 1rem; }
  .login-card { max-width: 440px; margin-left: auto; margin-right: auto; }
}
