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

:root {
  --ink: #132422;
  --ink-soft: #54655F;
  --teal: #0E3F3D;
  --teal-mid: #1E6B63;
  --amber: #E2A23B;
  --bg: #F6F8F7;
  --card: #FFFFFF;
  --line: #E1E7E4;
  --danger: #B3261E;
  --danger-bg: #FBE9E7;
  --success-bg: #EAF3E8;
  --warn-bg: #FFF3DE;
  --warn-text: #8A5A12;
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}
h1, h2, h3, h4, .display { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* --- Top bar + folder-tab navigation --- */
.topbar {
  background: var(--teal);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 0 24px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk'; font-weight: 700; font-size: 16px;
}
.brand-name { font-family: 'Space Grotesk'; font-weight: 600; font-size: 17px; }
.brand-sub { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 1px; }
.logout-link { color: rgba(255,255,255,0.75); font-size: 13px; text-decoration: none; align-self: center; margin-bottom: 12px; }
.logout-link:hover { color: white; }

.tabbar { display: flex; gap: 4px; background: var(--teal); padding: 10px 20px 0 20px; overflow-x: auto; }
.tab {
  font-family: 'Space Grotesk';
  font-weight: 600; font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 10px 10px 0 0;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { background: rgba(255,255,255,0.18); color: white; }
.tab.active { background: var(--bg); color: var(--teal); }

.page { max-width: 1000px; margin: 0 auto; padding: 24px 20px 48px; }

/* --- Cards --- */
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(19,36,34,0.07), 0 1px 2px rgba(19,36,34,0.04);
  margin-bottom: 16px;
}
.card h3 { margin-top: 0; color: var(--teal); font-size: 16px; }
.card h4 { color: var(--teal-mid); font-size: 14px; margin-bottom: 6px; }

/* --- Buttons --- */
.btn {
  font-family: 'Inter'; font-weight: 600; font-size: 13px;
  padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: white; }
.btn-secondary { background: var(--line); color: var(--ink); }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: transparent; color: var(--teal-mid); border: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* --- Forms --- */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], select {
  font-family: 'Inter'; font-size: 13.5px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: white; color: var(--ink);
}
label { font-size: 12.5px; color: var(--ink-soft); }

/* --- Toggle switch --- */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--line); transition: 0.2s; border-radius: 22px; }
.slider:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; transition: 0.2s; border-radius: 50%; }
input:checked + .slider { background: var(--teal-mid); }
input:checked + .slider:before { transform: translateX(18px); }

/* --- Status pills --- */
.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-confirmed, .pill-rescheduled { background: var(--success-bg); color: var(--teal-mid); }
.pill-completed { background: #E7ECEB; color: var(--teal); }
.pill-no_show { background: var(--danger-bg); color: var(--danger); }
.pill-cancelled { background: #F0F0F0; color: #999; }

/* --- Checklist --- */
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist-item:last-child { border-bottom: none; }
.check-badge { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.check-done { background: var(--teal-mid); color: white; }
.check-pending { background: var(--line); color: var(--ink-soft); }

/* --- Metric cards (insights) --- */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { background: var(--card); border-radius: 14px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border-left: 4px solid var(--teal-mid); }
.metric-value { font-family: 'Space Grotesk'; font-size: 30px; font-weight: 700; color: var(--teal); }
.metric-label { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; }
th { background: var(--teal); color: white; text-align: left; padding: 10px 12px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 10px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }

/* --- Day navigation --- */
.day-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.day-nav a { color: var(--teal-mid); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.day-nav strong { font-family: 'Space Grotesk'; font-size: 16px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-soft); background: var(--card); border-radius: 14px; }
.inactive { opacity: 0.5; }

/* --- Platform operator dashboard --- */
.topbar-admin { background: var(--ink); }
.subscription-badge { display: inline-flex; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sub-trial { background: var(--warn-bg); color: var(--warn-text); }
.sub-active { background: var(--success-bg); color: var(--teal-mid); }
.sub-overdue { background: var(--danger-bg); color: var(--danger); }
.sub-cancelled { background: #F0F0F0; color: #999; }

.powered-by { text-align: center; font-size: 11px; color: var(--ink-soft); padding: 16px 0 8px; opacity: 0.7; }
.pricing-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:16px; align-items:start; }
.pricing-card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px; }
.pricing-card h3 { color:var(--teal); margin:0 0 6px; }
.pricing-popular { border:2px solid var(--teal-mid); }
.popular-label { display:inline-block; margin-bottom:12px; padding:3px 9px; border-radius:999px; background:var(--success-bg); color:var(--teal-mid); font-size:11px; font-weight:700; text-transform:uppercase; }
.plan-tagline { color:var(--ink-soft); min-height:42px; font-size:13px; }
.price-line { font-family:'Space Grotesk'; color:var(--teal); font-size:24px; font-weight:700; margin:18px 0 2px; }
.price-line small, .annual-line { font-family:'Inter'; font-size:12px; font-weight:500; color:var(--ink-soft); }
.pricing-card ul { padding-left:18px; color:var(--ink-soft); font-size:12.5px; line-height:1.55; }
.billing-note { margin-top:18px; color:var(--ink-soft); font-size:12.5px; }

@media (max-width: 640px) {
  table.responsive-table thead { display: none; }
  table.responsive-table, table.responsive-table tbody, table.responsive-table tr, table.responsive-table td {
    display: block; width: 100%;
  }
  table.responsive-table tr {
    margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 0; background: white;
  }
  table.responsive-table td {
    display: flex; justify-content: space-between; padding: 6px 12px; border: none; font-size: 13px;
  }
  table.responsive-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--ink-soft); margin-right: 12px;
  }
}
