:root {
  --navy: #14213d;
  --navy-light: #1f2f52;
  --gold: #c9972a;
  --gold-light: #e8b94f;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1b1f2a;
  --muted: #667085;
  --border: #e3e6ef;
  --ok: #1a7f5a;
  --warn: #b3401d;
  --radius: 10px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a { color: var(--navy); }

.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.topbar .brand { font-weight: 700; letter-spacing: 0.3px; font-size: 1.05rem; }
.topbar .brand .dot { color: var(--gold-light); }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: 0.9rem; }
.topbar button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.topbar button:hover { background: rgba(255,255,255,0.12); }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--navy-light);
  padding: 0 20px;
  overflow-x: auto;
}
.tabs button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tabs button.active {
  color: #fff;
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card h2 { margin-top: 0; font-size: 1.1rem; }
.card h3 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat .num { font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.stat .label { color: var(--muted); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; }
tr:hover td { background: #fafbff; }

input, select, textarea, button.btn {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}
textarea { width: 100%; resize: vertical; }
label { font-size: 0.85rem; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }

button.btn {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  cursor: pointer;
  font-weight: 600;
}
button.btn:hover { background: var(--navy-light); }
button.btn:disabled { background: #b8bccb; border-color: #b8bccb; cursor: not-allowed; }
button.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
button.btn.gold:hover { background: var(--gold-light); }
button.btn.ghost { background: transparent; color: var(--navy); }
button.btn.danger { background: var(--warn); border-color: var(--warn); }
button.btn.small { padding: 5px 10px; font-size: 0.82rem; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
}
.pill.ok { background: #e2f3ec; color: var(--ok); }
.pill.warn { background: #fdeee7; color: var(--warn); }
.pill.muted { background: #eef0f5; color: var(--muted); }

.msg { padding: 10px 14px; border-radius: 7px; margin-bottom: 14px; font-size: 0.9rem; }
.msg.error { background: #fdeee7; color: var(--warn); }
.msg.success { background: #e2f3ec; color: var(--ok); }

.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 60%, #2a3f6e 100%);
}
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px 36px;
  width: 340px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.login-card h1 { font-size: 1.3rem; margin: 0 0 4px; color: var(--navy); }
.login-card p.sub { color: var(--muted); margin: 0 0 22px; font-size: 0.88rem; }
.login-card input { width: 100%; margin-bottom: 14px; }
.login-card button.btn { width: 100%; padding: 11px; }

.card-visual {
  background: linear-gradient(135deg, var(--navy), #2a3f6e);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  position: relative;
  overflow: hidden;
}
.card-visual::after {
  content: "";
  position: absolute; right: -30px; top: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(201,151,42,0.25);
}
.card-visual .photo {
  width: 72px; height: 72px; border-radius: 10px;
  background: rgba(255,255,255,0.15);
  object-fit: cover;
}
.geo-status { font-size: 0.85rem; margin-top: 8px; color: var(--muted); }
