:root {
    --bg: #07111f;
    --panel: #0e1b2c;
    --panel-soft: #111f33;
    --line: rgba(255,255,255,.1);
    --text: #eaf2ff;
    --muted: #91a4bd;
    --blue: #4b8dff;
    --purple: #7c4dff;
    --green: #2ed47a;
    --red: #ff4d57;
    --orange: #ff9f43;
    --gray: #9aa8b8;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: radial-gradient(circle at top, #10223a, var(--bg) 50%);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    background: #111f33;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
}
button.primary, .full-button {
    background: linear-gradient(135deg, #6236ff, #3d8bff);
    border-color: transparent;
}
.app-shell {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 300px;
    padding: 18px;
    border-right: 1px solid var(--line);
    background: rgba(3,10,20,.86);
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #52d2ff, #6236ff);
    font-weight: 800;
}
.brand-title {
    font-weight: 800;
    font-size: 20px;
}
.brand-subtitle, .client-card span, .score-card small, .page-heading p {
    color: var(--muted);
    font-size: 13px;
}
.client-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 14px;
    margin-bottom: 22px;
}
.client-logo {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #9bd7ff, #4b8dff);
    font-weight: 800;
}
.client-card strong, .client-card span, .client-card em {
    display: block;
}
.client-card em {
    color: var(--green);
    font-style: normal;
    margin-top: 8px;
    font-size: 13px;
}
.nav {
    display: grid;
    gap: 6px;
}
.nav a {
    display: flex;
    justify-content: space-between;
    padding: 13px 14px;
    color: #c8d6ea;
    border-radius: 12px;
}
.nav a.active, .nav a:hover {
    background: linear-gradient(135deg, rgba(98,54,255,.9), rgba(75,141,255,.45));
    color: white;
}
.nav span {
    background: rgba(255,255,255,.08);
    padding: 2px 8px;
    border-radius: 999px;
}
.score-card {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
}
.score-card strong {
    display: block;
    font-size: 40px;
    margin: 12px 0;
}
.score-card small {
    font-size: 15px;
}
.score-track {
    height: 10px;
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    overflow: hidden;
}
.score-track div {
    height: 100%;
    background: var(--green);
}
.main {
    flex: 1;
    min-width: 0;
}
.topbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(5,13,26,.72);
}
.topbar span, .topbar b {
    color: var(--muted);
    margin-right: 10px;
}
.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #d2e5ff;
    color: #10223a;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
}
.view-toggle {
    margin-left: auto;
    display: flex;
    gap: 10px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 18px;
    padding: 0 28px;
}
.map-panel, .detail-panel, .panel, .table-panel, .risk-card, .report-preview {
    background: rgba(14,27,44,.84);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.map-stage {
    position: relative;
    min-height: 620px;
}
#aiom-map {
    width: 100%;
    min-height: 620px;
}
.legend {
    position: absolute;
    left: 18px;
    bottom: 18px;
    background: rgba(3,10,20,.7);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 7px;
    font-size: 12px;
}
.legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}
.red { background: var(--red); }
.blue { background: var(--blue); }
.purple { background: var(--purple); }
.green { background: var(--green); }
.orange { background: var(--orange); }
.gray { background: var(--gray); }
.detail-panel {
    padding: 22px;
}
.detail-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--red);
    border: 1px solid rgba(255,77,87,.45);
    background: rgba(255,77,87,.1);
    font-size: 26px;
}
.danger-text {
    color: var(--red);
}
.tabs {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    margin: 18px 0;
}
.tabs span {
    color: var(--muted);
    padding-bottom: 12px;
}
.tabs .active {
    color: white;
    border-bottom: 2px solid var(--purple);
}
.detail-list {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}
.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}
.detail-list strong {
    color: white;
}
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 18px 28px 28px;
}
.panel {
    padding: 18px;
}
.compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.compact-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #dce8fa;
}
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
}
.badge-danger {
    background: rgba(255,77,87,.14);
    color: #ff858c;
}
.badge-warning {
    background: rgba(255,159,67,.14);
    color: #ffc27f;
}
.badge-good {
    background: rgba(46,212,122,.14);
    color: #7cf0ae;
}
.badge-soft {
    background: rgba(255,255,255,.08);
    color: #cbd8ec;
}
.bar-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin: 14px 0 22px;
    color: #dce8fa;
}
.bar-row i {
    position: absolute;
    left: 0;
    bottom: -10px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--green));
}
.summary-numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 18px 0;
}
.summary-numbers div {
    border-right: 1px solid var(--line);
}
.summary-numbers strong {
    display: block;
    font-size: 30px;
    color: var(--green);
}
.summary-numbers span {
    color: var(--muted);
    font-size: 12px;
}
.page-heading {
    padding: 28px;
}
.page-heading h1 {
    margin: 0 0 8px;
}
.table-panel {
    margin: 0 28px 28px;
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}
th {
    color: var(--muted);
    font-size: 13px;
}
.cards-grid {
    padding: 0 28px 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.risk-card {
    padding: 20px;
}
.risk-card p, .report-preview p {
    color: #c5d3e8;
    line-height: 1.6;
}
.report-preview {
    margin: 0 28px 28px;
    padding: 28px;
    max-width: 900px;
}
blockquote {
    margin: 20px 0;
    padding: 18px;
    border-left: 4px solid var(--purple);
    background: rgba(255,255,255,.05);
    border-radius: 10px;
}
@media (max-width: 1200px) {
    .dashboard-grid, .bottom-grid, .cards-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: -320px;
    }
    .main {
        width: 100%;
    }
}
