:root {
  --brand-primary: #1B4F9E;
  --brand-accent: #F4A116;
  --sidebar-dark: #0B1E3D;
  --sidebar-mid: #152A52;
  --body-bg: #F7F8FA;
  --text-main: #1A202C;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
  --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --bs-primary: #1B4F9E;
  --bs-primary-rgb: 27,79,158;
}

.btn-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover { background-color: #163f80; border-color: #163f80; }
.btn-outline-primary { color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline-primary:hover { background-color: var(--brand-primary); border-color: var(--brand-primary); color:#fff; }
.text-primary { color: var(--brand-primary) !important; }
.bg-primary { background-color: var(--brand-primary) !important; }
.badge.bg-primary { background-color: var(--brand-primary) !important; }

.btn-accent { background-color: var(--brand-accent); border-color: var(--brand-accent); color: #fff; font-weight: 600; }
.btn-accent:hover { background-color: #d48e10; border-color: #d48e10; color: #fff; }
.text-accent { color: var(--brand-accent) !important; }
.bg-accent { background-color: var(--brand-accent) !important; }
.badge-accent { background-color: var(--brand-accent); color: #fff; }

#sidebar, .sidebar {
  background: linear-gradient(180deg, var(--sidebar-dark) 0%, var(--sidebar-mid) 100%) !important;
}
.sidebar .nav-link { color: rgba(255,255,255,.75); transition: all .2s; border-radius: 8px; margin: 1px 8px; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active {
  color: var(--brand-accent) !important;
  background: rgba(244,161,22,.12) !important;
  border-left: 3px solid var(--brand-accent);
  font-weight: 600;
}
.sidebar .nav-link i { width: 20px; text-align: center; }
.sidebar-brand { padding: 1.2rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-section-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.35); text-transform: uppercase;
  padding: .75rem 1.5rem .25rem;
}

body { background-color: var(--body-bg); color: var(--text-main); }
.card { border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--card-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--border-color); font-weight: 600; border-radius: 12px 12px 0 0 !important; }

.stat-card { border-radius: 12px; padding: 1.25rem 1.5rem; position: relative; overflow: hidden; }
.stat-card.blue  { background: linear-gradient(135deg,#1B4F9E,#2563EB); color:#fff; }
.stat-card.gold  { background: linear-gradient(135deg,#F4A116,#F59E0B); color:#fff; }
.stat-card.green { background: linear-gradient(135deg,#059669,#10B981); color:#fff; }
.stat-card.dark  { background: linear-gradient(135deg,#0B1E3D,#152A52); color:#fff; }
.stat-card .stat-icon { font-size:2.5rem; opacity:.25; position:absolute; right:1rem; top:.75rem; }
.stat-card .stat-value { font-size:2rem; font-weight:700; line-height:1; }
.stat-card .stat-label { font-size:.8rem; opacity:.85; margin-top:.25rem; }

.topbar { background: #fff; border-bottom: 1px solid var(--border-color); box-shadow: 0 1px 3px rgba(0,0,0,.04); }

.table thead th { background: #F8FAFC; color: var(--text-muted); font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; border-bottom: 2px solid var(--border-color); }
.table tbody tr:hover td { background: #F0F4FF; }

.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .2rem rgba(27,79,158,.15);
}

.badge-status-active   { background:#D1FAE5; color:#065F46; }
.badge-status-pending  { background:#FEF3C7; color:#92400E; }
.badge-status-inactive { background:#F3F4F6; color:#6B7280; }
.badge-status-trial    { background:#EDE9FE; color:#5B21B6; }

.property-card { border-radius:12px; overflow:hidden; transition: transform .2s, box-shadow .2s; }
.property-card:hover { transform:translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.property-card .property-type-badge { position:absolute; top:.75rem; left:.75rem; }
.property-card .property-price { font-size:1.3rem; font-weight:700; color:var(--brand-primary); }

.auth-wrapper { min-height:100vh; background: linear-gradient(135deg, var(--sidebar-dark) 0%, var(--brand-primary) 100%); display:flex; align-items:center; justify-content:center; }
.auth-card { background:#fff; border-radius:20px; padding:2.5rem; max-width:440px; width:100%; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo-wrap { text-align:center; margin-bottom:1.5rem; }
.auth-card .form-control { border-radius:8px; padding:.65rem 1rem; }

.page-link { color: var(--brand-primary); }
.page-item.active .page-link { background-color: var(--brand-primary); border-color: var(--brand-primary); }

@media(max-width:768px) {
  .stat-card .stat-value { font-size:1.5rem; }
}
