:root {
  --a-navy: #0e2f5a; --a-maroon: #8a1c2b; --a-line: #e3e6ea; --a-bg: #f4f6f9;
  --a-ink: #232a33; --a-muted: #6b7480;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Source Sans 3", system-ui, sans-serif; background: var(--a-bg); color: var(--a-ink); }
a { color: var(--a-maroon); text-decoration: none; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: #0b2547; color: #cdd8e8; padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-side .brand img { height: 40px; background:#fff;border-radius:6px;padding:3px }
.admin-side .brand strong { color: #fff; font-size: 1rem; font-family: "Playfair Display", serif; }
.admin-side nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-side nav a { color: #c4d0e2; padding: 11px 14px; border-radius: 8px; font-weight: 600; font-size: .95rem; display:flex; gap:10px; align-items:center; }
.admin-side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side nav a.active { background: var(--a-maroon); color: #fff; }
.admin-side nav .sep { color: #6f83a3; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; padding: 16px 14px 6px; }
.admin-side .foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.1); margin-top: auto; }

.admin-main { padding: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--a-line); padding: 16px 30px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 5; }
.admin-topbar h1 { margin: 0; font-size: 1.4rem; font-family: "Playfair Display", serif; color: var(--a-navy); }
.admin-topbar .who { color: var(--a-muted); font-size: .9rem; }
.admin-content { padding: 30px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 22px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.stat-card .n { font-size: 2.2rem; font-weight: 800; color: var(--a-navy); font-family: "Playfair Display", serif; }
.stat-card .l { color: var(--a-muted); font-size: .9rem; }
.stat-card.hot .n { color: var(--a-maroon); }

.panel { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-bottom: 24px; overflow: hidden; }
.panel-head { padding: 16px 22px; border-bottom: 1px solid var(--a-line); display: flex; justify-content: space-between; align-items: center; }
.panel-head h2 { margin: 0; font-size: 1.15rem; font-family: "Playfair Display", serif; color: var(--a-navy); }
.panel-body { padding: 22px; }

table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { text-align: left; padding: 12px 22px; border-bottom: 1px solid var(--a-line); font-size: .93rem; vertical-align: middle; }
table.grid th { background: #f8fafc; color: var(--a-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid td img.thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge.new { background: #fde8ea; color: #a12626; }
.badge.contacted { background: #fff3d6; color: #8a5a00; }
.badge.closed { background: #e6f4ea; color: #1e6b3a; }
.badge.on { background: #e6f4ea; color: #1e6b3a; }
.badge.off { background: #eee; color: #777; }
.badge.gold { background: #f6e7bf; color: #7a5a12; }

.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--a-maroon); color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font-weight: 600; cursor: pointer; font-size: .92rem; font-family: inherit; }
.btn:hover { background: #a8283a; color: #fff; }
.btn.sm { padding: 6px 12px; font-size: .82rem; }
.btn.ghost { background: #eef1f5; color: var(--a-navy); }
.btn.ghost:hover { background: #e2e7ee; }
.btn.danger { background: #fff; color: #a12626; border: 1px solid #f0c4c4; }
.btn.danger:hover { background: #fdecec; }

label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--a-navy); font-size: .9rem; }
input, select, textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--a-line); border-radius: 8px; font-family: inherit; font-size: .96rem; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--a-navy); box-shadow: 0 0 0 3px rgba(14,47,90,.1); }
textarea { resize: vertical; min-height: 120px; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.hint { color: var(--a-muted); font-size: .82rem; margin-top: 4px; }
.actions { display: flex; gap: 10px; align-items: center; }

.alert { padding: 12px 16px; border-radius: 9px; margin-bottom: 18px; font-weight: 600; }
.alert.ok { background: #e6f4ea; color: #1e6b3a; }
.alert.err { background: #fdecec; color: #a12626; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0e2f5a, #0b2547); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-card .lc-logo { text-align: center; margin-bottom: 20px; }
.login-card .lc-logo img { height: 64px; margin: 0 auto; }
.login-card h1 { text-align: center; font-family: "Playfair Display", serif; color: var(--a-navy); font-size: 1.5rem; margin: 0 0 4px; }
.login-card .sub { text-align: center; color: var(--a-muted); margin-bottom: 24px; font-size: .9rem; }

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
  .field-row { grid-template-columns: 1fr; }
}
