/* ============================================================
   TFL Mentorat — style.css
   Light/Dark theme, violet palette, mobile-first
   ============================================================ */

/* ---------- Google Font import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS VARIABLES — Light mode (default)
   ============================================================ */
:root,
[data-theme="light"] {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-hover: #f4f4f5;
  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;
  --color-primary-light: rgba(124, 58, 237, 0.08);
  --color-primary-glow: rgba(124, 58, 237, 0.15);
  --color-text: #09090b;
  --color-text-muted: #71717a;
  --color-text-faint: #a1a1aa;
  --color-border: #e4e4e7;
  --color-border-light: #f4f4f5;
  --color-muted: #f4f4f5;
  --color-success: #22c55e;
  --color-success-bg: rgba(34, 197, 94, 0.1);
  --color-success-text: #15803d;
  --color-info: #3b82f6;
  --color-info-bg: rgba(59, 130, 246, 0.1);
  --color-info-text: #1d4ed8;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.03);
  --shadow-primary: 0 4px 14px rgba(124, 58, 237, 0.25);
  --nav-height: 64px;
}

/* ============================================================
   CSS VARIABLES — Dark mode
   ============================================================ */
[data-theme="dark"] {
  --color-bg: #09090b;
  --color-surface: #0a0a0b;
  --color-surface-hover: #18181b;
  --color-primary: #a78bfa;
  --color-primary-hover: #8b5cf6;
  --color-primary-light: rgba(167, 139, 250, 0.1);
  --color-primary-glow: rgba(167, 139, 250, 0.15);
  --color-text: #fafafa;
  --color-text-muted: #a1a1aa;
  --color-text-faint: #71717a;
  --color-border: #27272a;
  --color-border-light: #1e1e21;
  --color-muted: #18181b;
  --color-success: #22c55e;
  --color-success-bg: rgba(34, 197, 94, 0.12);
  --color-success-text: #4ade80;
  --color-info: #3b82f6;
  --color-info-bg: rgba(59, 130, 246, 0.12);
  --color-info-text: #60a5fa;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
  --shadow-primary: 0 4px 14px rgba(167, 139, 250, 0.2);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100dvh;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-hover);
}

/* ============================================================
   LAYOUT
   ============================================================ */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.app-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}
.app-container--wide {
  max-width: 1100px;
}

.app-main {
  flex: 1;
  padding: 24px 16px 24px;
}

.app-main.has-nav {
  padding-bottom: calc(var(--nav-height) + 24px);
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60dvh;
  text-align: center;
  padding: 24px 16px;
}

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

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
}

/* ============================================================
   AUTH
   ============================================================ */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px 16px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.auth-form {
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: 28px 24px;
}
.auth-forgot-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.auth-forgot-link:hover { text-decoration: underline; }
.form-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: 5px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

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

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-block {
  width: 100%;
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  padding: 6px 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
  position: relative;
}

.nav-item-more {
  overflow: visible;
}

.nav-plus-bubble {
  width: 40px;
  height: 40px;
  margin-top: -18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #ffffff;
  border: 3px solid var(--color-surface);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
}

.nav-item-more.active .nav-plus-bubble,
.nav-item-more:active .nav-plus-bubble {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.nav-item:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 0 0 2px 2px;
}
/* Onboarding progress bar in Materials page */
.lg-onboarding-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  text-decoration: none;
  transition: filter 0.15s;
}
[data-theme="dark"] .lg-onboarding-bar {
  background: linear-gradient(135deg, #0369a1, #075985);
}
.lg-onboarding-bar:hover {
  filter: brightness(1.08);
}
.lg-onboarding-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lg-onboarding-bar-icon {
  font-size: 18px;
}
.lg-onboarding-bar-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.lg-onboarding-bar-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.lg-onboarding-bar-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}
.lg-onboarding-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lg-onboarding-bar-track {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
}
.lg-onboarding-bar-fill {
  height: 100%;
  background: #fff;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.lg-onboarding-bar-cta {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .lg-onboarding-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 16px;
  }
  .lg-onboarding-bar-right {
    justify-content: space-between;
  }
  .lg-onboarding-bar-track {
    flex: 1;
  }
}

.nav-item-locked {
  opacity: 0.35;
  pointer-events: auto;
  cursor: not-allowed;
}

.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ============================================================
   LOADING & SPINNER
   ============================================================ */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
@keyframes toast-in {
  from {
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
  }
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 999;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  min-width: 220px;
  text-align: center;
}

.toast.show {
  animation: toast-in 0.3s ease forwards;
  pointer-events: auto;
  opacity: 1;
}

.toast.hide {
  animation: toast-out 0.3s ease forwards;
}

.toast-success {
  background: #f0fdf4;
  border-color: var(--color-success);
  color: #15803d;
}

[data-theme="dark"] .toast-success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.toast-error {
  background: #fef2f2;
  border-color: var(--color-error);
  color: #b91c1c;
}

[data-theme="dark"] .toast-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  width: 100%;
  background: var(--color-border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 0;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboarding-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px calc(var(--nav-height) + 24px);
}

.onboarding-header {
  margin-bottom: 28px;
}

.onboarding-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

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

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.onboarding-step.completed {
  border-color: var(--color-success);
  background: rgba(34, 197, 94, 0.04);
}

[data-theme="dark"] .onboarding-step.completed {
  background: rgba(34, 197, 94, 0.07);
}

.onboarding-step.current {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.onboarding-step.locked {
  opacity: 0.5;
  pointer-events: none;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--color-border);
  color: var(--color-text-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.onboarding-step.completed .step-number {
  background: var(--color-success);
  color: #ffffff;
}

.onboarding-step.current .step-number {
  background: var(--color-primary);
  color: #ffffff;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.step-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.step-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.onboarding-step.completed .step-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

[data-theme="dark"] .onboarding-step.completed .step-badge {
  color: #86efac;
}

.step-badge-confirm {
  display: inline-block;
  cursor: pointer;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 6px 14px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.15s;
}
.step-badge-confirm:hover {
  background: var(--color-primary);
  color: #fff;
}

.step-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 16px;
  background: #25d366;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.step-wa-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}
.step-mission-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.step-mission-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Confirmation Modal */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-modal {
  background: var(--color-surface);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.confirm-modal-header {
  text-align: center;
  margin-bottom: 24px;
}
.confirm-modal-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}
.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
}
.confirm-modal-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}
.confirm-modal-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border);
  transition: all 0.15s;
}
.confirm-check:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.confirm-check:has(input:checked) {
  border-color: var(--color-success);
  background: rgba(34, 197, 94, 0.06);
}
.confirm-checkbox {
  display: none;
}
.confirm-check-box {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-top: 1px;
}
.confirm-check-box::after {
  content: '';
  display: none;
}
.confirm-checkbox:checked + .confirm-check-box {
  background: var(--color-success);
  border-color: var(--color-success);
}
.confirm-checkbox:checked + .confirm-check-box::after {
  display: block;
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.confirm-check-text {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.5;
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.confirm-modal-submit {
  flex: 1;
}
.confirm-modal-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   START PAGE
   ============================================================ */
.start-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px calc(var(--nav-height) + 24px);
}

.start-header {
  margin-bottom: 28px;
}

.start-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.start-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  margin-bottom: 8px;
}

.start-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* 2x2 grid on mobile */
.start-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.start-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 14px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease, transform 0.1s ease;
  box-shadow: var(--shadow);
}

.start-card:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.start-card:active {
  transform: translateY(0);
}

.start-card-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.start-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.start-card-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.start-cta {
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-hover)
  );
  border-radius: var(--radius);
  padding: 20px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.start-cta:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  color: #ffffff;
}

.start-cta-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.start-cta-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.start-cta-desc {
  font-size: 0.875rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* ============================================================
   WIZARD PAGE
   ============================================================ */
.wizard-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px calc(var(--nav-height) + 24px);
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.wizard-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background-color 0.2s ease, transform 0.2s ease, width 0.2s ease;
  flex-shrink: 0;
}

.wizard-dot.done {
  background: var(--color-primary);
  opacity: 0.5;
}

.wizard-dot.active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 999px;
  transform: none;
}

.wizard-count {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.wizard-section {
  margin-bottom: 24px;
}

.wizard-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.wizard-section p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.wizard-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.wizard-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wizard-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.wizard-textarea::placeholder {
  color: var(--color-text-muted);
}

.wizard-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

.wizard-nav .btn {
  flex: 1;
}

/* ============================================================
   OBJECTIVES PAGE
   ============================================================ */
.objectives-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px calc(var(--nav-height) + 24px);
}

.objectives-page .page-header {
  margin-bottom: 20px;
}

.objectives-page .page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.objectives-page .page-header p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ============================================================
   RESPONSIVE — tablets / larger screens
   ============================================================ */
@media (min-width: 480px) {
  .app-container {
    padding: 0 24px;
  }

  .auth-container {
    padding: 40px 24px;
  }

  .start-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .start-title {
    font-size: 2rem;
  }

  .auth-title {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .app-main {
    padding: 32px 24px 32px;
  }

  .app-main.has-nav {
    padding-bottom: calc(var(--nav-height) + 32px);
  }

  .start-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius) var(--radius) 0 0;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }
}

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ============================================================
   THEME TOGGLE BUTTON (optional utility)
   ============================================================ */
.theme-toggle {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--color-primary);
  background: var(--color-surface-hover);
}

/* ============================================================
   Admin Panel
   ============================================================ */

.admin-cursanti-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.admin-table-row {
  cursor: pointer;
  transition: background 0.15s;
}
.admin-table-row:hover {
  background: var(--color-primary-light);
}
.admin-table-row td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.admin-row-expanded td {
  border-bottom: none;
  background: var(--color-primary-light);
}
.admin-detail-row td {
  padding: 0 10px 16px;
  border-bottom: 2px solid var(--color-primary);
  background: var(--color-primary-light);
}
.admin-td-color { width: 28px; text-align: center; }
.admin-td-name strong { display: block; font-size: 14px; }
.admin-td-email { font-size: 12px; color: var(--color-text-muted); display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.admin-td-progress { width: 100px; }
.admin-mini-progress { height: 6px; background: var(--color-border); border-radius: 3px; overflow: hidden; }
.admin-mini-bar { height: 100%; background: var(--color-primary); border-radius: 3px; transition: width 0.3s; }
.admin-pct-sm { font-size: 11px; color: var(--color-text-muted); }
.admin-td-module { font-size: 13px; white-space: nowrap; }
.admin-td-active { white-space: nowrap; }
.admin-td-last { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.admin-td-expand { width: 24px; text-align: center; color: var(--color-text-muted); }
.admin-th-color { width: 28px; }
.admin-th-expand { width: 24px; }

.admin-search-count {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-right: 4px;
}

/* Sticky search and filters */
.admin-search-filters-sticky {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--color-bg);
  padding: 12px 0;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}

@media (max-width: 768px) {
  .admin-table th.admin-th-progress,
  .admin-table td.admin-td-progress,
  .admin-table th.admin-th-module,
  .admin-table td.admin-td-module,
  .admin-table th.admin-th-last,
  .admin-table td.admin-td-last {
    display: none;
  }
  .admin-td-email { max-width: 120px; }
}

.admin-cursant {
  padding: 16px;
}

.admin-cursant-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.admin-cursant-progress {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.admin-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-day {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.admin-day.completed {
  background: rgba(34, 197, 94, 0.1);
}

.admin-day.available {
  background: var(--color-primary-light);
}

.admin-day.locked {
  opacity: 0.5;
}

.admin-day-label {
  font-weight: 700;
  min-width: 24px;
  color: var(--color-primary);
}

.admin-day-name {
  flex: 1;
  color: var(--color-text);
}

.admin-day-status {
  font-size: 16px;
}

.btn-sm {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
}

/* Admin Details (expandable per cursant) */
.admin-details {
  margin-top: 12px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

.detail-item {
  margin-bottom: 10px;
}

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.detail-value {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Onboarding incomplete banner */
.onboarding-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-warning);
  color: #1a1a2e;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s;
}

.onboarding-banner:hover {
  opacity: 0.9;
  color: #1a1a2e;
}

.onboarding-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.onboarding-banner-text strong {
  font-weight: 700;
}

/* ============================================================
   Top Bar (redesigned)
   ============================================================ */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-back {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: all 0.15s;
}
.top-bar-back:hover {
  background: var(--color-muted);
  color: var(--color-text);
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-bar-logo {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  padding: 4px 10px;
  border-radius: var(--radius-md);
  letter-spacing: 0.5px;
}
.top-bar-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-action {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 7px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  text-decoration: none;
}
.top-bar-action:hover {
  background: var(--color-muted);
  color: var(--color-text);
}

.top-bar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.top-bar-avatar:hover {
  background: var(--color-primary-glow);
}

/* Legacy .top-bar-link (fallback) */
.top-bar-link {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.top-bar-link:hover {
  color: #fff;
  background: var(--color-surface-hover);
}

/* ============================================================
   TRACKER PAGE
   ============================================================ */

.tracker-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

/* --- Streak --- */
.streak-card {
  padding: 16px 20px;
}

.streak-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.streak-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.streak-day-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.streak-day {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.streak-day.empty {
  background: var(--color-border);
  border: 2px solid transparent;
}

.streak-day.filled {
  background: var(--color-primary);
  border: 2px solid transparent;
}

.streak-day.today {
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.streak-day.empty.today {
  background: var(--color-primary-light);
}

.streak-day-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* --- Tracker form sections --- */
.tracker-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tracker-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 12px;
}

/* --- AB Fields --- */
.ab-field {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}

.ab-field:last-of-type {
  margin-bottom: 0;
}

.ab-field-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.ab-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 32px;
}

.ab-desc {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

.ab-buttons {
  display: flex;
  gap: 8px;
}

.ab-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-align: center;
}

.ab-btn:active {
  transform: scale(0.97);
}

.ab-btn.ab-yes.active {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.ab-btn.ab-partial.active {
  background: #fef9c3;
  border-color: #eab308;
  color: #a16207;
}

.ab-btn.ab-no.active {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

[data-theme="dark"] .ab-btn.ab-yes.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #4ade80;
}

[data-theme="dark"] .ab-btn.ab-partial.active {
  background: rgba(234, 179, 8, 0.18);
  border-color: #eab308;
  color: #facc15;
}

[data-theme="dark"] .ab-btn.ab-no.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #f87171;
}

/* --- Slider --- */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

#slider-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 24px;
  text-align: center;
}

.tracker-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--color-primary) 0%,
    var(--color-primary) calc((var(--slider-pct, 44.4%))),
    var(--color-border) calc((var(--slider-pct, 44.4%)))
  );
  outline: none;
  cursor: pointer;
}

.tracker-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 1.5px var(--color-primary), var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tracker-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 1.5px var(--color-primary), var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tracker-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

/* --- Color buttons --- */
.color-buttons {
  display: flex;
  gap: 10px;
}

.color-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-family: var(--font-family);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.color-btn:active {
  transform: scale(0.96);
}

.color-btn-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--btn-color, #ccc);
  transition: transform 0.15s ease;
}

.color-btn-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.color-btn.active {
  border-color: var(--btn-color, var(--color-primary));
  background: var(--color-surface);
}

.color-btn.active .color-btn-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.color-btn.active .color-btn-label {
  color: var(--color-text);
}

.color-btn-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* --- Save button --- */
.tracker-save-btn {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  font-size: 1rem;
}

/* --- GRS card --- */
.grs-card {
  margin-top: 4px;
  opacity: 0.7;
}

.grs-card.grs-card-active {
  opacity: 1;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.grs-card.grs-card-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.grs-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.grs-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.grs-card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.grs-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.grs-card-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.grs-card-arrow {
  margin-left: auto;
  font-size: 1.25rem;
  color: var(--color-primary);
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================================================
   GRS FORM / MONTHLY REPORT / SIMPLIFIED
   ============================================================ */

.grs-form-page,
.monthly-report-page,
.simplified-form-page {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 24px;
}

/* Readonly value block */
.grs-readonly-value {
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  min-height: 40px;
}

/* Tri-radio buttons (Da / Partial / Nu) */
.grs-tri-radio {
  display: flex;
  gap: 8px;
}

.grs-tri-btn {
  flex: 1;
  padding: 10px 6px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.grs-tri-btn:hover {
  border-color: var(--color-primary);
}

.grs-tri-btn.active.grs-tri-da {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.grs-tri-btn.active.grs-tri-partial {
  background: #fef9c3;
  border-color: #f59e0b;
  color: #92400e;
}

.grs-tri-btn.active.grs-tri-nu {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Generic active for non-typed tri-btns */
.grs-tri-btn.active:not(.grs-tri-da):not(.grs-tri-partial):not(.grs-tri-nu) {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* AB comparison table */
.grs-ab-table {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.grs-ab-header {
  display: flex;
  background: var(--color-surface);
  border-bottom: 1.5px solid var(--color-border);
  padding: 8px 0;
}

.grs-ab-header .grs-ab-col-label,
.grs-ab-header .grs-ab-col {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.grs-ab-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}

.grs-ab-row:last-child {
  border-bottom: none;
}

.grs-ab-col-label {
  width: 80px;
  flex-shrink: 0;
  padding-left: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.grs-ab-col {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Number input inside AB table */
.grs-num-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.grs-num-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.grs-num-input {
  width: 52px;
  padding: 6px 8px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  text-align: center;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s ease;
}

.grs-num-input:focus {
  border-color: var(--color-primary);
}

.grs-readonly-num {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Checkboxes */
.grs-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grs-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--color-surface);
}

.grs-checkbox-label:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.grs-checkbox-label input[type="checkbox"] {
  accent-color: var(--color-primary);
}

/* Color buttons in GRS form */
.grs-color-buttons {
  justify-content: center;
  margin-top: 16px;
}

/* Review section */
.grs-review {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.grs-review-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.grs-review-item:last-child {
  border-bottom: none;
}

.grs-review-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  flex-shrink: 0;
  min-width: 90px;
}

.grs-review-value {
  font-size: 0.875rem;
  color: var(--color-text);
  text-align: right;
}

.grs-review-color.verde { color: #22c55e; font-weight: 700; }
.grs-review-color.galben { color: #f59e0b; font-weight: 700; }
.grs-review-color.rosu { color: #ef4444; font-weight: 700; }

/* Need type radio (simplified form) */
.sf-need-radio {
  flex-wrap: wrap;
}

.sf-need-radio .grs-tri-btn {
  min-width: calc(50% - 8px);
}

/* Monthly table readonly */
.grs-monthly-table .grs-ab-col {
  padding: 4px 0;
}

/* Dark mode overrides for GRS */
[data-theme="dark"] .grs-tri-btn.active.grs-tri-da {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #4ade80;
}

[data-theme="dark"] .grs-tri-btn.active.grs-tri-partial {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

[data-theme="dark"] .grs-tri-btn.active.grs-tri-nu {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #f87171;
}

[data-theme="dark"] .grs-checkbox-label:has(input:checked) {
  background: rgba(124, 58, 237, 0.15);
}

/* ============================================================
   COMMUNITY
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   COMMUNITY — Channel-based layout (Slack/Discord style)
   ═══════════════════════════════════════════════════════════ */

.community-page {
  padding: 0;
  height: calc(100vh - 180px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}

/* --- 3-column layout --- */
.ch-layout {
  display: flex;
  height: 100%;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}

/* --- Channels sidebar --- */
.ch-sidebar {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  background: var(--color-muted);
}

.ch-sidebar-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.ch-sidebar-header h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0;
}

.ch-channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ch-channel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}

.ch-channel-item:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

.ch-channel-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.ch-channel-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.ch-channel-item.active .ch-channel-icon {
  opacity: 1;
}

.ch-channel-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-lock-icon {
  opacity: 0.5;
  flex-shrink: 0;
}

.ch-unread-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Main messages area --- */
.ch-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ch-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
  flex-shrink: 0;
}

.ch-main-header-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.ch-main-header-info h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.ch-main-header-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-toggle-members-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ch-toggle-members-btn:hover {
  background: var(--color-muted);
  border-color: var(--color-border);
}

/* --- Messages scroll area --- */
.ch-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.ch-messages-feed {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ch-loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.ch-empty-messages {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  color: var(--color-text-muted);
  text-align: center;
}

.ch-empty-messages p {
  margin: 0;
  font-size: 0.9375rem;
}

/* --- Single message --- */
.ch-message {
  display: flex;
  gap: 12px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.1s ease;
  position: relative;
}

.ch-message:hover {
  background: var(--color-muted);
}

.ch-message:hover .ch-msg-actions {
  opacity: 1;
  pointer-events: auto;
}

.ch-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.ch-msg-body {
  flex: 1;
  min-width: 0;
}

.ch-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.ch-msg-author {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.ch-msg-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.ch-msg-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ch-msg-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.ch-msg-action-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.ch-delete-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-error);
}

/* Reply preview */
.ch-msg-reply-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 4px;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-muted);
  font-size: 0.8125rem;
}

.ch-msg-reply-author {
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
}

.ch-msg-reply-text {
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Message content */
.ch-msg-content {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Reactions */
.ch-msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.ch-react-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--color-border-light);
  border-radius: 100px;
  background: var(--color-muted);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ch-react-chip:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.ch-react-chip.reacted {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.ch-react-count {
  font-weight: 600;
  font-size: 0.75rem;
}

/* Emoji picker */
.ch-emoji-picker {
  position: absolute;
  right: 0;
  top: -4px;
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.ch-emoji-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-size: 1.125rem;
  transition: background 0.1s ease, transform 0.1s ease;
}

.ch-emoji-pick:hover {
  background: var(--color-muted);
  transform: scale(1.2);
}

/* --- Reply bar --- */
.ch-reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--color-muted);
  border-top: 1px solid var(--color-border-light);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.ch-reply-bar span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-reply-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  padding: 0 4px;
  line-height: 1;
}

.ch-reply-cancel:hover {
  color: var(--color-text);
}

/* --- Composer --- */
.ch-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface);
  flex-shrink: 0;
}

.ch-composer-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  max-height: 120px;
  transition: border-color 0.15s ease;
}

.ch-composer-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.ch-composer-input::placeholder {
  color: var(--color-text-muted);
}

.ch-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ch-send-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.ch-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ch-composer-locked {
  justify-content: center;
  padding: 14px 20px;
}

.ch-composer-locked-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* --- Members panel --- */
.ch-members-panel {
  width: 220px;
  min-width: 220px;
  border-left: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  background: var(--color-muted);
}

.ch-members-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ch-members-header h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0;
}

.ch-members-online {
  font-size: 0.75rem;
  color: #22c55e;
  font-weight: 500;
}

.ch-members-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ch-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.ch-member-item:hover {
  background: var(--color-border-light);
}

.ch-member-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ch-member-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-muted);
}

.ch-member-status-dot.online {
  background: #22c55e;
}

.ch-member-status-dot.away {
  background: #f59e0b;
}

.ch-member-status-dot.offline {
  background: var(--color-text-muted);
  opacity: 0.4;
}

.ch-member-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ch-member-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-member-role {
  font-size: 0.6875rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* Post links in messages */
.post-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(var(--color-primary-rgb, 79, 70, 229), 0.4);
  word-break: break-all;
}

.post-link:hover {
  text-decoration-color: var(--color-primary);
}

/* --- Responsive: hide panels on mobile --- */
@media (max-width: 900px) {
  .community-page {
    height: calc(100dvh - 132px);
    min-height: 520px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .ch-layout {
    flex-direction: column;
    border-radius: 0;
  }

  .ch-sidebar {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-surface);
  }

  .ch-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 6px;
    border-bottom: 0;
  }

  .ch-channel-list {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding: 6px 12px 12px;
    scrollbar-width: auto;
  }

  .ch-channel-list::-webkit-scrollbar {
    display: initial;
  }

  .ch-channel-row {
    flex: 0 0 auto;
    width: auto;
  }

  .ch-channel-row .ch-channel-item,
  .ch-channel-item {
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    background: var(--color-muted);
    box-shadow: none;
  }

  .ch-channel-item.active {
    border-color: rgba(124, 58, 237, 0.35);
    background: var(--color-primary-light);
  }

  .ch-channel-item.active::before {
    display: none;
  }

  .ch-channel-icon svg {
    width: 16px;
    height: 16px;
  }

  .ch-channel-name {
    flex: 0 1 auto;
    max-width: 210px;
  }

  .ch-channel-gear {
    display: none;
  }

  .ch-sidebar-members-section,
  .ch-dm-section {
    display: none;
  }

  .ch-main {
    min-height: 0;
    flex: 1 1 auto;
  }

  .ch-members-panel {
    display: none;
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 60px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--color-border);
  }
  .ch-members-panel.visible {
    display: flex;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .ch-members-panel {
    width: 180px;
    min-width: 180px;
  }
  .ch-sidebar {
    width: 180px;
    min-width: 180px;
  }
}

/* ── Sidebar: active members dropdown ── */

.ch-sidebar-members-section {
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
  padding-top: 4px;
}

.ch-sidebar-members-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.ch-sidebar-members-toggle:hover {
  color: var(--color-text);
}

.ch-sidebar-members-toggle-icon {
  font-size: 0.625rem;
  transition: transform 0.15s ease;
}

.ch-sidebar-members-count {
  margin-left: auto;
  background: #22c55e;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.ch-sidebar-members-dropdown {
  padding: 0 8px 8px;
}

/* ── Remove member button (admin, GRS channels) ── */
.ch-remove-member-btn {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.ch-member-item:hover .ch-remove-member-btn {
  opacity: 1;
}
.ch-remove-member-btn:hover {
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.1);
}

.ch-sidebar-member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.ch-sidebar-member-item:hover {
  background: var(--color-border-light);
}

.ch-sidebar-member-avatar {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ch-sidebar-member-avatar .ch-member-status-dot {
  width: 8px;
  height: 8px;
  border-width: 1.5px;
}

.ch-sidebar-member-name {
  font-size: 0.75rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-sidebar-no-members {
  padding: 8px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ── Admin: channel management UI ── */

.ch-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ch-add-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ch-add-channel-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.ch-channel-row {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.ch-channel-row .ch-channel-item {
  flex: 1;
  min-width: 0;
}

.ch-channel-gear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.ch-channel-row:hover .ch-channel-gear {
  display: flex;
}

.ch-channel-gear:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.ch-hidden-channel {
  opacity: 0.5;
}

/* Context menu */
.ch-context-menu {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 1000;
  min-width: 200px;
}

.ch-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.8125rem;
  color: var(--color-text);
  text-align: left;
  transition: background 0.1s ease;
}

.ch-ctx-item:hover {
  background: var(--color-muted);
}

.ch-ctx-danger {
  color: var(--color-error);
}

.ch-ctx-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

.ch-ctx-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 4px 0;
}

/* Modal */
.ch-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ch-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg);
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.ch-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.ch-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.ch-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0 4px;
  line-height: 1;
}

.ch-modal-close:hover {
  color: var(--color-text);
}

.ch-modal-body {
  padding: 16px 20px;
}

.ch-modal-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  margin-top: 12px;
}

.ch-modal-label:first-child {
  margin-top: 0;
}

.ch-modal-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s ease;
}

.ch-modal-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.ch-modal-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.ch-modal-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--color-text);
  user-select: none;
}

.ch-modal-toggle input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ch-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--color-border-light);
}

/* ── Pinned/announcement messages ── */
.ch-message-pinned {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.ch-msg-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-left: 8px;
}

/* --- Unread badge on bottom nav --- */
.nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.25rem;
  line-height: 1;
}

.nav-unread-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--color-surface);
}

/* ============================================================
   MATERIALS PAGE
   ============================================================ */

.materials-page {
  padding-bottom: 8px;
}

/* --- Summary card --- */
.mat-summary {
  margin-bottom: 20px;
}

.mat-summary-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mat-summary-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.mat-summary-text {
  flex: 1;
  min-width: 0;
}

.mat-summary-count {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 6px;
}

.mat-summary-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 100px;
  overflow: hidden;
}

.mat-summary-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.mat-summary-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Module list --- */
.mat-modules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Module accordion --- */
.mat-module {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.mat-module:not(.mat-module-locked):hover {
  box-shadow: var(--shadow-md);
}

.mat-module-locked {
  opacity: 0.65;
}

.mat-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  text-align: left;
  gap: 12px;
  color: var(--color-text);
  transition: background 0.15s ease;
}

.mat-module-header:not([disabled]):hover {
  background: var(--color-surface-hover);
}

.mat-module-header[disabled] {
  cursor: default;
}

.mat-module-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mat-module-num {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.mat-module-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mat-module-header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.mat-chevron {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.mat-module-header[aria-expanded="true"] .mat-chevron {
  transform: rotate(90deg);
}

.mat-lock-icon {
  font-size: 0.95rem;
}

.mat-locked-label {
  padding: 0 18px 14px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* --- Module body --- */
.mat-module-body {
  border-top: 1px solid var(--color-border);
  padding: 14px 18px 16px;
}

/* --- Module progress bar --- */
.mat-module-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.mat-progress-bar {
  flex: 1;
  height: 5px;
  background: var(--color-border);
  border-radius: 100px;
  overflow: hidden;
}

.mat-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.mat-progress-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

/* --- Material items --- */
.mat-items-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s ease;
  border-radius: var(--radius-sm);
}

.mat-item:last-child {
  border-bottom: none;
}

.mat-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mat-item-name {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.35;
}

/* --- Status indicators --- */
.mat-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.mat-status-notstarted {
  background: var(--color-border);
}

.mat-status-inprogress {
  background: var(--color-warning);
}

.mat-status-completed {
  background: var(--color-success);
  color: #fff;
}

/* --- Toggle button --- */
.mat-toggle-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 4px 11px;
  font-family: var(--font-family);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.mat-toggle-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.mat-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mat-empty {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 4px 0;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.profile-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

/* --- Header card --- */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-header-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-header-email {
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.profile-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.profile-tier-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 100px;
}

.tier-group {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.tier-1on1 {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

[data-theme="dark"] .tier-1on1 {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.profile-member-since {
  font-size: 0.75rem;
}

/* --- Section cards --- */
.profile-card {
  /* inherits .card */
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-edit-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
}

.profile-edit-link:hover {
  color: var(--color-primary-hover);
}

.profile-empty {
  font-size: 0.875rem;
  padding: 4px 0;
}

/* --- Objectives --- */
.profile-obj-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.profile-obj-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.profile-obj-value {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.5;
}

.profile-obj-divider {
  height: 1px;
  background: var(--color-border);
  margin: 12px 0;
}

.profile-priority-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.5;
}

.priority-num {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 18px;
  flex-shrink: 0;
}

.profile-declaration {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.65;
  font-style: italic;
  border-left: 3px solid var(--color-primary);
  padding-left: 12px;
  margin-top: 8px;
}

/* --- Activation form answers on profile --- */
.profile-form-answers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-form-row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.profile-form-row:last-child { border-bottom: none; }
.profile-form-q {
  flex-shrink: 0;
  width: 140px;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
}
.profile-form-a {
  color: var(--color-text);
  flex: 1;
}
.profile-form-empty {
  text-align: center;
  padding: 20px 0;
  color: var(--color-text-muted);
}
.profile-form-empty-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

/* --- Mission & color history --- */
.profile-mission-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-mission-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-primary-light);
  flex-shrink: 0;
}

.mission-number {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.mission-day {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1;
  margin-top: 3px;
}

.profile-mission-info {
  flex: 1;
}

.profile-mission-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.profile-mission-sub {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.profile-color-history {
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.color-dots-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-dot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.color-dot {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.color-dot-item:hover .color-dot {
  transform: scale(1.15);
}

.color-dot-date {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 32px;
}

/* --- Settings --- */
.profile-settings-group {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.profile-settings-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-settings-group:first-child {
  padding-top: 0;
}

.profile-settings-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.profile-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-inline-input {
  flex: 1;
  min-width: 0;
}

.profile-inline-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 0.875rem;
}

.profile-password-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-password-form .form-group {
  margin-bottom: 10px;
}

.profile-password-form .btn {
  margin-top: 4px;
  width: 100%;
}

/* --- Theme toggle row --- */
.profile-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-hover);
  cursor: pointer;
  font-size: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.profile-theme-toggle:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.profile-theme-toggle:active {
  transform: scale(0.92);
}

/* ============================================================
   TODAY — Daily Mission Screen
   ============================================================ */

.today-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

/* Mission header */
.today-mission-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  border-radius: var(--radius);
  padding: 20px;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.today-mission-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 4px;
}

.today-mission-day {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}

.today-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.today-progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 4px;
}

.today-progress-pct {
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 500;
}

/* Info cards */
.today-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today-card-icon {
  font-size: 1.375rem;
  line-height: 1;
}

.today-card-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.today-card-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.today-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.today-card-value {
  font-size: 0.9375rem;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.4;
}

.today-card-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Post type badge */
.today-post-type-badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  width: fit-content;
}

.today-post-type-servire {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1.5px solid rgba(34, 197, 94, 0.3);
}
[data-theme="dark"] .today-post-type-servire {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
}

.today-post-type-autenticitate {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
}
[data-theme="dark"] .today-post-type-autenticitate {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

.today-post-type-transformare {
  background: rgba(124, 58, 237, 0.1);
  color: var(--color-primary);
  border: 1.5px solid rgba(124, 58, 237, 0.25);
}

.today-post-type-flex {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1.5px solid rgba(59, 130, 246, 0.25);
}
[data-theme="dark"] .today-post-type-flex {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
}

.today-post-type-reflectie {
  background: rgba(100, 116, 139, 0.1);
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}

/* Reflection blockquote */
.today-reflection {
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.6;
  border-left: 3px solid var(--color-primary);
  padding-left: 14px;
  margin: 4px 0 0 0;
}

/* CTA button */
.today-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  background: var(--color-primary);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  margin-top: 4px;
}

.today-cta-btn:hover {
  background: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.today-cta-btn:active {
  transform: translateY(0);
}

/* Tracker done state */
.today-tracker-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(34, 197, 94, 0.1);
  border: 1.5px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  color: #16a34a;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 4px;
}

[data-theme="dark"] .today-tracker-done {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.today-tracker-done-icon {
  font-size: 1.25rem;
}

/* ============================================
   Admin Extended Dashboard
   ============================================ */

/* Filter pills */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-filter-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.admin-filter-pill.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Sort row */
.admin-sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-sort-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-sort-btn:hover {
  color: var(--color-text);
}

.admin-sort-btn.active {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cursant row (clickable list item) */
.admin-cursant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
}

.admin-cursant-row:hover {
  opacity: 0.85;
}

.admin-cursant-name {
  font-size: 14px;
}

.admin-cursant-email {
  font-size: 12px;
}

.admin-module-label {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 4px;
}

.admin-last-active {
  font-size: 12px;
  margin-left: auto;
}

.admin-cursant-expanded {
  border-left: 3px solid var(--color-primary);
}

/* Color dots */
.admin-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin: 16px 0 0;
  overflow-x: auto;
}

.admin-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s;
}

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

.admin-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.admin-tab-content {
  padding: 16px 0;
}

/* Expanded detail */
.admin-expanded-detail {
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
}

/* Mini table for tracker */
.admin-table-wrap {
  overflow-x: auto;
}

.admin-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-mini-table th,
.admin-mini-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.admin-mini-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-reflection-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* GRS items */
.admin-grs-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.admin-grs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  background: var(--color-surface);
  transition: background 0.15s;
}

.admin-grs-header:hover {
  background: var(--color-bg);
}

.admin-grs-week {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text);
}

.admin-grs-toggle {
  margin-left: auto;
  font-size: 14px;
  color: var(--color-text-muted);
}

.admin-grs-body {
  padding: 12px;
  border-top: 1px solid var(--color-border);
}

/* Intervention items */
.admin-intervention-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.admin-intervention-item:last-child {
  border-bottom: none;
}

.admin-intervention-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-intervention-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.admin-intervention-type--message {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.admin-intervention-type--call {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.admin-intervention-type--reset {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-intervention-type--note {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
}

.admin-intervention-channel {
  font-size: 12px;
  color: var(--color-text-muted);
}

.admin-intervention-note {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Observation form */
.admin-obs-form .form-group {
  margin-bottom: 12px;
}

.admin-obs-form .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Color timeline */
.admin-color-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-color-timeline-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.admin-color-timeline-date {
  color: var(--color-text-muted);
  font-size: 12px;
  min-width: 120px;
}

.admin-color-timeline-source {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.admin-color-timeline-reason {
  color: var(--color-text);
  font-size: 13px;
}

/* Admin form helpers */
.admin-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-form-row .form-input {
  flex: 1;
}

.admin-add-form {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

/* ============================================================
   FINAL REPORT — Protocolul de Final (Weeks 23-24)
   ============================================================ */

/* Quoted reference blocks (activation form answers shown as readonly) */
.final-quote-block {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.final-quote-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.final-quote-text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.55;
  font-style: italic;
  margin: 0;
  white-space: pre-wrap;
}

/* Stats grid (Section C — 2x2) */
.final-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.final-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.final-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.final-stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  line-height: 1.3;
}

/* Radio groups */
.final-radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.final-radio-group--vertical {
  flex-direction: column;
  gap: 8px;
}

.final-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: var(--color-surface);
  flex: 1;
  min-width: 80px;
}

.final-radio-group--vertical .final-radio-label {
  flex: none;
}

.final-radio-label input[type="radio"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.final-radio-label.selected,
.final-radio-label:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

/* Review section */
.final-review-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.final-review-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.final-review-row {
  margin-bottom: 10px;
}

.final-review-row:last-child {
  margin-bottom: 0;
}

.final-review-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.final-review-value {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Celebration / success screen */
.final-celebration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  min-height: 60dvh;
}

.final-celebration-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: final-pop 0.5s ease-out;
}

@keyframes final-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.final-celebration-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 12px;
}

.final-celebration-text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 320px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  max-width: 400px;
  margin: 0 auto;
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.85;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.empty-state-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.empty-state-cta {
  margin-top: 20px;
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--color-text-muted);
}

.loading-state .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-state p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================================
   GRS DRAFT BANNER
   ============================================================ */
.grs-draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  margin-bottom: 16px;
  color: var(--color-text);
}

.grs-draft-banner-text {
  flex: 1 1 200px;
  font-size: 0.9rem;
  font-weight: 500;
}

.grs-draft-banner-actions {
  display: flex;
  gap: 8px;
}

/* ============================================================
   STREAK BADGE
   ============================================================ */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.streak-badge.streak-purple {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.streak-badge.streak-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border-color: #f59e0b;
}

[data-theme="dark"] .streak-badge.streak-gold {
  color: #fbbf24;
}

/* ============================================================
   ACTIVATION FORM — MULTI-CHOICE OPTIONS
   ============================================================ */
.activation-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activation-option-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.activation-option-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.activation-option-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 600;
}

/* ============================================================
   ACTIVATION CHECKLIST (Z7 + Z12 confirm)
   ============================================================ */
.activation-checklist,
.activation-checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activation-check-label,
.score-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.activation-check-label:hover,
.score-check-label:hover {
  border-color: var(--color-primary);
}

.activation-check-label input:checked + span,
.score-check-label input:checked + span {
  font-weight: 600;
}

.activation-check-label input,
.score-check-label input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.activation-check-label span,
.score-check-label span {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* ============================================================
   ACTIVATION SCORE RESULT
   ============================================================ */
.activation-score-result {
  text-align: center;
  padding: 24px;
  margin-top: 20px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.score-count {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.score-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ===== Materials Menu ===== */
.mat-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mat-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.15s;
}

.mat-menu-item:hover:not(.mat-menu-locked) {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.mat-menu-locked {
  opacity: 0.55;
  cursor: default;
}

.mat-menu-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.mat-menu-num {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.mat-menu-info {
  flex: 1;
  min-width: 0;
}

.mat-menu-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--color-text);
}

.mat-menu-lock-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.mat-menu-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mat-menu-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.mat-menu-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 0.3s;
}

.mat-menu-pct {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.mat-menu-arrow {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-left: 8px;
}

/* ===== Material Detail Page (GCD-style) ===== */
.md-detail-page {
  padding-bottom: 100px;
}

.md-detail-header {
  margin-bottom: 16px;
}

.md-back-link {
  display: inline-block;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.md-detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 8px;
  color: var(--color-text);
}

/* Section headers */
.md-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.md-section-icon {
  font-size: 1.1rem;
}

.md-count-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Video Carousel ── */
.md-videos-section {
  margin-top: 20px;
}

.md-video-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.md-video-carousel::-webkit-scrollbar {
  height: 4px;
}

.md-video-carousel::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.md-video-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.md-video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.md-video-thumb {
  width: 100%;
  height: 124px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.md-video-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  backdrop-filter: blur(4px);
}

.md-video-card:hover .md-video-play {
  background: var(--color-primary);
}

.md-video-card-body {
  padding: 8px 10px;
}

.md-video-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Materials Toggle ── */
.md-materials-section {
  margin-top: 20px;
}

.md-materials-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: left;
}

.md-materials-toggle:hover {
  border-color: var(--color-primary);
}

.md-mat-chevron {
  margin-left: auto;
  color: var(--color-text-muted);
}

.md-materials-list {
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.md-material-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-hover);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s;
}

.md-material-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.md-mat-icon { font-size: 1.1rem; flex-shrink: 0; }
.md-mat-name { flex: 1; min-width: 0; color: var(--color-text); }

.md-text-body {
  padding: 12px 14px;
  margin: 4px 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface-hover);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

.md-del-btn {
  background: none;
  border: none;
  color: var(--color-error);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.md-del-btn:hover { opacity: 1; background: rgba(239,68,68,0.1); }

/* ── Checklist ── */
.md-checklist-section {
  margin-top: 20px;
}

.md-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.md-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-hover);
}

.md-check-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  background: none;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: all 0.15s;
}

.md-check-not_started { border-color: var(--color-border); color: var(--color-text-muted); }
.md-check-in_progress { border-color: var(--color-warning); color: var(--color-warning); background: rgba(245,158,11,0.08); }
.md-check-completed { border-color: var(--color-success); color: #fff; background: var(--color-success); }

.md-check-label {
  font-size: 0.9rem;
  flex: 1;
  color: var(--color-text);
}

.md-check-done {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ── Chat Section ── */
.md-chat-section {
  margin-top: 20px;
}

.md-chat-new {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  padding: 2px 6px;
  border-radius: 8px;
  animation: md-pulse 1.5s infinite;
}

@keyframes md-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.md-chat-messages {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

.md-chat-msg {
  padding: 6px 0;
}

.md-chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.md-chat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.md-chat-sender {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text);
}

.md-chat-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.md-chat-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-left: 32px;
  margin-top: 2px;
  color: var(--color-text);
}

.md-chat-empty {
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
}

.md-chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.md-chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--color-surface);
  color: var(--color-text);
}

.md-chat-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.md-chat-send {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.85;
}

.md-chat-send:hover { opacity: 1; }

/* ── Chat Replies ── */
.md-chat-replies { margin-top: 8px; padding-left: 32px; border-left: 2px solid var(--color-primary-light, #ede9fe); }
.md-chat-reply { background: var(--color-surface-alt, rgba(124,58,237,0.04)); border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.md-reply-btn { font-size: 0.75rem; opacity: 0.6; transition: opacity 0.15s; }
.md-reply-btn:hover { opacity: 1; }
.md-reply-form { display: flex; align-items: center; gap: 4px; }
.md-reply-input { flex: 1; font-size: 0.875rem !important; padding: 6px 10px !important; }

/* ── Glosar ── */
.glos-page { max-width: 800px; margin: 0 auto; padding: 24px 16px; }
.glos-header { margin-bottom: 24px; }
.glos-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; }
.glos-subtitle { color: var(--color-text-muted); margin: 0 0 16px; }
.glos-search { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-size: 0.95rem; }
.glos-search:focus { outline: none; border-color: var(--color-primary); }
.glos-add-section { margin-bottom: 20px; }
.glos-add-form { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 16px; }
.glos-group { margin-bottom: 24px; }
.glos-letter { font-size: 1.2rem; font-weight: 800; color: var(--color-primary); border-bottom: 2px solid var(--color-primary); padding-bottom: 4px; margin-bottom: 12px; }
.glos-term { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.glos-term-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.glos-term-name { font-weight: 700; font-size: 1rem; }
.glos-term-def { color: var(--color-text-secondary, var(--color-text)); font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; }
.glos-term-actions { display: flex; gap: 6px; }
.glos-edit-btn, .glos-del-btn { background: none; border: none; cursor: pointer; font-size: 0.9rem; opacity: 0.5; padding: 2px 4px; }
.glos-edit-btn:hover, .glos-del-btn:hover { opacity: 1; }
.glos-edit-form { margin-top: 8px; }
.glos-edit-form .form-input + .form-input { margin-top: 6px; }

/* ── Notes Section ── */
.md-notes-section {
  margin-top: 20px;
}

.md-notes-saved {
  font-size: 0.8rem;
  color: var(--color-success);
  font-weight: 400;
  margin-left: auto;
}

.md-notes-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  resize: vertical;
  background: var(--color-surface);
  color: var(--color-text);
}

.md-notes-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ── Admin Upload ── */
.md-admin-upload {
  margin-top: 20px;
  padding: 16px;
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.md-upload-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.md-uptab {
  padding: 6px 12px;
  font-size: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-hover);
  cursor: pointer;
  color: var(--color-text);
}

.md-uptab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.md-up-content { display: none; }
.md-up-content.active { display: block; }

.md-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  margin-top: 8px;
  transition: all 0.2s;
  color: var(--color-text-muted);
}

.md-dropzone-hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.md-browse {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.md-file-label {
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ── Video Modal (full-screen overlay, opaque) ── */
.md-modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0a0a1a;
  z-index: 1000;
}

.md-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  background: #0a0a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
}

.md-modal-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 800px;
  padding: 10px 0;
  color: #e0e0f0;
}

.md-modal-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md-modal-counter {
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
}

.md-modal-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.md-modal-close:hover {
  background: rgba(255,255,255,0.2);
}

.md-modal-player {
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.md-modal-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.md-modal-note {
  width: 100%;
  max-width: 800px;
  margin-top: 14px;
}

.md-modal-note-text {
  width: 100%;
  min-height: 50px;
  max-height: 100px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #e0e0f0;
  font-size: 0.9rem;
  resize: none;
  font-family: var(--font-family);
}

.md-modal-note-text:focus {
  outline: none;
  border-color: #a78bfa;
}

.md-modal-note-text::placeholder {
  color: rgba(255,255,255,0.35);
}

.md-modal-note-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.md-modal-note-row .btn {
  color: #e0e0f0;
  border-color: rgba(255,255,255,0.2);
  font-size: 0.8rem;
  padding: 4px 12px;
}

.md-modal-note-status {
  font-size: 0.8rem;
}

.md-modal-nav {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 800px;
  margin-top: 14px;
  justify-content: space-between;
}

.md-modal-nav-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #e0e0f0;
  cursor: pointer;
  font-size: 0.85rem;
}

.md-modal-nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
}

.md-modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ============================================================
   MATERIALS — Sidebar + Main Layout (lg-*)
   Adapted from GCD lgstart.css for TFL violet theme
   ============================================================ */

/* Full-width page container for sidebar layout */
.lg-page {
  width: 100%;
  max-width: none;
  padding: 0;
}
.lg-layout {
  display: flex;
  align-items: flex-start;
  background: var(--color-bg);
  min-height: calc(100vh - 48px);
  width: 100%;
  max-width: none;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.lg-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  z-index: 15;
  border-right: 1px solid var(--color-border);
}
[data-theme="dark"] .lg-sidebar {
  background: #151528;
}

.lg-sidebar-head {
  padding: 24px 16px 20px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 2;
}
.lg-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.lg-sidebar-prog-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
  font-weight: 600;
}
.lg-sidebar-prog-val {
  color: var(--color-primary);
  font-weight: 700;
}
.lg-sidebar-prog-track {
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}
.lg-sidebar-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
  border-radius: 3px;
  transition: width 0.6s ease;
}

.lg-sidebar-mod {
  border-bottom: 1px solid var(--color-border);
}
.lg-sidebar-mod-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 8px;
}
.lg-sidebar-mod-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.lg-sidebar-mod-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lg-sidebar-mod-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-surface-hover);
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.lg-sidebar-lec-list {
  padding: 0 8px 10px;
}
.lg-sidebar-lock-msg {
  font-size: 11px;
  color: var(--color-text-muted);
  padding: 6px 10px;
  font-style: italic;
}
.lg-sidebar-lec {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  margin-bottom: 2px;
  font-family: inherit;
}
.lg-sidebar-lec:hover {
  background: var(--color-surface-hover);
}
.lg-sidebar-lec-active {
  background: var(--color-primary) !important;
}
.lg-sidebar-lec-active .lg-sidebar-lec-name {
  color: #fff;
  font-weight: 700;
}
.lg-sidebar-lec-active .lg-sidebar-num {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.lg-sidebar-lec-active .lg-sidebar-check {
  color: #fff;
}
.lg-sidebar-lec-done .lg-sidebar-lec-name {
  color: var(--color-text-muted);
}

.lg-sidebar-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lg-sidebar-check {
  color: var(--color-success);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.lg-sidebar-lec-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

/* ── Main content ───────────────────────────────────────────── */
.lg-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}
/* Video + info bar go full width inside main */

/* Mobile bar (hidden on desktop) */
.lg-mobile-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 48px;
  z-index: 10;
}
.lg-back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--color-bg-secondary); color: var(--color-text);
  text-decoration: none; flex-shrink: 0; transition: .12s;
}
.lg-back-btn:hover { background: var(--color-primary); color: #fff; }
.lg-quick-nav {
  display: flex; gap: 4px; margin-left: auto;
}
.lg-qnav-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  color: var(--color-text-muted); text-decoration: none; transition: .12s;
}
.lg-qnav-link:hover { background: var(--color-bg-secondary); color: var(--color-primary); }
.lg-menu-btn {
  flex-shrink: 0;
  padding: 7px 12px;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.lg-mobile-lec-name {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Card Stack — narrower content below video ──────────────── */
.lg-card-stack {
  max-width: 100%;
  margin: 24px auto 40px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lg-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .lg-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Split card (notes + docs) */
.lg-card-split {
  display: flex;
  gap: 0;
  padding: 0;
}
.lg-split-col-notes {
  flex: 7;
  padding: 20px 24px;
  min-width: 0;
}
.lg-split-divider {
  width: 1px;
  background: var(--color-border);
  flex-shrink: 0;
}
.lg-split-col-docs {
  flex: 3;
  padding: 20px 20px;
  min-width: 0;
}

@media (max-width: 768px) {
  .lg-card-stack {
    padding: 0 12px;
    margin: 16px auto 32px;
    gap: 12px;
  }
  .lg-card {
    border-radius: 12px;
    padding: 16px;
  }
  .lg-card-split {
    flex-direction: column;
  }
  .lg-split-divider {
    width: auto;
    height: 1px;
  }
  .lg-split-col-notes,
  .lg-split-col-docs {
    padding: 16px;
    flex: auto;
  }
}

/* Loading / empty states */
.lg-content-loading,
.lg-no-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Video */
.lg-video-wrap {
  background: #000;
  width: 100%;
}
.lg-video-ratio {
  position: relative;
  width: 100%;
  padding-bottom: min(56.25%, calc(100vh - 200px));
  height: 0;
  overflow: hidden;
}
.lg-video-ratio iframe,
.lg-video-ratio video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Info bar */
.lg-lec-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.lg-lec-info-left {
  flex: 1;
  min-width: 0;
}
.lg-lec-mod-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.lg-lec-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  margin: 0;
}

/* Sections */
.lg-section {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 24px;
}
.lg-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  letter-spacing: -0.1px;
}

/* Extra videos */
.lg-extra-video {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.lg-extra-video-btn {
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  font-family: inherit;
  transition: all 0.15s;
  flex: 1;
}
.lg-extra-video-btn:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

/* Text content blocks */
.lg-text-block {
  background: var(--color-surface-hover);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.lg-text-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.lg-text-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text);
}

.lg-training-content {
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface);
}

.lg-training-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.lg-training-body strong,
.lg-training-body b {
  color: var(--color-primary);
  font-weight: 600;
}

.lg-training-body h1,
.lg-training-body h2,
.lg-training-body h3 {
  margin: 20px 0 8px;
  color: var(--color-text);
  font-weight: 700;
}

.lg-training-body h1 { font-size: 20px; }
.lg-training-body h2 { font-size: 17px; }
.lg-training-body h3 { font-size: 15px; }

.lg-training-body ul,
.lg-training-body ol {
  padding-left: 20px;
  margin: 8px 0;
}

.lg-training-body li {
  margin-bottom: 4px;
}

/* Document items */
.lg-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface-hover);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}
.lg-doc-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Checklist (progress) */
.lg-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.lg-check-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--color-text-muted);
}
.lg-check-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.lg-check-not_started {
  color: var(--color-text-muted);
}
.lg-check-in_progress {
  border-color: var(--color-warning);
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}
.lg-check-completed {
  border-color: var(--color-success);
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}
.lg-check-name {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.3;
}
.lg-check-done {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

/* Notes */
.lg-note-area {
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  padding: 12px 14px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text);
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lg-note-area:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: var(--color-surface);
}
[data-theme="dark"] .lg-note-area:focus {
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}
.lg-note-area::placeholder {
  color: var(--color-text-muted);
}
.lg-note-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-success);
  letter-spacing: 0.3px;
}

/* Chat */
.lg-chat-messages {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.lg-chat-empty {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: 13px;
}
.lg-chat-msg {
  margin-bottom: 14px;
}
.lg-chat-msg-admin {
  background: rgba(124, 58, 237, 0.05);
  border-left: 3px solid var(--color-primary);
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
}
.lg-chat-msg-reply {
  margin-left: 28px;
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--color-surface-alt, #f3f4f6);
  border-radius: 8px;
}
.lg-chat-admin-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lg-chat-reply-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lg-chat-reply-btn:hover {
  background: var(--color-primary);
  color: #fff;
}
.lg-chat-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.lg-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lg-chat-sender {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
}
.lg-chat-time {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-left: auto;
}
.lg-chat-text {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
  padding-left: 36px;
}
.lg-chat-new {
  background: var(--color-error);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
}
.lg-chat-new.hidden {
  display: none;
}
.lg-chat-input-row {
  display: flex;
  gap: 8px;
}
.lg-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.lg-chat-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.lg-chat-input::placeholder {
  color: var(--color-text-muted);
}
.lg-chat-send {
  padding: 10px 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.lg-chat-send:hover {
  background: var(--color-primary-hover);
}

/* Admin section */
.lg-admin-section {
  border: 1px dashed var(--color-primary);
  border-radius: var(--radius);
  margin: 16px 24px;
  background: var(--color-primary-light);
}
.lg-upload-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.lg-uptab {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.lg-uptab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.lg-up-content {
  display: none;
}
.lg-up-content.active {
  display: block;
}
.lg-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  transition: all 0.15s;
  margin-top: 8px;
}
.lg-dropzone-hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.lg-browse {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  font-size: 13px;
}
.lg-file-label {
  font-size: 11px;
  margin-top: 6px;
}

/* Admin delete button */
.lg-section .md-del-btn,
.lg-extra-video .md-del-btn,
.lg-doc-item .md-del-btn {
  background: rgba(239, 68, 68, 0.1);
  border: none;
  color: var(--color-error);
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.lg-section .md-del-btn:hover,
.lg-extra-video .md-del-btn:hover,
.lg-doc-item .md-del-btn:hover {
  background: var(--color-error);
  color: #fff;
}

/* Sidebar backdrop (mobile) */
.lg-sidebar-backdrop {
  display: none;
}

/* ── Mobile overrides ───────────────────────────────────────── */
@media (max-width: 768px) {
  .lg-layout {
    flex-direction: column;
    position: relative;
  }

  .lg-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: none;
    height: 100vh;
  }
  .lg-sidebar.lg-sidebar-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }

  .lg-sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
  }
  .lg-sidebar-backdrop-visible {
    display: block;
  }

  .lg-mobile-bar {
    display: flex;
  }
  .lg-main {
    width: 100%;
    padding-top: 0;
  }

  .lg-section {
    padding: 16px;
  }
  .lg-lec-info-bar {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
  }
  .lg-admin-section {
    margin: 12px 16px;
  }
  #lg-main-content {
    padding-bottom: 60px;
  }
  .lg-cal-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .lg-cal-weeks {
    padding: 0 12px 16px;
  }
  .lg-cal-week-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .lg-indicator-fear,
  .lg-indicator-love {
    flex-wrap: wrap;
  }
  .lg-day-postare {
    padding-left: 16px !important;
  }
}

/* ============================================================
   SIDEBAR NAV LINKS
   ============================================================ */
.lg-sidebar-nav-links {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.lg-sidebar-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--color-primary-light);
  transition: all 0.15s;
}
.lg-sidebar-link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ============================================================
   CALENDAR GRID
   ============================================================ */
.lg-lec-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.lg-cal-progress {
  flex-shrink: 0;
}
.lg-cal-progress-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 12px;
  border-radius: 20px;
}

.lg-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 20px 24px;
}
.lg-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  font-family: inherit;
}
.lg-cal-day:hover:not([disabled]) {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}
.lg-cal-day.lg-cal-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.lg-cal-day.lg-cal-done {
  border-color: var(--color-success);
  background: rgba(34, 197, 94, 0.06);
}
.lg-cal-day.lg-cal-today {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.lg-cal-day.lg-cal-future {
  opacity: 0.4;
  cursor: not-allowed;
}
.lg-cal-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
}
.lg-cal-day-name {
  font-size: 10px;
  color: var(--color-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lg-cal-day-date {
  font-size: 10px;
  color: var(--color-text-muted);
}
.lg-cal-day-type {
  font-size: 10px;
  font-weight: 600;
}
.lg-cal-day-check {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 14px;
  color: var(--color-success);
  font-weight: 700;
}
.lg-cal-semafor {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 6px;
}
.lg-cal-semafor-verde { background: #22c55e; }
.lg-cal-semafor-galben { background: #f59e0b; }
.lg-cal-semafor-rosu { background: #ef4444; }

/* ============================================================
   DAY DETAIL PANEL
   ============================================================ */
.lg-day-detail {
  display: none;
  background: var(--color-surface);
  border-top: 3px solid var(--color-primary);
  margin: 0 24px 24px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.lg-day-header {
  padding: 16px 20px;
  background: var(--color-surface-hover);
}
.lg-day-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lg-day-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.lg-day-date-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: capitalize;
}
.lg-day-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
}
.lg-day-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.lg-day-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lg-day-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  opacity: 0.7;
}
.lg-day-action {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 10px;
}
.lg-day-done-criteria {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-surface-hover);
  padding: 8px 12px;
  border-radius: 6px;
}
.lg-day-question {
  font-size: 14px;
  font-style: italic;
  color: var(--color-primary);
  margin-bottom: 10px;
  line-height: 1.5;
}
.lg-day-answer {
  min-height: 80px;
}
.lg-day-indicator {
  max-width: 200px;
}

/* Done toggle */
.lg-day-done-toggle {
  display: flex;
  gap: 8px;
}
.lg-done-opt {
  padding: 10px 24px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.lg-done-opt:hover {
  border-color: var(--color-primary);
}
.lg-done-active {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.lg-undone-active {
  background: var(--color-surface-hover);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

/* Semafor */
.lg-semafor-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lg-semafor-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
}
.lg-semafor-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
}
.lg-semafor-btn.lg-semafor-active {
  border-width: 2px;
}
.lg-semafor-btn.lg-semafor-active.lg-semafor-verde {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}
.lg-semafor-btn.lg-semafor-active.lg-semafor-galben {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.lg-semafor-btn.lg-semafor-active.lg-semafor-rosu {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.lg-semafor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lg-semafor-text {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
}


/* Pulse Score */
.lg-pulse-section {
  background: var(--color-surface-hover);
  border-radius: var(--radius-sm);
  margin: 16px 20px;
  padding: 16px 20px !important;
  border: none !important;
}
.lg-pulse-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lg-pulse-dim {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lg-pulse-dim-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  min-width: 110px;
}
.lg-pulse-scores {
  display: flex;
  gap: 4px;
}
.lg-pulse-score {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.lg-pulse-score:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.lg-pulse-score-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.lg-pulse-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 100px;
}
.lg-pulse-total {
  text-align: center;
  font-size: 16px;
  color: var(--color-text);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* Week grouped calendar */
.lg-cal-weeks {
  padding: 0 24px 24px;
}
.lg-cal-week-group {
  margin-bottom: 20px;
}
.lg-cal-week-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 8px;
  border-bottom: 2px solid var(--color-primary-light);
  margin-bottom: 10px;
}
.lg-cal-week-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.lg-cal-week-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Caiet section */
.lg-day-caiet {
  background: rgba(245, 158, 11, 0.04);
  border-left: 3px solid rgba(245, 158, 11, 0.4);
}
[data-theme="dark"] .lg-day-caiet {
  background: rgba(245, 158, 11, 0.06);
}
.lg-caiet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lg-caiet-list li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text);
}
.lg-caiet-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-size: 12px;
  top: 8px;
}

/* Postare section */
.lg-day-postare {
  padding-left: 20px !important;
}
.lg-postare-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lg-postare-list li {
  position: relative;
  padding: 5px 0 5px 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
}
.lg-postare-list li::before {
  content: '\2022';
  position: absolute;
  left: 2px;
  color: var(--color-text-muted);
}

/* Indicator Frică → Iubire */
.lg-indicator-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lg-indicator-fear,
.lg-indicator-love {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}
.lg-indicator-fear {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.3);
}
.lg-indicator-love {
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--color-text);
  font-weight: 500;
}
.lg-indicator-icon {
  flex-shrink: 0;
  font-size: 14px;
}
.lg-indicator-label {
  font-weight: 700;
  flex-shrink: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.lg-indicator-fear .lg-indicator-label {
  color: #ef4444;
}
.lg-indicator-love .lg-indicator-label {
  color: var(--color-primary);
}
.lg-indicator-text {
  flex: 1;
}

/* Comunitate section */
.lg-day-comunitate {
  background: rgba(34, 197, 94, 0.04);
}
[data-theme="dark"] .lg-day-comunitate {
  background: rgba(34, 197, 94, 0.06);
}
.lg-comunitate-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 12px;
}
.lg-comunitate-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.lg-comunitate-input {
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.15s;
}
.lg-comunitate-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12);
}
.lg-comunitate-input::placeholder {
  color: var(--color-text-muted);
}
.lg-comunitate-send {
  flex-shrink: 0;
  white-space: nowrap;
  height: 44px;
}

/* AI badge */
.lg-day-ai-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

/* Badge muted (no postare) */
.lg-day-badge-muted {
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
}

/* Save button */
.lg-day-save {
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px 20px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
}

/* ============================================================
   SOS BUTTON & MODAL
   ============================================================ */
.lg-sos-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  transition: all 0.2s;
  z-index: 50;
  font-family: inherit;
}
.lg-sos-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.45);
}

.lg-sos-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.lg-sos-overlay.lg-sos-visible {
  opacity: 1;
}
.lg-sos-modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 440px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.lg-sos-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--color-text-muted);
  cursor: pointer;
}
.lg-sos-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.lg-sos-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 6px;
}
.lg-sos-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.lg-sos-protocol {
  text-align: left;
  margin-bottom: 20px;
}
.lg-sos-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
}
.lg-sos-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lg-sos-textarea {
  width: 100%;
  margin-bottom: 12px;
  min-height: 70px;
}
.lg-sos-send {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
}

/* (split-row replaced by lg-card-split above) */
.lg-docs-empty {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 12px 0;
}
.lg-admin-upload-mini {
  margin-top: 12px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}
.lg-dropzone-mini {
  padding: 12px !important;
  min-height: auto !important;
}
.lg-dropzone-mini p {
  margin: 0;
  font-size: 12px;
}

/* ============================================================
   INDICATOR TOGGLE BUTTONS
   ============================================================ */
.lg-indicator-toggle {
  display: flex;
  gap: 8px;
}
.lg-indicator-opt {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  transition: all 0.15s;
}
.lg-indicator-opt:hover {
  border-color: var(--color-primary);
}
.lg-indicator-opt-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ============================================================
   COMMUNITY INVITATION
   ============================================================ */
.lg-community-invite {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-primary-light);
  border-color: rgba(124, 58, 237, 0.15);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}
.lg-community-invite:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

/* ============================================================
   PROTOCOL NOTES
   ============================================================ */
.lg-protocol-notes {
  width: 100%;
  min-height: 60px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

/* ============================================================
   PULSE DESCRIPTIONS — RIGHT of buttons
   ============================================================ */
.lg-pulse-dim {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lg-pulse-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 80px;
  font-style: italic;
}
@media (max-width: 480px) {
  .lg-pulse-dim {
    flex-wrap: wrap;
  }
  .lg-pulse-desc {
    flex-basis: 100%;
    margin-top: 2px;
  }
}

/* ============================================================
   APP SHELL — Desktop sidebar + responsive layout
   ============================================================ */

.app-shell {
  display: flex;
  min-height: 100dvh;
}

/* Desktop sidebar — hidden on mobile */
.desktop-sidebar {
  display: none;
}

/* Desktop: show sidebar, hide top bar brand + bottom nav */
@media (min-width: 768px) {
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 240px;
    min-width: 240px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    overflow-y: auto;
  }

  .app-container {
    margin-left: 240px;
    max-width: none;
    padding: 0;
  }

  .app-container--wide {
    max-width: none;
  }

  .app-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 32px;
  }

  .app-main:has(.community-page) {
    max-width: 1125px;
  }

  .admin-shell .app-main {
    max-width: 1100px;
  }

  .app-main.has-nav {
    padding-bottom: 24px;
  }

  .bottom-nav {
    display: none;
  }

  /* Hide back button + brand on desktop (sidebar handles it) */
  .top-bar-left {
    display: none;
  }
  .top-bar {
    justify-content: flex-end;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: static;
  }
  .top-bar-action {
    background: transparent;
    color: var(--color-text-muted);
  }
  .top-bar-action:hover {
    background: var(--color-muted, var(--color-surface-hover));
    color: var(--color-text);
  }
  .top-bar-avatar {
    background: var(--color-primary-light);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
  }
  .top-bar-avatar:hover {
    background: var(--color-primary-glow, var(--color-primary-light));
  }
}

/* Sidebar internals */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-logo {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  padding: 5px 10px;
  border-radius: var(--radius-md);
  letter-spacing: 0.5px;
}

.sidebar-brand-text {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint, var(--color-text-muted));
  padding: 12px 12px 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-family);
  width: 100%;
  text-align: left;
}

.sidebar-item:hover {
  background: var(--color-muted, var(--color-surface-hover));
  color: var(--color-text);
}

.sidebar-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.sidebar-item svg {
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--color-border);
  margin: 8px 12px;
}

.sidebar-logout {
  margin-top: auto;
  color: var(--color-text-muted);
}
.sidebar-logout:hover {
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.06);
}

.sidebar-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-full, 9999px);
  margin-left: auto;
  min-width: 20px;
  text-align: center;
}

/* ============================================================
   ADMIN DASHBOARD CARDS
   ============================================================ */

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--color-border-light, var(--color-border));
  box-shadow: var(--shadow-xs, var(--shadow));
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-border);
}

.admin-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.admin-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.admin-stat-card--primary .admin-stat-value { color: var(--color-primary); }
.admin-stat-card--success .admin-stat-value { color: var(--color-success); }
.admin-stat-card--warning .admin-stat-value { color: var(--color-warning); }
.admin-stat-card--error .admin-stat-value { color: var(--color-error); }

/* Progress bar for cursant rows */
.progress-bar-wrap {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-primary);
  transition: width 0.4s ease;
}
.progress-bar-fill--success { background: var(--color-success); }
.progress-bar-fill--warning { background: var(--color-warning); }

/* ============================================================
   ADMIN SUPER DASHBOARD
   ============================================================ */

.admin-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-dashboard-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.admin-dashboard-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-search-bar {
  position: relative;
  margin-bottom: 16px;
}

.admin-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.admin-search-input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 14px;
  font-family: var(--font-family);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.admin-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}

.admin-recent-activity {
  margin-bottom: 20px;
  padding: 16px;
}

.admin-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  flex-wrap: wrap;
}

.admin-activity-item:last-child {
  border-bottom: none;
}

.admin-activity-preview {
  color: var(--color-text-muted);
  font-size: 12px;
  font-style: italic;
}

/* Cursant row — enhanced layout */
.admin-cursant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-cursant-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.admin-cursant-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-cursant-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-cursant-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100px;
}

.admin-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.admin-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.status--active {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.status--recent {
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
}

.status--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.status--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status--inactive {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.admin-expand-icon {
  color: var(--color-text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.admin-score-display {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  padding: 8px 0;
}

/* Team modal (Day 0) */
.team-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.team-modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.team-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-text);
}

.team-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.team-member:last-of-type {
  border-bottom: none;
}

.team-member-name {
  font-weight: 600;
  color: var(--color-text);
}

.team-member-phone {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.team-member-phone:hover {
  text-decoration: underline;
}

/* Onboarding nav row */
.onboarding-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* Persistent admin/cursant toggle buttons in sidebar */
.sidebar-item--admin,
.sidebar-item--cursant {
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.sidebar-item--admin {
  background: var(--color-primary-light);
}

.sidebar-item--admin:hover {
  background: var(--color-primary);
  color: #fff;
}

.sidebar-item--admin.active {
  background: var(--color-primary);
  color: #fff;
}

.sidebar-item--cursant {
  background: rgba(34, 197, 94, 0.1);
}

.sidebar-item--cursant:hover {
  background: rgba(34, 197, 94, 0.25);
}

.sidebar-item--cursant.active {
  background: var(--color-success);
  color: #fff;
}

/* Collapsible cursant group in admin sidebar */
.sidebar-cursant-group {
  margin: 0;
}
.sidebar-cursant-group summary {
  list-style: none;
  cursor: pointer;
}
.sidebar-cursant-group summary::-webkit-details-marker { display: none; }
.sidebar-cursant-group summary::marker { display: none; content: ''; }
.sidebar-cursant-group .sidebar-chevron {
  margin-left: auto;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.sidebar-cursant-group[open] .sidebar-chevron {
  transform: rotate(180deg);
}
.sidebar-cursant-items {
  padding-left: 12px;
}
.sidebar-cursant-items .sidebar-item {
  font-weight: 400;
  font-size: 0.875rem;
  padding: 8px 12px;
}

/* Admin insights grid — 2 columns on desktop */
.admin-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-insights-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 767px) {
  .admin-insights-grid {
    grid-template-columns: 1fr;
  }
}

.admin-panel {
  padding: 16px;
}

.admin-panel--alerts .admin-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 10px;
}

.admin-panel--alerts .admin-alert-item:last-child {
  border-bottom: none;
}

.admin-alert-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.admin-alert-left strong {
  font-size: 13px;
  display: block;
}

.admin-alert-reason {
  font-size: 11px;
  color: var(--color-error);
  font-weight: 500;
  display: block;
}

.admin-alert-action {
  font-size: 20px;
  text-decoration: none;
  flex-shrink: 0;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.admin-alert-action:hover {
  background: var(--color-surface-hover);
}

/* Funnel */
.admin-funnel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-funnel-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-funnel-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  width: 90px;
  flex-shrink: 0;
  text-align: right;
}

.admin-funnel-bar-wrap {
  flex: 1;
  height: 16px;
  background: var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.admin-funnel-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 8px;
  min-width: 2px;
  transition: width 0.4s ease;
}

.admin-funnel-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  width: 24px;
  text-align: center;
}

/* Weekly summary */
.admin-weekly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-weekly-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}

.admin-weekly-big {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
}

@media (max-width: 767px) {
  .admin-weekly-grid {
    grid-template-columns: 1fr;
  }
}

.admin-poll-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.admin-poll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}

/* Responsive: mobile adjustments for dashboard */
@media (max-width: 767px) {
  .admin-cursant-meta {
    display: none;
  }

  .admin-cursant-row {
    padding: 12px;
  }

  .admin-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stat-value {
    font-size: 22px;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .admin-cursant-progress-wrap {
    display: none;
  }
}

/* ============================================================
   ANIMATIONS & TRANSITIONS
   ============================================================ */

.app-main {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.pulse-animate {
  animation: pulse 1.5s ease-in-out;
}

/* ============================================================
   CARD IMPROVEMENTS
   ============================================================ */

.card {
  transition: box-shadow 0.2s, transform 0.15s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable:hover {
  transform: translateY(-1px);
  cursor: pointer;
}

/* ============================================================
   Calendar V2 — Premium Redesign
   ============================================================ */

.cal-page { max-width: 920px; margin: 0 auto; }

.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.cal-header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cal-header-center { display: flex; align-items: center; gap: 12px; }
.cal-header-right { display: flex; align-items: center; gap: 8px; }
.cal-title { font-size: 18px; font-weight: 600; margin: 0; color: var(--color-text); letter-spacing: -0.02em; }
.cal-nav-btn {
  width: 32px; height: 32px; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; color: var(--color-text-muted);
}
.cal-nav-btn:hover { background: var(--color-muted, var(--color-surface-hover)); color: var(--color-text); border-color: var(--color-border); }
.cal-month-label { font-weight: 600; font-size: 18px; min-width: 170px; text-align: center; letter-spacing: -0.02em; }

.cal-view-toggle {
  display: flex; background: var(--color-muted, var(--color-surface-hover)); border-radius: var(--radius-md); padding: 3px;
  border: none;
}
.cal-view-btn {
  padding: 5px 14px; font-size: 13px; font-weight: 500; border: none; background: transparent;
  cursor: pointer; transition: all 0.15s; color: var(--color-text-muted); border-radius: 6px;
}
.cal-view-btn--active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.04)); }
.cal-view-btn:hover:not(.cal-view-btn--active) { color: var(--color-text); }

.cal-create-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-md); border: none;
  background: var(--color-primary); color: #fff; cursor: pointer;
  transition: all 0.15s; box-shadow: var(--shadow-primary);
}
.cal-create-btn:hover { background: var(--color-primary-hover); transform: translateY(-1px); }

/* Month grid */
.cal-grid-header {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--color-text-faint, var(--color-text-muted)); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 0;
  background: var(--color-muted, var(--color-surface-hover));
  border: 1px solid var(--color-border); border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden;
}
.cal-hdr { padding: 10px 0; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 104px;
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden;
  background: var(--color-surface);
}
.cal-cell {
  min-height: 0; padding: 6px 8px; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  cursor: pointer; transition: background 0.15s;
  border-right: 1px solid var(--color-border-light, var(--color-border));
  border-bottom: 1px solid var(--color-border-light, var(--color-border));
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--color-muted, var(--color-surface-hover)); }
.cal-cell--empty { cursor: default; min-height: 0; opacity: 0.35; }
.cal-cell--empty:hover { background: transparent; }
.cal-cell--today { background: var(--color-primary-light); }
.cal-cell--today:hover { background: var(--color-primary-glow, var(--color-primary-light)); }
.cal-cell--today .cal-day-num {
  background: var(--color-primary); color: #fff; border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-weight: 600; box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}
.cal-cell--selected { background: var(--color-muted, var(--color-surface-hover)); box-shadow: inset 0 0 0 2px var(--color-primary); border-radius: 2px; }
.cal-day-num { font-size: 13px; font-weight: 500; margin-bottom: 2px; padding: 2px; color: var(--color-text-muted); }
.cal-cell-badges { display: flex; flex-direction: column; gap: 2px; width: 100%; margin-top: 2px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.cal-cell-badge {
  font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 6px;
  display: flex; align-items: center; gap: 4px;
  overflow: hidden; line-height: 1.4; cursor: pointer; transition: opacity 0.15s;
}
.cal-cell-badge:hover { opacity: 0.8; }
.cal-cell-badge-time { font-weight: 700; flex-shrink: 0; }
.cal-cell-badge-type { font-weight: 700; flex-shrink: 0; font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.cal-cell-badge-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.cal-cell-badge--group { background: var(--color-success-bg, rgba(34, 197, 94, 0.1)); color: var(--color-success-text, #15803d); }
.cal-cell-badge--1on1 { background: var(--color-info-bg, rgba(59, 130, 246, 0.1)); color: var(--color-info-text, #1d4ed8); }
.cal-cell-badge--more { font-size: 10px; font-weight: 600; color: var(--color-text-faint, var(--color-text-muted)); padding: 1px 6px; text-align: center; }

/* Week view */
.cal-week { display: flex; position: relative; min-height: 500px; }
.cal-week-hours { width: 52px; position: relative; flex-shrink: 0; }
.cal-week-hour { position: absolute; font-size: 11px; font-weight: 500; color: var(--color-text-faint, var(--color-text-muted)); right: 8px; }
.cal-week-cols { display: flex; flex: 1; }
.cal-week-col { flex: 1; position: relative; min-height: 960px; border-left: 1px solid var(--color-border-light, var(--color-border)); }
.cal-week-col--today { background: var(--color-primary-light); }
.cal-week-day-hdr {
  text-align: center; padding: 10px 4px; border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-surface); z-index: 1;
}
.cal-week-day-name { font-size: 11px; color: var(--color-text-faint, var(--color-text-muted)); text-transform: uppercase; display: block; letter-spacing: 0.05em; }
.cal-week-day-num { font-size: 18px; font-weight: 700; }
.cal-week-day-num--today {
  background: var(--color-primary); color: #fff; border-radius: 50%;
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}
.cal-week-day-body { position: relative; }
.cal-week-block {
  position: absolute; left: 3px; right: 3px; border-radius: 6px;
  padding: 4px 6px; font-size: 12px; overflow: hidden; cursor: pointer;
  transition: all 0.15s; box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.05));
}
.cal-week-block:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: var(--shadow); }
.cal-week-block--group { background: var(--color-success-bg, rgba(34, 197, 94, 0.15)); color: var(--color-success-text, #15803d); }
.cal-week-block--1on1 { background: var(--color-info-bg, rgba(59, 130, 246, 0.15)); color: var(--color-info-text, #1d4ed8); }
.cal-week-block-time { font-weight: 700; display: block; }
.cal-week-block-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Day detail */
.cal-day-detail { margin-top: 28px; }
.cal-day-detail-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--color-text); letter-spacing: -0.01em; }
.cal-day-empty { color: var(--color-text-muted); font-size: 14px; }

/* Meeting card */
.cal-meeting {
  padding: 0; margin-bottom: 14px; overflow: hidden;
  border: 1px solid var(--color-border-light, var(--color-border));
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cal-meeting:hover { box-shadow: var(--shadow-md); border-color: var(--color-border); }
.cal-meeting-accent { height: 3px; }
.cal-meeting-accent--group { background: linear-gradient(90deg, #22c55e, #4ade80); }
.cal-meeting-accent--1on1 { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.cal-meeting-body { padding: 18px 20px; }
.cal-card--group { border-top: 3px solid #22c55e; }
.cal-card--1on1 { border-top: 3px solid #3b82f6; }
.cal-meeting-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-meeting-time { font-weight: 600; font-size: 13px; }
.cal-meeting-sep { color: var(--color-text-faint, var(--color-text-muted)); font-size: 13px; }
.cal-meeting-duration { font-size: 13px; color: var(--color-text-muted); }
.cal-meeting-target { font-size: 13px; color: var(--color-text-muted); }
.cal-meeting-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.cal-meeting-desc { font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; white-space: pre-line; line-height: 1.5; }
.cal-meeting-links { font-size: 13px; margin-bottom: 10px; word-break: break-all; }

.cal-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: var(--radius-full, 9999px); text-transform: uppercase; letter-spacing: 0.03em;
}
.cal-badge--group { background: var(--color-success-bg, rgba(34, 197, 94, 0.1)); color: var(--color-success-text, #15803d); }
.cal-badge--1on1 { background: var(--color-info-bg, rgba(59, 130, 246, 0.1)); color: var(--color-info-text, #1d4ed8); }

/* Zoom link */
.cal-zoom-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
  text-decoration: none; margin: 10px 0;
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted);
  transition: all 0.15s;
}
.cal-zoom-link--active {
  background: #2563eb; border-color: #2563eb; color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.cal-zoom-link--active:hover { background: #1d4ed8; transform: translateY(-1px); }
.cal-zoom-lock { font-size: 11px; font-weight: 400; opacity: 0.7; margin-left: 4px; }

/* RSVP */
.cal-rsvp { display: flex; gap: 8px; margin: 14px 0; align-items: center; }
.cal-rsvp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600;
  border: 1px solid var(--color-border); background: var(--color-surface);
  cursor: pointer; transition: all 0.15s; color: var(--color-text);
}
.cal-rsvp-btn:hover { border-color: var(--color-primary); }
.cal-rsvp-btn--confirmed { background: var(--color-success-bg, #dcfce7); border-color: var(--color-success); color: var(--color-success-text, #16a34a); }
.cal-rsvp-btn--declined { background: rgba(239, 68, 68, 0.06); border-color: var(--color-error); color: var(--color-error); }
.cal-rsvp-hint { font-size: 12px; color: var(--color-text-faint, var(--color-text-muted)); font-style: italic; }
.cal-needs { margin-top: 10px; }
.cal-needs-label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 6px; }
.cal-needs-input { font-size: 13px; }
.cal-needs-save { margin-top: 6px; }

/* Admin bar */
.cal-admin-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border-light, var(--color-border)); flex-wrap: wrap; gap: 8px; }
.cal-rsvp-pills { display: flex; gap: 6px; }
.cal-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-full, 20px); }
.cal-pill--confirmed { background: var(--color-success-bg, #dcfce7); color: var(--color-success-text, #16a34a); }
.cal-pill--declined { background: rgba(239, 68, 68, 0.06); color: var(--color-error); }
.cal-admin-btns { display: flex; gap: 6px; align-items: center; }

/* Modal */
.cal-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.cal-modal { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 28px; border-radius: var(--radius-lg); }
.cal-modal h2 { margin: 0 0 20px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.cal-modal .form-row { display: flex; gap: 12px; }
.cal-modal .form-row .form-group { flex: 1; }
.cal-modal .form-group { margin-bottom: 14px; }
.cal-modal .form-label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 6px; }
.cal-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--color-border); }

.btn-danger-ghost { color: var(--color-error); border: 1px solid var(--color-error); background: transparent; }
.btn-danger-ghost:hover { background: rgba(239, 68, 68, 0.06); }

/* Notification preferences */
.notif-section { margin-top: 16px; }
.notif-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--color-border-light, var(--color-border));
}
.notif-row:last-child { border-bottom: none; }
.notif-info { flex: 1; }
.notif-label { font-size: 14px; font-weight: 500; }
.notif-desc { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.notif-toggle {
  width: 44px; height: 24px; border-radius: var(--radius-full, 12px); border: none;
  background: var(--color-border); cursor: pointer; position: relative;
  transition: background 0.2s;
}
.notif-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.2s; box-shadow: var(--shadow);
}
.notif-toggle--on { background: var(--color-primary); }
.notif-toggle--on::after { transform: translateX(20px); }

/* Email dashboard */
.email-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.email-stat-card {
  padding: 18px; border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--color-border-light, var(--color-border));
  box-shadow: var(--shadow-xs, var(--shadow));
}
.email-stat-num { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.email-stat-label { font-size: 12px; font-weight: 500; color: var(--color-text-muted); margin-bottom: 6px; }
.email-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid var(--color-border-light, var(--color-border));
  border-radius: var(--radius-lg); overflow: hidden;
}
.email-table th {
  text-align: left; padding: 10px 16px; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-text-faint, var(--color-text-muted));
  background: var(--color-muted, var(--color-surface-hover));
  border-bottom: 1px solid var(--color-border);
}
.email-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border-light, var(--color-border)); }
.email-table tr:last-child td { border-bottom: none; }
.email-table tr:hover td { background: var(--color-muted, var(--color-surface-hover)); }
.email-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12px; }
.email-status--sent { color: var(--color-text-faint, var(--color-text-muted)); }
.email-status--opened { color: var(--color-success-text, #16a34a); }
.email-status--bounced { color: var(--color-error); }
.email-status--failed { color: var(--color-error); }
.email-pagination { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.email-page-btn {
  padding: 6px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); cursor: pointer; font-size: 13px; transition: all 0.15s;
}
.email-page-btn:hover { background: var(--color-muted, var(--color-surface-hover)); }
.email-page-btn--active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

@media (max-width: 768px) {
  .cal-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .cal-header-left { justify-content: center; }
  .cal-header-center { justify-content: center; }
  .cal-header-right { justify-content: center; }
  .cal-grid { grid-auto-rows: 78px; }
  .cal-cell { min-height: 0; padding: 4px; }
  .cal-cell-badge { font-size: 9px; padding: 2px 3px; }
  .cal-cell-badge-title { display: none; }
  .cal-cell-badge-type { font-size: 9px; }
  .cal-day-num { font-size: 12px; }
  .cal-week-hours { width: 36px; }
  .cal-week-day-num { font-size: 14px; }
  .cal-modal .form-row { flex-direction: column; gap: 0; }
  .cal-admin-bar { flex-direction: column; align-items: flex-start; }
  .email-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════ */

/* Admin link */
.dash-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin-bottom: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.dash-admin-link:hover { background: var(--color-bg); }

/* Hero */
.dash-hero {
  margin-bottom: 20px;
}
.dash-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 4px;
  line-height: 1.2;
}
.dash-hero-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Progress bar */
.dash-progress-bar {
  margin-bottom: 20px;
}
.dash-progress-track {
  height: 8px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}
.dash-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.dash-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Today card */
.dash-today-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.dash-today-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12);
}
.dash-today-complete { cursor: default; }
.dash-today-complete:hover { border-color: var(--color-border); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.dash-today-icon { font-size: 32px; flex-shrink: 0; }
.dash-today-body { flex: 1; min-width: 0; }
.dash-today-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.dash-today-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 4px;
}
.dash-today-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.dash-today-badge-done {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.dash-today-badge-todo {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--color-primary);
}
.dash-today-arrow {
  font-size: 20px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* Stats row */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.dash-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}
.dash-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 4px;
}
.dash-stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.dash-stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.dash-color-green .dash-stat-value { color: #16a34a; }
.dash-color-yellow .dash-stat-value { color: #ca8a04; }
.dash-color-red .dash-stat-value { color: #dc2626; }

/* Quick actions grid */
.dash-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.dash-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, transform 0.1s;
}
.dash-action-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.dash-action-icon { font-size: 26px; }
.dash-action-label { font-size: 13px; font-weight: 700; color: var(--color-text); }
.dash-action-sub { font-size: 11px; color: var(--color-text-muted); text-align: center; }

/* Sections */
.dash-section {
  margin-bottom: 24px;
}
.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dash-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}
.dash-section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

/* Meetings */
.dash-meetings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-meeting-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s;
}
.dash-meeting-card:hover { border-color: var(--color-primary); }
.dash-meeting-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 42px;
}
.dash-meeting-day {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.dash-meeting-month {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 600;
}
.dash-meeting-info { flex: 1; min-width: 0; }
.dash-meeting-title { font-size: 14px; font-weight: 600; color: var(--color-text); }
.dash-meeting-time { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.dash-meeting-rsvp {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
}
.dash-rsvp-yes { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.dash-rsvp-no { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.dash-rsvp-pending { background: rgba(202, 138, 4, 0.12); color: #ca8a04; }

/* Objective card */
.dash-objective-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 18px;
}
.dash-objective-text {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
}
.dash-objective-declaration {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-primary);
  font-style: italic;
  line-height: 1.4;
}

/* Community posts */
.dash-community {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}
.dash-post {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.dash-post:last-child { border-bottom: none; }
.dash-post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.dash-post-body { flex: 1; min-width: 0; }
.dash-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.dash-post-author { font-size: 13px; font-weight: 700; color: var(--color-text); }
.dash-post-time { font-size: 11px; color: var(--color-text-muted); }
.dash-post-content {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.dash-post-reactions {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Dark mode */
[data-theme="dark"] .dash-today-card { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
[data-theme="dark"] .dash-today-card:hover { box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2); }

/* Responsive */
@media (max-width: 600px) {
  .dash-hero-title { font-size: 20px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-actions { grid-template-columns: repeat(2, 1fr); }
  .dash-today-card { padding: 14px 16px; gap: 12px; }
  .dash-today-icon { font-size: 28px; }
  .dash-today-title { font-size: 15px; }
  .dash-stat-value { font-size: 18px; }
  .dash-meeting-card { padding: 12px 14px; }
}

/* ═══════════════════════════════════════════════════════
   FIX #4 — Composer full-width
   ═══════════════════════════════════════════════════════ */
.ch-composer {
  width: 100%;
  box-sizing: border-box;
}
.ch-composer-input {
  width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════
   FIX #5 — Community buttons redesign
   ═══════════════════════════════════════════════════════ */

/* Channel items — crisper active/hover */
.ch-channel-item {
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
}
.ch-channel-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}
.ch-channel-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px; bottom: 4px;
  width: 3px;
  background: var(--color-primary);
  border-radius: 0 2px 2px 0;
}

/* Send button — pill shape, stronger */
.ch-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-primary);
  box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}
.ch-send-btn:hover {
  background: var(--color-primary);
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
  transform: translateY(-1px);
}

/* Message action buttons — visible, polished */
.ch-msg-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.ch-msg-action-btn:hover {
  border-color: var(--color-border);
  background: var(--color-bg);
  color: var(--color-primary);
}
.ch-reply-btn:hover { color: var(--color-primary); }
.ch-emoji-btn:hover { color: #f59e0b; }
.ch-pin-btn:hover { color: #8b5cf6; }
.ch-delete-btn:hover {
  border-color: rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.06);
  color: var(--color-error);
}

/* Unread badge — more prominent */
.ch-unread-badge {
  background: var(--color-primary);
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Composer textarea — cleaner */
.ch-composer-input {
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.9375rem;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ch-composer-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

/* ═══════════════════════════════════════════════════════
   FIX #3 — DM (Direct Messages)
   ═══════════════════════════════════════════════════════ */
.ch-dm-section {
  border-top: 1px solid var(--color-border-light);
  padding: 8px 8px 4px;
}
.ch-dm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.ch-dm-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ch-dm-new-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.ch-dm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.ch-dm-item:hover { background: var(--color-border-light); }
.ch-dm-item.active {
  background: var(--color-primary-light);
}
.ch-dm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ch-dm-info { flex: 1; min-width: 0; }
.ch-dm-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-dm-preview {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-dm-unread {
  background: var(--color-primary);
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* DM conversation messages */
.ch-dm-msg {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}
.ch-dm-msg.ch-dm-msg-mine { flex-direction: row-reverse; }
.ch-dm-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ch-dm-msg-mine .ch-dm-msg-avatar {
  background: var(--color-primary);
  color: #fff;
}
.ch-dm-msg-body { max-width: 70%; }
.ch-dm-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
  word-break: break-word;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}
.ch-dm-msg-mine .ch-dm-msg-bubble {
  background: var(--color-primary);
  color: #fff;
  border: none;
}
.ch-dm-msg-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 3px;
  padding: 0 4px;
}
.ch-dm-msg-mine .ch-dm-msg-meta { text-align: right; }

/* Member click to DM */
.ch-member-item { cursor: pointer; }
.ch-member-item:hover { background: var(--color-muted); border-radius: var(--radius-sm); }

/* Admin alerts — always visible, fixed scroll */
.admin-alerts-collapse {
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-alerts-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-error, #ef4444);
}
.admin-alerts-scroll {
  max-height: calc(5 * 72px);
  overflow-y: auto;
  padding: 0 0 8px;
}
.admin-alerts-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
}
.admin-alerts-summary-title { flex: 1; }
/* Recent activity fixed scroll */
.admin-scroll-5 {
  max-height: calc(5 * 56px);
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════
   FIX #6 — Leaderboard page
   ═══════════════════════════════════════════════════════ */
.lb-page { max-width: 860px; margin: 0 auto; padding: 0 0 60px; }
.lb-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.lb-title { font-size: 1.75rem; font-weight: 800; margin: 0; }
.lb-subtitle { color: var(--color-text-muted); font-size: 0.9rem; margin: 4px 0 0; }
.lb-legend { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lb-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--color-text-muted); }
.lb-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.lb-scoring-title { font-weight: 700; margin-bottom: 10px; }
.lb-scoring-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.lb-scoring-item { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.lb-scoring-pts { font-weight: 800; color: var(--color-primary); min-width: 28px; }
.lb-pts-galben { color: #f59e0b; }
.lb-pts-rosu { color: #ef4444; }

.lb-table { overflow: hidden; }
.lb-table-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.lb-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.15s;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--color-muted); }
.lb-row-me { background: var(--color-primary-light) !important; }
.lb-row-top { }
.lb-cell-rank { width: 50px; flex-shrink: 0; }
.lb-cell-user { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-cell-score { width: 80px; text-align: center; flex-shrink: 0; }
.lb-cell-streak { width: 90px; text-align: center; flex-shrink: 0; }
.lb-cell-color { width: 130px; flex-shrink: 0; }

.lb-medal { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; font-size: 13px; }
.lb-gold { background: #fef3c7; color: #92400e; border: 2px solid #f59e0b; }
.lb-silver { background: #f1f5f9; color: #475569; border: 2px solid #94a3b8; }
.lb-bronze { background: #fef3c7; color: #78350f; border: 2px solid #d97706; }
.lb-rank { font-weight: 700; color: var(--color-text-muted); font-size: 14px; }

.lb-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary-light); color: var(--color-primary); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lb-name { font-weight: 600; font-size: 0.9375rem; }
.lb-you { font-size: 0.75rem; color: var(--color-primary); font-weight: 500; }
.lb-mission { font-size: 0.75rem; color: var(--color-text-muted); }
.lb-user-info { min-width: 0; }

.lb-score { font-size: 1.25rem; font-weight: 800; color: var(--color-primary); display: block; }
.lb-score-label { font-size: 0.7rem; color: var(--color-text-muted); }
.lb-streak-num { font-size: 1.125rem; font-weight: 700; display: block; }
.lb-streak-label { font-size: 0.7rem; color: var(--color-text-muted); }

.lb-color-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--color-border-light); margin-bottom: 3px; }
.lb-cb-verde { background: #22c55e; }
.lb-cb-galben { background: #f59e0b; }
.lb-cb-rosu { background: #ef4444; }
.lb-cb-empty { flex: 1; background: var(--color-border-light); }
.lb-color-counts { font-size: 0.7rem; color: var(--color-text-muted); }
.lb-empty { text-align: center; padding: 40px; color: var(--color-text-muted); }
.lb-error { color: var(--color-error); }

/* ═══════════════════════════════════════════════════════
   FIX #9 — Sales page
   ═══════════════════════════════════════════════════════ */
.sales-page { max-width: 1100px; margin: 0 auto; padding-bottom: 60px; }
.sales-kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.sales-kpi { padding: 20px 24px; }
.sales-kpi-label { font-size: 0.8125rem; color: var(--color-text-muted); font-weight: 500; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.sales-kpi-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.sales-kpi-sub { font-size: 0.8125rem; color: var(--color-text-muted); }
.sales-charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.sales-chart { padding: 20px 24px; }
.sales-chart-title { font-size: 0.9375rem; font-weight: 700; margin-bottom: 16px; }
.sales-chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.sales-chart-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; }
.sales-chart-bar-label { font-size: 11px; color: var(--color-text-muted); font-weight: 700; margin-bottom: 4px; }
.sales-chart-bar { width: 100%; background: var(--color-primary); border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.3s; }
.sales-chart-bar-month { font-size: 10px; color: var(--color-text-muted); margin-top: 4px; text-align: center; }
.sales-tier-table { padding: 20px 24px; }
.sales-section-title { font-size: 0.9375rem; font-weight: 700; margin-bottom: 14px; }
.sales-tier-badge { background: var(--color-primary-light); color: var(--color-primary); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.sales-recent { padding: 20px 24px; overflow-x: auto; }

@media (max-width: 768px) {
  .sales-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sales-charts-grid { grid-template-columns: 1fr; }
  .lb-cell-streak, .lb-cell-color { display: none; }
}

/* ═══════════════════════════════════════════════════════
   COACH VIEW
   ═══════════════════════════════════════════════════════ */
.coach-page { padding: 0 0 40px; }
.coach-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.coach-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; }
.coach-subtitle { color: var(--color-text-muted); font-size: 14px; margin: 0; }
.coach-list { padding: 0; overflow: hidden; }
.coach-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.coach-row:last-child { border-bottom: none; }
.coach-row:hover { background: var(--color-surface-alt, #f9fafb); }
.coach-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.coach-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.coach-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coach-sub { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coach-row-mid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.coach-module { font-size: 13px; color: var(--color-text-muted); }
.coach-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}
.coach-pill--ok { background: rgba(34,197,94,0.12); color: #16a34a; }
.coach-pill--warn { background: rgba(234,179,8,0.12); color: #a16207; }
.coach-pill--danger { background: rgba(239,68,68,0.12); color: #dc2626; }
.coach-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.coach-wa-btn, .coach-dm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.coach-wa-btn:hover { background: rgba(37,211,102,0.1); border-color: #25D366; }
.coach-dm-btn:hover { background: rgba(124,58,237,0.1); border-color: var(--color-primary); color: var(--color-primary); }
@media (max-width: 600px) {
  .coach-row { flex-wrap: wrap; }
  .coach-row-mid { order: 3; flex: 1 0 100%; }
}

/* ═══════════════════════════════════════════════════════
   ADMIN DROPDOWN SECTIONS
   ═══════════════════════════════════════════════════════ */
.admin-dd {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.admin-dd-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  user-select: none;
  background: var(--color-surface);
  transition: background 0.15s;
}
.admin-dd-summary::-webkit-details-marker { display: none; }
.admin-dd-summary::before {
  content: '▸';
  font-size: 12px;
  color: var(--color-text-muted);
  transition: transform 0.2s;
}
details.admin-dd[open] > .admin-dd-summary::before { content: '▾'; }
.admin-dd-summary:hover { background: var(--color-surface-alt, #f9fafb); }
.admin-dd > *:not(summary) { padding: 0 20px 16px; }

/* Alerts + Activity side by side */
.admin-alerts-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-alerts-col,
.admin-activity-col {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}
.admin-section-label {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt, #f9fafb);
}
.admin-alerts-col .admin-alerts-scroll,
.admin-activity-col .admin-scroll-5 {
  max-height: calc(5 * 68px);
  overflow-y: auto;
}
@media (max-width: 768px) {
  .admin-alerts-activity-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   COACH DETAIL PANEL
   ═══════════════════════════════════════════════════════ */
.coach-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  transition: background 0.15s;
  cursor: default;
}
.coach-row-main:hover { background: var(--color-surface-alt, #f9fafb); }
.coach-detail-panel {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-alt, #f9fafb);
}
.coach-detail-content {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.coach-detail-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.coach-detail-section:last-child { border-bottom: none; }
.coach-detail-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
/* Onboarding steps */
.coach-onb-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.coach-onb-step {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.coach-onb-step.done {
  background: rgba(34,197,94,0.1);
  border-color: #86efac;
  color: #15803d;
}
.coach-onb-icon { font-size: 11px; }
.btn-sm { font-size: 12px; padding: 5px 12px; border-radius: 8px; cursor: pointer; border: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-success { background: #22c55e !important; color: #fff !important; }

/* Staff management modal */
.staff-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.staff-modal {
  background: var(--color-bg); border-radius: 16px; width: 100%; max-width: 680px;
  max-height: 85vh; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.staff-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--color-border);
}
.staff-modal-header h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.staff-modal-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--color-text-muted); padding: 4px 8px; line-height: 1;
}
.staff-modal-close:hover { color: var(--color-text); }
.staff-modal-body { padding: 20px 24px; overflow-y: auto; }
.staff-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.staff-member {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--color-border); border-radius: 10px; flex-wrap: wrap;
}
.staff-member--inactive { opacity: 0.5; }
.staff-member-info { flex: 1; min-width: 140px; }
.staff-member-name { font-weight: 600; font-size: 14px; }
.staff-member-email { font-size: 12px; color: var(--color-text-muted); }
.staff-member-roles { display: flex; gap: 10px; flex-wrap: wrap; }
.staff-role-toggle {
  display: flex; align-items: center; gap: 4px; font-size: 13px;
  cursor: pointer; user-select: none;
}
.staff-role-toggle input { cursor: pointer; }
.staff-add-form {
  padding: 16px; background: var(--color-bg-secondary); border-radius: 10px;
}
.staff-add-form .form-input {
  padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 8px;
  font-size: 13px; background: var(--color-bg);
}

/* Profile collapsible sections */
.profile-collapsible { overflow: hidden; }
.profile-summary-header {
  cursor: pointer; list-style: none; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.profile-summary-header::-webkit-details-marker { display: none; }
.profile-summary-header::marker { display: none; content: ''; }
.profile-chevron { transition: transform 0.2s; flex-shrink: 0; }
.profile-collapsible[open] .profile-chevron { transform: rotate(180deg); }
.profile-collapsible-body { padding-top: 12px; }

/* Close DM button */
.ch-close-dm-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--color-border);
  background: var(--color-bg); cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--color-text-muted); flex-shrink: 0;
}
.ch-close-dm-btn:hover { background: var(--color-bg-secondary); color: var(--color-danger); }

/* ── Azi Page Redesign ─────────────────────────────────── */

.today-card { position: relative; }

.today-card-section {
  margin-bottom: 12px;
}
.today-card-section:last-child { margin-bottom: 0; }

.today-card-divider {
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}

.today-post-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-primary-light, #ede9fe);
  color: var(--color-primary, #7c3aed);
  margin-bottom: 8px;
}

/* Admin edit button */
.admin-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
  line-height: 1;
}
.admin-edit-btn:hover {
  opacity: 1;
  color: var(--color-primary, #7c3aed);
  border-color: var(--color-primary, #7c3aed);
}

.editable-active {
  outline: 2px dashed var(--color-primary, #7c3aed);
  outline-offset: 2px;
  border-radius: 4px;
  padding: 4px;
  min-height: 1.5em;
  background: var(--color-bg-secondary, #faf5ff);
}

.admin-save-bar {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
}

/* AB1 Category Buttons */
.ab1-section { margin-bottom: 16px; }

.ab1-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.ab1-cat-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.ab1-cat-btn:active { transform: scale(0.97); }

.ab1-cat-btn.ab1-servire { border-color: #dbeafe; color: #2563eb; }
.ab1-cat-btn.ab1-servire.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.ab1-cat-btn.ab1-autenticitate { border-color: #fce7f3; color: #db2777; }
.ab1-cat-btn.ab1-autenticitate.active { background: #db2777; color: #fff; border-color: #db2777; }

.ab1-cat-btn.ab1-transformare { border-color: #d1fae5; color: #059669; }
.ab1-cat-btn.ab1-transformare.active { background: #059669; color: #fff; border-color: #059669; }

.ab1-cat-btn.ab1-invitatie { border-color: #fef3c7; color: #d97706; }
.ab1-cat-btn.ab1-invitatie.active { background: #d97706; color: #fff; border-color: #d97706; }

/* AB2-4 Compact rows */
.ab-compact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ab-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-bg-secondary, #f9fafb);
  border-radius: 8px;
  gap: 12px;
}

.ab-compact-label {
  font-size: 0.82rem;
  color: var(--color-text-secondary, #64748b);
  flex: 1;
  min-width: 0;
}

.ab-compact-key {
  font-weight: 700;
  color: var(--color-primary, #7c3aed);
  margin-right: 4px;
}

.ab-compact-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ab-btn-sm {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.ab-btn-sm:active { transform: scale(0.95); }

.ab-btn-sm.ab-yes.active { background: #22c55e; color: #fff; border-color: #22c55e; }
.ab-btn-sm.ab-partial.active { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.ab-btn-sm.ab-no.active { background: #ef4444; color: #fff; border-color: #ef4444; }

/* Dark mode overrides */
[data-theme="dark"] .ab1-cat-btn { background: var(--color-bg-secondary); }
[data-theme="dark"] .ab-compact-row { background: var(--color-bg-tertiary, #1e1e2e); }
[data-theme="dark"] .ab-btn-sm { background: var(--color-bg-secondary); }
[data-theme="dark"] .editable-active { background: rgba(124, 58, 237, 0.1); }
[data-theme="dark"] .today-post-badge { background: rgba(124, 58, 237, 0.2); }


/* ── Admin Container Management ────────────────────────── */
.admin-container-bar {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.lg-container { position: relative; }
.lg-container:hover .admin-container-bar { opacity: 1; }

.admin-cbar-btn {
  width: auto;
  min-width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  padding: 0 6px;
  transition: all 0.15s;
}
.admin-cbar-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.admin-cbar-del:hover { border-color: #dc2626; color: #dc2626; }

.lg-day-sublabel {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.lg-day-training {
  font-size: 0.95rem;
  color: var(--color-text);
}


/* ============================================================
   MOBILE MORE SHEET
   ============================================================ */
.more-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 490;
}

.more-sheet-backdrop.open {
  display: block;
}

.more-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--color-border);
  z-index: 500;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 80vh;
  overflow-y: auto;
}

.more-sheet.open {
  transform: translateY(0);
}

.more-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.more-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--color-border);
}

.more-sheet-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.more-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.more-sheet-close:hover {
  background: var(--color-muted, var(--color-border));
  color: var(--color-text);
}

.more-sheet-items {
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.more-sheet-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 8px 12px 4px;
}

.more-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.more-sheet-item:hover,
.more-sheet-item:active {
  background: var(--color-surface-hover);
}

.more-sheet-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.more-sheet-item.active svg {
  color: var(--color-primary);
}

.more-sheet-item svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.more-sheet-item--danger {
  color: #ef4444;
}

.more-sheet-item--danger svg {
  color: #ef4444;
}

.more-sheet-divider {
  height: 1px;
  background: var(--color-border);
  margin: 6px 0;
}

/* Hide more sheet on desktop (sidebar handles all nav) */
@media (min-width: 768px) {
  .more-sheet,
  .more-sheet-backdrop {
    display: none !important;
  }
}

/* ============================================================
   SCHEDULING
   ============================================================ */
.sch-page{max-width:1180px;margin:0 auto}.sch-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px;flex-wrap:wrap}.sch-header h1,.sp-header h1{margin:0;font-size:1.55rem;line-height:1.2;font-weight:800}.sch-header p,.sch-panel-head p,.sp-header p{margin:6px 0 0;color:var(--color-text-muted);font-size:.92rem}.sch-tabs{display:flex;gap:4px;border-bottom:1px solid var(--color-border);margin-bottom:18px;overflow-x:auto}.sch-tab{border:0;background:transparent;color:var(--color-text-muted);padding:10px 16px;font-weight:700;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap}.sch-tab--active{color:var(--color-primary);border-bottom-color:var(--color-primary)}.sch-tab-content--hidden{display:none}.sch-panel{margin-bottom:16px}.sch-panel-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:16px}.sch-panel h2,.sch-panel h3,.sp-card h2,.sp-day h3{margin:0;line-height:1.25}.sch-panel h2,.sp-card h2{font-size:1.05rem}.sch-panel h3,.sp-day h3{font-size:.92rem}.sch-form-grid,.sch-link-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sch-form-grid label,.sch-link-grid label,.sch-admin-block label,.sp-form-card label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:var(--color-text-muted)}.sch-form-grid input,.sch-link-grid input,.sch-link-grid textarea,.sch-admin-block input,.sch-admin-block textarea,.sch-user-row input,.sch-day-row input,.sch-override-row input,.sch-override-row select,.sp-form-card input,.sp-form-card textarea{width:100%;border:1px solid var(--color-border);border-radius:8px;padding:10px 11px;background:var(--color-surface);color:var(--color-text);font:inherit;min-height:42px}.sch-actions{display:flex;align-items:end}.sch-week-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sch-day-row,.sch-override-row,.sch-user-row,.sch-member-row{display:grid;grid-template-columns:minmax(130px,1fr) 120px 120px;gap:10px;align-items:center;border:1px solid var(--color-border-light);border-radius:8px;padding:10px;background:var(--color-bg)}.sch-check,.sp-consent{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px!important;color:var(--color-text)!important}.sch-check input,.sp-consent input{width:16px!important;min-height:16px!important;flex:0 0 auto}.sch-overrides{margin-top:18px}.sch-overrides-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}#sch-overrides-list{display:flex;flex-direction:column;gap:8px}.sch-override-row{grid-template-columns:150px 190px 110px 110px minmax(140px,1fr) 36px}.sch-icon-btn{width:34px;height:34px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);color:var(--color-text-muted);cursor:pointer;font-size:18px;line-height:1}.sch-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}.sch-admin-block{border:1px solid var(--color-border-light);border-radius:8px;padding:14px;background:var(--color-bg);display:flex;flex-direction:column;gap:10px}.sch-number-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sch-member-list,.sch-user-list{display:flex;flex-direction:column;gap:8px}.sch-member-row{grid-template-columns:18px minmax(0,1fr)}.sch-member-row small,.sch-user-row small,.sch-table small{display:block;color:var(--color-text-muted);font-size:.76rem;margin-top:2px}.sch-users-block{margin-top:18px}.sch-user-row{grid-template-columns:minmax(150px,1.2fr) minmax(130px,1fr) minmax(180px,1.4fr) 92px 90px}.sch-table-wrap{overflow-x:auto}.sch-table{width:100%;border-collapse:collapse;min-width:760px}.sch-table th,.sch-table td{text-align:left;padding:10px;border-bottom:1px solid var(--color-border-light);vertical-align:top;font-size:.88rem}.sch-table th{color:var(--color-text-muted);font-size:.75rem;text-transform:uppercase;letter-spacing:.04em}.sch-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:800;background:var(--color-muted);color:var(--color-text-muted)}.sch-pill--confirmed,.sch-pill--synced{background:var(--color-success-bg);color:var(--color-success-text)}.sch-pill--cancelled,.sch-pill--failed{background:rgba(239,68,68,.1);color:#dc2626}.sch-empty,.sch-alert{padding:18px;color:var(--color-text-muted)}
.scheduling-public-body,.scheduling-embed-body{background:#f8fafc;color:#111827;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.scheduling-embed-body{min-height:auto}.sp-shell{width:min(1120px,calc(100% - 24px));margin:0 auto;padding:22px 0 34px}.sp-shell-embed{width:100%;padding:0}.sp-header{margin-bottom:16px}.sp-header img{width:136px;height:auto;margin-bottom:14px}.sp-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:16px;align-items:start}.sp-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:18px;box-shadow:0 1px 3px rgba(15,23,42,.05)}.sp-section-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:14px}.sp-section-head span,.sp-type span,.sp-selected span{color:#6b7280;font-size:.8rem;font-weight:700}.sp-type-grid,.sp-slot-grid{display:flex;flex-wrap:wrap;gap:8px}.sp-type,.sp-slot{border:1px solid #d1d5db;background:#fff;color:#111827;border-radius:8px;cursor:pointer;font:inherit}.sp-type{padding:12px;min-width:190px;text-align:left}.sp-type strong,.sp-type span{display:block}.sp-type.active,.sp-slot.active{border-color:#7c3aed;background:rgba(124,58,237,.08);color:#5b21b6}.sp-days{display:flex;flex-direction:column;gap:16px}.sp-day{display:grid;grid-template-columns:170px minmax(0,1fr);gap:12px;align-items:start;border-top:1px solid #f3f4f6;padding-top:12px}.sp-slot{min-width:76px;min-height:40px;padding:9px 12px;font-weight:800}.sp-form-card form{display:flex;flex-direction:column;gap:12px}.sp-selected{border:1px solid #e5e7eb;background:#f9fafb;border-radius:8px;padding:10px 12px;margin-bottom:14px}.sp-selected strong,.sp-selected span{display:block}.sp-selected.muted{color:#6b7280}.sp-btn{border:0;border-radius:8px;min-height:44px;padding:12px 16px;font:inherit;font-weight:800;cursor:pointer}.sp-btn:disabled{opacity:.55;cursor:not-allowed}.sp-btn-primary{background:#7c3aed;color:#fff}.sp-error{background:rgba(239,68,68,.08);color:#b91c1c;border:1px solid rgba(239,68,68,.18);border-radius:8px;padding:12px;margin-bottom:12px}.sp-empty,.sp-loading{color:#6b7280}.sp-result{max-width:620px;margin:28px auto}.sp-result h1{margin:0 0 10px;font-size:1.45rem}.sp-summary{display:grid;gap:10px;margin-top:16px}.sp-summary div{border:1px solid #e5e7eb;border-radius:8px;padding:10px 12px;background:#f9fafb}.sp-summary span,.sp-summary strong{display:block}.sp-summary span{color:#6b7280;font-size:.78rem;font-weight:800}.sp-hp{position:absolute;left:-9999px;width:1px!important;height:1px!important;min-height:1px!important;opacity:0}
@media (max-width:900px){.sch-form-grid,.sch-admin-grid,.sch-link-grid,.sp-grid{grid-template-columns:1fr}.sch-week-grid{grid-template-columns:1fr}.sch-user-row,.sch-override-row,.sch-day-row{grid-template-columns:1fr}.sp-day{grid-template-columns:1fr}}@media (max-width:560px){.sp-shell{width:min(100%,calc(100% - 20px));padding-top:12px}.sp-card{padding:14px}.sp-slot{flex:1 1 72px}}
.sch-cc2-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:16px;align-items:start}.sch-cc2-slots{display:flex;flex-direction:column;gap:14px}.sch-cc2-day{border-top:1px solid var(--color-border-light);padding-top:12px}.sch-cc2-day:first-child{border-top:0;padding-top:0}.sch-cc2-day h3{margin:0 0 8px;font-size:.92rem}.sch-cc2-slot-grid{display:flex;flex-wrap:wrap;gap:8px}.sch-cc2-form{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:14px;display:flex;flex-direction:column;gap:12px}.sch-cc2-form label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:var(--color-text-muted)}.sch-cc2-form input,.sch-cc2-form textarea{width:100%;border:1px solid var(--color-border);border-radius:8px;padding:10px 11px;background:var(--color-surface);color:var(--color-text);font:inherit;min-height:42px}@media (max-width:900px){.sch-cc2-grid{grid-template-columns:1fr}}
.sch-profile-media{display:flex;align-items:center;gap:14px;margin-bottom:14px}.sch-avatar-preview{width:76px;height:76px;border-radius:50%;border:1px solid var(--color-border);background:var(--color-bg);display:grid;place-items:center;overflow:hidden;color:var(--color-text-muted);font-weight:800}.sch-avatar-preview img{width:100%;height:100%;object-fit:cover}.sch-photo-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.sch-photo-form input{max-width:280px}.sch-google-box{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:14px;margin:14px 0;display:flex;justify-content:space-between;gap:12px;align-items:center}.sch-google-box h3{margin:0}.sch-google-select{margin-top:10px}.sch-day-multi{border:1px solid var(--color-border-light);border-radius:8px;padding:12px;background:var(--color-bg)}.sch-day-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.sch-day-intervals{display:flex;flex-direction:column;gap:8px}.sch-day-multi .sch-day-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;padding:0;border:0;background:transparent}.sch-empty-compact{padding:8px 0;font-size:.82rem}.sch-calendar-controls{display:flex;gap:6px;flex-wrap:wrap}.sch-team-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.sch-team-column{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:12px;min-width:0}.sch-team-head{display:flex;gap:10px;align-items:center;margin-bottom:12px}.sch-team-head img,.sch-team-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:var(--color-muted);display:grid;place-items:center;font-size:.72rem;font-weight:800;color:var(--color-text-muted);flex:0 0 auto}.sch-team-head small,.sch-mini-list small{display:block;color:var(--color-text-muted);font-size:.76rem}.sch-mini-list,.sch-mini-section{display:flex;flex-direction:column;gap:8px}.sch-mini-section{border-top:1px solid var(--color-border-light);padding-top:10px}.sch-mini-appt{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:8px}.sch-mini-appt span,.sch-mini-appt small,.sch-mini-appt b{display:block}.sch-client-results{display:flex;flex-direction:column;gap:6px}.sch-client-result{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);text-align:left;padding:9px 10px;cursor:pointer;color:var(--color-text)}.sch-client-result strong,.sch-client-result small{display:block}.sch-client-result small{color:var(--color-text-muted);font-size:.76rem;margin-top:2px}.sch-template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sch-template-form{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:14px;display:flex;flex-direction:column;gap:10px}.sch-template-form label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:var(--color-text-muted)}.sch-template-form input,.sch-template-form textarea,.sch-google-select select{width:100%;border:1px solid var(--color-border);border-radius:8px;padding:10px 11px;background:var(--color-surface);color:var(--color-text);font:inherit}.sp-timezone-label{display:flex;flex-direction:column;gap:6px;min-width:220px;margin-bottom:12px;color:#6b7280;font-size:.8rem;font-weight:800}.sp-timezone-label select{border:1px solid #d1d5db;border-radius:8px;min-height:40px;padding:8px 10px;background:#fff;color:#111827;font:inherit}.sp-reschedule-current{margin-bottom:14px}.sp-reschedule-form{margin-top:16px;display:flex;justify-content:flex-end}@media (max-width:1100px){.sch-team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sch-template-list{grid-template-columns:1fr}}@media (max-width:700px){.sch-team-grid{grid-template-columns:1fr}.sch-google-box,.sch-profile-media{align-items:flex-start;flex-direction:column}.sch-day-multi .sch-day-row{grid-template-columns:1fr}.sp-timezone-label{min-width:0;width:100%}.sp-reschedule-form{justify-content:stretch}.sp-reschedule-form .sp-btn{width:100%}}
.sch-cal-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto minmax(220px,.45fr);gap:12px;align-items:end;margin-bottom:12px}.sch-cal-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.sch-cal-nav strong{font-size:1rem;color:var(--color-text)}.sch-cal-active{background:var(--color-primary-light)!important;color:var(--color-primary)!important;border-color:var(--color-primary)!important}.sch-cal-search{display:flex;flex-direction:column;gap:5px;font-size:.76rem;font-weight:800;color:var(--color-text-muted)}.sch-cal-search input{border:1px solid var(--color-border);border-radius:8px;min-height:36px;padding:8px 10px;background:var(--color-surface);color:var(--color-text);font:inherit}.sch-cal-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 14px}.sch-cal-user-filter{border:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text);border-radius:999px;min-height:34px;padding:6px 10px;display:inline-flex;align-items:center;gap:7px;font:inherit;font-size:.82rem;font-weight:800;cursor:pointer}.sch-cal-user-filter.active{border-color:var(--color-primary);background:var(--color-primary-light);color:var(--color-primary)}.sch-cal-user-filter img,.sch-cal-dot{width:20px;height:20px;border-radius:50%;object-fit:cover;background:var(--color-primary)}.sch-cal-count{color:var(--color-text-muted);font-size:.78rem;font-weight:800}.sch-cal-day-shell{display:grid;grid-template-rows:56px 897px;overflow:auto;border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg)}.sch-cal-time-head,.sch-cal-person-head{position:sticky;top:0;z-index:4;background:var(--color-surface);border-bottom:1px solid var(--color-border-light)}.sch-cal-person-head{display:flex;align-items:center;gap:10px;padding:8px 10px;border-left:1px solid var(--color-border-light);min-width:0}.sch-cal-person-head img{width:34px;height:34px;border-radius:50%;object-fit:cover}.sch-cal-person-head strong,.sch-cal-person-head small{display:block}.sch-cal-person-head small{font-size:.72rem;color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sch-cal-time-gutter{position:sticky;left:0;z-index:3;background:var(--color-surface);border-right:1px solid var(--color-border-light);grid-column:1;grid-row:2;min-height:897px}.sch-cal-hour-label{position:absolute;right:8px;transform:translateY(-7px);font-size:.72rem;color:var(--color-text-muted);font-weight:700}.sch-cal-lane{position:relative;grid-row:2;min-height:897px;background:#d9d9d9;border-left:1px solid var(--color-border-light);overflow:hidden}.sch-cal-hour-line{position:absolute;left:0;right:0;border-top:1px solid rgba(148,163,184,.42);z-index:1}.sch-cal-free-block{position:absolute;left:0;right:0;background:var(--color-surface);border-top:1px solid rgba(148,163,184,.22);border-bottom:1px solid rgba(148,163,184,.22);z-index:2}.sch-cal-override-free{box-shadow:inset 0 0 0 2px rgba(34,197,94,.42)}.sch-cal-free-block span{position:absolute;left:8px;top:6px;font-size:.68rem;color:var(--color-text-muted);font-weight:800}.sch-cal-blocked-block{position:absolute;left:6px;right:6px;border:1px solid rgba(239,68,68,.35);background:repeating-linear-gradient(135deg,rgba(239,68,68,.12),rgba(239,68,68,.12) 5px,rgba(239,68,68,.22) 5px,rgba(239,68,68,.22) 10px);z-index:4;overflow:hidden}.sch-cal-blocked-block span{display:block;padding:4px 6px;font-size:.72rem;color:#b91c1c;font-weight:900}.sch-cal-busy-block{position:absolute;left:6px;right:6px;border:1px solid rgba(20,184,166,.35);background:repeating-linear-gradient(135deg,rgba(20,184,166,.13),rgba(20,184,166,.13) 4px,rgba(20,184,166,.24) 4px,rgba(20,184,166,.24) 8px);z-index:3;overflow:hidden}.sch-cal-busy-block span{display:block;padding:4px 6px;font-size:.72rem;color:#0f766e;font-weight:800}.sch-cal-appt-block{position:absolute;left:10px;right:10px;z-index:5;min-height:24px}.sch-cal-event{height:100%;min-height:34px;border:1px solid rgba(202,138,4,.45);background:#fde047;color:#111827;border-radius:6px;padding:6px 8px;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.12);font-size:.78rem}.sch-cal-event strong,.sch-cal-event span,.sch-cal-event small{display:block;line-height:1.22}.sch-cal-event span,.sch-cal-event small{font-size:.72rem}.sch-cal-event-cancelled{background:#f3f4f6;color:#6b7280;border-color:#d1d5db;text-decoration:line-through}.sch-cal-event-no_show{background:#fee2e2;border-color:#fca5a5}.sch-cal-event-completed{background:#dcfce7;border-color:#86efac}.sch-cal-event-overbook{box-shadow:inset 0 0 0 2px #ef4444}.sch-cal-week{display:grid;grid-template-columns:160px repeat(7,minmax(150px,1fr));border:1px solid var(--color-border-light);border-radius:8px;overflow:auto;background:var(--color-surface)}.sch-cal-week-head{position:sticky;top:0;z-index:2;background:var(--color-bg);border-bottom:1px solid var(--color-border-light);border-left:1px solid var(--color-border-light);padding:9px;font-size:.78rem;font-weight:900;color:var(--color-text-muted)}.sch-cal-week-user-head{left:0;z-index:3;border-left:0}.sch-cal-week-user{position:sticky;left:0;z-index:1;background:var(--color-surface);border-top:1px solid var(--color-border-light);padding:10px;display:flex;gap:8px;align-items:center;min-height:128px}.sch-cal-week-user img{width:32px;height:32px;border-radius:50%;object-fit:cover}.sch-cal-week-user strong,.sch-cal-week-user small{display:block}.sch-cal-week-user small{font-size:.72rem;color:var(--color-text-muted)}.sch-cal-week-cell{min-height:128px;border-top:1px solid var(--color-border-light);border-left:1px solid var(--color-border-light);padding:7px;display:flex;flex-direction:column;gap:5px;background:var(--color-bg)}.sch-cal-free-chip,.sch-cal-blocked-chip,.sch-cal-busy-card{border-radius:6px;padding:5px 6px;font-size:.72rem;font-weight:800}.sch-cal-free-chip{background:var(--color-surface);border:1px solid var(--color-border-light);color:var(--color-text-muted)}.sch-cal-blocked-chip{background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:#b91c1c}.sch-cal-busy-card{border:1px solid rgba(20,184,166,.35);background:repeating-linear-gradient(135deg,rgba(20,184,166,.1),rgba(20,184,166,.1) 4px,rgba(20,184,166,.2) 4px,rgba(20,184,166,.2) 8px);color:#0f766e}.sch-cal-busy-card strong,.sch-cal-busy-card span{display:block}.sch-cal-empty-cell{color:var(--color-text-muted);font-size:.8rem}.sch-cal-month{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));border:1px solid var(--color-border-light);border-radius:8px;overflow:auto;background:var(--color-surface)}.sch-cal-month-head{background:var(--color-bg);border-left:1px solid var(--color-border-light);border-bottom:1px solid var(--color-border-light);padding:8px;font-size:.78rem;font-weight:900;color:var(--color-text-muted)}.sch-cal-month-head:first-child{border-left:0}.sch-cal-month-cell{min-height:136px;border-left:1px solid var(--color-border-light);border-bottom:1px solid var(--color-border-light);padding:8px;display:flex;flex-direction:column;gap:5px;background:var(--color-bg)}.sch-cal-month-cell.muted{opacity:.48}.sch-cal-month-cell>strong{font-size:.82rem}.sch-cal-month-free,.sch-cal-month-busy,.sch-cal-month-blocked,.sch-cal-more{font-size:.7rem;font-weight:800;color:var(--color-text-muted)}.sch-cal-month-free{color:#047857}.sch-cal-month-busy{color:#0f766e}.sch-cal-month-blocked{color:#b91c1c}.sch-row-actions{display:flex;gap:6px;flex-wrap:wrap}
@media (max-width:1100px){.sch-cal-toolbar{grid-template-columns:1fr}.sch-cal-day-shell{grid-template-columns:70px repeat(var(--visible-users,4),minmax(210px,1fr))}.sch-cal-week{grid-template-columns:140px repeat(7,minmax(135px,1fr))}.sch-cal-month{grid-template-columns:repeat(7,minmax(118px,1fr))}}
@media (max-width:700px){.sch-cal-filter{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.sch-cal-user-filter{white-space:nowrap}.sch-cal-day-shell{grid-template-columns:62px repeat(var(--visible-users,4),minmax(190px,1fr));grid-template-rows:52px 897px}.sch-cal-time-gutter{min-height:897px}.sch-cal-week{grid-template-columns:126px repeat(7,minmax(126px,1fr))}.sch-cal-month{grid-template-columns:repeat(7,minmax(112px,1fr))}}
.sch-cal-picker{position:relative;display:inline-flex}.sch-cal-picker-toggle{display:inline-flex!important;align-items:center;gap:8px}.sch-cal-picker-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:40;width:330px;max-width:calc(100vw - 32px);background:var(--color-surface);border:1px solid var(--color-border-light);border-radius:8px;box-shadow:0 24px 70px rgba(15,23,42,.22);padding:16px}.sch-cal-picker-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.sch-cal-picker-actions button{border:0;background:transparent;color:var(--color-text);font:inherit;font-size:.75rem;font-weight:900;letter-spacing:.04em;cursor:pointer;padding:8px 10px;border-radius:6px}.sch-cal-picker-actions button:hover{background:var(--color-bg)}.sch-cal-picker-actions .sch-cal-picker-apply{background:#111827;color:#fff}.sch-cal-picker-row{display:flex;align-items:center;gap:12px;min-height:40px;padding:6px 2px;color:var(--color-text);font-size:.9rem;font-weight:700}.sch-cal-picker-row input{width:18px;height:18px;accent-color:#4b5563;flex:0 0 auto}.sch-cal-picker-row span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sch-cal-picker-row strong{font-weight:900}.sch-cal-filter{display:none}
.sch-clients-layout{display:grid;grid-template-columns:minmax(330px,.42fr) minmax(0,1fr);gap:16px;align-items:start}.sch-clients-list,.sch-client-detail{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:14px;min-width:0}.sch-client-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:12px}.sch-client-search-form input{width:100%;min-width:0;border:1px solid var(--color-border);border-radius:8px;min-height:38px;padding:8px 10px;background:var(--color-surface);color:var(--color-text);font:inherit}.sch-client-table{display:flex;flex-direction:column;gap:8px;max-height:680px;overflow:auto;padding-right:2px}.sch-client-card{width:100%;border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);color:var(--color-text);padding:10px 11px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:3px}.sch-client-card:hover,.sch-client-card.active{border-color:var(--color-primary);box-shadow:0 0 0 2px var(--color-primary-light)}.sch-client-card strong{font-size:.9rem}.sch-client-card span,.sch-client-card small,.sch-client-card em{font-size:.76rem;color:var(--color-text-muted);font-style:normal;line-height:1.35}.sch-client-detail-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}.sch-client-detail-head h3{margin:0}.sch-client-detail-head p{margin:4px 0 0;color:var(--color-text-muted);font-size:.84rem}.sch-client-history{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:12px;margin-bottom:14px}.sch-client-history h4{margin:0 0 10px;font-size:.84rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted)}.sch-client-history-row{border-top:1px solid var(--color-border-light);padding:9px 0;display:flex;flex-direction:column;gap:2px}.sch-client-history-row:first-of-type{border-top:0;padding-top:0}.sch-client-history-row strong{font-size:.88rem}.sch-client-history-row span,.sch-client-history-row small{font-size:.78rem;color:var(--color-text-muted)}.sch-client-book-form{display:flex;flex-direction:column;gap:12px}.sch-client-book-form label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:var(--color-text-muted)}.sch-client-book-form input,.sch-client-book-form textarea,.sch-client-book-form select{width:100%;border:1px solid var(--color-border);border-radius:8px;padding:10px 11px;background:var(--color-surface);color:var(--color-text);font:inherit;min-height:42px}.sch-client-book-form .btn:disabled{opacity:.55;cursor:not-allowed}.sch-client-slot-list{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:12px;max-height:420px;overflow:auto}.sch-client-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.sch-client-results:not(:empty){border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:8px}.sch-client-book-form .sch-client-results{margin-top:-4px}@media (max-width:980px){.sch-clients-layout{grid-template-columns:1fr}.sch-client-table,.sch-client-slot-list{max-height:none}.sch-client-fields{grid-template-columns:1fr}}@media (max-width:640px){.sch-client-search-form{grid-template-columns:1fr}.sch-client-detail-head{flex-direction:column}.sch-client-search-form .btn,.sch-client-detail-head .btn{width:100%}}
.sch-client-extra-fields{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:12px;margin-bottom:14px}.sch-client-extra-fields h4{margin:0 0 10px;font-size:.84rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted)}.sch-client-extra-fields>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sch-client-extra-fields section{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:9px;min-width:0}.sch-client-extra-fields span,.sch-client-extra-fields strong{display:block}.sch-client-extra-fields span{font-size:.72rem;font-weight:900;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.03em}.sch-client-extra-fields strong{font-size:.84rem;overflow-wrap:anywhere;margin-top:3px}@media (max-width:680px){.sch-client-extra-fields>div{grid-template-columns:1fr}}
.sch-template-list{grid-template-columns:1fr}.sch-template-form-visual{gap:14px}.sch-template-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--color-border-light);padding-bottom:12px}.sch-template-form-head h3{margin:0}.sch-template-form-head small{display:block;margin-top:3px;color:var(--color-text-muted);font-size:.75rem}.sch-template-collapse{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:10px}.sch-template-collapse>summary{cursor:pointer;font-weight:900;color:var(--color-text);font-size:.86rem;list-style-position:inside}.sch-template-collapse[open]>summary{margin-bottom:12px}.sch-template-builder{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.72fr);gap:16px;align-items:start}.sch-template-editor{display:flex;flex-direction:column;gap:12px;min-width:0}.sch-template-editor label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700;color:var(--color-text-muted)}.sch-template-editor input,.sch-template-editor textarea,.sch-template-editor select{width:100%;min-width:0;border:1px solid var(--color-border);border-radius:8px;padding:10px 11px;background:var(--color-surface);color:var(--color-text);font:inherit;min-height:42px}.sch-template-variable-box{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:10px}.sch-template-variable-box>strong,.sch-template-section-head>strong{display:block;color:var(--color-text);font-size:.84rem;margin-bottom:8px}.sch-template-vars{display:flex;gap:6px;flex-wrap:wrap}.sch-template-vars button{border:1px solid var(--color-border);background:var(--color-bg);color:var(--color-text);border-radius:999px;padding:6px 9px;font:inherit;font-size:.75rem;font-weight:800;cursor:pointer}.sch-template-vars button:hover{border-color:var(--color-primary);color:var(--color-primary)}.sch-template-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.sch-template-paragraph-list,.sch-template-button-list{display:flex;flex-direction:column;gap:8px}.sch-template-paragraph-row{display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:8px}.sch-template-button-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(150px,.8fr) minmax(170px,1fr) 36px;gap:8px;align-items:center}.sch-template-detail-toggle{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:10px}.sch-template-advanced{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:10px}.sch-template-advanced summary{cursor:pointer;font-weight:900;color:var(--color-text);font-size:.84rem}.sch-template-advanced label{margin-top:10px}.sch-template-preview-panel{position:sticky;top:82px;border:1px solid var(--color-border-light);border-radius:8px;background:#f8fafc;padding:12px;min-width:0}.sch-template-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.sch-template-preview-head strong{font-size:.85rem}.sch-template-preview-head span{font-size:.75rem;color:var(--color-text-muted);font-weight:800}.sch-template-email-preview{max-width:600px;margin:0 auto;background:#fff;border:1px solid #e4e4e7;border-radius:8px;overflow:hidden;color:#18181b;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.sch-template-preview-logo{padding:20px 24px 8px;font-weight:900;color:#7c3aed}.sch-template-preview-subject{padding:0 24px 8px;color:#71717a;font-size:12px;line-height:1.4;border-bottom:1px solid #f4f4f5}.sch-template-email-preview h1{margin:0;padding:18px 24px 4px;font-size:22px;line-height:1.25;color:#111827}.sch-template-preview-body{padding:0 24px 18px;color:#3f3f46;font-size:15px;line-height:1.65}.sch-template-preview-body p{margin:0 0 14px}.sch-template-preview-body table{max-width:100%}.sch-template-preview-footer{padding:16px 24px 22px;border-top:1px solid #f4f4f5;color:#71717a;font-size:13px;line-height:1.6}.sch-template-preview-body a{word-break:break-word}@media (max-width:1100px){.sch-template-builder{grid-template-columns:1fr}.sch-template-preview-panel{position:static}.sch-template-button-row{grid-template-columns:1fr 1fr}}@media (max-width:680px){.sch-template-form-head,.sch-template-section-head{flex-direction:column;align-items:flex-start}.sch-template-button-row{grid-template-columns:1fr}.sch-template-paragraph-row{grid-template-columns:1fr}.sch-template-paragraph-row .sch-icon-btn,.sch-template-button-row .sch-icon-btn{width:100%}}
.sch-cal-free-block{border-left:0;border-right:0;text-align:left;font:inherit;cursor:pointer}.sch-cal-free-block:hover{box-shadow:inset 0 0 0 2px var(--color-primary-light)}.sch-cal-cell-add{border:1px solid var(--color-border-light);border-radius:6px;background:var(--color-surface);color:var(--color-primary);font:inherit;font-size:.72rem;font-weight:900;padding:4px 7px;cursor:pointer;align-self:flex-start}.sch-cal-month-day-head{display:flex;align-items:center;justify-content:space-between;gap:6px}.sch-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.48);z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding:28px 14px;overflow:auto}.sch-modal{width:min(820px,100%);background:var(--color-surface);border:1px solid var(--color-border-light);border-radius:8px;box-shadow:0 28px 80px rgba(15,23,42,.28);padding:18px}.sch-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.sch-modal-head h3{margin:0}.sch-modal-head p{margin:5px 0 0;color:var(--color-text-muted);font-size:.86rem}.sch-alert-compact{padding:10px 12px;margin-bottom:12px}.sch-calendar-book-form,.sch-calendar-book-form label{display:flex;flex-direction:column;gap:8px}.sch-calendar-book-form{gap:12px}.sch-calendar-book-form label{font-size:.82rem;font-weight:800;color:var(--color-text-muted)}.sch-calendar-book-form input,.sch-calendar-book-form textarea,.sch-calendar-book-form select,.sch-admin-block select{width:100%;border:1px solid var(--color-border);border-radius:8px;padding:10px 11px;background:var(--color-surface);color:var(--color-text);font:inherit;min-height:42px}.sch-calendar-book-time-grid{grid-template-columns:minmax(0,1fr) 190px}.sch-calendar-overbook-check{align-self:end;min-height:42px}.sch-calendar-slot-list{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-bg);padding:12px;max-height:280px;overflow:auto}.sch-calendar-client-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.sch-modal-actions{display:flex;justify-content:flex-end;gap:10px}.sch-client-profile{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px}.sch-client-profile div{border:1px solid var(--color-border-light);border-radius:8px;background:var(--color-surface);padding:10px}.sch-client-profile span,.sch-client-profile strong{display:block}.sch-client-profile span{color:var(--color-text-muted);font-size:.72rem;font-weight:900}.sch-client-profile strong{font-size:.86rem;word-break:break-word}.sch-admin-section{border-top:1px solid var(--color-border-light);padding-top:18px;margin-top:18px}.sch-admin-section:first-of-type{border-top:0;padding-top:0;margin-top:0}.sch-admin-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}.sch-admin-section-head h3{margin:0}.sch-admin-section-head p{margin:0;color:var(--color-text-muted);font-size:.84rem}.sch-admin-grid-wide{grid-template-columns:repeat(3,minmax(0,1fr))}.sp-flow-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;width:min(940px,100%);margin:28px auto 20px}.sp-flow-head strong{justify-self:center;font-size:1.05rem}.sp-back{border:0;background:transparent;color:#111827;font:inherit;font-size:.8rem;font-weight:900;letter-spacing:.02em;cursor:pointer;text-align:left}.sp-back:disabled{cursor:default}.sp-appointment-card{width:min(940px,100%);margin:0 auto 18px;background:#fff;border:1px solid #e5e7eb;border-radius:0;box-shadow:0 8px 24px rgba(15,23,42,.06);padding:24px 28px;display:flex;justify-content:space-between;align-items:center;gap:14px}.sp-appointment-card span,.sp-section-label{display:block;color:#111827;font-size:.74rem;font-weight:900;letter-spacing:.04em;margin-bottom:9px}.sp-appointment-card strong,.sp-appointment-card small{display:block}.sp-appointment-card small{margin-top:3px;color:#374151;font-size:.9rem}.sp-reset-type{border:0;background:transparent;font:inherit;font-size:28px;line-height:1;cursor:pointer}.sp-type-card,.sp-datetime-card,.sp-form-card-wide{width:min(940px,100%);margin:0 auto 18px}.sp-datetime-card{display:grid;grid-template-columns:minmax(320px,.95fr) minmax(260px,.75fr);gap:44px;padding:32px 40px}.sp-month-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.sp-month-head strong{text-transform:capitalize;font-size:1rem}.sp-month-nav{border:0;background:#fff;color:#111827;font:inherit;font-size:28px;line-height:1;cursor:pointer}.sp-month-grid{display:grid;grid-template-columns:repeat(7,42px);gap:14px 18px;align-items:center}.sp-month-weekday{text-align:center;font-weight:900;color:#111827}.sp-month-day{width:42px;height:42px;border:0;border-radius:999px;background:#fff;color:#111827;font:inherit;cursor:pointer}.sp-month-day:disabled{color:#d1d5db;cursor:default}.sp-month-day.available:not(.selected){font-weight:800}.sp-month-day.selected{background:#111827;color:#fff}.sp-month-day.muted{opacity:.45}.sp-times-pane h2{margin:0 0 4px;text-transform:capitalize;font-size:1.05rem}.sp-timezone-note{font-size:.76rem;font-weight:900;color:#111827;margin:4px 0 18px}.sp-times-pane .sp-timezone-label{margin-top:8px}.sp-time-grid{display:flex;gap:12px;flex-wrap:wrap}.sp-time-grid .sp-slot{min-width:112px;min-height:58px;border-radius:0;background:#fff}.sp-form-card-wide{padding:30px 36px}.sp-form-card-wide form{max-width:460px}.sp-field-label{display:inline!important;color:var(--color-text-muted)!important}.sp-field-label b{color:#dc2626;font-weight:900}.sp-redirect-note{font-weight:800;color:#4b5563}@media (max-width:1150px){.sch-admin-grid-wide{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:820px){.sch-calendar-book-time-grid,.sch-calendar-client-fields,.sch-client-profile,.sch-admin-grid-wide{grid-template-columns:1fr}.sch-modal-actions{flex-direction:column}.sp-flow-head{grid-template-columns:1fr}.sp-flow-head strong{justify-self:start;margin-top:10px}.sp-datetime-card{grid-template-columns:1fr;padding:22px}.sp-month-grid{grid-template-columns:repeat(7,minmax(28px,1fr));gap:10px}.sp-month-day{width:100%;height:38px}.sp-appointment-card{padding:18px}.sp-form-card-wide{padding:20px}.sp-form-card-wide form{max-width:none}}

/* Public scheduler layout refinements */
.sp-header-inline{display:flex;justify-content:center;text-align:left;margin:4px auto 28px}
.sp-header-brand{display:flex;align-items:center;justify-content:center;gap:14px;max-width:780px}
.sp-header-brand img{width:58px!important;max-width:58px;height:auto;margin:0!important;flex:0 0 auto}
.sp-header-brand h1{font-size:1.42rem!important}
.sp-header-brand p{max-width:680px;line-height:1.45}
.sp-timezone-label select{font-size:.86rem}
@media (max-width:640px){
  .sp-header-inline{text-align:center;margin-top:8px}
  .sp-header-brand{flex-direction:column;gap:8px}
  .sp-header-brand img{width:52px!important;max-width:52px}
  .sp-header-brand h1{font-size:1.25rem!important}
}

/* Scheduler refinements */
.sch-admin-block input[type="checkbox"],
.sch-member-row input[type="checkbox"],
.sch-check input[type="checkbox"],
.sp-consent input[type="checkbox"]{
  width:16px!important;
  height:16px!important;
  min-height:16px!important;
  padding:0!important;
  flex:0 0 auto!important;
}
.sch-member-row-compact{
  grid-template-columns:18px minmax(0,1fr)!important;
  padding:8px 10px!important;
  min-height:auto;
}
.sch-member-row-compact strong{
  font-size:.86rem;
  line-height:1.25;
}
.sch-member-list-inline{
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  flex-wrap:wrap;
  gap:6px!important;
}
.sch-member-list-inline>strong{
  flex:0 0 100%;
  font-size:.78rem;
  color:var(--color-text-muted);
}
.sch-member-list-inline .sch-member-row{
  display:inline-flex!important;
  width:auto;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 9px!important;
  background:var(--color-surface);
}
.sch-member-list-inline .sch-member-row input[type="checkbox"]{
  width:14px!important;
  height:14px!important;
  min-height:14px!important;
}
.sch-member-list-inline .sch-member-row strong{
  font-size:.78rem;
  white-space:nowrap;
}
.sch-iframe-type-list .sch-member-row{
  max-width:100%;
}
.sch-iframe-type-list .sch-member-row span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sch-cal-week{
  grid-template-columns:minmax(108px,.66fr) repeat(7,minmax(0,1fr))!important;
  width:100%;
  overflow:visible!important;
}
.sch-cal-week-head,
.sch-cal-week-cell{
  min-width:0;
}
.sch-cal-week-head{
  padding:7px 6px!important;
  font-size:.72rem!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sch-cal-week-user{
  position:relative!important;
  left:auto!important;
  min-height:104px!important;
  padding:8px!important;
}
.sch-cal-week-user .sch-team-avatar,
.sch-cal-week-user img{
  width:28px!important;
  height:28px!important;
}
.sch-cal-week-user strong{
  font-size:.84rem;
  line-height:1.2;
}
.sch-cal-week-user small{
  font-size:.68rem!important;
}
.sch-cal-week-cell{
  min-height:104px!important;
  padding:6px!important;
  gap:4px!important;
  overflow:hidden;
}
.sch-cal-free-chip,
.sch-cal-blocked-chip,
.sch-cal-busy-card,
.sch-cal-week .sch-cal-event{
  font-size:.66rem!important;
  line-height:1.2;
  padding:4px 5px!important;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sch-cal-month{
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  overflow:visible!important;
}
.sch-cal-cell-add{
  display:none!important;
}
.sch-cal-week-timeline{
  display:grid;
  grid-template-rows:34px 52px 897px;
  border:1px solid var(--color-border-light);
  border-radius:8px;
  background:var(--color-bg);
  overflow:auto;
  width:100%;
  max-width:100%;
  -webkit-overflow-scrolling:touch;
}
.sch-cal-week-day-head{
  position:sticky;
  top:0;
  z-index:5;
  background:var(--color-surface);
  border-left:1px solid var(--color-border-light);
  border-bottom:1px solid var(--color-border-light);
  padding:5px 6px;
  text-align:center;
  min-width:0;
}
.sch-cal-week-day-head strong,
.sch-cal-week-day-head span{
  display:inline;
  font-size:.72rem;
  line-height:1.2;
  font-weight:900;
  color:var(--color-text);
}
.sch-cal-week-day-head span{
  color:var(--color-text-muted);
  margin-left:4px;
}
.sch-cal-week-subhead-spacer{
  position:sticky;
  top:34px;
  z-index:5;
  grid-column:1;
  grid-row:2;
  background:var(--color-surface);
  border-right:1px solid var(--color-border-light);
  border-bottom:1px solid var(--color-border-light);
}
.sch-cal-week-person-head{
  top:34px!important;
  min-height:52px;
  padding:5px 6px!important;
  gap:5px!important;
}
.sch-cal-week-person-head img,
.sch-cal-week-person-head .sch-team-avatar{
  width:24px!important;
  height:24px!important;
  font-size:.58rem!important;
}
.sch-cal-week-person-head strong{
  font-size:.72rem;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sch-cal-week-person-head small{
  font-size:.62rem!important;
}
.sch-cal-week-time-gutter{
  grid-row:3!important;
  min-height:897px;
}
.sch-cal-week-lane{
  grid-row:3!important;
  min-width:170px;
}
.sch-cal-week-lane .sch-cal-free-block span,
.sch-cal-week-lane .sch-cal-busy-block span,
.sch-cal-week-lane .sch-cal-blocked-block span{
  font-size:.58rem;
  left:4px;
  top:4px;
}
.sch-cal-week-lane .sch-cal-appt-block{
  left:4px;
  right:4px;
}
.sch-cal-week-lane .sch-cal-event{
  padding:4px 5px;
  font-size:.62rem;
}
.sch-cal-week-lane .sch-cal-event span,
.sch-cal-week-lane .sch-cal-event small{
  font-size:.58rem;
}

.sch-cal-event.sch-appt-manage-open{
  width:100%;
  text-align:left;
  cursor:pointer;
  font:inherit;
  font-size:.68rem;
  line-height:1.15;
  padding:4px 6px;
}
.sch-cal-event.sch-appt-manage-open strong{font-size:.68rem;line-height:1.12}
.sch-cal-event.sch-appt-manage-open span,
.sch-cal-event.sch-appt-manage-open small{font-size:.6rem;line-height:1.12}
.sch-cal-event.sch-appt-manage-open:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,.16);
}
.btn-danger{
  background:#dc2626;
  color:#fff;
  border-color:#dc2626;
}
.btn-danger:hover{
  background:#b91c1c;
  border-color:#b91c1c;
}
.sch-appointment-manage-modal h4{
  margin:0;
  font-size:.95rem;
}
.sch-selected-link{
  border:1px solid var(--color-border);
  border-radius:8px;
  min-height:42px;
  padding:10px 11px;
  background:var(--color-bg);
  overflow-wrap:anywhere;
  font-size:.82rem;
  line-height:1.35;
}
.sch-selected-link a{
  color:var(--color-primary);
  font-weight:800;
}
.sch-muted{
  color:var(--color-text-muted);
  font-weight:700;
}
.sch-sales-history-profile{
  margin-bottom:10px;
}
.sch-appointment-manage-modal .sch-client-history{
  max-height:260px;
  overflow:auto;
}
.sch-booking-filters{
  display:grid;
  grid-template-columns:minmax(220px,1.4fr) minmax(130px,.7fr) minmax(180px,1fr) minmax(150px,.8fr) auto;
  gap:10px;
  align-items:end;
  margin-bottom:10px;
}
.sch-booking-filters label{
  display:flex;
  flex-direction:column;
  gap:5px;
  color:var(--color-text-muted);
  font-size:.76rem;
  font-weight:900;
}
.sch-booking-filters input,
.sch-booking-filters select{
  border:1px solid var(--color-border);
  border-radius:8px;
  min-height:36px;
  padding:8px 10px;
  background:var(--color-surface);
  color:var(--color-text);
  font:inherit;
}
.sch-filter-count{
  margin:0 0 8px;
  color:var(--color-text-muted);
  font-size:.78rem;
  font-weight:800;
}
@media (max-width:900px){
  .sch-booking-filters{
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width:560px){
  .sch-booking-filters{
    grid-template-columns:1fr;
  }
}
@media (max-width:900px){
  .sch-cal-week{
    grid-template-columns:minmax(88px,.6fr) repeat(7,minmax(0,1fr))!important;
  }
  .sch-cal-week-head{
    font-size:.64rem!important;
    padding:6px 4px!important;
  }
  .sch-cal-week-user{
    flex-direction:column;
    align-items:flex-start!important;
    gap:5px!important;
  }
  .sch-cal-week-timeline{
    grid-template-columns:48px repeat(var(--week-lanes, 28), minmax(150px, 1fr))!important;
    overflow:auto;
  }
}
@media (max-width:640px){
  .sp-shell,
  .sp-type-card,
  .sp-datetime-card,
  .sp-form-card-wide,
  .sp-appointment-card{
    width:100%!important;
  }
  .sp-shell{
    padding-left:10px;
    padding-right:10px;
  }
  .sp-header-brand{
    max-width:100%;
  }
  .sp-time-grid .sp-slot{
    min-width:calc(50% - 6px);
  }
}

.sch-form-grid select,
.sch-cc2-form select,
.sch-calendar-book-form select,
.sr-cc2-book-form select{
  width:100%;
  border:1px solid var(--color-border);
  border-radius:8px;
  padding:10px 11px;
  background:var(--color-surface);
  color:var(--color-text);
  font:inherit;
  min-height:42px;
}

/* Public booking motion */
.scheduling-public-body .sp-appointment-card,
.scheduling-embed-body .sp-appointment-card,
.scheduling-public-body .sp-type,
.scheduling-embed-body .sp-type,
.scheduling-public-body .sp-slot,
.scheduling-embed-body .sp-slot,
.scheduling-public-body .sp-month-day.available,
.scheduling-embed-body .sp-month-day.available,
.scheduling-public-body .sp-month-nav,
.scheduling-embed-body .sp-month-nav,
.scheduling-public-body .sp-reset-type,
.scheduling-embed-body .sp-reset-type,
.scheduling-public-body .sp-btn,
.scheduling-embed-body .sp-btn{
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    opacity .18s ease;
}
.scheduling-public-body .sp-appointment-card:hover,
.scheduling-embed-body .sp-appointment-card:hover,
.scheduling-public-body .sp-type:hover,
.scheduling-embed-body .sp-type:hover{
  transform:translateY(-2px);
  border-color:#d4d4d8;
  box-shadow:0 18px 42px rgba(15,23,42,.10);
}
.scheduling-public-body .sp-slot:hover,
.scheduling-embed-body .sp-slot:hover{
  background:#e5e5e5;
  border-color:#a3a3a3;
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(15,23,42,.10);
}
.scheduling-public-body .sp-slot:active,
.scheduling-embed-body .sp-slot:active,
.scheduling-public-body .sp-type:active,
.scheduling-embed-body .sp-type:active,
.scheduling-public-body .sp-btn:active,
.scheduling-embed-body .sp-btn:active{
  transform:translateY(0) scale(.99);
}
.scheduling-public-body .sp-slot.active,
.scheduling-embed-body .sp-slot.active{
  background:#111827;
  border-color:#111827;
  color:#fff;
  animation:spPickPulse .24s ease-out;
}
.scheduling-public-body .sp-month-day.available:not(.selected):hover,
.scheduling-embed-body .sp-month-day.available:not(.selected):hover{
  background:#e5e5e5;
  color:#111827;
  transform:scale(1.08);
}
.scheduling-public-body .sp-month-day.selected,
.scheduling-embed-body .sp-month-day.selected{
  animation:spPickPulse .24s ease-out;
}
.scheduling-public-body .sp-month-nav:hover,
.scheduling-embed-body .sp-month-nav:hover,
.scheduling-public-body .sp-reset-type:hover,
.scheduling-embed-body .sp-reset-type:hover{
  background:#f4f4f5;
  transform:translateY(-1px);
}
.scheduling-public-body .sp-btn:hover:not(:disabled),
.scheduling-embed-body .sp-btn:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(124,58,237,.22);
}
.scheduling-public-body .sp-back:hover,
.scheduling-embed-body .sp-back:hover{
  opacity:.72;
}
.scheduling-public-body .sp-slot:focus-visible,
.scheduling-embed-body .sp-slot:focus-visible,
.scheduling-public-body .sp-month-day:focus-visible,
.scheduling-embed-body .sp-month-day:focus-visible,
.scheduling-public-body .sp-type:focus-visible,
.scheduling-embed-body .sp-type:focus-visible,
.scheduling-public-body .sp-btn:focus-visible,
.scheduling-embed-body .sp-btn:focus-visible{
  outline:2px solid #111827;
  outline-offset:3px;
}
@keyframes spPickPulse{
  0%{transform:scale(.98);}
  70%{transform:scale(1.025);}
  100%{transform:scale(1);}
}
@media (prefers-reduced-motion:reduce){
  .scheduling-public-body .sp-appointment-card,
  .scheduling-embed-body .sp-appointment-card,
  .scheduling-public-body .sp-type,
  .scheduling-embed-body .sp-type,
  .scheduling-public-body .sp-slot,
  .scheduling-embed-body .sp-slot,
  .scheduling-public-body .sp-month-day.available,
  .scheduling-embed-body .sp-month-day.available,
  .scheduling-public-body .sp-month-nav,
  .scheduling-embed-body .sp-month-nav,
  .scheduling-public-body .sp-reset-type,
  .scheduling-embed-body .sp-reset-type,
  .scheduling-public-body .sp-btn,
  .scheduling-embed-body .sp-btn{
    transition:none!important;
    animation:none!important;
  }
}

/* Public booking compact transparent embed */
html:has(.scheduling-embed-body),
.scheduling-embed-body,
.scheduling-public-body{
  background:transparent!important;
}
.scheduling-embed-body .sp-shell,
.scheduling-public-body .sp-shell{
  background:transparent!important;
}
.scheduling-embed-body .sp-shell{
  width:100%!important;
  max-width:none!important;
  padding:6px 8px!important;
}
.scheduling-embed-body .sp-header-inline,
.scheduling-public-body .sp-header-inline{
  margin:0 auto 14px!important;
}
.scheduling-embed-body .sp-header-brand img,
.scheduling-public-body .sp-header-brand img{
  width:44px!important;
  max-width:44px!important;
}
.scheduling-embed-body .sp-header-brand h1,
.scheduling-public-body .sp-header-brand h1{
  font-size:1.18rem!important;
}
.scheduling-embed-body .sp-header-brand p,
.scheduling-public-body .sp-header-brand p{
  margin-top:2px!important;
  font-size:.86rem!important;
}
.scheduling-embed-body .sp-card,
.scheduling-public-body .sp-card{
  background:transparent!important;
}
.scheduling-embed-body .sp-appointment-card,
.scheduling-public-body .sp-appointment-card,
.scheduling-embed-body .sp-datetime-card,
.scheduling-public-body .sp-datetime-card,
.scheduling-embed-body .sp-type-card,
.scheduling-public-body .sp-type-card{
  box-shadow:none!important;
  border-color:#e5e7eb!important;
}
.scheduling-embed-body .sp-appointment-card,
.scheduling-public-body .sp-appointment-card{
  padding:14px 18px!important;
  margin-bottom:12px!important;
}
.scheduling-embed-body .sp-datetime-card,
.scheduling-public-body .sp-datetime-card{
  padding:18px 24px!important;
  gap:28px!important;
  align-items:start;
}
.scheduling-embed-body .sp-month-head,
.scheduling-public-body .sp-month-head{
  margin-bottom:12px!important;
}
.scheduling-embed-body .sp-month-grid,
.scheduling-public-body .sp-month-grid{
  grid-template-columns:repeat(7,36px)!important;
  gap:8px 12px!important;
}
.scheduling-embed-body .sp-month-day,
.scheduling-public-body .sp-month-day{
  width:36px!important;
  height:36px!important;
}
.scheduling-embed-body .sp-times-pane h2,
.scheduling-public-body .sp-times-pane h2{
  font-size:1rem!important;
  margin-bottom:2px!important;
}
.scheduling-embed-body .sp-timezone-label,
.scheduling-public-body .sp-timezone-label{
  margin-bottom:8px!important;
}
.scheduling-embed-body .sp-timezone-note,
.scheduling-public-body .sp-timezone-note{
  margin:2px 0 12px!important;
}
.scheduling-embed-body .sp-time-grid,
.scheduling-public-body .sp-time-grid{
  gap:10px!important;
}
.scheduling-embed-body .sp-time-grid .sp-slot,
.scheduling-public-body .sp-time-grid .sp-slot{
  min-height:52px!important;
}
.scheduling-embed-body .sp-slot:hover,
.scheduling-public-body .sp-slot:hover,
.scheduling-embed-body .sp-month-day.available:not(.selected):hover,
.scheduling-public-body .sp-month-day.available:not(.selected):hover,
.scheduling-embed-body .sp-month-nav:hover,
.scheduling-public-body .sp-month-nav:hover,
.scheduling-embed-body .sp-reset-type:hover,
.scheduling-public-body .sp-reset-type:hover{
  background:#f3f4f6!important;
}
@media (min-width:760px){
  .scheduling-embed-body .sp-datetime-card,
  .scheduling-public-body .sp-datetime-card{
    grid-template-columns:minmax(280px,.85fr) minmax(260px,.75fr)!important;
  }
}
@media (max-width:640px){
  .scheduling-embed-body .sp-shell,
  .scheduling-public-body .sp-shell{
    padding:6px!important;
  }
  .scheduling-embed-body .sp-datetime-card,
  .scheduling-public-body .sp-datetime-card{
    padding:14px!important;
    gap:16px!important;
  }
}

/* Public booking compact form step */
.scheduling-embed-body .sp-flow-head,
.scheduling-public-body .sp-flow-head{
  margin:8px auto 10px!important;
}
.scheduling-embed-body .sp-form-card-wide,
.scheduling-public-body .sp-form-card-wide{
  padding:16px 22px!important;
  box-shadow:none!important;
  border-color:#e5e7eb!important;
  background:transparent!important;
}
.scheduling-embed-body .sp-form-card-wide form,
.scheduling-public-body .sp-form-card-wide form{
  max-width:430px!important;
  gap:8px!important;
}
.scheduling-embed-body .sp-form-card label,
.scheduling-public-body .sp-form-card label{
  gap:4px!important;
  margin-bottom:8px!important;
  font-size:.78rem!important;
}
.scheduling-embed-body .sp-form-card input,
.scheduling-public-body .sp-form-card input,
.scheduling-embed-body .sp-form-card textarea,
.scheduling-public-body .sp-form-card textarea{
  min-height:36px!important;
  padding:8px 10px!important;
  font-size:.9rem!important;
}
.scheduling-embed-body .sp-form-card textarea,
.scheduling-public-body .sp-form-card textarea{
  height:62px!important;
  min-height:62px!important;
  resize:vertical;
}
.scheduling-embed-body .sp-consent,
.scheduling-public-body .sp-consent{
  align-items:flex-start!important;
  gap:8px!important;
  margin:6px 0 10px!important;
  font-size:.78rem!important;
  line-height:1.35!important;
}
.scheduling-embed-body .sp-btn-primary,
.scheduling-public-body .sp-btn-primary{
  min-height:44px!important;
  padding:10px 16px!important;
}
.scheduling-embed-body .sp-section-label,
.scheduling-public-body .sp-section-label{
  margin-bottom:8px!important;
}
@media (min-width:760px){
  .scheduling-embed-body .sp-form-card-wide form,
  .scheduling-public-body .sp-form-card-wide form{
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:14px;
    row-gap:8px;
    align-items:start;
  }
  .scheduling-embed-body .sp-form-card-wide label:nth-of-type(3),
  .scheduling-public-body .sp-form-card-wide label:nth-of-type(3),
  .scheduling-embed-body .sp-form-card-wide label:nth-of-type(4),
  .scheduling-public-body .sp-form-card-wide label:nth-of-type(4),
  .scheduling-embed-body .sp-form-card-wide .sp-consent,
  .scheduling-public-body .sp-form-card-wide .sp-consent,
  .scheduling-embed-body .sp-form-card-wide .sp-btn,
  .scheduling-public-body .sp-form-card-wide .sp-btn{
    grid-column:1 / -1;
  }
}
