:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.brand-name {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-badge {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-switcher {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.portal-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-tab:hover {
  color: var(--text-main);
}

.portal-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.endpoint-pill {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--bg-subtle);
  color: var(--text-light);
  font-family: monospace;
}

.portal-tab.active .endpoint-pill {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 0.98rem;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-danger {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

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

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

/* View Switching */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* Client Portal Layout */
.client-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: #fff;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.client-hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 0.6rem;
}

.host-header .eyebrow-tag {
  background: var(--primary-soft);
  color: var(--primary);
}

.client-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.client-hero p {
  color: #c7d2fe;
  font-size: 1rem;
}

.client-container {
  max-width: 1280px;
  margin: -1.5rem auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 980px) {
  .client-container {
    grid-template-columns: 1fr;
  }
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.step-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Activities Grid */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

.activity-card {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.activity-card:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.activity-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.activity-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.activity-category-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  color: #fff;
}

.activity-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
}

.activity-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.activity-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 0.6rem;
}

/* Date & Time Picker Layout */
.datetime-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .datetime-layout {
    grid-template-columns: 1fr;
  }
}

.date-picker-panel {
  background: var(--bg-subtle);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mini-cal-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.mini-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.mini-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-btn {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--bg-surface);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.cal-day-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.cal-day-btn.selected {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.cal-day-btn.today {
  border-color: var(--primary);
}

.cal-day-btn:disabled,
.cal-day-btn.muted {
  background: transparent;
  color: #cbd5e1;
  cursor: not-allowed;
}

/* Available Slots Panel */
.slots-panel {
  display: flex;
  flex-direction: column;
}

.slots-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.slots-panel-header h3 {
  font-size: 0.98rem;
  font-weight: 700;
}

.badge-subtle {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.55rem;
  max-height: 295px;
  overflow-y: auto;
  padding-right: 4px;
}

.slot-btn {
  padding: 0.55rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.slot-spots-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--success);
}

.slot-btn.selected .slot-spots-label {
  color: #e0e7ff;
}

.slot-btn:disabled .slot-spots-label {
  color: #94a3b8;
  text-decoration: none;
}

.capacity-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: #e0e7ff;
  color: #3730a3;
}

.inline-cap-input {
  width: 68px;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.color-legend-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding: 0.6rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--bg-subtle);
}

.legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.timeframes-builder {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-subtle);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.timeframe-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.timeframe-row input[type="time"] {
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-surface);
}

.client-container.client-single-col {
  max-width: 960px;
  grid-template-columns: 1fr;
}

.summary-page-container {
  max-width: 1180px;
  margin: -1.5rem auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.summary-page-container.summary-single-col {
  max-width: 720px;
  grid-template-columns: 1fr;
}

.auth-gate-container {
  max-width: 440px;
  margin: 3.5rem auto;
  padding: 0 1.25rem;
}

.auth-gate-card {
  text-align: center;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
}

.auth-gate-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
}

.email-status-notice {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
}

.email-status-notice.sent {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.email-status-notice.unconfigured {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

@media (max-width: 960px) {
  .summary-page-container {
    grid-template-columns: 1fr;
  }
}

.reschedule-panel {
  margin-top: 1.25rem;
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.email-preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.email-preview-banner {
  background: #ecfdf5;
  border-bottom: 1px solid #a7f3d0;
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.email-sent-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #065f46;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.email-envelope-header {
  padding: 0.85rem 1.15rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-body-content {
  padding: 1.25rem;
}

.email-body-content h4 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.email-body-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.email-summary-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.83rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.email-cta-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.timeframe-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.slot-btn.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.slot-btn:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Forms */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.req {
  color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--bg-surface);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

/* Booking Sidebar Summary */
.booking-sidebar {
  position: sticky;
  top: 84px;
}

.summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-md);
}

.summary-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.summary-label {
  color: var(--text-muted);
  font-weight: 500;
}

.summary-val {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

.confirmation-box {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  text-align: center;
}

.confirm-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
}

.confirmation-box h4 {
  color: #065f46;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.confirmation-box p {
  font-size: 0.82rem;
  color: #047857;
  margin-bottom: 0.75rem;
}

/* ==================== HOST PORTAL & CALENDAR ==================== */
.host-container {
  max-width: 1380px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

.host-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.host-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.host-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.host-header-actions {
  display: flex;
  gap: 0.65rem;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.2rem;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Calendar Toolbar */
.calendar-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-range-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-left: 0.5rem;
}

.cal-filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-main);
}

.view-mode-toggle {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
}

.mode-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Calendar Card & TimeGrid */
.calendar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.timegrid-header {
  display: grid;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.timegrid-header.cols-7 {
  grid-template-columns: 72px repeat(7, 1fr);
}

.timegrid-header.cols-1 {
  grid-template-columns: 72px 1fr;
}

.tg-head-cell {
  padding: 0.65rem 0.5rem;
  text-align: center;
  border-left: 1px solid var(--border-color);
}

.tg-head-cell.today {
  background: var(--primary-soft);
}

.tg-day-name {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
}

.tg-day-num {
  display: inline-block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.tg-head-cell.today .tg-day-num {
  color: var(--primary);
}

.timegrid-body-scroll {
  max-height: 680px;
  overflow-y: auto;
}

.timegrid-body {
  display: grid;
  position: relative;
  min-height: 720px; /* 12 hours * 60px */
}

.timegrid-body.cols-7 {
  grid-template-columns: 72px repeat(7, 1fr);
}

.timegrid-body.cols-1 {
  grid-template-columns: 72px 1fr;
}

.tg-time-axis {
  border-right: 1px solid var(--border-color);
  background: #fafafa;
}

.tg-time-label {
  height: 60px;
  padding: 4px 8px 0 0;
  text-align: right;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 1px dashed #e2e8f0;
}

.tg-day-col {
  position: relative;
  border-left: 1px solid var(--border-color);
  background-image: linear-gradient(to bottom, #f1f5f9 1px, transparent 1px);
  background-size: 100% 60px;
  min-height: 720px;
}

.tg-day-col.today {
  background-color: rgba(238, 242, 255, 0.28);
}

.cal-event-block {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 6px;
  padding: 4px 7px;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.25;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  z-index: 5;
  border-left: 4px solid rgba(0, 0, 0, 0.25);
}

.cal-event-block:hover {
  transform: scale(1.015);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.26);
  z-index: 15;
}

.cal-event-block.status-cancelled {
  opacity: 0.5;
  text-decoration: line-through;
}

.cal-event-time {
  font-weight: 700;
  font-size: 0.7rem;
  opacity: 0.92;
}

.cal-event-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-sub {
  font-size: 0.7rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Month View */
.monthgrid-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.6rem 0;
}

.monthgrid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.month-cell {
  min-height: 120px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.month-cell.muted {
  background: #f8fafc;
  color: #94a3b8;
}

.month-cell-date {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.month-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Agenda Table View */
.list-wrapper {
  overflow-x: auto;
}

.apt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.apt-table th,
.apt-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.apt-table th {
  background: var(--bg-subtle);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
}

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill.confirmed {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.pending {
  background: #fef3c7;
  color: #b45309;
}

.status-pill.completed {
  background: #e0e7ff;
  color: #4338ca;
}

.status-pill.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-card.modal-lg {
  max-width: 740px;
}

.modal-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-form,
.modal-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.modal-footer-right {
  display: flex;
  gap: 0.6rem;
}

.host-activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.host-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 0.5rem 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.error {
  background: #dc2626;
}
