:root {
  --aex-brand: #1f3f93;
  --aex-brand-600: #18337a;
  --aex-brand-700: #102761;
  --aex-accent: #7ac943;
  --aex-accent-600: #63b02f;
  --aex-ink: #111827;
  --aex-muted: #64748b;
  --aex-soft: #f4f7fb;
  --aex-panel: rgba(255, 255, 255, .88);
  --aex-border: rgba(148, 163, 184, .28);
  --aex-shadow: 0 18px 50px rgba(31, 63, 147, .12);
  --aex-shadow-sm: 0 10px 28px rgba(15, 23, 42, .08);
  --aex-ring: 0 0 0 .22rem rgba(31, 63, 147, .14);
}

* {
  letter-spacing: 0;
}

body {
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(122, 201, 67, .16), transparent 58%),
    radial-gradient(900px 560px at 100% 0%, rgba(31, 63, 147, .15), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--aex-soft) 50%, #eef3fb 100%);
  color: var(--aex-ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--aex-brand);
}

a:hover {
  color: var(--aex-brand-600);
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  background: rgba(255, 255, 255, .78);
  border-right: 1px solid var(--aex-border);
  box-shadow: 10px 0 40px rgba(15, 23, 42, .05);
  min-height: 100vh;
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
}

.admin-brand {
  align-items: center;
  color: var(--aex-brand);
  display: flex;
  font-weight: 900;
  gap: .65rem;
  letter-spacing: 0;
}

.admin-brand-mark {
  align-items: center;
  background: #fff;
  border: 1px solid var(--aex-border);
  border-radius: 8px;
  box-shadow: var(--aex-shadow-sm);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.admin-brand-mark img {
  display: block;
  max-height: 28px;
  max-width: 28px;
}

.admin-brand small {
  color: var(--aex-muted);
  display: block;
  font-size: .74rem;
  font-weight: 700;
  margin-top: .1rem;
}

.admin-nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  display: flex;
  font-weight: 800;
  gap: .6rem;
  min-height: 42px;
  padding: .7rem .85rem;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.admin-nav a::before {
  background: rgba(31, 63, 147, .16);
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: #edf4ff;
  border-color: rgba(31, 63, 147, .14);
  color: var(--aex-brand);
  transform: translateX(2px);
}

.admin-user {
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--aex-border);
  border-radius: 8px;
  padding: .85rem;
}

.page-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-kicker {
  align-items: center;
  color: var(--aex-brand);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  gap: .45rem;
  text-transform: uppercase;
}

.page-kicker::before {
  background: var(--aex-accent);
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(122, 201, 67, .14);
  content: "";
  height: 8px;
  width: 8px;
}

.metric {
  background: var(--aex-panel);
  border: 1px solid var(--aex-border);
  border-radius: 8px;
  box-shadow: var(--aex-shadow-sm);
  min-height: 112px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.metric::after {
  background: linear-gradient(180deg, rgba(122, 201, 67, .45), rgba(31, 63, 147, .2));
  border-radius: 999px;
  content: "";
  height: 54px;
  position: absolute;
  right: -20px;
  top: -18px;
  width: 54px;
}

.metric:hover {
  border-color: rgba(31, 63, 147, .26);
  box-shadow: var(--aex-shadow);
  transform: translateY(-2px);
}

.metric-value {
  color: var(--aex-brand);
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

.metric-label {
  color: var(--aex-muted);
  font-size: .82rem;
  font-weight: 800;
  margin-top: .4rem;
}

.panel {
  background: var(--aex-panel);
  border: 1px solid var(--aex-border);
  border-radius: 8px;
  box-shadow: var(--aex-shadow-sm);
  backdrop-filter: blur(18px);
}

.panel-title {
  color: var(--aex-brand-700);
  font-weight: 900;
}

.form-control,
.form-select {
  border-color: rgba(148, 163, 184, .45);
  border-radius: 8px;
  min-height: 42px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--aex-brand);
  box-shadow: var(--aex-ring);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(31, 63, 147, .045);
}

.table thead th {
  background: rgba(237, 244, 255, .82);
  color: #475569;
  font-size: .74rem;
  padding-bottom: .85rem;
  padding-top: .85rem;
  text-transform: uppercase;
}

.table tbody tr {
  transition: background-color .16s ease, transform .16s ease;
}

.table tbody tr:hover {
  transform: translateX(2px);
}

.lead-message {
  white-space: pre-wrap;
}

.status-badge {
  border-radius: 999px;
  font-weight: 900;
  padding: .48rem .7rem;
}

.status-new {
  background: rgba(31, 63, 147, .12);
  color: var(--aex-brand);
}

.status-contacted {
  background: rgba(14, 165, 233, .14);
  color: #0369a1;
}

.status-qualified {
  background: rgba(122, 201, 67, .18);
  color: #3f7f22;
}

.status-discarded {
  background: rgba(100, 116, 139, .16);
  color: #475569;
}

.login-page {
  min-height: 100vh;
}

.login-card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--aex-border);
  border-radius: 8px;
  box-shadow: var(--aex-shadow);
  max-width: 430px;
  width: 100%;
  backdrop-filter: blur(18px);
}

.btn-aex {
  --bs-btn-bg: var(--aex-brand);
  --bs-btn-border-color: var(--aex-brand);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--aex-brand-600);
  --bs-btn-hover-border-color: var(--aex-brand-600);
  --bs-btn-active-bg: var(--aex-brand-700);
  --bs-btn-active-border-color: var(--aex-brand-700);
  --bs-btn-disabled-bg: #94a3b8;
  --bs-btn-disabled-border-color: #94a3b8;
  border-radius: 8px;
  font-weight: 900;
  min-height: 42px;
}

.btn-outline-primary {
  --bs-btn-color: var(--aex-brand);
  --bs-btn-border-color: rgba(31, 63, 147, .35);
  --bs-btn-hover-bg: var(--aex-brand);
  --bs-btn-hover-border-color: var(--aex-brand);
  border-radius: 8px;
  font-weight: 800;
}

.btn-outline-secondary {
  border-radius: 8px;
  font-weight: 800;
}

.fade-up {
  animation: fadeUp .46s cubic-bezier(.22, 1, .36, 1) both;
}

.fade-up-2 {
  animation-delay: .06s;
}

.fade-up-3 {
  animation-delay: .12s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    min-height: auto;
    position: static;
  }
}
