/* Indigo Place Parking Enforcement — "private banking" theme */
:root {
    --ip-navy: #0b1b3f;
    --ip-navy-2: #12285a;
    --ip-indigo: #3d3fa8;
    --ip-indigo-2: #5153c9;
    --ip-gold: #c8a24a;
    --ip-bg: #f3f5f9;
    --ip-border: #e2e6ef;
    --ip-text: #1d2433;
    --ip-muted: #6b7489;
    --bs-primary: #3d3fa8;
    --bs-primary-rgb: 61, 63, 168;
    --bs-link-color: #3d3fa8;
    --bs-link-color-rgb: 61, 63, 168;
    --bs-link-hover-color: #2a2c86;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body { background: var(--ip-bg); color: var(--ip-text); font-size: .935rem; }
h1, h2, h3, .serif { font-family: "Source Serif 4", Georgia, serif; letter-spacing: -.01em; }
.text-muted, .form-text { color: var(--ip-muted) !important; }
.mono, .plate { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }

/* ---------- Layout ---------- */
.ip-shell { display: flex; min-height: 100vh; }
.ip-sidebar {
    width: 258px; flex-shrink: 0; background: linear-gradient(180deg, var(--ip-navy) 0%, #0e2250 100%);
    color: #c9d2e6; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
}
.ip-brand { padding: 1.35rem 1.4rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.ip-brand .mark {
    width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ip-indigo-2), var(--ip-indigo)); color: #fff; font-family: "Source Serif 4", serif;
    font-weight: 700; font-size: 1.25rem; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 0 0 2px rgba(200,162,74,.55);
}
.ip-brand .name { color: #fff; font-family: "Source Serif 4", serif; font-weight: 600; font-size: 1.12rem; line-height: 1.1; }
.ip-brand .sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ip-gold); }
.ip-nav { padding: .9rem .75rem; flex: 1; }
.ip-nav .section { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: #7f8cab; padding: 1rem .75rem .4rem; }
.ip-nav a {
    display: flex; align-items: center; gap: .7rem; color: #c9d2e6; text-decoration: none; padding: .55rem .75rem;
    border-radius: 8px; font-weight: 500; font-size: .9rem; margin-bottom: 2px; transition: background .15s;
}
.ip-nav a i { font-size: 1.05rem; opacity: .85; width: 1.2rem; text-align: center; }
.ip-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.ip-nav a.active { background: rgba(81,83,201,.35); color: #fff; box-shadow: inset 3px 0 0 var(--ip-gold); }
.ip-nav a.cta { background: var(--ip-gold); color: var(--ip-navy); font-weight: 600; margin: .25rem 0 .5rem; }
.ip-nav a.cta:hover { background: #d8b45d; }
.ip-sidebar-foot { padding: 1rem 1.4rem; font-size: .75rem; color: #7f8cab; border-top: 1px solid rgba(255,255,255,.07); }

.ip-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ip-topbar {
    background: #fff; border-bottom: 1px solid var(--ip-border); padding: .7rem 1.75rem; display: flex; align-items: center; gap: 1rem;
    position: sticky; top: 0; z-index: 1020;
}
.ip-topbar .search { max-width: 380px; flex: 1; }
.ip-topbar .search .form-control { border-radius: 999px; padding-left: 2.4rem; background: var(--ip-bg); border-color: transparent; }
.ip-topbar .search i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ip-muted); }
.ip-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--ip-navy); color: #fff; display: inline-flex; align-items: center;
    justify-content: center; font-weight: 600; font-size: .85rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ip-gold);
}
.ip-content { padding: 1.75rem; flex: 1; }
.ip-footer { padding: 1rem 1.75rem; color: var(--ip-muted); font-size: .78rem; border-top: 1px solid var(--ip-border); background: #fff; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.75rem; margin: 0; color: var(--ip-navy); }
.page-head .eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ip-indigo); font-weight: 600; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--ip-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--ip-border); padding: .95rem 1.25rem; font-weight: 600; border-radius: 14px 14px 0 0 !important; }
.card-header .bi { color: var(--ip-indigo); }
.card-body { padding: 1.25rem; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ip-muted); font-weight: 600; min-height: 2.2em; }
.stat-card .value { font-family: "Source Serif 4", serif; font-size: 2.1rem; font-weight: 600; color: var(--ip-navy); line-height: 1.1; }
.stat-card .icon {
    position: absolute; right: 1rem; bottom: 1rem; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center;
    justify-content: center; font-size: 1.2rem;
}
.stat-card a.stretched-link { z-index: 1; }

.hero {
    background: radial-gradient(1200px 300px at 0% 0%, rgba(81,83,201,.55), transparent 60%), linear-gradient(135deg, var(--ip-navy) 0%, var(--ip-navy-2) 100%);
    color: #fff; border-radius: 16px; padding: 1.75rem; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(200,162,74,.18); }
.hero h2 { color: #fff; font-size: 1.45rem; }
.hero .form-control { border: 0; height: 56px; font-size: 1.35rem; font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .12em; border-radius: 12px 0 0 12px; }
.hero .btn { border-radius: 0 12px 12px 0; padding: 0 1.5rem; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ip-muted); font-weight: 600; background: #f8f9fc; border-bottom: 1px solid var(--ip-border); white-space: nowrap; }
.table > :not(caption) > * > * { padding: .75rem 1rem; vertical-align: middle; border-color: #edf0f5; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f6f7fd; }
tr.row-link { cursor: pointer; }

/* ---------- Plates & badges ---------- */
.plate {
    display: inline-block; background: #fff; border: 2px solid #1d2433; border-radius: 6px; padding: .1rem .5rem; font-weight: 700;
    letter-spacing: .1em; font-size: .9rem; color: #1d2433; white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0,0,0,.06);
}
.plate small { font-size: .62rem; letter-spacing: .05em; color: var(--ip-muted); margin-left: .35rem; font-weight: 600; }
.plate-lg { font-size: 1.8rem; padding: .25rem 1rem; border-width: 3px; border-radius: 10px; }
.badge { font-weight: 600; letter-spacing: .02em; }
.badge-status { padding: .4em .7em; border-radius: 999px; font-size: .74rem; }

.status-banner { border-radius: 14px; padding: 1.1rem 1.4rem; color: #fff; display: flex; align-items: center; gap: 1rem; }
.status-banner i { font-size: 2rem; }
.status-banner.whitelisted { background: linear-gradient(135deg, #0f7a4a, #13985c); }
.status-banner.blacklisted { background: linear-gradient(135deg, #a3182b, #cf2a3e); }
.status-banner.unknown { background: linear-gradient(135deg, #48526b, #687290); }
.status-banner .title { font-family: "Source Serif 4", serif; font-size: 1.35rem; font-weight: 600; }

/* ---------- Buttons / forms ---------- */
.btn { border-radius: 9px; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--ip-indigo); --bs-btn-border-color: var(--ip-indigo); --bs-btn-hover-bg: #2f318c; --bs-btn-hover-border-color: #2f318c; --bs-btn-active-bg: #2a2c80; }
.btn-navy { background: var(--ip-navy); color: #fff; border-color: var(--ip-navy); }
.btn-navy:hover { background: var(--ip-navy-2); color: #fff; }
.btn-gold { background: var(--ip-gold); color: var(--ip-navy); border-color: var(--ip-gold); font-weight: 600; }
.btn-gold:hover { background: #d8b45d; color: var(--ip-navy); }
.btn-outline-primary { --bs-btn-color: var(--ip-indigo); --bs-btn-border-color: var(--ip-indigo); --bs-btn-hover-bg: var(--ip-indigo); --bs-btn-hover-border-color: var(--ip-indigo); }
.form-control, .form-select { border-radius: 9px; border-color: #d5dae5; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--ip-indigo-2); box-shadow: 0 0 0 .2rem rgba(81,83,201,.15); }
.form-label { font-weight: 600; font-size: .82rem; color: #3a4258; margin-bottom: .35rem; }
.plate-input { font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 1.15rem; }
.plate-input::placeholder { font-family: "Inter", sans-serif; text-transform: none; letter-spacing: normal; font-weight: 400; }
td.mono { white-space: nowrap; }
.req::after { content: " *"; color: #cf2a3e; }

.toggle-tile { border: 1.5px solid var(--ip-border); border-radius: 12px; padding: .9rem 1rem; cursor: pointer; display: block; transition: all .15s; background: #fff; }
.toggle-tile:hover { border-color: var(--ip-indigo-2); }
.btn-check:checked + .toggle-tile, .toggle-tile.on { border-color: var(--ip-indigo); background: #f1f1fc; box-shadow: 0 0 0 3px rgba(81,83,201,.12); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 4px; bottom: 4px; width: 2px; background: var(--ip-border); }
.timeline li { position: relative; padding: 0 0 1.15rem 3rem; }
.timeline li .dot { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--ip-border); display: flex; align-items: center; justify-content: center; }
.timeline .when { font-size: .78rem; color: var(--ip-muted); }

/* ---------- Media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.media-tile { position: relative; border-radius: 10px; overflow: hidden; background: #e9ecf3; aspect-ratio: 4/3; border: 1px solid var(--ip-border); }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile .ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ip-muted); font-size: .75rem; text-align: center; padding: .5rem; }
.media-tile .ph i { font-size: 2rem; }
.media-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: .7rem; padding: 1.2rem .5rem .35rem; }
.media-tile .del { position: absolute; top: .35rem; right: .35rem; z-index: 2; }
.media-tile a.stretched-link::after { z-index: 1; }

.flag { border-radius: 10px; padding: .6rem .9rem; font-weight: 600; font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
@media (min-width: 768px) { .border-start-md { border-left: 1px solid var(--ip-border); } }
.policy-box { background: #f6f7fb; border: 1px solid var(--ip-border); border-left: 4px solid var(--ip-gold); border-radius: 10px; padding: .85rem 1rem; font-size: .84rem; white-space: pre-line; color: #3a4258; }
.flag-danger { background: #fde8eb; color: #a3182b; border: 1px solid #f6c2c9; }
.flag-warning { background: #fff5e0; color: #8a5a00; border: 1px solid #f3dca5; }

.dl-grid { display: grid; grid-template-columns: 140px 1fr; gap: .45rem 1rem; margin: 0; }
.dl-grid dt { color: var(--ip-muted); font-weight: 500; font-size: .82rem; }
.dl-grid dd { margin: 0; font-weight: 500; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ip-muted); }
.empty i { font-size: 2.4rem; color: #c4cadb; display: block; margin-bottom: .5rem; }

.pagination { margin: 0; }
.nav-pills .nav-link { color: var(--ip-indigo); font-weight: 500; border-radius: 9px; }
.nav-pills .nav-link.active { background: var(--ip-navy); color: #fff; }
.page-link { color: var(--ip-indigo); }
.active > .page-link { background: var(--ip-indigo); border-color: var(--ip-indigo); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side {
    background: radial-gradient(900px 400px at 0% 0%, rgba(81,83,201,.6), transparent 60%), linear-gradient(160deg, var(--ip-navy), #0f2557 70%);
    color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 50px solid rgba(200,162,74,.14); }
.auth-side h1 { color: #fff; font-size: 2.4rem; line-height: 1.15; }
.auth-side .gold { color: var(--ip-gold); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: #fff; }
.auth-form .inner { width: 100%; max-width: 420px; }

/* ---------- Mobile ---------- */
.ip-mobilebar { display: none; }
@media (max-width: 991.98px) {
    .ip-sidebar { position: fixed; left: -270px; z-index: 1045; transition: left .2s; }
    .ip-sidebar.open { left: 0; box-shadow: 0 0 0 100vmax rgba(11,27,63,.45); }
    .ip-topbar { padding: .6rem 1rem; }
    .ip-content { padding: 1rem; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { padding: 2rem 1.5rem; }
    .auth-side .hide-sm { display: none; }
    .dl-grid { grid-template-columns: 110px 1fr; }
    .page-head h1 { font-size: 1.4rem; }
}

/* ---------- Print ---------- */
@media print {
    .ip-sidebar, .ip-topbar, .ip-footer, .no-print, .btn { display: none !important; }
    .ip-content { padding: 0; }
    body { background: #fff; }
    .card { box-shadow: none; break-inside: avoid; }
}
