﻿:root {
  --bg: #f4f6f8;
  --bg2: #ffffff;
  --bg3: #eef1f5;
  --surface: #ffffff;
  --surface2: #f1f4f8;
  --border: #e6eaef;
  --border2: #d7dee6;
  --gold: #f5b301;
  --gold2: #ffd166;
  --gold-dim: rgba(245,179,1,0.14);
  --cream: #0f172a;
  --cream2: #334155;
  --muted: #64748b;
  --muted2: #475569;
  --text: #0f172a;
  --text2: #1e293b;
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.12);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.12);
  --blue: #3b82f6;
  --blue-dim: rgba(59,130,246,0.12);
  --orange: #f97316;
  --orange-dim: rgba(249,115,22,0.12);
  --navy: #0f2a43;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15,23,42,0.08);
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --sidebar-w: 240px;
  --header-h: 56px;
  --mobile-nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* â”€â”€ LAYOUT â”€â”€ */
#app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* â”€â”€ SIDEBAR â”€â”€ */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-mark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo .logo-icon {
  width: 28px; height: 28px;
  background: #fff;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.sidebar-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  padding: 12px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.15s;
  color: var(--muted2);
  font-size: 13.5px;
  font-weight: 400;
  position: relative;
  border-left: 2px solid transparent;
}
.nav-item:hover { background: var(--surface); color: var(--text2); }
.nav-item.active {
  background: var(--blue-dim);
  color: var(--blue);
  border-left-color: var(--blue);
  font-weight: 600;
}
.nav-item .nav-icon { width: 16px; text-align: center; font-size: 15px; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 500;
}
.nav-badge.gold { background: var(--gold); color: var(--bg); }
.nav-badge.green { background: var(--green); }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--bg);
  flex-shrink: 0;
}
.user-info .user-name { font-size: 12px; font-weight: 500; color: var(--text2); }
.user-info .user-role { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }

/* â”€â”€ MAIN â”€â”€ */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

#topbar {
  height: var(--header-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15,23,42,0.04);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}
.topbar-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

#content { flex: 1; overflow-y: auto; padding: 24px; }

/* â”€â”€ COMPONENTS â”€â”€ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #123a5c; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--border2); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }
.btn-green { background: var(--green-dim); color: var(--green); border: 1px solid var(--green); }
.btn-icon { padding: 7px; border-radius: var(--radius-sm); background: var(--surface); color: var(--muted2); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; }
.btn-icon:hover { background: var(--surface2); color: var(--text); }

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 22px rgba(15,23,42,0.06);
}
.card-sm { padding: 14px 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.badge-gold { background: rgba(245,179,1,0.14); color: #b45309; border: 1px solid rgba(245,179,1,0.35); }
.badge-red { background: var(--red-dim); color: #e74c3c; border: 1px solid rgba(192,57,43,0.3); }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.28); }
.badge-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.28); }
.badge-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(230,126,34,0.3); }
.badge-muted { background: var(--surface); color: var(--muted2); border: 1px solid var(--border); }

.input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--muted); }

select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 80px; }

.label { font-size: 11px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; display: block; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* â”€â”€ SCORE BAR â”€â”€ */
.score-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* â”€â”€ GRID â”€â”€ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* â”€â”€ STAT CARD â”€â”€ */
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px;
  position: relative;
  overflow: hidden;
}
.stat-card::before { display: none; }
.stat-value { font-size: 26px; font-weight: 700; font-family: var(--font-display); margin-bottom: 4px; }
.stat-card.gold .stat-value { color: var(--blue); }
.stat-card.red .stat-value { color: var(--red); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.blue .stat-value { color: var(--gold); }
.stat-label { font-size: 12px; color: var(--muted2); font-weight: 500; }
.stat-change { font-size: 11px; margin-top: 8px; font-family: var(--font-mono); }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* â”€â”€ LEAD CARD â”€â”€ */
.lead-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.lead-card:hover { border-color: var(--border2); background: var(--surface2); transform: translateY(-1px); box-shadow: var(--shadow); }
.lead-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--bg);
  flex-shrink: 0;
  font-family: var(--font-display);
}
.lead-info { flex: 1; min-width: 0; }
.lead-name { font-weight: 500; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.lead-type { font-size: 12px; color: var(--muted2); margin-bottom: 6px; }
.lead-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-score { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.score-num { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }

/* â”€â”€ INBOX â”€â”€ */
.inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.inbox-item:hover { background: var(--bg3); }
.inbox-item.active { background: var(--surface2); border-left: 2px solid var(--blue); }
.inbox-item.unread::before {
  content: '';
  position: absolute;
  left: 4px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
}
.inbox-channel {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.ch-instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.ch-whatsapp { background: #25d366; }
.ch-email { background: var(--blue); }
.ch-web { background: var(--surface2); border: 1px solid var(--border2); }
.inbox-body { flex: 1; min-width: 0; }
.inbox-name { font-size: 14px; font-weight: 600; color: var(--text); }
.inbox-preview {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inbox-time { font-size: 10px; color: var(--muted); font-family: var(--font-mono); flex-shrink: 0; margin-top: 2px; }

/* â”€â”€ CONVERSATION â”€â”€ */
.conv-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.bubble-in {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.bubble-out {
  background: var(--navy);
  border: 1px solid rgba(15,42,67,0.35);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.conv-messages {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.bubble-time {
  font-size: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 2px;
  text-align: right;
}
.bubble-wrap { display: flex; flex-direction: column; margin-bottom: 4px; }
.bubble-wrap.in { align-items: flex-start; }
.bubble-wrap.out { align-items: flex-end; }

/* â”€â”€ AI CHIP â”€â”€ */
.ai-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(15,42,67,0.06));
  border: 1px solid rgba(59,130,246,0.22);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--blue);
  font-family: var(--font-mono);
}
.ai-dot { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* â”€â”€ MODAL â”€â”€ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-size: 18px; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* â”€â”€ TABS â”€â”€ */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted2);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab.active { color: var(--navy); border-bottom-color: var(--blue); font-weight: 600; }
.tab:hover:not(.active) { color: var(--text2); }

/* â”€â”€ KANBAN â”€â”€ */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  min-width: 260px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kanban-col-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kanban-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 100px; }
.kanban-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.kanban-card:hover { border-color: var(--border2); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.kanban-card .kc-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.kanban-card .kc-type { font-size: 11px; color: var(--muted2); margin-bottom: 8px; }
.kanban-card .kc-date { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }

/* â”€â”€ PHOTOGRAPHER CARD â”€â”€ */
.photo-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.photo-card:hover { border-color: var(--border2); }
.photo-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.photo-info { flex: 1; }
.photo-name { font-weight: 500; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.photo-zone { font-size: 12px; color: var(--muted2); margin-bottom: 6px; }
.photo-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dispo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dispo-ok { background: var(--green); }
.dispo-busy { background: var(--red); }
.dispo-partial { background: var(--orange); }

/* â”€â”€ TIMELINE â”€â”€ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px; top: 28px;
  width: 1px;
  bottom: 0;
  background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.tl-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg2);
  z-index: 1;
}
.tl-dot.done { background: var(--green-dim); border-color: var(--green); }
.tl-dot.active { background: var(--gold-dim); border-color: var(--gold); animation: pulse 2s infinite; }
.tl-content { flex: 1; padding-top: 4px; }
.tl-title { font-size: 13px; font-weight: 500; color: var(--text); }
.tl-sub { font-size: 12px; color: var(--muted2); margin-top: 2px; }

/* â”€â”€ FORM GROUP â”€â”€ */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* â”€â”€ SCROLLBAR â”€â”€ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* â”€â”€ NOTIFICATION TOAST â”€â”€ */
#toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 320px;
  font-size: 13px;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* â”€â”€ MOBILE â”€â”€ */
#menu-toggle { display: none; }
@media (max-width: 768px) {
  html, body {
    overflow: auto;
    overscroll-behavior-y: none;
  }
  #app {
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    overflow: hidden;
  }
  #main {
    min-height: 0;
  }
  #content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  #sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: var(--shadow);
  }
  #sidebar.open { transform: translateX(0); }
  #menu-toggle { display: flex; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  #content { padding: 16px 16px calc(16px + var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  body.is-photographer-mobile #content { padding-top: calc(16px + 6px); }
  .kanban { min-height: 400px; }
  #inbox-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  #inbox-layout > .card {
    min-height: 320px;
  }
}

/* â”€â”€ MOBILE TAB BAR (StudioFlow-like) â”€â”€ */
.mobile-tabbar { display: none; }
@media (max-width: 768px) {
  .mobile-tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    min-height: var(--mobile-nav-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 300;
    justify-content: space-around;
    align-items: center;
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
  }
  .mobile-tab .ico { font-size: 16px; line-height: 1; }
  .mobile-tab.active { color: var(--navy); }
}

.dash-hello { margin-bottom: 14px; }
.dash-hello .kicker { font-size: 13px; color: var(--muted2); font-weight: 500; }
.dash-hello .title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; margin-top: 2px; color: var(--navy); }

.pipeline-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
}
.pipeline-pill {
  min-width: 92px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.05);
}
.pipeline-pill .num { font-size: 18px; font-weight: 700; color: var(--navy); }
.pipeline-pill .lbl { font-size: 11px; color: var(--muted2); margin-top: 2px; }

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted2);
  font-weight: 600;
}
.sync-pill .ok { color: var(--green); font-weight: 700; }

/* â”€â”€ VIEWS â”€â”€ */
.view { display: none; }
.view.active { display: block; animation: lf-view-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes lf-view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* â”€â”€ SEARCH BAR â”€â”€ */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 300px;
}
.search-wrap .search-icon {
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.search-wrap .input { padding-left: 32px; }

/* â”€â”€ STATUS TAG â”€â”€ */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 10px;
  border-radius: 20px;
}

/* â”€â”€ TUNNEL STEP INDICATOR â”€â”€ */
.tunnel-steps {
  display: flex;
  gap: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.tunnel-step {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  font-size: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-right: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.tunnel-step:last-child { border-right: none; }
.tunnel-step.done { background: var(--green-dim); color: var(--green); }
.tunnel-step.active { background: var(--blue-dim); color: var(--blue); font-weight: 600; }

/* â”€â”€ PROGRESS RING â”€â”€ */
.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--surface2); stroke-width: 3; }
.progress-ring-fill { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }

/* â”€â”€ EMPTY STATE â”€â”€ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 13px; }

/* â”€â”€ AGENDA â”€â”€ */
.agenda-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  font-size: 12px;
}
.agenda-time {
  color: var(--muted);
  font-family: var(--font-mono);
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.agenda-slot {
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  min-height: 48px;
  position: relative;
}
.agenda-event {
  background: var(--gold-dim);
  border: 1px solid rgba(212,168,83,0.3);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  color: var(--gold);
  cursor: pointer;
}
.agenda-event.shooting {
  background: var(--blue-dim);
  border-color: rgba(41,128,185,0.3);
  color: #5dade2;
}
.agenda-event.deadline {
  background: var(--red-dim);
  border-color: rgba(192,57,43,0.3);
  color: #e74c3c;
}

/* —— Vues CRM (app front) —— */
.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.view-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.view-sub {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 4px;
}
.view-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kanban-root {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  min-height: calc(100vh - 200px);
}
.kanban-col {
  flex: 0 0 240px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}
.kanban-col-head {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted2);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.kanban-col-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 10px 8px;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kanban-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
}
.kanban-card.dragging { opacity: 0.55; }
.kanban-card .kc-name { font-weight: 600; font-size: 13px; color: var(--text); }
.kanban-card .kc-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.kanban-card .kc-score {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.agenda-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agenda-row.card {
  margin: 0;
}

.lf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lf-table th,
.lf-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.lf-table th {
  font-weight: 600;
  color: var(--muted2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface2);
}
.lf-table tr:last-child td { border-bottom: none; }

/* Modales */
.lf-modal-root {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lf-modal-root.open { display: flex; }
.lf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.lf-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  border: 1px solid var(--border);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.lf-modal-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}
.lf-modal-body {
  padding: 16px;
  overflow-y: auto;
}
.lf-modal-x { font-size: 22px; line-height: 1; }
.lf-form-stack .input,
.lf-form-stack select {
  width: 100%;
  margin-bottom: 10px;
}
.lf-form-stack label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* —— Native mobile (LensFlow app) —— */
.lf-hide-if-no-crm { display: none !important; }
.lf-hide-mobile { display: inline-flex; }
@media (max-width: 768px) {
  .lf-hide-mobile { display: none !important; }
}

.lf-native-scroll {
  padding-bottom: 8px;
}

.lf-dash-sub {
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 10px;
}

.lf-hero-ca {
  background: #0f172a;
  color: #fff;
  border-radius: 20px;
  padding: 18px 20px 20px;
  margin-bottom: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
.lf-hero-ca-label { font-size: 12px; opacity: 0.85; font-weight: 500; }
.lf-hero-ca-value { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-top: 4px; }

.lf-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.lf-kpi-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.lf-kpi-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.lf-kpi-blue { background: rgba(59, 130, 246, 0.12); }
.lf-kpi-red { background: rgba(239, 68, 68, 0.12); }
.lf-kpi-orange { background: rgba(249, 115, 22, 0.14); }
.lf-kpi-blue2 { background: rgba(59, 130, 246, 0.12); }
.lf-kpi-green { background: rgba(34, 197, 94, 0.12); }
.lf-kpi-red2 { background: rgba(239, 68, 68, 0.12); }
.lf-kpi-num { font-size: 22px; font-weight: 700; color: var(--navy); }
.lf-kpi-lbl { font-size: 11px; color: var(--muted); font-weight: 600; }

.lf-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 16px 0 10px;
}
.lf-section-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 8px 0 8px 4px;
}
.lf-muted-small { font-size: 12px; color: var(--muted2); margin: 0 0 10px; }

.lf-actions-card { padding: 0; overflow: hidden; border-radius: 16px; }
.lf-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}
.lf-action-row:last-child { border-bottom: none; }
.lf-action-row:active { background: var(--surface2); }
.lf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lf-dot.blue { background: #3b82f6; }
.lf-dot.orange { background: #f97316; }
.lf-dot.red { background: #ef4444; }
.lf-dot.grey { background: #94a3b8; }
.lf-action-txt { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.lf-chev { color: var(--muted); font-size: 18px; }

.lf-leads-recent { display: flex; flex-direction: column; gap: 10px; }
.lf-lead-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lf-lead-row:active { transform: scale(0.99); }
.lf-lead-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lf-lead-mid { flex: 1; min-width: 0; }
.lf-lead-name { font-weight: 600; font-size: 15px; color: var(--navy); }
.lf-lead-sub { font-size: 12px; color: var(--muted2); margin-top: 2px; }
.lf-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: capitalize;
}
.lf-st-blue { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.lf-st-orange { background: rgba(249, 115, 22, 0.15); color: #ea580c; }
.lf-st-green { background: rgba(34, 197, 94, 0.15); color: #16a34a; }

.lf-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lf-chip-row::-webkit-scrollbar { display: none; }
.lf-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lf-chip-on {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.lf-leads-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.lf-clients-stack { display: flex; flex-direction: column; gap: 10px; }
.lf-client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.lf-client-name { font-weight: 700; font-size: 15px; color: var(--navy); }
.lf-client-mail { font-size: 13px; color: var(--muted2); margin-top: 4px; }

.lf-quote-stack { display: flex; flex-direction: column; gap: 12px; }
.lf-quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
.lf-quote-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.lf-quote-title { font-weight: 700; font-size: 16px; color: var(--navy); }
.lf-quote-sub { font-size: 12px; color: var(--muted2); margin-top: 2px; }
.lf-quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted2);
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.lf-quote-foot { font-size: 11px; color: var(--muted); margin-top: 10px; }

.lf-more-profile {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}
.lf-more-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.lf-more-name { font-weight: 700; font-size: 17px; color: var(--navy); }
.lf-more-mail { font-size: 13px; color: var(--muted2); margin-top: 2px; }
.lf-more-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted2);
}
.lf-more-list { padding: 0; overflow: hidden; border-radius: 16px; }
.lf-more-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}
.lf-more-row:last-child { border-bottom: none; }
.lf-more-row:active { background: var(--surface2); }
.lf-more-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.lf-more-ico.green { background: rgba(34, 197, 94, 0.15); }
.lf-more-ico.gold { background: rgba(245, 179, 1, 0.18); }
.lf-more-ico.slate { background: rgba(100, 116, 139, 0.15); }
.lf-more-ico.blue { background: rgba(59, 130, 246, 0.15); }
.lf-more-ico.teal { background: rgba(20, 184, 166, 0.15); }
.lf-more-ico.red { background: rgba(239, 68, 68, 0.12); }
.lf-more-ico.grey { background: var(--surface2); }
.lf-more-tt { font-weight: 600; font-size: 15px; color: var(--navy); }
.lf-more-st { font-size: 12px; color: var(--muted2); margin-top: 2px; }

.lf-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}
.lf-toggle-row:last-child { border-bottom: none; }

.lf-btn-black {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.lf-btn-logout {
  display: block;
  text-align: center;
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-weight: 700;
  text-decoration: none;
}

.lf-native-tabs .mobile-tab.active {
  color: #0f172a;
}
.lf-ico-grid::before { content: '▦'; font-size: 15px; }
.lf-ico-inbox::before { content: '💬'; font-size: 15px; }
.lf-ico-cal::before { content: '📅'; font-size: 15px; }
.lf-ico-menu::before { content: '≡'; font-size: 17px; font-weight: 700; }

.lf-modal-root.lf-modal-full .lf-modal {
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}
.lf-modal-root.lf-modal-full {
  padding: 0;
  align-items: stretch;
}
.lf-lead-tabs {
  display: flex;
  gap: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  padding-bottom: 8px;
}
.lf-lead-tabs .lf-lead-tab {
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0 0 8px;
  margin: 0;
  font-weight: 600;
}
.lf-lead-tabs .lf-lead-tab.on,
.lf-lead-tabs .on {
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
  padding-bottom: 6px;
  margin-bottom: -9px;
}
.lf-lead-panel[hidden] {
  display: none !important;
}
.lf-lead-thread-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 160px;
  overflow-y: auto;
}
.lf-lead-thread-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
}
.lf-lead-thread-item:last-child {
  border-bottom: none;
}
.lf-lead-thread-item.active {
  background: var(--surface2);
}
.lf-lead-msg-conv {
  max-height: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
}
.lf-lead-reply-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 10px;
}
.lf-factures-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.lf-payment-row {
  cursor: pointer;
  transition: transform 0.12s ease;
}
.lf-payment-row:hover {
  transform: translateY(-1px);
}
.lf-label-block {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted2);
}
.lf-toggle-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.lf-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}
.lf-code {
  font-family: var(--font-mono);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.lensflow-shortcode-root {
  position: relative;
  width: 100%;
  min-height: 75vh;
  isolation: isolate;
}
.lensflow-shortcode-root .mobile-tabbar {
  z-index: 50000;
}
.lf-lead-sheet {
  background: var(--surface2);
  border-radius: 14px;
  padding: 4px 0;
}
.lf-sheet-h { font-weight: 700; padding: 10px 14px 4px; font-size: 14px; color: var(--navy); }
.lf-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted2);
}
.lf-kv:last-child { border-bottom: none; }
.lf-kv strong { color: var(--text); font-size: 13px; font-weight: 600; text-align: right; }
.lf-pill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-pill-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  cursor: pointer;
  text-transform: capitalize;
}
.lf-pill-btn.lf-pill-on {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

@media (max-width: 900px) {
  .lf-factures-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .lf-native-tabs .mobile-tab { font-size: 9px; }
}
