/* =============================
   ROOT VARIABLES & RESET
   ============================= */
:root {
  --primary: #f57418;
  --primary-dark: #d4610f;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --secondary: #12181f;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

/* =============================
   NAVIGATION
   ============================= */
.navbar {
  background: var(--secondary);
  border-bottom: 1px solid #1e2830;
  padding: 0 2rem;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-brand img {
  height: 56px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  text-decoration: none;
  color: #94a3b8;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(245, 116, 24, 0.15);
  color: var(--primary);
}

/* =============================
   LAYOUT
   ============================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* =============================
   STATS ROW
   ============================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* =============================
   DASHBOARD GRID
   ============================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* =============================
   CARDS
   ============================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.card-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* =============================
   LIST ITEMS
   ============================= */
.list-container {
  padding: 0.5rem 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
  cursor: pointer;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: #f8fafc;
}

.list-item-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.list-item-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* =============================
   BADGES / STATUS
   ============================= */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-lead       { background: #fef9c3; color: #854d0e; }
.badge-active     { background: #dcfce7; color: #166534; }
.badge-inactive   { background: #f1f5f9; color: #475569; }
.badge-proposal   { background: #fef9c3; color: #854d0e; }
.badge-on_hold    { background: #fee2e2; color: #991b1b; }
.badge-complete   { background: #f1f5f9; color: #475569; }

/* =============================
   BUTTONS
   ============================= */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-small {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  background: #fff3eb;
  color: var(--primary);
}

.btn-small:hover {
  background: #ffe4cc;
}

/* =============================
   UTILITY
   ============================= */
.loading {
  padding: 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.empty-state {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.btn-signout {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-signout:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}