:root {
  --s: #0a1633;
  --s2: #143056;
  --o: #0a1633;
  --og: linear-gradient(135deg, #1c3d6e, #0a1633);
  --bg: #f3f5f9;
  --line: #e6ebf3;
  --muted: #667085;
  --text: #0a1633;
  --shadow: 0 10px 30px rgba(10, 22, 51, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(20, 48, 86, .10), transparent 50%),
    var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.side {
  background: linear-gradient(180deg, #050b1c 0%, #0a1633 100%);
  color: #9aa7bd;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid rgba(255,255,255,.04);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; margin-bottom: 26px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--og); color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 8px 18px rgba(10, 22, 51, .35);
}
.brand-logo {
  width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto;
}
.brand strong { display: block; font-size: 16px; letter-spacing: -.3px; }
.brand small { display: block; color: #8b97ab; font-size: 11px; font-weight: 500; }
.nav-label {
  margin: 16px 10px 6px; font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: #6b778c; font-weight: 700;
}
.side nav a {
  display: block; padding: 8px 12px; border-radius: 10px; margin-bottom: 2px;
  font-size: 13px; font-weight: 500; color: #b7c2d3;
}
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.active {
  background: rgba(255,255,255,.12); color: #fff;
  box-shadow: inset 3px 0 0 #c9d7f2;
}
.side form { margin-top: auto; padding-top: 16px; }
.side button {
  width: 100%; background: rgba(255,255,255,.06); color: #dbe4f0; border: 0;
  padding: 10px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600;
}

.main { padding: 26px 34px 56px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; }
.eyebrow { margin: 0 0 4px; color: var(--o); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.top h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px 6px 6px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--og); color: #fff; font-size: 13px;
}

.flash { background: #ecfdf3; color: #166534; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; border: 1px solid #bbf7d0; }
.flash.err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.card {
  background: #fff; border-radius: 18px; padding: 18px 18px 16px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card.accent { background: linear-gradient(160deg, #fff 0%, #eef2f8 100%); border-color: #d5deec; }
.card b { display: block; font-size: 30px; margin: 6px 0 4px; letter-spacing: -.6px; }
.card span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.card em { color: #98a2b3; font-size: 12px; font-style: normal; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h3 { margin: 0; font-size: 16px; }
.panel .table { border: 0; border-radius: 0; box-shadow: none; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; background: #f8fafc; font-size: 12px; }
.table tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); text-align: center; padding: 28px 14px !important; }

.pill {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  background: #f2f4f7; color: #344054; font-size: 11px; font-weight: 700; text-transform: capitalize;
}
.pill.new { background: #e8eef6; color: #0a1633; }
.pill.contacted { background: #eff6ff; color: #1d4ed8; }
.pill.closed { background: #ecfdf3; color: #15803d; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto !important; min-width: 72px; height: 34px; padding: 0 14px;
  border: 0; border-radius: 9px; background: var(--og); color: #fff;
  cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap; flex: 0 0 auto; line-height: 1;
  box-shadow: 0 6px 14px rgba(10, 22, 51, .22);
}
a.btn { height: 34px; }
.btn.gray { background: #1f2a3d; box-shadow: none; }
.btn.red { background: #ef4444; box-shadow: none; }
.btn.ghost { background: #fff; color: #344054; border: 1px solid var(--line); box-shadow: none; }
.btn:hover { transform: translateY(-1px); }
.grid > .btn, .form .btn, .row-form .btn { justify-self: start; }

.form, .item {
  background: #fff; padding: 20px; border-radius: 18px;
  border: 1px solid var(--line); margin-bottom: 16px; box-shadow: var(--shadow);
}
.form h3 { margin: 22px 0 10px; font-size: 15px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: #344054; }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d7deea; border-radius: 10px;
  font-size: 13px; background: #fbfdff; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #1c3d6e; box-shadow: 0 0 0 4px rgba(10, 22, 51, .12); background: #fff;
}
input[type="checkbox"], input[type="file"] { width: auto; }
input[type="file"] { padding: 6px 0; background: transparent; border: 0; box-shadow: none; }

.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.row-form input, .row-form select { width: auto; min-width: 160px; flex: 1; }

.actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.checks, .chip-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.checks > label, .chip-list label, .check {
  display: inline-flex !important; align-items: center; gap: 7px; width: auto !important; margin: 0;
  font-size: 13px; font-weight: 600; color: #0a1633; background: #e8eef6;
  border: 1px solid #d5deec; border-radius: 999px; padding: 6px 12px;
}
.checks input, .chip-list input, .check input { width: auto; margin: 0; }

.repeater { border: 1px dashed #d9e2ef; padding: 12px; border-radius: 12px; margin-bottom: 8px; background: #fbfcfe; }
.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 8px; }
.thumb.lg { width: 84px; height: 60px; }
.media-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #050b1c, #0a1633 55%, #143056); grid-template-columns: 1fr; }
.login-card { width: min(400px, 92%); background: #fff; padding: 28px; border-radius: 16px; }
.login-logo {
  width: 150px; height: auto; display: block; margin: 0 auto 14px;
  border-radius: 12px; background: #000;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.pagination li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination li a,
.pagination li span,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.pagination li a:hover,
.pagination .page-link:hover {
  border-color: var(--s);
  color: var(--s);
}
.pagination li.active span,
.pagination li.active .page-link,
.pagination .active span,
.pagination .active .page-link {
  background: var(--s);
  color: #fff;
  border-color: var(--s);
}
.pagination li.disabled span,
.pagination .disabled .page-link,
.pagination .disabled span {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .side { display: none; }
  .cards, .grid { grid-template-columns: 1fr; }
}
