/* PredictiveLeads - style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
}

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

/* Sidebar */
.sidebar {
  width: 240px; background: var(--sidebar); color: #cbd5e1;
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: transform .3s;
}
.sidebar-brand { padding: 1.25rem 1.5rem; font-size: 1.25rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid #1e293b; }
.sidebar-brand i { color: var(--orange); font-size: 1.5rem; }
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem;
  color: #94a3b8; text-decoration: none; font-weight: 500; transition: all .15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: var(--sidebar-hover); }
.sidebar-nav a.active { border-right: 3px solid var(--orange); }
.sidebar-nav a i { width: 20px; text-align: center; }

/* Main */
.main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* Top bar */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 50;
}
.topbar .search-box {
  flex: 1; max-width: 480px; position: relative;
}
.topbar .search-box input {
  width: 100%; padding: .6rem 1rem .6rem 2.5rem; border: 1px solid var(--border);
  border-radius: .5rem; font-size: .9rem; background: var(--bg); outline: none;
}
.topbar .search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.topbar .search-box i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.topbar .topbar-right .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.hamburger { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text); }

/* Content */
.content { padding: 1.5rem; flex: 1; }

/* Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--card); border-radius: .75rem; padding: 1.25rem;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 1rem;
}
.stat-card .icon-box {
  width: 48px; height: 48px; border-radius: .5rem; display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.stat-card .icon-box.blue { background: rgba(37,99,235,.1); color: var(--blue); }
.stat-card .icon-box.orange { background: rgba(249,115,22,.1); color: var(--orange); }
.stat-card .icon-box.green { background: rgba(34,197,94,.1); color: var(--green); }
.stat-card .icon-box.red { background: rgba(239,68,68,.1); color: var(--red); }
.stat-card h3 { font-size: 1.5rem; font-weight: 700; }
.stat-card p { color: var(--text-muted); font-size: .8rem; }

/* Filters */
.filters-bar {
  background: var(--card); border: 1px solid var(--border); border-radius: .75rem;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
}
.filter-group { display: flex; align-items: center; gap: .35rem; font-size: .85rem; }
.filter-group input[type="checkbox"] { accent-color: var(--blue); }
.filter-group label { cursor: pointer; white-space: nowrap; }

/* Table */
.table-card { background: var(--card); border: 1px solid var(--border); border-radius: .75rem; overflow: hidden; }
.table-card .table-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.table-card .table-header h2 { font-size: 1.1rem; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
thead th { background: #f8fafc; padding: .75rem 1rem; text-align: left; font-weight: 600; font-size: .8rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
tbody tr:hover { background: #f8fafc; }
.table-responsive { overflow-x: auto; }

/* Badges */
.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.badge-high { background: rgba(239,68,68,.1); color: var(--red); }
.badge-medium { background: rgba(234,179,8,.1); color: #a16207; }
.badge-low { background: rgba(34,197,94,.1); color: #15803d; }

/* Signals pills */
.signal-pills { display: flex; flex-wrap: wrap; gap: .25rem; }
.signal-pill { background: var(--bg); padding: .15rem .5rem; border-radius: .25rem; font-size: .7rem; color: var(--text-muted); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem;
  border-radius: .5rem; font-size: .85rem; font-weight: 600; border: none;
  cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: .35rem .75rem; font-size: .78rem; }

/* Property detail */
.property-hero {
  height: 280px; border-radius: .75rem; overflow: hidden; position: relative;
  background-size: cover; background-position: center; margin-bottom: 1.5rem;
}
.property-hero .overlay {
  position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.7));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; color: #fff;
}
.property-hero .overlay h1 { font-size: 1.75rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.detail-section { background: var(--card); border: 1px solid var(--border); border-radius: .75rem; padding: 1.25rem; margin-bottom: 1rem; }
.detail-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.detail-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .9rem; }
.detail-row .label { color: var(--text-muted); }

/* Campaigns */
.campaign-card {
  background: var(--card); border: 1px solid var(--border); border-radius: .75rem;
  padding: 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 1.25rem;
}
.campaign-card .campaign-icon {
  width: 52px; height: 52px; border-radius: .5rem; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.campaign-card .campaign-info { flex: 1; }
.campaign-card .campaign-info h3 { font-size: 1rem; font-weight: 600; }
.campaign-card .campaign-info p { color: var(--text-muted); font-size: .85rem; }
.campaign-stats { display: flex; gap: 1.5rem; }
.campaign-stat { text-align: center; }
.campaign-stat .num { font-size: 1.25rem; font-weight: 700; }
.campaign-stat .lbl { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; }
.status-active { color: var(--green); }
.status-paused { color: var(--yellow); }
.status-draft { color: var(--text-muted); }

/* Mobile */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .campaign-card { flex-direction: column; text-align: center; }
  .campaign-stats { justify-content: center; }
}
