/* ============================================
   WANKHEDE GROUP CRM v2.0 — MAIN STYLESHEET
   Luxury Real Estate · Nashik
   ============================================ */

:root {
  --gold: #C9A227;
  --gold2: #E8C547;
  --gold-dk: #9B7A1A;
  --bg: #0A0C12;
  --bg2: #0F1320;
  --bg3: #161B2A;
  --card: #131827;
  --card2: #1A2035;
  --border: rgba(201,162,39,0.13);
  --border2: rgba(255,255,255,0.06);
  --text: #EDF0F7;
  --muted: #68718F;
  --muted2: #4A5268;
  --blue: #4F8EF7;
  --green: #2ECC71;
  --red: #E74C3C;
  --orange: #F39C12;
  --purple: #9B59B6;
  --teal: #1ABC9C;
  --sw: 258px;
  --tbh: 64px;
  --rad: 14px;
  --rad2: 10px;
  --shad: 0 8px 32px rgba(0,0,0,0.45);
  --shad2: 0 2px 12px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(201,162,39,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,39,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none; z-index: 0;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-dk); border-radius: 3px; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sw); flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100; overflow-y: auto;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar.hidden { transform: translateX(-100%); }

.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 700; color: #000;
  flex-shrink: 0; box-shadow: 0 4px 16px rgba(201,162,39,0.25);
}
.logo-words strong { display: block; font-size: .88rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.logo-words span { font-size: .7rem; color: var(--gold); font-weight: 500; letter-spacing: .07em; }

.user-pill {
  margin: 14px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.user-ava {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #000; font-size: .95rem; flex-shrink: 0;
}
.user-meta strong { display: block; font-size: .83rem; color: var(--text); }
.user-meta span { font-size: .71rem; color: var(--gold); }
.online-dot {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.snav { padding: 8px 10px; flex: 1; }
.snav-label {
  font-size: .62rem; letter-spacing: .12em; color: var(--muted2);
  padding: 12px 10px 5px; font-weight: 600; text-transform: uppercase;
}
.slink {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none;
  font-size: .855rem; font-weight: 500;
  transition: all .2s; margin-bottom: 1px; position: relative;
  border: 1px solid transparent;
}
.slink i { width: 18px; text-align: center; font-size: .9rem; flex-shrink: 0; }
.slink span { flex: 1; }
.slink em { font-style: normal; font-size: .68rem; font-weight: 700;
  background: var(--gold); color: #000; border-radius: 10px; padding: 1px 6px; }
.slink em.red { background: var(--red); color: #fff; }
.slink:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.slink.active {
  background: linear-gradient(135deg,rgba(201,162,39,0.18),rgba(201,162,39,0.06));
  color: var(--gold); border-color: rgba(201,162,39,0.2);
  font-weight: 600;
}
.slink.active::after {
  content: ''; position: absolute; right: 0; top: 25%; bottom: 25%;
  width: 3px; background: var(--gold); border-radius: 2px 0 0 2px;
}
.slink.hidden-perm { display: none !important; }

.logout-btn {
  margin: 12px; border: 1px solid rgba(231,76,60,0.2);
  background: rgba(231,76,60,0.07); color: #E74C3C;
  border-radius: 10px; padding: 10px 14px;
  font-family: 'Outfit', sans-serif; font-size: .83rem; font-weight: 500;
  cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 8px;
}
.logout-btn:hover { background: rgba(231,76,60,0.15); }

/* ===== SHELL ===== */
.shell {
  margin-left: var(--sw);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh; transition: margin-left .3s cubic-bezier(.4,0,.2,1);
  position: relative; z-index: 1;
}
.shell.wide { margin-left: 0; }

/* ===== TOPBAR ===== */
.topbar {
  height: var(--tbh);
  background: rgba(13,16,30,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; position: sticky; top: 0; z-index: 90;
  flex-shrink: 0;
}
.tb-left { display: flex; align-items: center; gap: 14px; }
.hamburger {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border2);
  color: var(--muted); width: 36px; height: 36px; border-radius: 9px;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.hamburger:hover { color: var(--gold); border-color: var(--border); }
.breadcrumb { display: flex; align-items: center; gap: 8px; }
.bc-brand { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.bc-sep { font-size: .6rem; color: var(--muted2); }
.bc-page { font-size: .85rem; color: var(--gold); font-weight: 500; }

.tb-right { display: flex; align-items: center; gap: 12px; }
.tb-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  border-radius: 10px; padding: 7px 13px; position: relative;
  transition: border-color .2s;
}
.tb-search:focus-within { border-color: var(--border); }
.tb-search i { color: var(--muted); font-size: .82rem; }
.tb-search input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: .85rem;
  width: 210px;
}
.tb-search input::placeholder { color: var(--muted); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 12px; max-height: 320px; overflow-y: auto;
  display: none; z-index: 200; box-shadow: var(--shad);
}
.search-results.open { display: block; }
.sr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--border2);
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: rgba(255,255,255,0.04); }
.sr-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.sr-icon.lead { background: rgba(79,142,247,.15); color: var(--blue); }
.sr-icon.client { background: rgba(201,162,39,.15); color: var(--gold); }
.sr-info strong { font-size: .83rem; display: block; }
.sr-info span { font-size: .72rem; color: var(--muted); }

.tb-icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  color: var(--muted); cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: .95rem; transition: all .2s;
}
.tb-icon-btn:hover { color: var(--gold); border-color: var(--border); }
.tb-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
  background: var(--red); color: #fff; border-radius: 8px;
  font-size: .62rem; font-weight: 700; display: flex;
  align-items: center; justify-content: center; padding: 0 3px;
}
.tb-date { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.tb-user {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 6px 10px; border-radius: 10px; position: relative;
  border: 1px solid transparent; transition: all .2s;
}
.tb-user:hover { background: rgba(255,255,255,0.04); border-color: var(--border2); }
.tb-ava {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #000; font-size: .88rem; flex-shrink: 0;
}
.tb-uinfo strong { display: block; font-size: .82rem; }
.tb-uinfo span { font-size: .7rem; color: var(--gold); }
.tb-chevron { font-size: .65rem; color: var(--muted); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 13px; padding: 8px; box-shadow: var(--shad);
  display: none; z-index: 200;
}
.user-dropdown.open { display: block; }
.udd-head { padding: 10px 12px 10px; border-bottom: 1px solid var(--border2); margin-bottom: 6px; }
.udd-head strong { display: block; font-size: .88rem; }
.udd-head span { font-size: .72rem; color: var(--gold); }
.user-dropdown a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-size: .84rem;
  transition: all .15s;
}
.user-dropdown a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.udd-div { height: 1px; background: var(--border2); margin: 6px 0; }
.udd-logout { color: var(--red) !important; }

/* ===== NOTIFICATION PANEL ===== */
.notif-panel {
  position: fixed; top: var(--tbh); right: 0; width: 340px; bottom: 0;
  background: var(--bg2); border-left: 1px solid var(--border);
  z-index: 88; transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.notif-panel.open { transform: translateX(0); }
.np-header { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border); }
.np-header h4 { font-size: .95rem; font-weight: 600; }
.np-header button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.np-list { flex: 1; overflow-y: auto; padding: 12px; }
.np-item {
  display: flex; gap: 10px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--border2); margin-bottom: 8px;
  background: rgba(255,255,255,0.02);
}
.np-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.np-info strong { font-size: .82rem; display: block; margin-bottom: 2px; }
.np-info small { font-size: .73rem; color: var(--muted); }

/* ===== CONTENT ===== */
.content { padding: 26px; flex: 1; overflow: auto; }
.page { display: none; animation: fadeUp .3s ease; }
.page.active { display: block; }
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

/* ===== PAGE HERO ===== */
.page-hero {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 700; color: var(--text);
  background: linear-gradient(135deg, var(--text), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.page-hero p { font-size: .85rem; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; }

/* ===== KPI STRIP ===== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.kpi {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--rad); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: all .2s; cursor: default; position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.kpi:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shad2); }
.kpi:hover::before { opacity: 1; }
.kpi-ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.kpi-ico.blue { background: rgba(79,142,247,.12); color: var(--blue); }
.kpi-ico.green { background: rgba(46,204,113,.12); color: var(--green); }
.kpi-ico.gold { background: rgba(201,162,39,.12); color: var(--gold); }
.kpi-ico.teal { background: rgba(26,188,156,.12); color: var(--teal); }
.kpi-ico.purple { background: rgba(155,89,182,.12); color: var(--purple); }
.kpi-ico.red { background: rgba(231,76,60,.12); color: var(--red); }
.kpi-data { flex: 1; min-width: 0; }
.kpi-n {
  display: block; font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem; font-weight: 700; line-height: 1; color: var(--text);
}
.kpi-data span { font-size: .74rem; color: var(--muted); display: block; margin-top: 3px; font-weight: 400; }

/* ===== CARDS ===== */
.card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--rad); padding: 20px; box-shadow: var(--shad2);
}
.card.no-pad { padding: 0; overflow: hidden; }
.card-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-hdr h3 { font-size: .95rem; font-weight: 600; color: var(--text); }
.link-gold { font-size: .78rem; color: var(--gold); text-decoration: none; }
.link-gold:hover { text-decoration: underline; }

/* ===== DASHBOARD GRID ===== */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }

/* ===== PAGE TOOLBAR ===== */
.pt {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 14px; flex-wrap: wrap;
}
.pt h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 700; }
.pt-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.pt-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  color: #000; border: none; border-radius: var(--rad2);
  padding: 10px 18px; font-family: inherit; font-size: .84rem;
  font-weight: 600; cursor: pointer; display: inline-flex;
  align-items: center; gap: 7px; transition: all .2s; white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,162,39,.3); }
.btn-secondary {
  background: rgba(255,255,255,0.05); color: var(--muted);
  border: 1px solid var(--border2); border-radius: var(--rad2);
  padding: 10px 18px; font-family: inherit; font-size: .84rem;
  font-weight: 500; cursor: pointer; display: inline-flex;
  align-items: center; gap: 7px; transition: all .2s; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--border); color: var(--text); }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border2);
  border-radius: var(--rad2); padding: 10px 18px; font-family: inherit;
  font-size: .84rem; cursor: pointer; transition: all .2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border); }

/* ===== INPUTS ===== */
.sinput, .msel, .fi {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  color: var(--text); border-radius: 9px; padding: 9px 12px;
  font-family: inherit; font-size: .84rem; outline: none;
  transition: border-color .2s;
}
.sinput:focus, .fi:focus { border-color: var(--gold); background: rgba(201,162,39,.04); }
.sinput { width: 200px; }
.fi { width: 100%; }
.fi option { background: var(--bg3); }
textarea.fi { resize: vertical; min-height: 80px; }
.mini-sel { background: rgba(255,255,255,0.04); border: 1px solid var(--border2); color: var(--muted); border-radius: 7px; padding: 5px 10px; font-family: inherit; font-size: .78rem; outline: none; cursor: pointer; }

/* ===== DATA TABLE ===== */
.xt { width: 100%; border-collapse: collapse; font-size: .82rem; }
.xt thead th {
  background: rgba(255,255,255,0.025);
  color: var(--muted); text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--border2);
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; white-space: nowrap;
}
.xt tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; }
.xt tbody tr:last-child td { border-bottom: none; }
.xt tbody tr:hover td { background: rgba(255,255,255,0.025); }
.xt.full { min-width: 900px; }

/* ===== STATUS CHIPS ===== */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: .7rem; font-weight: 600; white-space: nowrap;
}
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.c-new { background: rgba(79,142,247,.12); color: var(--blue); }
.c-contacted { background: rgba(201,162,39,.12); color: var(--gold); }
.c-visit { background: rgba(155,89,182,.12); color: var(--purple); }
.c-negotiation { background: rgba(243,156,18,.12); color: var(--orange); }
.c-booked { background: rgba(46,204,113,.12); color: var(--green); }
.c-lost { background: rgba(231,76,60,.12); color: var(--red); }
.c-available { background: rgba(46,204,113,.12); color: var(--green); }
.c-sold { background: rgba(231,76,60,.12); color: var(--red); }
.c-confirmed { background: rgba(46,204,113,.12); color: var(--green); }
.c-draft { background: rgba(155,89,182,.12); color: var(--purple); }
.c-sent { background: rgba(79,142,247,.12); color: var(--blue); }
.c-accepted { background: rgba(46,204,113,.12); color: var(--green); }

/* ===== ACTION BUTTONS ===== */
.ab { display: flex; gap: 5px; }
.abtn {
  width: 28px; height: 28px; border-radius: 7px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .77rem; transition: all .15s;
}
.abtn:hover { transform: scale(1.12); }
.abtn.v { background: rgba(201,162,39,.12); color: var(--gold); }
.abtn.e { background: rgba(79,142,247,.12); color: var(--blue); }
.abtn.d { background: rgba(231,76,60,.12); color: var(--red); }
.abtn.c { background: rgba(46,204,113,.12); color: var(--green); }
.abtn.p { background: rgba(155,89,182,.12); color: var(--purple); }

/* ===== FOLLOW-UP SECTION ===== */
.fu-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.fu-ul { list-style: none; }
.fu-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.fu-item:last-child { border-bottom: none; }
.fu-ico {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
}
.fu-inf { flex: 1; min-width: 0; }
.fu-inf strong { font-size: .83rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-inf small { font-size: .72rem; color: var(--muted); }
.fu-time { font-size: .71rem; color: var(--gold); font-weight: 600; white-space: nowrap; margin-left: auto; }
.fu-overdue-hdr { color: var(--red); }
.fu-today-hdr { color: var(--gold); }
.fu-upcoming-hdr { color: var(--blue); }
.fu-overdue-hdr em, .fu-today-hdr em, .fu-upcoming-hdr em {
  font-style: normal; font-size: .72rem; font-weight: 700;
  background: rgba(255,255,255,0.08); border-radius: 10px;
  padding: 2px 8px; margin-left: 6px;
}
.fu-done-btn {
  font-size: .68rem; background: rgba(46,204,113,.12); color: var(--green);
  border: none; border-radius: 5px; padding: 2px 7px; cursor: pointer;
  margin-top: 3px; transition: background .2s;
}
.fu-done-btn:hover { background: rgba(46,204,113,.25); }

/* ===== KANBAN ===== */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kk-col {
  min-width: 210px; flex-shrink: 0;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--rad); overflow: hidden;
}
.kk-hdr {
  padding: 12px 14px; border-bottom: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-between;
}
.kk-hdr h4 { font-size: .83rem; font-weight: 600; }
.kk-cnt { font-size: .7rem; background: rgba(255,255,255,0.08); border-radius: 10px; padding: 2px 7px; color: var(--muted); }
.kk-cards { padding: 10px; min-height: 180px; display: flex; flex-direction: column; gap: 8px; }
.kk-card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 10px; padding: 11px 12px; cursor: pointer;
  transition: all .2s;
}
.kk-card:hover { border-color: var(--border); transform: translateY(-1px); box-shadow: var(--shad2); }
.kk-card h5 { font-size: .83rem; margin-bottom: 3px; }
.kk-card p { font-size: .73rem; color: var(--muted); }
.kk-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.kk-bud { font-size: .71rem; color: var(--gold); font-weight: 600; }
.kk-src { font-size: .69rem; color: var(--muted2); }

/* ===== PROJECTS ===== */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.pj-card { background: var(--card); border: 1px solid var(--border2); border-radius: var(--rad); overflow: hidden; transition: all .2s; }
.pj-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shad); }
.pj-head { background: linear-gradient(135deg, var(--bg3), rgba(201,162,39,.08)); padding: 18px 20px; border-bottom: 1px solid var(--border2); }
.pj-head h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }
.pj-head p { font-size: .78rem; color: var(--gold); margin-top: 3px; }
.pj-body { padding: 16px 20px; }
.pj-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pj-stat { background: var(--bg3); border-radius: 9px; padding: 9px 11px; }
.pj-stat span { font-size: .67rem; color: var(--muted); display: block; }
.pj-stat strong { font-size: 1rem; font-weight: 600; }
.prog-wrap { margin-bottom: 6px; }
.prog-bar { height: 5px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold2)); animation: growBar 1s ease; }
@keyframes growBar { from { width: 0 !important; } }
.prog-lbl { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.pj-footer { display: flex; gap: 8px; margin-top: 14px; }

/* ===== CLIENT CARDS ===== */
.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 16px; }
.cl-card { background: var(--card); border: 1px solid var(--border2); border-radius: var(--rad); padding: 18px; transition: all .2s; }
.cl-card:hover { border-color: var(--border); transform: translateY(-2px); }
.cl-ava { width: 48px; height: 48px; border-radius: 13px; background: linear-gradient(135deg, var(--gold), var(--gold-dk)); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; color: #000; margin-bottom: 12px; }
.cl-card h4 { font-size: .92rem; margin-bottom: 5px; }
.cl-card p { font-size: .78rem; color: var(--muted); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.cl-card p i { color: var(--gold); font-size: .75rem; width: 12px; }
.cl-acts { display: flex; gap: 8px; margin-top: 14px; }

/* ===== MARKETING ===== */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mkt-card {
  background: var(--card); border: 1px solid var(--border2); border-radius: var(--rad);
  padding: 20px; cursor: pointer; transition: all .2s; text-align: center; position: relative; overflow: hidden;
}
.mkt-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shad2); }
.mkt-ico { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 12px; }
.mkt-card h3 { font-size: .9rem; margin-bottom: 5px; }
.mkt-card p { font-size: .78rem; color: var(--muted); }
.mkt-tag { position: absolute; top: 12px; right: 12px; font-size: .63rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: rgba(201,162,39,.15); color: var(--gold); letter-spacing: .05em; }
.mkt-tag.ai { background: rgba(26,188,156,.15); color: var(--teal); }
.wa-info { background: rgba(37,211,102,.08); border: 1px solid rgba(37,211,102,.2); border-radius: 9px; padding: 9px 13px; font-size: .82rem; color: var(--green); display: flex; align-items: center; gap: 7px; }

/* Score board */
.sc-badge { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .77rem; }
.sc-hot { background: rgba(231,76,60,.15); color: var(--red); border: 2px solid var(--red); }
.sc-warm { background: rgba(243,156,18,.15); color: var(--orange); border: 2px solid var(--orange); }
.sc-cold { background: rgba(79,142,247,.15); color: var(--blue); border: 2px solid var(--blue); }
.pri-hot { background: rgba(231,76,60,.1); color: var(--red); border-radius: 20px; padding: 3px 9px; font-size: .69rem; font-weight: 700; }
.pri-warm { background: rgba(243,156,18,.1); color: var(--orange); border-radius: 20px; padding: 3px 9px; font-size: .69rem; font-weight: 700; }
.pri-cold { background: rgba(79,142,247,.1); color: var(--blue); border-radius: 20px; padding: 3px 9px; font-size: .69rem; font-weight: 700; }

/* ===== REPORTS ===== */
.rpt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.team-perf-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tpr-name { font-size: .83rem; width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpr-bar { flex: 1; height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.tpr-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--teal)); animation: growBar .8s ease; }
.tpr-num { font-size: .78rem; color: var(--gold); font-weight: 600; width: 25px; text-align: right; }

/* ===== PROJECT PROGRESS (DASHBOARD) ===== */
.pp-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border2); }
.pp-row:last-child { border-bottom: none; margin-bottom: 0; }
.pp-name { font-size: .85rem; font-weight: 500; min-width: 160px; }
.pp-bar { flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.pp-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold2)); animation: growBar .8s ease; }
.pp-meta { font-size: .78rem; color: var(--muted); min-width: 120px; text-align: right; }

/* ===== SETTINGS ===== */
.settings-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.scard-h { font-size: .98rem; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.scard-h i { color: var(--gold); }
.fg { margin-bottom: 14px; }
.fg label { display: block; font-size: .74rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== USERS PAGE ===== */
.perm-checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.perm-checks label { display: flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); cursor: pointer; }
.perm-checks input[type=checkbox] { accent-color: var(--gold); }

/* ===== PAGINATION ===== */
.pag-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border2); }
.pag-info { font-size: .76rem; color: var(--muted); }
.pag-btns { display: flex; gap: 6px; }
.pb {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid var(--border2); background: rgba(255,255,255,0.03);
  color: var(--muted); cursor: pointer; font-size: .78rem;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
  font-family: inherit;
}
.pb.act { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }
.pb:hover:not(.act) { border-color: var(--border); color: var(--text); }

/* ===== QUOTATION SUMMARY ===== */
.quot-summary {
  background: rgba(201,162,39,.06); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 14px;
}
.qs-row { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 5px; }
.qs-row.total { font-size: .95rem; font-weight: 700; color: var(--gold); border-top: 1px solid var(--border); padding-top: 9px; margin-top: 5px; }

/* ===== MODAL ===== */
.mo {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.mo.open { display: flex; }
.mb {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 18px; width: 100%; max-width: 570px;
  max-height: 92vh; overflow-y: auto;
  animation: mSlide .3s cubic-bezier(.34,1.56,.64,1);
}
.mb.wide { max-width: 760px; }
@keyframes mSlide { from { opacity:0; transform:translateY(24px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
.mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.mh h3 { font-size: 1rem; font-weight: 600; }
.mclose { background: rgba(255,255,255,0.05); border: 1px solid var(--border2); color: var(--muted); width: 30px; height: 30px; border-radius: 7px; cursor: pointer; font-size: .95rem; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.mclose:hover { color: var(--red); border-color: rgba(231,76,60,.3); }
.mc { padding: 20px 22px; }
.mf { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 9px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 18px;
  display: flex; align-items: center; gap: 9px;
  font-size: .85rem; font-weight: 500;
  opacity: 0; transform: translateY(16px);
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none; max-width: 320px;
  box-shadow: var(--shad);
}
.toast.on { opacity: 1; transform: translateY(0); }
.toast.ok { border-color: rgba(46,204,113,.3); color: var(--green); }
.toast.err { border-color: rgba(231,76,60,.3); color: var(--red); }
.toast.info { border-color: var(--border); color: var(--gold); }

/* ===== ACCESS DENIED ===== */
.access-denied {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.8); backdrop-filter: blur(10px);
  z-index: 300; align-items: center; justify-content: center;
}
.access-denied.show { display: flex; }
.ad-box { background: var(--card2); border: 1px solid var(--border); border-radius: 20px; padding: 40px; text-align: center; max-width: 360px; }
.ad-box i { font-size: 3rem; color: var(--red); margin-bottom: 16px; }
.ad-box h3 { font-size: 1.2rem; margin-bottom: 8px; }
.ad-box p { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }

/* Lead detail */
.ld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.ld-item { background: var(--bg3); border-radius: 9px; padding: 10px 13px; }
.ld-item label { font-size: .69rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 3px; }
.ld-item strong { font-size: .88rem; }
.ld-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.timeline { margin-top: 18px; }
.tl-item { display: flex; gap: 10px; margin-bottom: 12px; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 5px; }
.tl-c strong { font-size: .82rem; display: block; }
.tl-c small { font-size: .72rem; color: var(--muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .span3 { grid-column: span 2; }
  .rpt-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mob-open { transform: translateX(0); }
  .shell { margin-left: 0 !important; }
  .content { padding: 16px; }
  .fu-columns { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: span 1; }
  .rpt-grid { grid-template-columns: 1fr; }
  .tb-search input { width: 140px; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
}
