/* Fonts (Heebo headings / Rubik body) are loaded once by base.html — no @import here. */

/* ══════════════════════════════════════════
   DESIGN TOKENS — CEYT Strategy Group
══════════════════════════════════════════ */
:root {
  /* Background */
  --bg:           #2A1C45;   /* כיוון A (13/10/2026): הסגול של הלוגו, בהיר ונושם יותר */
  --bg-2:         #241838;
  --surface:      #34254F;
  --surface-2:    rgba(255,255,255,0.06);
  --surface-3:    rgba(255,255,255,0.10);
  --surface-hover:rgba(255,255,255,0.08);
  --bg-1:         #2A1C45;   /* aliases: were used in templates without being defined */
  --bg-3:         #34254F;
  --sidebar-bg:   #1B102E;   /* logo purple — sidebar, modals, toasts */
  --sidebar-bg-glass: rgba(27,16,46,0.92);
  --topbar-bg:    rgba(36,23,60,0.94);

  /* Borders */
  --border:       rgba(255,255,255,0.10);
  --border-mid:   rgba(255,255,255,0.16);
  --border-hover: rgba(254,108,92,0.40);

  /* Accent — Coral */
  --accent:       #fe6c5c;
  --accent-2:     #c74c31;
  --accent-grad:  linear-gradient(135deg, #fe6c5c, #c74c31);
  --accent-glow:  rgba(254,108,92,0.13);
  --accent-glow2: rgba(254,108,92,0.22);

  /* Text */
  --text:         rgba(255,255,255,0.92);
  --text-1:       rgba(255,255,255,0.92);
  --text-2:       rgba(255,255,255,0.72);
  --text-3:       rgba(255,255,255,0.62);   /* raised from .50 — labels on #34254F now pass 4.5:1 */
  --text-4:       rgba(255,255,255,0.40);   /* raised from .28 */

  /* Status */
  --success:      #4ade80;
  --success-bg:   rgba(74,222,128,0.10);
  --error:        #f87171;
  --error-bg:     rgba(248,113,113,0.10);
  --warning:      #fbbf24;
  --warning-bg:   rgba(251,191,36,0.10);
  --blue:         #60a5fa;
  --blue-bg:      rgba(96,165,250,0.10);
  --purple:       #c084fc;
  --purple-bg:    rgba(192,132,252,0.10);

  /* Layout */
  --sidebar-w:    240px;
  --rail-w:       72px;     /* collapsed sidebar (icons only) */
  --radius:       14px;
  --radius-sm:    9px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --transition:   0.20s ease;

  /* Glass */
  --glass-bg:     rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --glass-blur:   24px;
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; color-scheme: dark; }  /* רשימות בחירה, בוחרי תאריך וגלילה — כהים, לא לבן על לבן */
select option, select optgroup { background: var(--sidebar-bg, #1b102e); color: var(--text, #fff); }

body {
  font-family: 'Rubik', 'Heebo', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
  display: flex;
  overflow-x: hidden;
  position: relative;
}

/* Dot-grid atmospheric overlay — identical to landing page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(254,109,93,0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* Radial coral glow — bottom center */
body::after {
  content: '';
  position: fixed;
  bottom: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(254,108,92,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ══════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(254,108,92,0.35); }

/* ══════════════════════════════════════════
   SIDEBAR — Glass panel
══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
}

/* Bottom coral glow inside sidebar */
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at bottom center, rgba(254,108,92,0.09) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-logo {
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(254,108,92,0.4));
}

.logo-text {
  font-family: 'Heebo', sans-serif;
  font-size: 0.97rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.logo-sub {
  font-size: 0.68rem;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.sidebar-nav {
  padding: 14px 8px;
  flex: 1;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.nav-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 10px 12px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.87rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 1px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.nav-item.active {
  background: rgba(254,108,92,0.12);
  color: var(--accent);
  border: 1px solid rgba(254,108,92,0.22);
  box-shadow: 0 0 16px rgba(254,108,92,0.08);
}

.nav-icon { font-size: 0.95rem; flex-shrink: 0; }

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 12px;
}

.sidebar-client-list {
  padding: 0 4px;
  max-height: 280px;
  overflow-y: auto;
}

.sidebar-client {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.81rem;
  transition: all var(--transition);
  margin-bottom: 1px;
}
.sidebar-client:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sidebar-client .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
}
.sidebar-client .dot.empty {
  background: var(--text-4);
  box-shadow: none;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-4);
  position: relative;
  z-index: 1;
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.main-wrap {
  margin-right: var(--sidebar-w);
  flex: 1;
  min-width: 0;   /* flex item: אל תתרחב לרוחב תוכן גולש (לוח קנבן / רצועות) — אחרת הטופבר נדחף מחוץ למסך */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.topbar {
  height: 58px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-family: 'Heebo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

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

.main-content {
  flex: 1;
  padding: 28px 28px 48px;
  width: 100%;
  max-width: none;   /* was 1200px, uncentred — left a quarter of wide screens empty */
  min-width: 0;
}
/* Reading widths — opt-in per page via {% block page_class %} */
.page-reading { max-width: 1100px; margin-inline: auto; }
.page-narrow  { max-width: 900px;  margin-inline: auto; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Primary — coral glow pulse */
.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 0 20px rgba(254,109,93,0.35);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(254,109,93,0.60), 0 0 60px rgba(254,109,93,0.20);
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(254,109,93,0.35); }
  50%       { box-shadow: 0 0 36px rgba(254,109,93,0.60), 0 0 56px rgba(254,109,93,0.18); }
}

/* Secondary */
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-mid);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
  background: var(--surface-3);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-mid);
}

/* Danger */
.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(248,113,113,0.20);
}
.btn-danger:hover { background: rgba(248,113,113,0.18); }

.btn-sm  { padding: 5px 12px; font-size: 0.77rem; }
.btn-lg  { padding: 12px 26px; font-size: 0.95rem; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--radius-sm); }
.btn:disabled, .btn[aria-disabled="true"], .btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; transform: none; }

/* ══════════════════════════════════════════
   CARDS — Glass morphism
══════════════════════════════════════════ */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.0), transparent);
  transition: background 0.3s;
}
.card:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.4), transparent);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

/* ══════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.055);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}
.stat-card:hover::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.5), transparent);
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-icon.purple { background: var(--purple-bg); }
.stat-icon.blue   { background: var(--blue-bg); }
.stat-icon.green  { background: var(--success-bg); }
.stat-icon.orange { background: rgba(254,108,92,0.12); }

.stat-val {
  font-family: 'Heebo', sans-serif;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.73rem;
  color: var(--text-3);
  margin-top: 3px;
}

/* ══════════════════════════════════════════
   CLIENT CARDS GRID
══════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

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

.client-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.client-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0), transparent);
  transition: background 0.3s;
}
.client-card:hover {
  border-color: rgba(254,108,92,0.35);
  background: rgba(255,255,255,0.055);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(254,108,92,0.08);
}
.client-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.50), transparent);
}

.client-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.client-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(254,108,92,0.35);
}

.client-card-name {
  font-family: 'Heebo', sans-serif;
  font-size: 0.97rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}
.client-card-date {
  font-size: 0.71rem;
  color: var(--text-3);
}

.client-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge-green  { background: var(--success-bg); color: var(--success); border: 1px solid rgba(74,222,128,0.25); }
.badge-blue   { background: var(--blue-bg);    color: var(--blue);    border: 1px solid rgba(96,165,250,0.25); }
.badge-purple { background: var(--purple-bg);  color: var(--purple);  border: 1px solid rgba(192,132,252,0.25); }
.badge-gray   { background: var(--surface-2);  color: var(--text-2);  border: 1px solid var(--border); }
.badge-coral  { background: rgba(254,108,92,0.12); color: var(--accent); border: 1px solid rgba(254,108,92,0.25); }

.client-card-actions {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   MODAL — Premium glass
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,2,12,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--sidebar-bg-glass);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(254,108,92,0.05);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.24s ease;
  position: relative;
  overflow: hidden;
}

/* Top gradient line on modal */
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.55), transparent);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-family: 'Heebo', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.modal-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-mid); }

/* ══════════════════════════════════════════
   FORM
══════════════════════════════════════════ */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.field input[type="text"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.92rem;
  direction: rtl;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(254,108,92,0.50);
  box-shadow: 0 0 0 3px rgba(254,108,92,0.10);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); }
.field textarea { resize: vertical; min-height: 80px; }

.field-hint {
  font-size: 0.73rem;
  color: var(--text-3);
  margin-top: 5px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-2);
  padding: 10px 0;
}
.checkbox-field input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-field:hover { color: var(--text); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* ══════════════════════════════════════════
   TABS — Premium pill-style
══════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 22px;
  width: fit-content;
}

.tab-btn {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active {
  background: rgba(254,108,92,0.14);
  color: var(--accent);
  border: 1px solid rgba(254,108,92,0.22);
  box-shadow: 0 1px 8px rgba(254,108,92,0.12);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ══════════════════════════════════════════
   FILE LIST
══════════════════════════════════════════ */
.file-list { list-style: none; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}
.file-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.file-item.selected {
  background: rgba(254,108,92,0.10);
  border: 1px solid rgba(254,108,92,0.22);
}
.file-icon { font-size: 0.95rem; flex-shrink: 0; }
.file-name { flex: 1; font-size: 0.84rem; color: var(--text-2); }
.file-date { font-size: 0.68rem; color: var(--text-3); margin-left: 8px; white-space: nowrap; }
.input-files-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.74rem; margin: -4px 0 12px; }
.input-file-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; color: var(--text-2); }
.nav-badge {
  margin-inline-start: auto; background: var(--accent); color: #fff; font-size: 0.64rem; font-weight: 700;
  border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.file-real-name { display: block; font-size: 0.66rem; color: var(--text-3); direction: ltr; text-align: right; margin-top: 1px; }
.file-new-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 600; padding: 1px 6px; margin-inline-start: 6px;
  border-radius: 999px; color: var(--success); background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.3);
  vertical-align: middle;
}
.file-stale-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 600; padding: 1px 6px; margin-inline-start: 6px;
  border-radius: 999px; color: var(--warning); background: var(--warning-bg); border: 1px solid rgba(251,191,36,0.35);
  vertical-align: middle; cursor: help;
}
.file-item:hover .file-name,
.file-item.selected .file-name { color: var(--text); }
.file-item .file-actions {
  opacity: 0;
  display: flex;
  gap: 4px;
  transition: opacity var(--transition);
}
.file-item:hover .file-actions,
.file-item.selected .file-actions { opacity: 1; }

.panel-split {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  min-height: 500px;
}

/* ══════════════════════════════════════════
   MD VIEWER — Premium RTL reader
══════════════════════════════════════════ */
.md-viewer {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 32px;
  overflow-y: auto;
  max-height: 620px;
  font-size: 0.91rem;
  line-height: 1.88;
  color: var(--text-2);
  direction: rtl;
}

.md-viewer h1 {
  font-family: 'Heebo', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(254,108,92,0.45);
  letter-spacing: -0.02em;
}

.md-viewer h2 {
  font-family: 'Heebo', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--accent);
  margin: 30px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(254,108,92,0.18);
}

.md-viewer h3 {
  font-family: 'Heebo', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--purple);
  margin: 20px 0 8px;
}

.md-viewer h4 {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--text-3);
  margin: 14px 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.md-viewer p  { margin-bottom: 12px; }
.md-viewer ul, .md-viewer ol { padding-right: 22px; margin-bottom: 12px; }
.md-viewer li { margin-bottom: 5px; line-height: 1.75; }
.md-viewer li::marker { color: var(--accent); }

.md-viewer strong { color: var(--text); font-weight: 700; }
.md-viewer em { color: var(--text-2); font-style: italic; }
.md-viewer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.md-viewer code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.80rem;
  font-family: 'Consolas', 'Courier New', monospace;
  direction: ltr;
  display: inline-block;
  color: var(--purple);
}
.md-viewer pre {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin-bottom: 14px;
  direction: ltr;
  text-align: left;
}
.md-viewer pre code { background: none; border: none; padding: 0; color: var(--text-2); }

.md-viewer blockquote {
  border-right: 3px solid var(--accent);
  padding: 8px 14px;
  color: var(--text-2);
  margin: 12px 0;
  background: rgba(254,108,92,0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

.md-viewer table { width: 100%; border-collapse: collapse; margin-bottom: 16px; direction: rtl; font-size: 0.86rem; }
.md-viewer thead tr { background: rgba(255,255,255,0.06); }
.md-viewer th { padding: 9px 14px; border: 1px solid var(--border); font-weight: 700; color: var(--text); text-align: right; }
.md-viewer td { padding: 8px 14px; border: 1px solid var(--border); text-align: right; color: var(--text-2); }
.md-viewer tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.md-viewer tr:hover td { background: rgba(254,108,92,0.07); color: var(--text); transition: background 0.15s; }

.md-viewer hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.md-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 220px;
  color: var(--text-3);
  font-size: 0.88rem;
}
.md-empty-icon { font-size: 2.2rem; }

/* ══════════════════════════════════════════
   TERMINAL / PIPELINE RUN
══════════════════════════════════════════ */
.run-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.pipeline-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  transition: all 0.3s;
  flex-shrink: 0;
}
.step-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(254,108,92,0.55);
}
.step-dot.done {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}
.step-dot.error {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}

.step-label { font-size: 0.68rem; color: var(--text-3); white-space: nowrap; }
.step.active .step-label { color: var(--text-2); }
.step.done .step-label   { color: var(--success); }

.step-line {
  width: 28px; height: 2px;
  background: var(--border);
  flex-shrink: 0;
}
.step-line.done { background: var(--success); }

.terminal {
  background: rgba(2,2,10,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: 'Consolas', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.79rem;
  height: 420px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
}

.t-line   { padding: 1px 0; color: rgba(255,255,255,0.38); line-height: 1.68; }
.t-ok     { color: var(--success); }
.t-error  { color: var(--error); }
.t-warn   { color: var(--warning); }
.t-header { color: var(--accent); font-weight: bold; }
.t-info   { color: var(--blue); }
.t-agent  { color: var(--purple); font-weight: bold; }

.run-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.running { background: var(--warning); animation: pulse 1.2s infinite; }
.status-dot.done    { background: var(--success); box-shadow: 0 0 8px rgba(74,222,128,0.5); }
.status-dot.error   { background: var(--error); }

.status-text { font-size: 0.87rem; color: var(--text-2); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.8); }
}

/* Agent Mode Banner */
.agent-banner {
  display: none;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, rgba(192,132,252,0.10), rgba(254,108,92,0.07));
  border: 1px solid rgba(192,132,252,0.30);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 18px;
}
.agent-banner-icon { font-size: 2rem; flex-shrink: 0; }
.agent-banner-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.agent-banner-title { font-size: 1rem; font-weight: 700; color: var(--purple); }
.agent-banner-desc { font-size: 0.85rem; color: var(--text-2); }
.agent-cmd {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(192,132,252,0.28);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--purple);
  direction: rtl;
}
.btn-copy {
  align-self: flex-start;
  background: rgba(192,132,252,0.12);
  border: 1px solid rgba(192,132,252,0.30);
  border-radius: var(--radius-sm);
  color: var(--purple);
  padding: 6px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-copy:hover { background: rgba(192,132,252,0.22); }

.done-actions {
  display: none;
  gap: 12px;
  margin-top: 18px;
}
.done-actions.visible { display: flex; }

/* ══════════════════════════════════════════
   SCRAPER SECTION
══════════════════════════════════════════ */
.scraper-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.platform-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color var(--transition);
}
.platform-card:hover { border-color: rgba(255,255,255,0.12); }

.platform-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.platform-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  width: 100%;
}
.platform-toggle input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.platform-card.disabled { opacity: 0.40; }
.platform-card.disabled textarea { pointer-events: none; }
.platform-icon { font-size: 1.1rem; }

.platform-card textarea {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-2);
  font-size: 0.78rem;
  direction: ltr;
  text-align: left;
  resize: vertical;
  height: 110px;
  min-height: 70px;
  font-family: 'Consolas', monospace;
  transition: border-color var(--transition);
  line-height: 1.6;
}
.platform-card textarea:focus { border-color: rgba(254,108,92,0.45); }
.platform-card textarea::placeholder { color: var(--text-3); }

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.page-header h1 {
  font-family: 'Heebo', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text);
  flex: 1;
}
.page-header h1 span { color: var(--accent); }
.back-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: 0.85rem;
  transition: all var(--transition);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.back-link:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-mid); }

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: var(--text-3);
  text-align: center;
}
.empty-icon { font-size: 2.4rem; margin-bottom: 4px; }
.empty-title { font-size: 0.97rem; font-weight: 700; color: var(--text-2); }
.empty-desc { font-size: 0.82rem; }

/* ══════════════════════════════════════════
   TOAST — Premium
══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--sidebar-bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  animation: slideIn 0.22s ease;
}
.toast.success { border-color: rgba(74,222,128,0.30); }
.toast.error   { border-color: rgba(248,113,113,0.30); }

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

/* ══════════════════════════════════════════
   MISC UTILITIES
══════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.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; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 18px; }
.mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.text-muted { color: var(--text-2); }
.text-faint { color: var(--text-3); }
.font-bold { font-weight: 700; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.details-toggle {
  font-size: 0.77rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  user-select: none;
}
.details-toggle:hover { color: var(--text-2); }

/* ══════════════════════════════════════════
   UPLOAD ZONE — Premium
══════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(255,255,255,0.02);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: rgba(254,108,92,0.55);
  background: rgba(254,108,92,0.07);
}
.upload-icon { font-size: 1.7rem; margin-bottom: 6px; }
.upload-text { font-size: 0.88rem; color: var(--text-2); font-weight: 500; }
.upload-hint { font-size: 0.74rem; color: var(--text-3); margin-top: 4px; }

.upload-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.upload-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  color: var(--text-2);
}
.upload-file-item .file-ok { color: var(--success); font-size: 0.74rem; margin-right: auto; }

/* ══════════════════════════════════════════
   WORKFLOW STEPS (client.html)
══════════════════════════════════════════ */
.workflow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  margin-bottom: 6px;
  background: var(--glass-bg);
}
.workflow-step:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.workflow-step.done {
  background: rgba(74,222,128,0.06);
  border-color: rgba(74,222,128,0.18);
}
.workflow-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all 0.3s;
}
.workflow-step.done .workflow-step-num {
  background: rgba(74,222,128,0.15);
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 10px rgba(74,222,128,0.25);
}

/* Progress bar */
.progress-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: 99px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(254,108,92,0.45);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-right: 0; }
  .panel-split { grid-template-columns: 1fr; }
  .scraper-platforms { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .main-content { padding: 18px 16px 36px; }
}

/* ══════════════════════════════════════════
   SIDEBAR — Premium redesign extras
══════════════════════════════════════════ */
.logo-ceyt    { font-weight: 900; color: rgba(255,255,255,0.95); font-family: 'Heebo', sans-serif; }
.logo-strategy { color: #fe6c5c; font-weight: 600; }

.nav-section { display: flex; flex-direction: column; gap: 2px; }

.nav-cta {
  background: rgba(254,108,92,0.12) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(254,108,92,0.22) !important;
  font-weight: 600 !important;
  margin-top: 4px;
}
.nav-cta:hover {
  background: rgba(254,108,92,0.20) !important;
  box-shadow: 0 0 16px rgba(254,108,92,0.15);
}

.sidebar-client-avatar {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-client-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer-brand { font-size: 0.72rem; color: var(--text-3); font-weight: 600; }
.sidebar-footer-ver   { font-size: 0.65rem; color: var(--text-4); margin-top: 2px; }
.topbar-left { display: flex; align-items: center; gap: 12px; }

/* ══════════════════════════════════════════
   DASHBOARD HERO
══════════════════════════════════════════ */
.dash-hero {
  position: relative;
  background: linear-gradient(160deg, rgba(254,108,92,0.07) 0%, rgba(27,16,46,0.5) 100%);
  border: 1px solid rgba(254,108,92,0.14);
  border-radius: var(--radius-xl);
  padding: 48px 52px 36px;
  margin-bottom: 28px;
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.65), transparent);
}
.dash-hero-glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(254,108,92,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.dash-hero-content { position: relative; z-index: 1; }
.dash-hero-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 14px;
}
.dash-hero-title {
  font-family: 'Heebo', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.dash-hero-accent {
  background: linear-gradient(135deg, #fe6c5c, #c74c31);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-hero-sub {
  font-size: 0.95rem;
  color: var(--text-2);
  margin-bottom: 28px;
  line-height: 1.6;
}
.dash-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.dash-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative; z-index: 1;
}
.dash-hero-stat { flex: 1; text-align: center; padding: 0 20px; }
.dash-hero-stat-val {
  font-family: 'Heebo', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.70));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 5px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.dash-hero-stat-sep {
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   CAPABILITY PILLS
══════════════════════════════════════════ */
.capability-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.capability-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
}
.capability-pill:hover {
  border-color: rgba(254,108,92,0.28);
  color: var(--text);
  background: rgba(254,108,92,0.06);
}
.cap-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}

/* ══════════════════════════════════════════
   SECTION BLOCK & HEADING
══════════════════════════════════════════ */
.section-block { margin-bottom: 40px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-heading-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
}
.section-heading-title {
  font-family: 'Heebo', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ══════════════════════════════════════════
   CLIENT CARDS — Complete redesign
══════════════════════════════════════════ */
.client-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.28s ease;
  cursor: pointer;
  position: relative;
  display: block;
}
.client-card:hover {
  border-color: rgba(254,108,92,0.35);
  background: rgba(255,255,255,0.05);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(254,108,92,0.08);
}
.client-card-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.22), transparent);
  transition: background 0.3s;
}
.client-card:hover .client-card-line {
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.65), transparent);
}
.client-card-body { padding: 20px 22px 18px; }
.client-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.client-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Heebo', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(254,108,92,0.35);
}
.client-card-name {
  font-family: 'Heebo', sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.client-card-date { font-size: 0.72rem; color: var(--text-3); }
.client-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-4);
  flex-shrink: 0;
  margin-top: 6px;
}
.client-status-dot.active {
  background: var(--success);
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
}
.client-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.client-module {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.62rem;
  color: var(--text-4);
  font-weight: 600;
  transition: all var(--transition);
}
.client-module span:first-child { font-size: 1.0rem; opacity: 0.30; }
.client-module.on {
  background: rgba(74,222,128,0.07);
  border-color: rgba(74,222,128,0.18);
  color: var(--success);
}
.client-module.on span:first-child { opacity: 1; }
.client-card-actions {
  display: flex;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.btn-icon-del {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(248,113,113,0.15);
  border-radius: var(--radius-sm);
  color: rgba(248,113,113,0.40);
  cursor: pointer;
  transition: all var(--transition);
  margin-right: auto;
}
.btn-icon-del:hover {
  background: rgba(248,113,113,0.10);
  border-color: rgba(248,113,113,0.40);
  color: var(--error);
}

/* ══════════════════════════════════════════
   EMPTY HERO STATE
══════════════════════════════════════════ */
.empty-hero {
  position: relative;
  text-align: center;
  padding: 72px 40px;
  background: linear-gradient(160deg, rgba(254,108,92,0.05) 0%, rgba(27,16,46,0.3) 100%);
  border: 1px solid rgba(254,108,92,0.12);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.empty-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254,108,92,0.5), transparent);
}
.empty-hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 400px; height: 200px;
  background: radial-gradient(ellipse, rgba(254,108,92,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.empty-hero-icon  { font-size: 3.5rem; margin-bottom: 16px; display: block; }
.empty-hero-title {
  font-family: 'Heebo', sans-serif;
  font-size: 1.5rem; font-weight: 900;
  color: var(--text); margin-bottom: 10px;
}
.empty-hero-desc { font-size: 0.9rem; color: var(--text-2); margin-bottom: 24px; }

/* ══════════════════════════════════════════
   REVEAL ANIMATION
══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.10s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.20s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal:nth-child(6) { transition-delay: 0.30s; }

/* ══════════════════════════════════════════
   CONTENT CALENDAR — גאנט תוכן
══════════════════════════════════════════ */
/* Month Navigation */
.cc-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.cc-nav-center { display: flex; align-items: center; gap: 10px; }
.cc-nav-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; transition: all 0.2s;
}
.cc-nav-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(254,108,92,0.06); }
.cc-nav-month {
  font-family: 'Heebo', sans-serif;
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  min-width: 160px; text-align: center; letter-spacing: -0.01em;
}

/* Smart Alerts */
.cc-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cc-alert {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 0.84rem; color: var(--text-2); line-height: 1.5;
  animation: ccAlertFade .3s;
}
.cc-alert-holiday {
  background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.22); color: var(--warning);
}
.cc-alert-gap {
  background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.22); color: var(--blue);
}
.cc-alert-icon { font-size: 1.2rem; flex-shrink: 0; }
.cc-alert-text { flex: 1; min-width: 0; }
.cc-alert-text strong { color: var(--text); }
@keyframes ccAlertFade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* Day-of-week header */
.cc-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 2px;
}
.cc-weekday {
  text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 0;
}

/* Calendar grid */
.cc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cc-day {
  min-height: 105px; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.2s; display: flex; flex-direction: column; overflow: hidden;
}
.cc-day:hover {
  border-color: rgba(254,108,92,0.35); background: rgba(254,108,92,0.03);
  box-shadow: 0 2px 12px rgba(254,108,92,0.08);
}
.cc-day-num { font-size: 0.78rem; font-weight: 700; color: var(--text-2); margin-bottom: 4px; line-height: 1; }
.cc-today {
  border-color: var(--accent) !important; background: rgba(254,108,92,0.06) !important;
  box-shadow: 0 0 16px rgba(254,108,92,0.12);
}
.cc-today .cc-day-num {
  color: var(--accent); font-weight: 900;
  background: var(--accent-grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.cc-shabbat { background: rgba(255,255,255,0.01); }
.cc-shabbat .cc-day-num { color: var(--text-4); }
.cc-other-month { opacity: 0.3; cursor: default; pointer-events: none; }

/* Events container */
.cc-events { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }

/* Event pills */
.cc-event {
  font-size: 0.68rem; font-weight: 600; padding: 3px 7px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; transition: all 0.15s; line-height: 1.3;
}
.cc-event:hover { transform: translateX(-2px); filter: brightness(1.1); }
.cc-event-coral  { background: rgba(254,108,92,0.15); color: #fe6c5c; border-left: 2px solid #fe6c5c; }
.cc-event-purple { background: rgba(167,139,250,0.15); color: #a78bfa; border-left: 2px solid #a78bfa; }
.cc-event-blue   { background: rgba(96,165,250,0.15); color: #60a5fa; border-left: 2px solid #60a5fa; }
.cc-event-green  { background: rgba(74,222,128,0.15); color: #4ade80; border-left: 2px solid #4ade80; }
.cc-event-custom { background: rgba(255,255,255,0.07); color: var(--text-2); border-left: 2px solid var(--text-3); }

/* Holiday badge */
.cc-holiday {
  font-size: 0.65rem; font-weight: 600; padding: 2px 6px; border-radius: 4px;
  background: rgba(251,191,36,0.12); color: #fbbf24;
  border-left: 2px solid #fbbf24; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}

/* Legend */
.cc-legend {
  display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 0; margin-top: 12px;
  border-top: 1px solid var(--border);
}
.cc-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--text-3); font-weight: 500; }
.cc-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.cc-legend-dot.coral  { background: #fe6c5c; box-shadow: 0 0 6px rgba(254,108,92,0.4); }
.cc-legend-dot.purple { background: #a78bfa; box-shadow: 0 0 6px rgba(167,139,250,0.4); }
.cc-legend-dot.blue   { background: #60a5fa; box-shadow: 0 0 6px rgba(96,165,250,0.4); }
.cc-legend-dot.green  { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,0.4); }
.cc-legend-dot.gold   { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.4); }
.cc-legend-dot.gray   { background: var(--text-3); }

/* Topic Picker Modal */
.cc-picker-tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.cc-picker-tab {
  padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-3); font-size: 0.8rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.cc-picker-tab:hover { border-color: var(--accent); color: var(--text-2); }
.cc-picker-tab.active { background: rgba(254,108,92,0.12); border-color: var(--accent); color: var(--accent); }

.cc-topic-list { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; padding-left: 4px; }
.cc-topic-item {
  padding: 8px 14px; border-radius: 8px; font-size: 0.82rem;
  color: var(--text-2); cursor: pointer; transition: all 0.15s; border: 1px solid transparent;
}
.cc-topic-item:hover { background: rgba(254,108,92,0.06); border-color: rgba(254,108,92,0.2); color: var(--text); }
.cc-topic-item.used { opacity: 0.4; text-decoration: line-through; }

/* Custom entry */
.cc-custom-input {
  width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--text); font-size: 0.88rem;
  font-family: inherit; transition: border-color 0.2s;
}
.cc-custom-input:focus { border-color: var(--accent); outline: none; }

/* Event detail (edit mode) */
.cc-event-detail {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.cc-event-detail-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.cc-event-detail-meta { font-size: 0.78rem; color: var(--text-3); margin-bottom: 12px; }

.cc-status-pills { display: flex; gap: 4px; }
.cc-status-pill {
  padding: 5px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-3); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.cc-status-pill:hover { border-color: var(--accent); color: var(--text-2); }
.cc-status-pill.active-planned { background: rgba(96,165,250,0.12); border-color: #60a5fa; color: #60a5fa; }
.cc-status-pill.active-done    { background: rgba(74,222,128,0.12); border-color: var(--success); color: var(--success); }
.cc-status-pill.active-skipped { background: rgba(248,113,113,0.12); border-color: var(--error); color: var(--error); }

/* Responsive */
@media (max-width: 900px) {
  .cc-grid { gap: 1px; }
  .cc-day { min-height: 85px; padding: 4px 5px; }
  .cc-day-num { font-size: 0.7rem; }
  .cc-event { font-size: 0.62rem; padding: 2px 5px; }
  .cc-holiday { font-size: 0.6rem; }
}
@media (max-width: 600px) {
  .cc-day { min-height: 65px; padding: 3px 4px; }
  .cc-event, .cc-holiday { font-size: 0.58rem; }
  .cc-nav-month { font-size: 1rem; min-width: 130px; }
  .cc-legend { gap: 8px; }
  .cc-legend-item { font-size: 0.68rem; }
}

/* ══════════════════════════════════════════
   DASHBOARD — Stats, Gantt, Activity
   (shared across all pages)
══════════════════════════════════════════ */

/* ── Stats Row ── */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.dash-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-right: 3px solid rgba(255,255,255,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.dash-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}
.dash-stat--done { border-right-color: #4ade80; }
.dash-stat--progress { border-right-color: var(--accent); }
.dash-stat--pending { border-right-color: #94a3b8; }
.dash-stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-stat--done .dash-stat-icon { background: rgba(74,222,128,0.12); color: #4ade80; }
.dash-stat--progress .dash-stat-icon { background: rgba(254,108,92,0.12); color: var(--accent); }
.dash-stat--pending .dash-stat-icon { background: rgba(148,163,184,0.12); color: #94a3b8; }
.dash-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.dash-stat-label {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Dashboard Grid ── */
.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.dash-panel-sub {
  font-size: 0.72rem;
  color: var(--text-3);
}
.dash-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Gantt Timeline ── */
.gantt-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-x: auto;
}
.gantt-days {
  display: grid;
  grid-template-columns: 140px repeat(7, 1fr);
  gap: 0;
  margin-bottom: 4px;
  min-width: 600px;
}
.gantt-day {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gantt-day.gantt-day--today {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.gantt-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  min-height: 44px;
  min-width: 600px;
}
.gantt-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 0;
}
.gantt-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.gantt-user-name {
  font-size: 0.74rem;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto auto;
  gap: 0 3px;
  padding: 4px 0;
  position: relative;
  min-height: 30px;
}
.gantt-bar {
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.64rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  color: #fff;
  line-height: 1.4;
  min-height: 22px;
  display: flex;
  align-items: center;
}
.gantt-bar:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}
.gantt-bar-label { pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.gantt-bar-time {
  font-size: 0.58rem;
  opacity: 0.7;
  margin-right: 6px;
  pointer-events: none;
  flex-shrink: 0;
}
.gantt-bar.drag-over { outline: 2px dashed #fff; opacity: 0.7; }
.gantt-track.drop-target-active .gantt-cell { background: rgba(254,108,92,0.06); }
.gantt-cell {
  grid-row: 1 / -1; border-left: 1px solid rgba(255,255,255,0.03);
  cursor: default;
}
.gantt-bar[draggable="true"] { cursor: grab; }
.gantt-bar[draggable="true"]:active { cursor: grabbing; }
.gantt-empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--text-3);
  font-size: 0.82rem;
}

/* ── Activity Panel ── */
.dash-activity-panel {
  max-height: 420px;
  overflow-y: auto;
}
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  transition: background 0.15s;
  cursor: pointer;
}
.activity-item:hover { background: rgba(255,255,255,0.04); }
.activity-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.activity-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.activity-name {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-desc {
  font-size: 0.68rem; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-meta { text-align: left; flex-shrink: 0; }
.activity-badge {
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  white-space: nowrap; display: inline-block;
  text-transform: uppercase; letter-spacing: .03em;
}
.activity-badge--completed { background: rgba(74,222,128,0.15); color: #4ade80; }
.activity-badge--in_progress { background: rgba(254,108,92,0.12); color: var(--accent); }
.activity-badge--upcoming { background: rgba(148,163,184,0.1); color: #94a3b8; }
.activity-time { font-size: 0.62rem; color: var(--text-3); margin-top: 2px; }

/* ── Floating Task Bubble (Control Center) ── */
.task-bubble {
  position: fixed;
  bottom: 20px; left: 20px;
  z-index: 999;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  width: 380px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  touch-action: none;   /* גרירה גם במגע */
  transition: width .18s ease, height .18s ease, border-radius .18s ease;
}
/* מצב מכווץ: כפתור עגול קטן עם מונה — לא מסתיר תוכן; לחיצה פותחת, גרירה מזיזה */
.task-bubble.collapsed { width: 54px; height: 54px; border-radius: 999px; box-shadow: 0 8px 28px rgba(0,0,0,0.45); }
.task-bubble.collapsed .task-bubble-header { height: 54px; padding: 0; justify-content: center; border-bottom: 0; cursor: grab; }
.task-bubble.collapsed .tb-label, .task-bubble.collapsed .task-bubble-header-actions, .task-bubble.collapsed .task-bubble-body { display: none; }
.task-bubble.collapsed .task-bubble-count { width: 34px; height: 34px; font-size: 0.9rem; }
.task-bubble.collapsed:hover { box-shadow: 0 0 0 4px rgba(254,108,92,0.18), 0 8px 28px rgba(0,0,0,0.45); }
.task-bubble.dragging { cursor: grabbing; opacity: .9; transition: none; }
.task-bubble-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.task-bubble-count.live { animation: livePulse 1.2s ease-in-out infinite; box-shadow: 0 0 10px rgba(254,108,92,0.6); }
.task-bubble-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; cursor: pointer;
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.task-bubble-header:hover { background: rgba(255,255,255,0.03); }
.task-bubble-count {
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.task-bubble-header-actions { margin-right: auto; display: flex; gap: 6px; }
.task-bubble-add-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--accent); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; font-size: 1.1rem;
}
.task-bubble-add-btn:hover { background: rgba(254,108,92,0.1); border-color: var(--accent); }
.task-bubble-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.task-bubble-body.expanded {
  max-height: 500px; overflow-y: auto;
}
/* Task item rows */
.task-bubble-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  transition: background 0.15s; font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.task-bubble-item:last-child { border-bottom: none; }
.task-bubble-item:hover { background: rgba(255,255,255,0.03); }
.task-bubble-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.task-bubble-dot--live { animation: livePulse 1s ease-in-out infinite; box-shadow: 0 0 6px rgba(254,108,92,0.5); }
.task-bubble-info { flex: 1; min-width: 0; }
.task-bubble-name {
  color: var(--text); font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  display: block; font-size: 0.82rem;
}
.task-bubble-name:hover { color: var(--accent); }
.task-bubble-sub { font-size: 0.68rem; color: var(--text-3); margin-top: 2px; }
.task-bubble-timer {
  font-family: 'Rubik', monospace; font-size: 0.88rem; font-weight: 800;
  color: var(--text-2); font-variant-numeric: tabular-nums;
  min-width: 70px; text-align: center;
}
.task-bubble-timer--active { color: var(--accent); }
.task-bubble-status { display: none; }
.task-bubble-btns { display: flex; gap: 4px; flex-shrink: 0; }
.tb-btn {
  width: 30px; height: 28px; border-radius: 6px; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s;
}
.tb-btn svg { width: 12px; height: 12px; }
.tb-btn--play { background: rgba(74,222,128,0.15); color: #4ade80; }
.tb-btn--play:hover { background: rgba(74,222,128,0.35); transform: scale(1.08); }
.tb-btn--pause { background: rgba(251,191,36,0.15); color: #facc15; }
.tb-btn--pause:hover { background: rgba(251,191,36,0.35); transform: scale(1.08); }
.tb-btn--stop { background: rgba(239,68,68,0.12); color: #ef4444; }
.tb-btn--stop:hover { background: rgba(239,68,68,0.25); transform: scale(1.08); }
/* Quick-add form */
.tb-quick-add {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 18px;
  display: none;
}
.tb-quick-add.open { display: block; }
.tb-quick-add-title { font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.tb-qa-field {
  margin-bottom: 8px;
}
.tb-qa-field label { font-size: 0.68rem; color: var(--text-3); display: block; margin-bottom: 3px; font-weight: 600; }
.tb-qa-field input, .tb-qa-field select {
  width: 100%; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text); font-size: 0.78rem; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.tb-qa-field input:focus, .tb-qa-field select:focus { border-color: var(--accent); }
.tb-qa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-qa-actions { display: flex; gap: 6px; margin-top: 10px; }
.tb-qa-btn {
  flex: 1; padding: 8px; border-radius: 8px; border: none;
  font-size: 0.76rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all 0.12s;
}
.tb-qa-btn--save { background: var(--accent); color: #fff; }
.tb-qa-btn--save:hover { filter: brightness(1.15); }
.tb-qa-btn--cancel { background: rgba(255,255,255,0.05); color: var(--text-3); }
.tb-qa-btn--cancel:hover { background: rgba(255,255,255,0.08); }
/* Task presets */
.tb-presets { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tb-preset-btn {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2); font-size: 0.68rem; padding: 4px 10px; border-radius: 14px;
  cursor: pointer; transition: all 0.15s; font-family: inherit; white-space: nowrap;
}
.tb-preset-btn:hover { background: rgba(254,108,92,0.12); border-color: var(--accent); color: var(--accent); }
/* Timer display in bubble */
.g-bubble-timer {
  font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.78rem;
  color: var(--text-3); font-weight: 600; flex-shrink: 0; min-width: 62px; text-align: center;
}
/* Empty state */
.tb-empty { text-align: center; padding: 18px; color: var(--text-3); font-size: 0.8rem; }

/* ═══════════════════════════════════════════════════════════════════
   HOME DASHBOARD (v2)
   ═══════════════════════════════════════════════════════════════════ */
.hm-welcome {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(254,108,92,0.08), rgba(192,132,252,0.06));
  border: 1px solid rgba(254,108,92,0.12); border-radius: var(--radius);
}
.hm-welcome-hi { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.hm-welcome-sub { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.hm-welcome-date { font-size: 0.78rem; color: var(--text-3); }

/* KPI ring strip */
.hm-kpi-strip {
  display: flex; align-items: center; gap: 24px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 20px; flex-wrap: wrap;
}
.hm-kpi { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hm-kpi-ring {
  width: 56px; height: 56px; position: relative;
}
.hm-kpi-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hm-kpi-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: var(--text);
}
.hm-kpi-label { font-size: 0.66rem; color: var(--text-3); font-weight: 500; }
.hm-kpi-divider { width: 1px; height: 48px; background: var(--border); margin: 0 8px; }
.hm-kpi-alert { flex-direction: row; gap: 10px; }
.hm-kpi-alert > div:not(.hm-kpi-alert-icon) { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hm-kpi-alert .hm-kpi-num { position: static; inset: auto; }   /* the absolute rule above is for the rings only */
.hm-kpi-alert-icon { color: var(--text-3); }
.hm-kpi-alert--active .hm-kpi-alert-icon { color: #ef4444; }

/* Two-column grid */
.hm-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; }
.hm-col-a, .hm-col-b { display: flex; flex-direction: column; gap: 16px; }

/* Card */
.hm-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.hm-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.hm-card-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.hm-card-title--warn { color: #ef4444; }
.hm-empty { text-align: center; padding: 24px; color: var(--text-3); font-size: 0.82rem; }

/* Alerts */
.hm-alert-list { }
.hm-alert {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.hm-alert:last-child { border-bottom: none; }
.hm-alert-icon { flex-shrink: 0; }
.hm-alert--overdue .hm-alert-icon { color: #ef4444; }
.hm-alert--today .hm-alert-icon { color: #facc15; }
.hm-alert-text { flex: 1; color: var(--text-2); }
.hm-alert-tag {
  font-size: 0.62rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.hm-alert--overdue .hm-alert-tag { background: rgba(239,68,68,0.12); color: #ef4444; }
.hm-alert--today .hm-alert-tag { background: rgba(251,191,36,0.12); color: #facc15; }

/* Activity feed (timeline style) */
.hm-feed { position: relative; }
.hm-feed-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  position: relative; transition: background 0.12s;
}
.hm-feed-item:hover { background: rgba(255,255,255,0.02); }
.hm-feed-line {
  position: absolute; right: 27px; top: 0; bottom: 0; width: 2px;
  background: var(--border); z-index: 0;
}
.hm-feed-item:first-child .hm-feed-line { top: 50%; }
.hm-feed-item:last-child .hm-feed-line { bottom: 50%; }
.hm-feed-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--bg); z-index: 1; position: relative;
}
.hm-feed-dot--completed { background: #4ade80; }
.hm-feed-dot--in-progress { background: var(--accent); }
.hm-feed-dot--pending { background: #94a3b8; }
.hm-feed-body { flex: 1; min-width: 0; }
.hm-feed-title { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-feed-meta { font-size: 0.68rem; color: var(--text-3); margin-top: 1px; }
.hm-feed-badge {
  font-size: 0.6rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.hm-feed-badge--completed { background: rgba(74,222,128,0.12); color: #4ade80; }
.hm-feed-badge--in-progress { background: rgba(254,108,92,0.12); color: var(--accent); }
.hm-feed-badge--pending { background: rgba(148,163,184,0.12); color: #94a3b8; }
.hm-feed-badge--overdue { background: rgba(248,113,113,0.12); color: var(--error); }
.hm-feed-dot--overdue { background: var(--error); }

/* Team workload */
.hm-team { }
.hm-team-member {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.hm-team-member:last-child { border-bottom: none; }
.hm-team-av {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.hm-team-info { flex: 1; min-width: 0; }
.hm-team-name { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.hm-team-bar-wrap { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.hm-team-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; display: flex; overflow: hidden; }
.hm-team-bar-done { background: #4ade80; height: 100%; }
.hm-team-bar-prog { background: var(--accent); height: 100%; }
.hm-team-count { font-size: 0.64rem; color: var(--text-3); white-space: nowrap; }

/* Nav grid */
.hm-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.hm-nav-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px;
  border-radius: var(--radius); border: 1px solid var(--border);
  text-decoration: none; color: var(--text-2); font-size: 0.74rem; font-weight: 500;
  transition: all 0.15s;
}
.hm-nav-tile:hover { background: rgba(255,255,255,0.04); border-color: var(--accent); color: var(--accent); }
.hm-nav-icon {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
}

/* Mini client list */
.hm-client-mini-list { }
.hm-client-mini {
  display: flex; align-items: center; gap: 10px; padding: 9px 18px;
  border-bottom: 1px solid var(--border); text-decoration: none; transition: background 0.12s;
}
.hm-client-mini:last-child { border-bottom: none; }
.hm-client-mini:hover { background: rgba(255,255,255,0.03); }
.hm-client-mini-av {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.hm-client-mini-name { flex: 1; font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.hm-client-mini-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.hm-client-mini-dot.active { background: #4ade80; }

/* Timer widget on dashboard */
.hm-timer-widget {
  background: var(--surface); border: 1px solid rgba(254,108,92,0.2); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 18px;
}
.hm-timer-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.hm-timer-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.hm-timer-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.hm-timer-row:last-child { border-bottom: none; }
.hm-timer-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.hm-timer-dot--live { background: #ef4444; animation: livePulse 1s ease-in-out infinite; }
.hm-timer-name { font-weight: 600; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-timer-client { font-size: 0.7rem; color: var(--text-3); white-space: nowrap; }
.hm-timer-clock { font-family: 'Rubik', monospace; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hm-timer-clock--active { color: var(--accent); }
.hm-timer-status { font-size: 0.62rem; color: var(--text-3); white-space: nowrap; }

@media (max-width: 1000px) { .hm-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .hm-kpi-strip { gap: 16px; justify-content: center; } }

/* ═══════════════════════════════════════════════════════════════════
   CRM PAGE
   ═══════════════════════════════════════════════════════════════════ */
.crm-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.crm-search {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  flex: 1; min-width: 200px; max-width: 320px; color: var(--text-3);
}
.crm-search input {
  border: none; background: transparent; color: var(--text); font-size: 0.82rem;
  width: 100%; font-family: inherit;
}
.crm-filters { display: flex; gap: 6px; }
.crm-filter-btn {
  padding: 6px 14px; border-radius: 16px; font-size: 0.72rem; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text-3);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.crm-filter-btn.active, .crm-filter-btn:hover { background: rgba(254,108,92,0.1); border-color: var(--accent); color: var(--accent); }
.crm-view-toggle { display: flex; gap: 4px; margin-right: auto; }
.crm-view-btn {
  padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: transparent;
  color: var(--text-3); cursor: pointer; transition: all 0.12s;
}
.crm-view-btn.active { background: rgba(254,108,92,0.1); border-color: var(--accent); color: var(--accent); }

.crm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.crm-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s;
}
.crm-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.crm-card-link { position: absolute; inset: 0; z-index: 1; }
.crm-card-header { display: flex; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.crm-card-av {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #c74c31);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.crm-card-info { flex: 1; min-width: 0; }
.crm-card-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.crm-card-date { font-size: 0.68rem; color: var(--text-3); margin-top: 1px; }
.crm-card-status {
  font-size: 0.62rem; font-weight: 700; padding: 3px 10px; border-radius: 10px;
  background: rgba(148,163,184,0.1); color: #94a3b8;
}
.crm-card-status.on { background: rgba(74,222,128,0.1); color: #4ade80; }
.crm-card-modules { display: flex; gap: 6px; padding: 6px 18px 10px; }
.crm-mod {
  font-size: 0.62rem; padding: 2px 8px; border-radius: 8px;
  background: rgba(148,163,184,0.08); color: var(--text-3);
}
.crm-mod.on { background: rgba(74,222,128,0.08); color: #4ade80; }
.crm-card-footer { display: flex; gap: 12px; padding: 8px 18px 14px; }
.crm-card-updated, .crm-card-runs { font-size: 0.66rem; color: var(--text-3); }

/* CRM Table View */
.crm-table-wrap { overflow-x: auto; }
.crm-table {
  width: 100%; border-collapse: collapse; font-size: 0.8rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.crm-table th {
  text-align: right; padding: 12px 14px; font-size: 0.68rem; font-weight: 700;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.crm-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-2); }
.crm-table tr:hover td { background: rgba(255,255,255,0.02); }
.crm-tbl-status {
  font-size: 0.62rem; font-weight: 700; padding: 2px 8px; border-radius: 8px;
  background: rgba(148,163,184,0.1); color: #94a3b8;
}
.crm-tbl-status.on { background: rgba(74,222,128,0.1); color: #4ade80; }
.crm-tbl-check { text-align: center; }
.crm-check { font-weight: 700; }
.crm-check.on { color: #4ade80; }

/* ═══════════════════════════════════════════════════════════════════
   PROJECTS PAGE — Kanban
   ═══════════════════════════════════════════════════════════════════ */
.proj-summary-strip {
  display: flex; align-items: center; gap: 20px; padding: 14px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 20px;
}
.proj-sum-item { text-align: center; }
.proj-sum-num { font-size: 1.4rem; font-weight: 800; color: var(--text); display: block; }
.proj-sum-lbl { font-size: 0.66rem; color: var(--text-3); }
.proj-sum-sep { width: 1px; height: 36px; background: var(--border); }

.proj-board { display: flex; flex-direction: column; gap: 14px; }
.proj-lane {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.proj-lane-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  cursor: pointer; transition: background 0.12s;
}
.proj-lane-head:hover { background: rgba(255,255,255,0.02); }
.proj-lane-av {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.proj-lane-title { flex: 1; font-size: 0.92rem; font-weight: 700; color: var(--text); }
.proj-lane-pct { font-size: 0.82rem; font-weight: 700; color: var(--accent); }
.proj-lane-progress { height: 3px; background: rgba(255,255,255,0.04); }
.proj-lane-bar { height: 100%; transition: width 0.4s; border-radius: 0 0 2px 2px; }

.proj-lane-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; border-top: 1px solid var(--border); }
.proj-col { padding: 10px 14px; border-left: 1px solid var(--border); min-height: 80px; }
.proj-col:first-child { border-left: none; }
.proj-col-head {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.proj-col-head--active { color: var(--accent); }
.proj-col-head--pending { color: #94a3b8; }
.proj-col-head--done { color: #4ade80; }
.proj-col-count {
  font-size: 0.58rem; padding: 1px 6px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.proj-task-card {
  padding: 8px 10px; margin-bottom: 6px; border-radius: 6px;
  border-right: 3px solid transparent;
}
.proj-task--active { background: rgba(254,108,92,0.06); border-right-color: var(--accent); }
.proj-task--pending { background: rgba(148,163,184,0.04); border-right-color: #94a3b8; }
.proj-task--done { background: rgba(74,222,128,0.04); border-right-color: #4ade80; opacity: 0.6; }
.proj-task-name { font-size: 0.74rem; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-task-meta { font-size: 0.62rem; color: var(--text-3); margin-top: 2px; }
.proj-task-empty { font-size: 0.72rem; color: var(--text-3); text-align: center; padding: 12px 0; }

.proj-lane-link {
  display: block; text-align: center; padding: 10px; font-size: 0.72rem;
  color: var(--accent); text-decoration: none; border-top: 1px solid var(--border);
  transition: background 0.12s;
}
.proj-lane-link:hover { background: rgba(254,108,92,0.04); }

/* ═══════════════════════════════════════════════════════════════════
   TIME TRACKING — Gantt v2
   ═══════════════════════════════════════════════════════════════════ */
.tt-controls {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.tt-view-btns { display: flex; gap: 4px; }
.tt-view-btn {
  padding: 6px 16px; border-radius: 16px; font-size: 0.74rem; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text-3);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.tt-view-btn.active { background: rgba(254,108,92,0.12); border-color: var(--accent); color: var(--accent); }

.tt-nav { display: flex; align-items: center; gap: 6px; }
.tt-nav-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text-3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.12s;
}
.tt-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.tt-nav-label { font-size: 0.82rem; font-weight: 600; color: var(--text); min-width: 160px; text-align: center; }
.tt-today-btn {
  padding: 4px 12px; border-radius: 12px; font-size: 0.68rem; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text-3);
  cursor: pointer; transition: all 0.12s; font-family: inherit;
}
.tt-today-btn:hover { border-color: var(--accent); color: var(--accent); }

.tt-legend { display: flex; gap: 12px; margin-right: auto; flex-wrap: wrap; }
.tt-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text-2); }
.tt-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

.tt-gantt-scroll { overflow-x: auto; }

/* Gantt v2 header */
.tt-gantt-header {
  display: grid; gap: 0; align-items: center;
  grid-template-columns: 150px repeat(7, 1fr);
  min-width: 700px;
}
.tt-gantt-label-col { padding: 8px 10px; font-size: 0.68rem; font-weight: 700; color: var(--text-3); }
.tt-gantt-hcell {
  text-align: center; font-size: 0.66rem; font-weight: 600; color: var(--text-3);
  padding: 8px 4px; border-bottom: 2px solid rgba(255,255,255,0.04);
}
.tt-gantt-hcell--today { color: var(--accent); border-bottom-color: var(--accent); }

/* Gantt rows */
.tt-gantt-row {
  display: grid; grid-template-columns: 150px 1fr; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03); min-height: 48px;
  min-width: 700px;
}
.tt-gantt-user { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.tt-gantt-av {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tt-gantt-uname {
  font-size: 0.76rem; font-weight: 600; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tt-gantt-track {
  display: grid; gap: 3px 0; padding: 4px 0;
  position: relative; min-height: 34px;
}
.tt-gantt-cell {
  border-left: 1px solid rgba(255,255,255,0.03);
  min-height: 30px; grid-row: 1;
}
.tt-gantt-cell--today { background: rgba(254,108,92,0.04); }

.tt-gantt-bar {
  border-radius: 5px; padding: 3px 8px; z-index: 1;
  font-size: 0.64rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; transition: filter 0.15s, transform 0.1s;
  min-height: 24px; display: flex; align-items: center; gap: 6px;
}
.tt-gantt-bar:hover { filter: brightness(1.2); transform: translateY(-1px); }
.tt-bar-label { pointer-events: none; }
.tt-bar-time { font-size: 0.56rem; opacity: 0.7; pointer-events: none; }

/* Summary table */
.tt-summary-scroll { overflow-x: auto; }
.tt-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.tt-table th {
  text-align: right; padding: 10px 14px; font-size: 0.66rem; font-weight: 700;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}
.tt-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-2); }
.tt-table-user { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.tt-table-clients { font-size: 0.72rem; color: var(--text-3); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════════════════════
   TIMER COMPONENTS
   ═══════════════════════════════════════════════════════════════════ */
/* Active timers panel */
.tt-active-panel { border-color: rgba(254,108,92,0.2); }
.tt-timers-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 14px; }
.tt-timer-card {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; transition: box-shadow 0.15s;
}
.tt-timer-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.tt-timer-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tt-timer-av {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tt-timer-info { flex: 1; min-width: 0; }
.tt-timer-task { font-size: 0.82rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-timer-meta { font-size: 0.66rem; color: var(--text-3); margin-top: 1px; }
.tt-timer-clock {
  font-size: 1.2rem; font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums;
  font-family: 'Rubik', monospace;
}
.tt-timer-clock--active { color: var(--accent); }
.tt-timer-est { font-size: 0.68rem; color: var(--text-3); margin-right: 4px; }
.tt-timer-progress { height: 5px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.tt-timer-bar { height: 100%; border-radius: 3px; transition: width 1s linear; }
.tt-timer-bar--pulse { animation: timerPulse 2s ease-in-out infinite; }
@keyframes timerPulse { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }

.tt-timer-actions { display: flex; gap: 6px; }
.tt-btn {
  display: flex; align-items: center; gap: 5px; padding: 5px 12px;
  border-radius: 8px; font-size: 0.7rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.12s; font-family: inherit;
}
.tt-btn--start { background: rgba(74,222,128,0.12); color: #4ade80; }
.tt-btn--start:hover { background: rgba(74,222,128,0.25); }
.tt-btn--pause { background: rgba(251,191,36,0.12); color: #facc15; }
.tt-btn--pause:hover { background: rgba(251,191,36,0.25); }
.tt-btn--stop { background: rgba(239,68,68,0.1); color: #ef4444; }
.tt-btn--stop:hover { background: rgba(239,68,68,0.2); }

/* Gantt bar states */
.tt-gantt-bar { position: relative; overflow: hidden; min-width: 0; }
.tt-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; pointer-events: none; }
.tt-bar-time { flex-shrink: 0; font-size: 0.56rem; opacity: 0.7; pointer-events: none; }
.tt-gantt-bar-fill {
  position: absolute; inset: 0; right: auto; border-radius: 5px;
  transition: width 1s linear; pointer-events: none;
}
.tt-fill-grow { animation: fillGrow 60s linear infinite; }
@keyframes fillGrow { from { opacity: 0.6; } to { opacity: 1; } }
.tt-gantt-bar--running { box-shadow: 0 0 8px rgba(254,108,92,0.3); }
.tt-gantt-bar--paused { opacity: 0.65 !important; }
.tt-bar-live {
  width: 6px; height: 6px; border-radius: 50%; background: #ef4444;
  animation: livePulse 1s ease-in-out infinite; margin-right: auto; flex-shrink: 0;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Inline timer buttons under gantt bars */
.tt-gantt-bar-actions {
  display: flex; gap: 3px; padding: 2px 0; align-items: center; justify-content: center;
}
.tt-ibtn {
  width: 22px; height: 18px; border-radius: 4px; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.12s;
}
.tt-ibtn--play { background: rgba(74,222,128,0.15); color: #4ade80; }
.tt-ibtn--play:hover { background: rgba(74,222,128,0.3); }
.tt-ibtn--pause { background: rgba(251,191,36,0.15); color: #facc15; }
.tt-ibtn--pause:hover { background: rgba(251,191,36,0.3); }
.tt-ibtn--stop { background: rgba(239,68,68,0.1); color: #ef4444; }
.tt-ibtn--stop:hover { background: rgba(239,68,68,0.2); }

/* Smart alerts */
.tt-smart-alert {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  border-bottom: 1px solid var(--border); font-size: 0.78rem;
}
.tt-smart-alert:last-child { border-bottom: none; }
.tt-smart-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tt-smart-text { color: var(--text-2); }

/* Activity timer buttons */
.act-timer-btns { display: flex; gap: 3px; margin-bottom: 4px; }

/* ══════════════════════════════════════════
   FOUNDATION (14/10/2026) — focus, states, sidebar rail, bottom bar
   Appended so it wins over the older rules above.
══════════════════════════════════════════ */

/* Keyboard focus is visible everywhere; fields keep their own ring */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible,
.tb-qa-field input:focus-visible, .tb-qa-field select:focus-visible, .cc-custom-input:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Breadcrumb (topbar) */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--text-3); min-width: 0; white-space: nowrap; }
.crumbs:empty { display: none; }
.crumbs a { color: var(--text-3); padding: 2px 4px; border-radius: 6px; }
.crumbs a:hover { color: var(--text); background: var(--surface-2); }
.crumbs .sep { opacity: 0.45; }
.crumbs .cur { color: var(--accent); font-weight: 700; font-family: 'Heebo', sans-serif; overflow: hidden; text-overflow: ellipsis; }
.crumbs .cur.mid { color: var(--text-2); font-weight: 600; }
@media (max-width: 900px) { .crumbs .hide-m, .crumbs .hide-m + .sep { display: none; } .topbar { padding: 0 14px; } }

/* Loading */
.spinner, .spinner-sm {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25); border-top-color: currentColor;
  animation: spin .8s linear infinite; vertical-align: -3px; flex-shrink: 0;
}
.spinner-sm { width: 12px; height: 12px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: skeleton 1.4s infinite;
}
@keyframes skeleton { to { background-position: -200% 0; } }

/* Toast levels (success / error exist above) */
.toast { border-inline-start: 3px solid var(--success); }
.toast.error   { border-inline-start-color: var(--error); }
.toast.warning { border-inline-start-color: var(--warning); border-color: rgba(251,191,36,0.30); }
.toast.info    { border-inline-start-color: var(--blue);    border-color: rgba(96,165,250,0.30); }
.toast .toast-icon { font-weight: 800; }
.toast.error .toast-icon { color: var(--error); } .toast.success .toast-icon { color: var(--success); }
.toast.warning .toast-icon { color: var(--warning); } .toast.info .toast-icon { color: var(--blue); }

/* ui.confirm / ui.prompt / ui.alert (ui.js) */
.ui-dialog-body { white-space: pre-line; color: var(--text-2); font-size: 0.9rem; line-height: 1.6; margin: -6px 0 18px; }
.ui-dialog-field { margin: 0 0 18px; }
#uiDialog .modal-title { font-size: 1.02rem; }

/* Modal sizes — instead of inline max-width per instance */
.modal--sm { max-width: 420px; } .modal--md { max-width: 560px; }
.modal--lg { max-width: 760px; } .modal--xl { max-width: 980px; }
.modal { max-height: calc(100vh - 40px); overflow-y: auto; }

/* ── Sidebar as an icon rail: 72px, expands to 240px on hover or when pinned (html.sb-pinned) ── */
.sidebar { width: var(--rail-w); overflow: hidden; transition: width .22s ease, transform var(--transition), box-shadow .22s ease; }
.sidebar:hover, html.sb-pinned .sidebar { width: var(--sidebar-w); }
html:not(.sb-pinned) .sidebar:hover { box-shadow: -24px 0 60px rgba(0,0,0,0.35); }
.main-wrap { margin-right: var(--rail-w); transition: margin-right .22s ease; }
html.sb-pinned .main-wrap { margin-right: var(--sidebar-w); }

.sidebar-logo { padding: 14px 17px; height: 68px; gap: 10px; white-space: nowrap; }
.sidebar-logo img { width: 38px; height: 38px; flex-shrink: 0; }
.sidebar-nav { padding: 12px 8px; overflow-x: hidden; }
.nav-item { position: relative; padding: 9px 20px; white-space: nowrap; }
.nav-icon { width: 16px; display: inline-flex; justify-content: center; flex-shrink: 0; }
.sidebar .sb-label { opacity: 0; transition: opacity .15s ease; white-space: nowrap; }
.sidebar:hover .sb-label, html.sb-pinned .sidebar .sb-label { opacity: 1; transition-delay: .06s; }
.sidebar .nav-badge { position: absolute; top: 5px; inset-inline-start: 30px; min-width: 16px; height: 16px; font-size: 0.6rem; }
.sidebar:hover .nav-badge, html.sb-pinned .sidebar .nav-badge { position: static; margin-inline-start: auto; min-width: 18px; height: 18px; font-size: 0.64rem; }
.nav-divider { margin: 8px 10px; }
.nav-label { white-space: nowrap; padding: 10px 12px 4px; }
.nav-cta { margin-top: 4px; }

/* Clients group inside the sidebar */
.sb-clients-head { display: flex; align-items: center; justify-content: space-between; }
.sb-clients-head button { background: none; border: 0; color: var(--text-4); display: inline-flex; padding: 2px; border-radius: 4px; }
.sb-clients-head button svg { transition: transform .2s; }
.sb-clients.collapsed .sb-clients-head button svg { transform: rotate(-90deg); }
.sb-clients.collapsed .sidebar-client-list, .sb-clients.collapsed .sb-filter { display: none; }
.sb-filter { display: flex; align-items: center; gap: 6px; margin: 2px 8px 6px; padding: 5px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-4); }
.sb-filter input { background: none; border: 0; color: var(--text); font-size: 0.78rem; width: 100%; min-width: 0; }
.sidebar-client-list { max-height: 40vh; padding: 0 4px; }
.sidebar-client { padding: 6px 16px; border: 1px solid transparent; white-space: nowrap; }
.sidebar-client.active { background: rgba(254,108,92,0.12); color: var(--accent); border-color: rgba(254,108,92,0.22); }
.sidebar-client.active .sidebar-client-avatar { background: var(--accent); }
.sidebar-client-avatar { background: var(--surface-3); color: var(--text-2); font-size: 0.72rem; font-weight: 700; }
.sidebar-client .dot { margin-inline-start: auto; }
.sidebar-client.hidden { display: none; }

/* Footer: pin + user */
.sidebar-footer { padding: 10px 8px; }
.sb-pin { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 20px; border-radius: var(--radius-sm); background: none; border: 1px solid transparent; color: var(--text-3); font-size: 0.8rem; white-space: nowrap; }
.sb-pin:hover { background: var(--surface-2); color: var(--text); }
html.sb-pinned .sb-pin { color: var(--accent); }
.sb-pin .nav-icon svg { transition: transform .2s; }
html.sb-pinned .sb-pin .nav-icon svg { transform: rotate(45deg); }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; white-space: nowrap; }
.sidebar-user .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.sidebar-user .who { flex: 1; min-width: 0; overflow: hidden; }
.sidebar-user .who b { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who small { font-size: 0.65rem; color: var(--text-3); }
.sidebar-user .logout { color: var(--text-3); display: inline-flex; padding: 4px; border-radius: 6px; }
.sidebar-user .logout:hover { color: var(--text); background: var(--surface-2); }
.sidebar-footer-brand, .sidebar-footer-ver { display: none; }
.sidebar:hover .sidebar-footer-brand, html.sb-pinned .sidebar .sidebar-footer-brand { display: block; padding: 6px 12px 0; }

/* Mobile: the sidebar is a drawer, plus a 5-item bottom bar */
.bottombar, .sb-backdrop { display: none; }
@media (max-width: 900px) {
  .sidebar, .sidebar:hover, html.sb-pinned .sidebar { width: var(--sidebar-w); box-shadow: none; transform: translateX(100%); }
  .sidebar.open, html.sb-pinned .sidebar.open { transform: translateX(0); box-shadow: -24px 0 60px rgba(0,0,0,0.5); z-index: 1001; }   /* above the task bubble (999) */
  .sidebar .sb-label, .sidebar .sidebar-footer-brand { opacity: 1; display: block; }
  .sidebar .nav-badge { position: static; margin-inline-start: auto; }
  .sb-pin { display: none; }
  .main-wrap, html.sb-pinned .main-wrap { margin-right: 0; }
  .main-content { padding-bottom: 88px; }
  .sb-backdrop { position: fixed; inset: 0; background: rgba(5,2,12,0.55); z-index: 1000; }
  .sidebar.open ~ .sb-backdrop, body.sb-open .sb-backdrop { display: block; }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; height: 62px;
    background: var(--sidebar-bg-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-mid); z-index: 180; padding-bottom: env(safe-area-inset-bottom);
  }
  .bottombar a, .bottombar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-3); font-size: 0.62rem; font-weight: 600; background: none; border: 0; position: relative;
  }
  .bottombar .active { color: var(--accent); }
  .bottombar .nav-badge { position: absolute; top: 6px; inset-inline-start: calc(50% + 4px); min-width: 16px; height: 16px; font-size: 0.6rem; }
  .toast-container { bottom: 76px; }
  .task-bubble { bottom: 74px; left: 10px; right: 10px; width: auto; }   /* floating control center sits above the bottom bar */
  .task-bubble.collapsed { right: auto; width: 54px; }
}

/* ══════════════════════════════════════════
   CRM — פעמון התראות (בכל עמוד)
══════════════════════════════════════════ */
.notif-bell { position: relative; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
              color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); }
.notif-bell:hover, .notif-bell.has { color: var(--text); border-color: var(--border-mid); }
.notif-bell.has { color: var(--accent); }
.notif-count { position: absolute; top: -5px; inset-inline-start: -5px; background: var(--accent); color: #fff; font-size: 0.62rem; font-weight: 800;
               border-radius: 999px; min-width: 17px; height: 17px; padding: 0 4px; display: flex; align-items: center; justify-content: center; }
.notif-drawer { position: fixed; top: 64px; left: 16px; right: auto;  /* הפעמון בצד שמאל של הטופבר — המגירה מתחתיו, לא מתחת לסרגל הימני */ width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 90px); z-index: 900;
                background: var(--sidebar-bg-glass); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 1px solid rgba(255,255,255,0.11);
                border-radius: var(--radius-lg); box-shadow: 0 30px 70px rgba(0,0,0,0.55); display: flex; flex-direction: column; overflow: hidden; }
.notif-drawer[hidden] { display: none; }
.notif-drawer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(254,108,92,0.55), transparent); }
.notif-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-family: 'Heebo', sans-serif; }
.notif-head .sp { flex: 1; }
.notif-list { overflow: auto; padding: 6px; }
.notif-empty { text-align: center; color: var(--text-3); padding: 30px 10px; font-size: 0.85rem; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; align-items: flex-start; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(254,108,92,0.07); }
.notif-ic { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--text-2); }
.notif-item.k-sla_breach .notif-ic, .notif-item.k-inbound_error .notif-ic { color: var(--error); }
.notif-item.k-deal_won .notif-ic, .notif-item.k-whatsapp_in .notif-ic { color: var(--success); }
.notif-item.k-hot_lead .notif-ic, .notif-item.k-task_due .notif-ic { color: var(--warning); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 0.84rem; }
.notif-body b { color: var(--text); font-weight: 600; }
.notif-body span { color: var(--text-2); font-size: 0.8rem; }
.notif-body small { color: var(--text-3); font-size: 0.72rem; }
.notif-sticky { position: fixed; bottom: 24px; left: 24px; z-index: 950; display: flex; flex-direction: column; gap: 8px; max-width: min(460px, calc(100vw - 48px)); }
.notif-sticky-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--sidebar-bg); border: 1px solid rgba(251,191,36,0.4);
                     border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,0.5); font-size: 0.85rem; }
.notif-sticky-item .nb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-sticky-item .nb b { color: var(--text); }
.notif-sticky-item .nb span { color: var(--text-3); font-size: 0.78rem; }
.notif-sticky-item .notif-ic { color: var(--warning); }
@media (max-width: 900px) { .notif-drawer { top: 60px; left: 8px; right: 8px; width: auto; } .notif-sticky { bottom: 74px; left: 12px; } }
