:root { --navy: #22425c; --teal: #0f8b8d; --bg: #e9e9e9; }
body { background: var(--bg); color: #333; font-size: 14px; }
.card { border: 0; border-radius: 4px; box-shadow: rgba(0,0,0,.16) 0 2px 2px 0, rgba(0,0,0,.08) 0 0 0 1px; padding: 16px; margin-bottom: 16px; }
.table thead th { background: rgba(20,54,82,.94); color: #fff; font-weight: 700; font-size: 14px; border-color: rgba(255,255,255,.15); }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: #17344a; --bs-btn-hover-border-color: #17344a; --bs-btn-active-bg: #17344a; }
.btn-outline-primary { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); }
a { color: var(--teal); }

/* admin layout */
body.mgr { display: flex; min-height: 100vh; }
.mgr-side { width: 220px; flex: 0 0 220px; background: #13293b; color: #fff; padding: 12px 0; }
.mgr-brand { font-weight: 700; padding: 8px 18px 16px; font-size: 16px; }
.mgr-side nav a { display: block; color: #cfd9e2; text-decoration: none; padding: 10px 18px; }
.mgr-side nav a i { width: 22px; }
.mgr-side nav a:hover, .mgr-side nav a.active { background: #1d3d56; color: #fff; }
.mgr-main { flex: 1; min-width: 0; padding: 18px 22px; }
.mgr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mgr-top h1 { font-size: 22px; margin: 0; color: var(--navy); }
@media (max-width: 800px) { body.mgr { flex-direction: column; } .mgr-side { width: 100%; flex: none; } .mgr-side nav { display: flex; flex-wrap: wrap; } }

.stat { border-radius: 4px; color: #fff; padding: 14px 16px; box-shadow: rgba(0,0,0,.16) 0 2px 2px; }
.stat .v { font-size: 24px; font-weight: 700; } .stat .hint { font-size: 12px; opacity: .85; }
.stat-blue { background: #22425c; } .stat-teal { background: #0f8b8d; } .stat-violet { background: #7b4ba8; } .stat-slate { background: #546e7a; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.key-box { font-family: Consolas, monospace; font-size: 12px; background: #f4f6f8; padding: 4px 8px; border-radius: 3px; word-break: break-all; }

/* portal + login */
.auth-card { max-width: 400px; margin: 9vh auto; background: #fff; border-radius: 6px; padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.portal-top { background: var(--navy); color: #fff; padding: 10px 0; }
.portal-top a { color: #fff; }

/* sign-in pages (v2) */
body.auth-page { margin: 0; background: #f4f6f9; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.auth-split { display: flex; min-height: 100vh; }
.auth-brand { position: relative; flex: 1 1 54%; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 56px; color: #fff; overflow: hidden;
  background: linear-gradient(140deg, #0f2335 0%, #1b3a55 50%, #0f8b8d 140%); }
.auth-portal .auth-brand { background: linear-gradient(140deg, #08494c 0%, #0f7f82 55%, #27b8a6 140%); }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.auth-brand::before { width: 520px; height: 520px; right: -180px; top: -160px; }
.auth-brand::after { width: 380px; height: 380px; left: -140px; bottom: -150px; background: rgba(255,255,255,.05); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.auth-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.16); font-size: 19px; }
.auth-pitch h2 { font-size: 34px; line-height: 1.2; font-weight: 700; max-width: 460px; margin: 0 0 26px; }
.auth-points { list-style: none; margin: 0; padding: 0; max-width: 460px; }
.auth-points li { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.auth-points li > i { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.14); font-size: 16px; }
.auth-points b { display: block; font-size: 15px; }
.auth-points span { display: block; font-size: 13px; opacity: .8; }
.auth-foot { font-size: 12px; opacity: .65; }
.auth-main { flex: 1 1 46%; display: flex; align-items: center; justify-content: center; padding: 32px 22px; }
.auth-form-card { width: 100%; max-width: 390px; }
.auth-form-card h1 { font-size: 28px; font-weight: 700; color: #16283a; margin: 0 0 6px; }
.auth-sub { color: #66788a; margin: 0 0 26px; font-size: 14.5px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; color: #3a4b5c; margin-bottom: 6px; }
.auth-input { position: relative; }
.auth-input > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a99a8; font-size: 14px; }
.auth-input input { width: 100%; height: 46px; padding: 0 44px 0 40px; border: 1px solid #cfd8e1; border-radius: 10px; background: #fff; font-size: 15px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.auth-input input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,139,141,.18); }
.auth-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a99a8; width: 36px; height: 36px; cursor: pointer; }
.auth-eye:hover { color: #3a4b5c; }
.auth-caps { display: none; margin-top: 5px; font-size: 12px; color: #b26a00; }
.auth-btn { width: 100%; height: 48px; border: 0; border-radius: 10px; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; background: #1b3a55; transition: background .15s, transform .05s; }
.auth-portal .auth-btn { background: #0f8b8d; }
.auth-btn:hover { background: #142c42; } .auth-portal .auth-btn:hover { background: #0b7173; }
.auth-btn:active { transform: translateY(1px); }
.auth-alert { background: #fdecea; color: #a12a1f; border: 1px solid #f6c6c1; border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.auth-help { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e2e8ee; font-size: 13px; color: #66788a; display: flex; flex-direction: column; gap: 8px; }
.auth-help a { font-weight: 600; text-decoration: none; }
@media (max-width: 900px) {
  .auth-split { flex-direction: column; }
  .auth-brand { flex: none; padding: 22px 24px; }
  .auth-pitch, .auth-foot { display: none; }
  .auth-main { align-items: flex-start; padding-top: 28px; }
  .auth-form-card h1 { font-size: 24px; }
}