:root {
    --navy: #0d1b2a;
    --navy-2: #1b3a4b;
    --accent: #1d4ed8;
    --gold: #c9a227;
    --bg: #f4f6f8;
    --text: #12202b;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; }

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--navy), #102536);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark {
    width: 40px; height: 40px; border-radius: 0; background: transparent;
    display: grid; place-items: center; overflow: visible; flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; background: transparent; }
.brand small { display: block; color: #9fb3c8; font-size: 12px; }
.side-nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; overflow: auto; }
.side-nav a {
    color: #d7e3ee; text-decoration: none; padding: 10px 12px; border-radius: 8px;
    display: flex; align-items: center; gap: 10px;
}
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.side-user { padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user .name { font-weight: 600; }
.side-user .role { font-size: 12px; color: #9fb3c8; margin-bottom: 8px; }
.side-user .logout { color: #f0c36d; text-decoration: none; font-size: 13px; }

.search-select { position: relative; }
.search-select-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: #334155; width: 36px; height: 36px;
}
.search-select-menu {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 320px; overflow: auto; background: #fff; border: 1px solid #d0d7de;
    border-radius: 10px; box-shadow: 0 8px 24px rgba(13, 27, 42, .12); padding: 6px;
}
.search-select-option {
    display: block; width: 100%; text-align: left; border: 0; background: transparent;
    padding: 8px 10px; border-radius: 8px;
}
.search-select-option:hover, .search-select-option.active { background: #e8eef5; }
.search-select-empty { padding: 8px 10px; color: #64748b; }

.app-main { flex: 1; min-width: 0; }
.app-topbar { background: #fff; padding: 18px 28px; border-bottom: 1px solid #e5e8eb; }
.app-topbar h1 { margin: 0; font-size: 22px; }
.app-content { padding: 24px 28px 48px; }

.card-soft { border: 0; box-shadow: 0 8px 24px rgba(16,37,54,.06); }
.table thead th { background: #0d1b2a; color: #fff; font-weight: 600; }
.table thead tr.audit-filters th { background: #f4f6f8; font-weight: 400; }
.form-sheet { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.form-sheet-head { background: #000; color: #fff; padding: 18px 22px; }
.form-sheet-head h2 { margin: 0; font-size: 20px; letter-spacing: .3px; }
.form-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; padding: 20px 22px; }
.rating-def { padding: 0 22px 16px; }
.section-banner { background: #000; color: #fff; padding: 10px 22px; font-weight: 700; }
.calc-box { background: #111; color: #fff; padding: 16px 22px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #0d1b2a, #1d4ed8); }
.login-card { width: min(440px, 92vw); }
.kpi { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 8px 24px rgba(16,37,54,.06); }
.kpi .label { color: #667; font-size: 13px; }
.kpi .value { font-size: 28px; font-weight: 700; }

@media (max-width: 992px) {
    .app-shell { flex-direction: column; }
    .app-sidebar { width: 100%; height: auto; position: relative; }
    .form-meta { grid-template-columns: 1fr; }
}
