:root{
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --ink: #14162B;
  --ink-soft: #565A78;
  --muted: #8A8DA6;
  --line: #E7E8F1;
  --brass: #C08A2E;
  --brass-light: #E7C784;
  --hot: #E1553F;
  --warm: #E0A339;
  --cold: #4C7EF3;
  --good: #2E9E6E;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{
  font-family:'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 90px;
}
a{ text-decoration:none; color:inherit; }
.font-display{ font-family:'Space Grotesk', sans-serif; }
.font-mono{ font-family:'IBM Plex Mono', monospace; }

/* ---------- Header ---------- */
.app-header{
  background: linear-gradient(160deg, #191C3A 0%, #0F1128 100%);
  padding: 20px 18px 26px 18px;
  color:#fff;
  position:relative;
  overflow:hidden;
}
.app-header::before{
  content:"";
  position:absolute; top:-60px; right:-60px;
  width:200px; height:200px; border-radius:50%;
  background: radial-gradient(circle, rgba(192,138,46,0.35), transparent 70%);
}
.app-header .row{ display:flex; justify-content:space-between; align-items:center; position:relative; z-index:2; }
.brand{ display:flex; align-items:center; gap:9px; }
.brand img{ height:28px; }
.brand-mark{
  width:30px; height:30px; border-radius:8px;
  background: linear-gradient(135deg, var(--brass-light), var(--brass));
  display:flex; align-items:center; justify-content:center;
  font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:14px; color:#191C3A;
}
.brand-name{ font-family:'Space Grotesk', sans-serif; font-weight:600; font-size:15px; }
.page-title{ font-family:'Space Grotesk', sans-serif; font-size:20px; font-weight:600; margin-top:16px; position:relative; z-index:2;}

/* ---------- Cards / layout ---------- */
.container{ max-width:480px; margin:0 auto; padding: 0 16px; }
.section{ padding: 20px 0 4px 0; }
.section-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.section-title{ font-family:'Space Grotesk', sans-serif; font-size:15px; font-weight:600; }
.card{
  background: var(--surface); border-radius: var(--radius-md); padding:16px;
  box-shadow: 0 8px 20px -16px rgba(20,22,43,0.25); border: 1px solid var(--line);
}
.admin-badge{
  display:inline-flex; align-items:center; gap:4px; font-size:9.5px; font-weight:700; color: var(--brass);
  background:#FBF1DC; padding:3px 8px; border-radius:20px; text-transform:uppercase; letter-spacing:0.3px;
}

/* ---------- Form elements (mobile-first, big touch targets) ---------- */
.form-group{ margin-bottom:16px; }
.form-label{ display:block; font-size:12.5px; font-weight:600; color: var(--ink-soft); margin-bottom:6px; }
.form-control{
  width:100%; padding:13px 14px; border-radius:12px; border:1.5px solid var(--line);
  background:#FAFAFD; font-size:14px; font-family:'Inter',sans-serif; color: var(--ink);
}
.form-control:focus{ outline:none; border-color: var(--brass); background:#fff; }
textarea.form-control{ resize:vertical; min-height:80px; }
select.form-control{ appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8DA6' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; }
.chip-group{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  padding:9px 14px; border-radius:20px; border:1.5px solid var(--line); font-size:12.5px; font-weight:600;
  color: var(--ink-soft); background:#FAFAFD; cursor:pointer;
}
.chip input{ display:none; }
.chip.q-hot.active{ background:#FCEAE7; border-color:var(--hot); color:var(--hot); }
.chip.q-warm.active{ background:#FBF1DC; border-color:var(--warm); color:var(--warm); }
.chip.q-cold.active{ background:#E9F0FE; border-color:var(--cold); color:var(--cold); }

.upload-box{
  border:1.5px dashed var(--line); border-radius:14px; padding:18px; text-align:center;
  background:#FAFAFD; color: var(--muted); font-size:12.5px; margin-bottom:10px;
}
.upload-box input{ display:none; }
.upload-preview{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.upload-thumb{ width:60px; height:60px; border-radius:10px; object-fit:cover; border:1px solid var(--line); }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  width:100%; padding:14px; border-radius:14px; border:none; font-size:14.5px; font-weight:700;
  font-family:'Inter',sans-serif; cursor:pointer;
}
.btn-primary{ background: linear-gradient(150deg, var(--brass-light), var(--brass)); color:#191C3A; }
.btn-dark{ background: var(--ink); color:#fff; }
.btn-outline{ background:transparent; border:1.5px solid var(--line); color: var(--ink-soft); }
.btn-success{ background: var(--good); color:#fff; }
.btn-sm{ width:auto; padding:9px 16px; font-size:12.5px; border-radius:10px; }

/* ---------- Lead cards ---------- */
.lead-item{ display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.lead-item:last-child{ border-bottom:none; }
.lead-avatar{
  width:42px; height:42px; border-radius:12px; flex-shrink:0;
  background: linear-gradient(135deg, #EDE4CF, #F6EFDE);
  display:flex; align-items:center; justify-content:center;
  font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:14px; color:#8A6A2A;
}
.lead-info{ flex:1; min-width:0; }
.lead-name{ font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lead-meta{ font-size:11.5px; color: var(--muted); margin-top:2px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.badge{ font-size:9.5px; font-weight:700; padding:2px 7px; border-radius:20px; text-transform:uppercase; letter-spacing:0.3px; }
.badge.hot{ background:#FCEAE7; color:var(--hot); }
.badge.warm{ background:#FBF1DC; color:var(--warm); }
.badge.cold{ background:#E9F0FE; color:var(--cold); }
.badge.status{ background:#EFEFF6; color:var(--ink-soft); }
.lead-amt{ font-family:'IBM Plex Mono', monospace; font-size:13px; font-weight:600; text-align:right; flex-shrink:0; }

/* ---------- Search bar ---------- */
.searchbar-wrap{ display:flex; gap:10px; margin-bottom: 6px;}
.searchbar{
  flex:1; background: var(--surface); border-radius: 14px; border:1px solid var(--line);
  padding: 12px 14px; display:flex; align-items:center; gap:9px;
}
.searchbar input{ border:none; outline:none; background:transparent; font-size:13px; width:100%; color: var(--ink); }
.filter-btn{
  width:44px; height:44px; background: var(--ink); border-radius:14px;
  display:flex; align-items:center; justify-content:center; color: var(--brass-light); font-size:15px; flex-shrink:0; border:none;
}

/* ---------- Bottom nav ---------- */
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0; max-width:480px; margin:0 auto;
  height:76px; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-around;
  padding-bottom:8px; z-index:50;
}
.nav-item{ display:flex; flex-direction:column; align-items:center; gap:4px; color: var(--muted); font-size:10px; font-weight:600; }
.nav-item.active{ color: var(--brass); }
.nav-icon{ font-size:18px; }
.fab{
  width:52px; height:52px; border-radius:50%;
  background: linear-gradient(150deg, var(--brass-light), var(--brass));
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:24px;
  margin-top:-30px; box-shadow: 0 10px 22px -6px rgba(192,138,46,0.6); border: 4px solid var(--bg);
}

/* ---------- Alerts ---------- */
.alert{ padding:12px 14px; border-radius:12px; font-size:12.5px; font-weight:600; margin-bottom:14px; }
.alert-error{ background:#FCEAE7; color:var(--hot); }
.alert-success{ background:#E5F7EC; color:var(--good); }

/* ---------- Login ---------- */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.login-card{ width:100%; max-width:380px; background:#fff; border-radius:24px; padding:30px 26px; box-shadow: 0 30px 60px -20px rgba(20,22,43,0.25); }

/* Utility */
.text-muted{ color: var(--muted); }
.mt-8{ margin-top:8px; } .mt-16{ margin-top:16px; } .mt-24{ margin-top:24px; }
.flex-between{ display:flex; justify-content:space-between; align-items:center; }
.attach-icon{ font-size:10.5px; color: var(--muted); }
