/* =========================================
   Klantportaal — witte omgeving
   ========================================= */

:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --surface-2: #f0f1f3;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --accent: #111111;
  --accent-light: rgba(0, 0, 0, 0.08);
  --green: #22c55e;
  --green-light: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --red-light: rgba(239, 68, 68, 0.1);
  --orange: #f97316;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

/* ---- Sidebar layout ---- */

.client-layout {
  display: flex;
  min-height: 100vh;
}

.client-sidebar {
  width: 220px;
  min-width: 220px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.client-main {
  flex: 1;
  margin-left: 220px;
  min-width: 0;
}

.client-sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
}

.client-sidebar-logo img {
  height: 32px;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

.client-sidebar-brand {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.client-sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.client-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.client-sidebar-link:hover  { background: var(--surface); color: var(--text); }
.client-sidebar-link.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.client-sidebar-link .sb-icon,
.client-sidebar-logout .sb-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.client-sidebar-link .sb-icon svg,
.client-sidebar-logout .sb-icon svg { width: 18px; height: 18px; }

.client-sidebar-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 14px 12px 4px;
}

.client-sidebar-footer {
  padding: 10px 8px 14px;
  border-top: 1px solid var(--border);
}

.client-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
  text-align: left;
}
.client-sidebar-logout:hover { color: var(--red); background: var(--red-light); }

/* ---- Pagina layout ---- */

.client-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---- Lightbox ---- */

.client-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lbFadeIn 0.15s ease;
}
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.client-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  cursor: default;
}
.client-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.client-lightbox-close:hover { background: rgba(255,255,255,0.22); }

.client-page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.client-page-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.client-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* ---- Knoppen ---- */

.client-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
}

.client-btn-primary { background: var(--accent); color: #fff; }
.client-btn-primary:hover { opacity: 0.88; }

.client-btn-success { background: var(--green); color: #fff; }
.client-btn-success:hover { opacity: 0.88; }

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

.client-btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.client-btn-ghost:hover { background: var(--surface-2); }

.client-btn-link { background: none; color: var(--accent); padding: 6px 0; }
.client-btn-link:hover { text-decoration: underline; }

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

/* ---- Badges ---- */

.client-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.client-badge-nieuw    { background: var(--accent-light); color: var(--accent); }
.client-badge-goedgekeurd { background: var(--green-light); color: var(--green); }
.client-badge-platform { background: var(--surface-2); color: var(--text-muted); }
.client-badge-ref      { background: var(--surface-2); color: var(--text-muted); font-family: monospace; }
.client-badge-type     { background: var(--accent-light); color: var(--accent); }
.client-badge-meta     { background: #fff3e0; color: #e65100; }
.client-badge-google   { background: #e8f5e9; color: #2e7d32; }

/* ---- Post kaarten (social media) ---- */

.client-card {
  display: flex;
  gap: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  transition: box-shadow 0.15s;
}
.client-card:hover { box-shadow: var(--shadow); }

.client-card-foto {
  flex-shrink: 0;
  width: 160px;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: zoom-in;
}

.client-card-foto-placeholder {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--border);
}

.client-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-card-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0;
}

.client-card-caption {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.client-card-caption:hover { border-color: var(--border); background: var(--surface); }
.client-card-caption.editing { border-color: var(--accent); background: var(--bg); }

.client-card-caption-area {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.client-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.client-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ---- Modal ---- */

.client-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.client-modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  padding: 28px;
  position: relative;
}
#post-modal .client-modal { max-width: 900px; width: 92vw; }

/* Post modal: afbeelding links, info rechts */
.post-modal-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.post-modal-img-col {
  flex: 0 0 240px;
  width: 240px;
}

.post-modal-img-col img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: zoom-in;
  display: block;
}

.post-modal-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 600px) {
  .post-modal-body { flex-direction: column; }
  .post-modal-img-col { width: 100%; flex: none; }
}

.client-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.client-modal-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.client-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.client-form-group {
  margin-bottom: 16px;
}

.client-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.client-form-input,
.client-form-textarea,
.client-form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.client-form-input:focus,
.client-form-textarea:focus { border-color: var(--accent); }

.client-form-textarea { min-height: 90px; resize: vertical; }

.client-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ---- Kalender ---- */

.client-cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.client-cal-month {
  font-size: 17px;
  font-weight: 700;
  flex: 1;
}

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

.client-cal-header {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
}

.client-cal-day {
  min-height: 68px;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}

.client-cal-day:hover { background: var(--surface); border-color: var(--border); }
.client-cal-day.today { border-color: var(--accent); background: var(--accent-light); }
.client-cal-day.other-month { opacity: 0.35; }
.client-cal-day.has-posts { background: var(--surface); }

.client-cal-day-num {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.client-cal-day.today .client-cal-day-num { color: var(--accent); }

.client-cal-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin: 1px;
}

/* Kalender platform chips */
.cal-chip {
  display: block;
  font-size: 10px;
  line-height: 1.3;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  color: #fff;
  font-weight: 500;
}
.cal-chip:hover { opacity: 0.85; }
.cal-chip-instagram { background: #E1306C; }
.cal-chip-linkedin  { background: #0A66C2; }
.cal-chip-facebook  { background: #1877F2; }
.cal-chip-tiktok    { background: #111; }
.cal-chip-twitter   { background: #1DA1F2; }
.cal-chip-all       { background: var(--accent); }
.cal-chip-gepubliceerd { background: #9ca3af !important; opacity: 0.7; }

/* Filter tabs */
.client-filter-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.client-filter-tab {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.client-filter-tab:hover { color: var(--text); }
.client-filter-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.client-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
}

.client-cal-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  min-height: 80px;
}

.client-cal-detail-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 14px;
}

/* ---- Contentbank ---- */

.client-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.client-img-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.client-img-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.client-img-name {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Taak kaartjes (SEO/advertenties) ---- */

.client-taak-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: box-shadow 0.12s;
}
.client-taak-card:hover { box-shadow: var(--shadow); }

.client-taak-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.client-taak-title {
  font-weight: 600;
  font-size: 15px;
  flex: 1;
  min-width: 0;
}

.client-taak-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ---- Login pagina ---- */

.client-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 20px;
}

.client-login-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.client-login-logo {
  max-height: 52px;
  width: auto;
  display: block;
  margin: 0 auto 24px;
}

.client-login-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.client-login-sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.client-login-error {
  background: var(--red-light);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.client-login-error.visible { display: block; }

/* ---- Laadindicator ---- */

.client-loading {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.client-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ---- Toast ---- */

.client-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 500;
  white-space: nowrap;
}

.client-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.client-toast.client-toast-error { background: var(--red); }
.client-toast.client-toast-success { background: var(--green); }

/* ---- Lege staat ---- */

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

.client-empty-icon { font-size: 42px; margin-bottom: 12px; }
.client-empty-title { font-weight: 600; font-size: 16px; color: var(--text); margin-bottom: 6px; }
.client-empty-sub { font-size: 14px; }

/* ---- Mobiele header (verborgen op desktop) ---- */

.client-mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 250;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.client-mobile-brand {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 56px);
}

.client-mobile-menu-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.client-mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Sidebar overlay */
.client-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
}
.client-sidebar-overlay.active { display: block; }

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .client-mobile-header { display: flex; }

  .client-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
    box-shadow: none;
  }
  .client-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .client-main { margin-left: 0; }
  .client-wrap { padding: 68px 16px 48px; }

  .client-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .client-header-row > .client-btn { width: 100%; justify-content: center; }

  /* Modals als bottom sheet */
  .client-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .client-modal {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    padding: 20px 16px;
  }
  #post-modal .client-modal {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
  }
  .post-modal-body { flex-direction: column; }
  .post-modal-img-col { width: 100%; flex: none; }

  /* Kalender */
  .client-cal-grid { gap: 2px; }
  .client-cal-day { min-height: 54px; padding: 3px; }
  .client-cal-day-num { font-size: 10px; margin-bottom: 2px; }
  .cal-chip { font-size: 8px; padding: 1px 3px; margin-bottom: 1px; }
  .client-cal-header { font-size: 10px; padding: 4px 0; }
  .client-cal-month { font-size: 15px; }
  .client-cal-nav { gap: 6px; }
  .client-cal-nav .client-btn { padding: 6px 10px; font-size: 12px; }

  /* Cards */
  .client-card { flex-direction: column; }
  .client-card-foto,
  .client-card-foto-placeholder { width: 100%; max-height: 240px; }

  /* Filter tabs scrollen */
  .client-filter-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .client-filter-tab { white-space: nowrap; }

  .client-page-title { font-size: 20px; }

  /* Chat: sessie-sidebar verbergen op mobiel */
  .chat-sessions-sidebar { display: none !important; }
}

@media (max-width: 480px) {
  .client-wrap { padding: 64px 12px 40px; }
  .client-page-title { font-size: 18px; }
  .client-btn { font-size: 13px; padding: 8px 14px; }
  .client-img-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  /* Voorkom automatisch inzoomen op iOS bij focus op input */
  .client-form-input,
  .client-form-textarea,
  .client-form-select { font-size: 16px; }
  .client-modal { padding: 16px 14px; }
  .client-modal-title { font-size: 16px; }
}

/* ---- Workspace switcher ---- */

.client-ws-switcher {
  position: relative;
  padding: 0 12px 12px;
}

.client-ws-current {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.12s;
  min-height: 44px;
}

.client-ws-current:hover { background: rgba(255,255,255,0.08); }

.client-ws-caret {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  margin-left: auto;
  flex-shrink: 0;
}

.client-ws-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 8px;
  right: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  z-index: 200;
  overflow: hidden;
}

.client-ws-dropdown.open { display: block; }

.client-ws-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  transition: background 0.1s;
}

.client-ws-option:last-child { border-bottom: none; }
.client-ws-option:hover { background: #f8fafc; }
.client-ws-option.active { font-weight: 600; color: var(--accent, #6C63FF); background: rgba(108,99,255,0.04); }

.client-ws-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Trial reminder popup ---- */

.trial-reminder {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 20px 20px 18px;
  max-width: 340px;
  width: calc(100% - 48px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.trial-reminder.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.trial-reminder-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}

.trial-reminder-close:hover {
  color: var(--text);
  background: var(--surface);
}

.trial-reminder-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin: 0 0 6px;
  padding-right: 24px;
}

.trial-reminder-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.trial-reminder-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trial-reminder-cta {
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.trial-reminder-dismiss {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .trial-reminder {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
  }
}

/* ---- Onboarding Tour ---- */

.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 450;
  transition: opacity 0.2s ease;
}

.tour-spotlight {
  position: relative;
  z-index: 451 !important;
  background: #fff !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  transition: box-shadow 0.25s ease;
}

.tour-tooltip {
  position: fixed;
  z-index: 452;
  background: #fff;
  padding: 22px 24px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-width: 360px;
  width: max-content;
  min-width: 280px;
  animation: tourFadeIn 0.2s ease;
}

@keyframes tourFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tour-tooltip-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 18px;
}

.tour-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tour-tooltip-btns {
  display: flex;
  gap: 8px;
}

.tour-btn {
  font-size: 13px !important;
  padding: 7px 16px !important;
}

.tour-btn-skip {
  color: var(--text-muted) !important;
  border-color: transparent !important;
  background: none !important;
}
.tour-btn-skip:hover {
  background: var(--surface) !important;
}

.tour-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Tour tooltip arrows */

.tour-tooltip-bottom::before,
.tour-tooltip-top::after,
.tour-tooltip-right::before,
.tour-tooltip-left::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
}

.tour-tooltip-bottom::before {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
}

.tour-tooltip-top::after {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
}

.tour-tooltip-right::before {
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}

.tour-tooltip-left::after {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #fff;
}

/* Tour responsive */

@media (max-width: 768px) {
  .tour-tooltip {
    max-width: calc(100vw - 32px);
    min-width: 240px;
  }
}

/* ---- Trial banners ---- */

.client-trial-banner {
  background: var(--accent-light, rgba(108,99,255,0.1));
  border: 1px solid var(--accent, #6C63FF);
  border-radius: var(--radius-sm);
  padding: 12px 40px 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  position: relative;
}
.client-trial-banner-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.6;
}
.client-trial-banner-close:hover { opacity: 1; }
