/* ===== CSS VARIABLES & THEMES ===== */
:root {
    --navy: #0a1628;
    --navy-mid: #112240;
    --navy-light: #1a3358;
    --gold: #c9a84c;
    --gold-light: #e8c96a;
    --gold-pale: #f5e9c8;
    --sidebar-w: 260px;

    /* Light mode */
    --bg: #f8f5ef;
    --surface: #ffffff;
    --surface2: #f8f5ef;
    --text: #0a1628;
    --text-muted: #1a2332;
    --border: #ddd8cc;
    --topbar-bg: #ffffff;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --hover-row: #fafaf8;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.25s ease, color 0.25s ease;
    line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', serif;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.125rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }

p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--navy);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--navy-light);
}

.btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--gold);
    background: var(--surface);
}

.btn-danger {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.btn-danger:hover {
    background: rgba(192, 57, 43, 0.18);
}

.btn-grafana {
    background: linear-gradient(135deg, #f46800, #e05500);
    color: #fff;
    border: none;
}

.btn-grafana:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-left {
    width: 52%;
    background: var(--navy);
    padding: 3.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.15);
    top: -200px;
    left: -200px;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.1);
    bottom: -100px;
    right: -100px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1;
}

.login-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gold);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    font-family: 'DM Serif Display', serif;
}

.login-logo-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.375rem;
    color: #ffffff;
    font-weight: 600;
}

.login-hero {
    z-index: 1;
}

.login-hero h1 {
    font-size: 3.25rem;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.login-hero h1 em {
    color: var(--gold);
    font-style: italic;
}

.login-hero p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 380px;
}

.login-stats {
    display: flex;
    gap: 2.5rem;
    z-index: 1;
}

.login-stat span {
    display: block;
    font-size: 1.75rem;
    font-family: 'DM Serif Display', serif;
    color: var(--gold);
}

.login-stat small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.75rem;
    background: var(--bg);
    position: relative;
}


.login-form-box {
    width: 100%;
    max-width: 400px;
}

.login-form-box h2 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.login-form-box p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.btn-sso {
    width: 100%;
    padding: 0.9375rem;
    background: #0066CC;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-sso:hover {
    background: #0052A3;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
    transform: translateY(-2px);
}

.divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin: 1.25rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* ===== PORTAL LAYOUT ===== */
.portal {
    display: none;
}

.portal.active {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.sidebar-logo {
    padding: 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gold);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.125rem;
    color: #ffffff;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.75rem;
}

.nav-section-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.09375rem;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold-light);
}

.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.4375rem;
    border-radius: 20px;
}

.sidebar-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.6875rem;
    color: var(--gold);
    font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

.topbar {
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.topbar-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.page-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
}

/* ===== PAGES ===== */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 2.375rem;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stat-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    opacity: 0.12;
}

/* ===== CARD ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.25s ease;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
}

.card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.0625rem;
    color: var(--text);
    font-weight: 600;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.25rem;
}

/* ===== TABLE ===== */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 0.6875rem 1.5rem;
    text-align: left;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s ease;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--hover-row);
}

td {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.625rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02rem;
}

.badge.active {
    background: rgba(46, 125, 94, 0.15);
    color: #2e7d5e;
}

.badge.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

.badge.assigned {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.badge.special {
    background: rgba(201, 168, 76, 0.2);
    color: #8a6a1e;
}

/* ===== ACTIVITY ===== */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-dot.green {
    background: #2e7d5e;
}

.activity-dot.gold {
    background: var(--gold);
}

.activity-dot.red {
    background: #b33a3a;
}

.activity-text {
    font-size: 0.8125rem;
    color: var(--text);
    line-height: 1.5;
}

.activity-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* ===== FORM PANEL ===== */
.form-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 680px;
    margin-bottom: 1.5rem;
    transition: background 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.form-panel h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-field {
    margin-bottom: 1.25rem;
}

.form-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-hint {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.3125rem;
}

.auto-id-field {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.auto-id-field input {
    flex: 1;
    background: var(--surface2);
    color: var(--text-muted);
}

.auto-id-badge {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    background: rgba(201, 168, 76, 0.15);
    color: #8a6a1e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* ===== COMPANY DETAIL ===== */
.company-header {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.company-avatar {
    width: 56px;
    height: 56px;
    background: var(--navy);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 1.375rem;
    color: var(--gold);
    flex-shrink: 0;
}

.company-meta h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.company-meta p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--text);
    border-bottom-color: var(--gold);
    font-weight: 600;
}

/* ===== EXECUTIVE DETAIL ===== */
.exec-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.info-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.info-block h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.info-row span:first-child {
    color: var(--text-muted);
}

.info-row span:last-child {
    color: var(--text);
    font-weight: 500;
}

.grafana-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.grafana-logo {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.grafana-panel h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.grafana-panel p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.grafana-url-box {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 1rem;
    text-align: left;
}

.grafana-url-box span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== ID CHIP ===== */
.id-chip {
    font-size: 0.6875rem;
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    background: var(--surface2);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
    display: inline-block;
}

/* ===== SPECIAL CARD ===== */
.special-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.625rem;
    box-shadow: var(--shadow-sm);
}

.special-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.1875rem;
}

.special-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== SEARCH INPUT ===== */
.search-input {
    padding: 0.5625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    outline: none;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

/* ===== ACTION ROW ===== */
.action-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--navy);
    color: #ffffff;
    padding: 0.875rem 1.25rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    z-index: 1000;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 320px;
    border-left: 4px solid var(--gold);
    box-shadow: var(--shadow-lg);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .exec-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-page {
        flex-direction: column;
    }

    .login-left {
        width: 100%;
        padding: 1.75rem 1.5rem 1.5rem;
        min-height: auto;
        display: flex;
        flex-direction: column;
    }

    .login-logo {
        display: block;
        margin-bottom: 16px !important;
    }

    .login-right {
        padding: 2rem 1.25rem;
    }

    .login-stats {
        display: none;
    }

    .login-logo svg {
        display: block;
        max-width: 100%;
        height: auto;
    }

    .login-hero h1 {
        font-size: 1.875rem;
        margin-bottom: 0.875rem;
        line-height: 1.15;
    }

    .login-hero p {
        display: none;
    }

    .topbar {
        flex-wrap: wrap;
        padding: 0 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-input {
        width: 100% !important;
    }

    table {
        font-size: 0.75rem;
    }

    td, th {
        padding: 0.5rem 0.75rem;
    }

    .action-row {
        flex-direction: column;
        width: 100%;
    }

    .action-row .btn {
        width: 100%;
        justify-content: center;
    }

    .company-header {
        flex-direction: column;
        text-align: center;
    }

    .login-stats {
        justify-content: space-between;
        gap: 0;
    }
    .login-stat span {
        font-size: 1.375rem;
    }
    .login-stat small {
        font-size: 0.6875rem;
        letter-spacing: 0.04em;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface2);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ===== PROGRESS BAR ===== */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
  background: var(--gold);
  transition: width 0.3s ease, opacity 0.4s ease;
}
#progress-bar.loading {
  opacity: 1;
  width: 85%;
}
#progress-bar.done {
  width: 100%;
  opacity: 0;
  transition: width 0.1s ease, opacity 0.5s ease 0.1s;
}

/* ===== BUTTON LOADING STATE ===== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.btn-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(26, 26, 46, 0.55);
  animation: pulse-dot 1s ease-in-out infinite;
}
.btn-dots span:nth-child(2) { animation-delay: 0.15s; }
.btn-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

/* ===== SKELETON SCREEN ===== */
.skeleton {
  background: #e0e0e0;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.5) 50%,
    transparent 100%
  );
  animation: shimmer 1.4s infinite;
  transform: translateX(-100%);
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
.skeleton-card {
  height: 120px;
  margin-bottom: 16px;
}
.skeleton-row {
  height: 16px;
  margin-bottom: 10px;
  width: 100%;
}
.skeleton-row.short { width: 60%; }

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar, .topbar, .btn, .action-row {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .card, .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ===== FLAG FEATURE ===== */

:root {
    --flag-high:        #c0392b;
    --flag-high-bg:     rgba(192,57,43,0.09);
    --flag-high-border: rgba(192,57,43,0.3);
    --flag-med:         #e67e22;
    --flag-med-bg:      rgba(230,126,34,0.09);
    --flag-med-border:  rgba(230,126,34,0.3);
    --flag-low:         #f39c12;
    --flag-low-bg:      rgba(243,156,18,0.08);
    --flag-low-border:  rgba(243,156,18,0.3);
}

/* ── Flag badge (table cells + clickable buttons) ── */
.flag-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em;
    padding: 0.1875rem 0.5rem; border-radius: 0.375rem;
    white-space: nowrap; user-select: none;
}
.cmo-flag-btn {
    cursor: pointer; border: none;
    font-family: 'DM Sans', sans-serif;
    transition: opacity 0.15s, transform 0.15s;
}
.cmo-flag-btn:hover { opacity: 0.8; transform: translateY(-1px); }
.flag-badge.priority-HIGH   { background: var(--flag-high-bg);  color: var(--flag-high);  border: 1px solid var(--flag-high-border); }
.flag-badge.priority-MEDIUM { background: var(--flag-med-bg);   color: var(--flag-med);   border: 1px solid var(--flag-med-border);  }
.flag-badge.priority-LOW    { background: var(--flag-low-bg);   color: var(--flag-low);   border: 1px solid var(--flag-low-border);  }

/* ── Priority pill ── */
.flag-priority-pill {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em;
    padding: 0.25rem 0.625rem; border-radius: 999px; border: 1.5px solid;
}
.flag-priority-pill.priority-HIGH   { background: var(--flag-high-bg);  color: var(--flag-high);  border-color: var(--flag-high-border);  }
.flag-priority-pill.priority-MEDIUM { background: var(--flag-med-bg);   color: var(--flag-med);   border-color: var(--flag-med-border);   }
.flag-priority-pill.priority-LOW    { background: var(--flag-low-bg);   color: var(--flag-low);   border-color: var(--flag-low-border);   }

/* ── Modal overlay ── */
.flag-modal-overlay {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    animation: overlayFadeIn 0.2s ease;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal card ── */
.flag-modal {
    position: relative;
    background: var(--surface);
    border-radius: 1rem;
    width: min(520px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.12);
    animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.flag-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.375rem 1.5rem 1.125rem;
    border-bottom: 1px solid var(--border);
}
.flag-modal-icon {
    width: 40px; height: 40px; border-radius: 0.5rem;
    background: rgba(192,57,43,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem; flex-shrink: 0;
}
.flag-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.375rem; line-height: 1; color: var(--text-muted);
    padding: 0.125rem 0.25rem; border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}
.flag-modal-close:hover { color: var(--text); background: var(--surface2); }
.flag-modal-body   { padding: 1.375rem 1.5rem; display: flex; flex-direction: column; gap: 1.125rem; }
.flag-modal-footer {
    padding: 1rem 1.5rem 1.375rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ── Modal error ── */
.flag-modal-error {
    background: rgba(192,57,43,0.08); border: 1px solid rgba(192,57,43,0.25);
    color: #c0392b; border-radius: 0.5rem; padding: 0.625rem 0.875rem;
    font-size: 0.8125rem; line-height: 1.5;
}

/* ── Spinner ── */
.flag-spinner {
    display: inline-block; width: 13px; height: 13px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: flagSpin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes flagSpin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.flag-toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    z-index: 4000;
    background: var(--navy); color: #fff;
    padding: 0.75rem 1.25rem; border-radius: 0.625rem;
    font-size: 0.875rem; font-weight: 500;
    border-left: 4px solid var(--gold);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    transform: translateY(120%); opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
    max-width: 340px; pointer-events: none;
}
.flag-toast.show { transform: translateY(0); opacity: 1; }
.flag-toast.flag-toast-error { border-left-color: #c0392b; background: #2d0a0a; }

/* ── Risk grid (dashboard zone cards) ── */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
    max-width: 100%;
}
@media (max-width: 900px) {
    .risk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px !important; }
}

/* ── Zone risk card — dark panel ── */
.zone-risk-card {
    border-radius: 14px;
    padding: 22px 18px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease;
    position: relative;
    min-width: 0;
}
.zone-risk-card:hover {
    filter: brightness(1.12);
}
.zone-risk-card.zero-count { opacity: 0.65; }
.zone-risk-card .zone-count {
    font-size: 44px;
    font-weight: 300;
    font-family: 'DM Mono', 'Courier New', monospace;
    line-height: 1;
    margin: 0.25rem 0 0.125rem;
}
.zone-risk-card .zone-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.zone-risk-card .zone-desc {
    font-size: 11px;
    margin-top: auto;
    line-height: 1.5;
}

/* ── Stable "All clear" badge ── */
.stable-all-clear-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(80,200,140,0.15);
    color: #50c88c;
    border-radius: 20px;
    font-size: 10px;
    padding: 3px 9px;
    white-space: nowrap;
    font-weight: 600;
}

/* ── Live status dot ── */
@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}
.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: live-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Scored pill (header badge) ── */
.scored-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 0.45rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.scored-pill-num { font-weight: 700; color: var(--text); font-size: 0.9375rem; }
.scored-pill-sep { opacity: 0.4; }

/* ── Flags panel — bold ── */
.flags-panel {
    background: #fef2f2;
    border: 1px solid rgba(192,57,43,0.18);
    border-left: 6px solid #c0392b;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.flags-panel-count {
    font-size: 3rem;
    font-weight: 800;
    color: #c0392b;
    line-height: 1;
}

/* ── Flag priority badges — solid pills ── */
.flag-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 1rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
}
.flag-badge-high   { background:#c0392b; color:#fff; }
.flag-badge-medium { background:#e67e22; color:#fff; }
.flag-badge-low    { background:#f1c40f; color:#0d1117; }

/* ── Risk table header ── */
.risk-table thead th {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.875rem 0.875rem;
    border-bottom: none;
    white-space: nowrap;
}
.risk-table tbody tr:nth-child(even) {
    background: rgba(245,240,232,0.45);
}
/* ── Risk table clickable rows ── */
tr.clickable-row { cursor: pointer; transition: background 0.12s ease, box-shadow 0.12s ease; }
tr.clickable-row:hover {
    background: rgba(201,151,44,0.07) !important;
    box-shadow: inset 3px 0 0 #c9972c;
}
tr.clickable-row:hover .risk-company-name { text-decoration: underline; }

/* ── Company name in risk table ── */
.risk-company-name {
    font-weight: 700;
    color: #0d1117;
    font-size: 0.9rem;
}
/* ── Flagged pill in table ── */
.flagged-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #c0392b;
    color: #fff;
    border-radius: 1rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Zone cell value (dot + number inline) ── */
.zone-cell-val {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
}
.zone-dot-sm {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* ── Filter banner (executives list) ── */
.filter-banner {
    background: rgba(201,151,44,0.07);
    border: 1px solid rgba(201,151,44,0.28);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text);
    flex-wrap: wrap;
}
.filter-clear-btn {
    margin-left: auto;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.filter-clear-btn:hover { color: var(--text); background: var(--surface2); }

/* ── Zone badges ── */
.zone-badge {
    display: inline-block;
    padding: 0.1875rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.6;
    white-space: nowrap;
}
.zone-badge.zone-FAILURE     { background: #7b0000; color: #fff; }
.zone-badge.zone-CRITICAL    { background: #c0392b; color: #fff; }
.zone-badge.zone-DEGRADATION { background: #e67e22; color: #fff; }
.zone-badge.zone-DRIFT       { background: #f1c40f; color: #0d1117; }
.zone-badge.zone-STABLE      { background: #2d7a4f; color: #fff; }

/* ── ERI stat grid (detail page) ── */
.eri-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.eri-stat-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.eri-stat-box .eri-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.eri-stat-box .eri-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

/* ── Analytics dashboard section ── */
.analytics-section {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: rgba(201, 151, 44, 0.08);
    border: 1px solid rgba(201, 151, 44, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.btn-analytics {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: #c9972c;
    color: #0d1117;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.btn-analytics:hover { background: #e0aa38; color: #0d1117; }
.analytics-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ===== HAMBURGER & MOBILE DRAWER ===== */
/* Breakpoints: mobile ≤600px | tablet 601-900px | desktop >900px */

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 900px) {
    /* Show hamburger */
    .hamburger-btn {
        display: flex;
    }

    /* Sidebar becomes a slide-in drawer */
    .sidebar {
        width: 280px !important;
        height: 100vh !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 1000 !important;
        transform: translateX(-280px);
        transition: transform 0.25s ease;
        box-shadow: none;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    /* Main content full width */
    .main {
        margin-left: 0 !important;
        width: 100%;
    }

    /* Topbar */
    .topbar {
        padding: 0 1rem !important;
        height: auto !important;
        min-height: 64px;
    }

    .portal.active {
        overflow: hidden;
    }

    .page-content {
        padding: 16px !important;
        width: 100%;
    }

    /* Source connectivity strip: 3-col → 1-col at tablet */
    .source-connect-grid {
        grid-template-columns: 1fr !important;
    }

    /* ERI score card columns: 3-col → 1-col at tablet */
    .eri-score-card-grid {
        grid-template-columns: 1fr !important;
    }

    /* Exec list: hide non-primary, non-actions columns */
    .exec-card .list-card-col:not(.list-card-col-hide) {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        overflow-x: hidden;
    }

    .page-content {
        padding: 16px !important;
    }

    .topbar-actions {
        gap: 0.375rem;
        flex-wrap: wrap;
    }

    /* Page header stacks */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Dashboard zone grid: 1 column */
    .risk-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stats grid: 1 column */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Content grid: 1 column */
    .content-grid {
        grid-template-columns: 1fr !important;
    }

    /* Exec detail grid: 1 column */
    .exec-detail-grid {
        grid-template-columns: 1fr !important;
    }

    /* Form panel full width */
    .form-panel {
        max-width: 100% !important;
    }

    /* Form row: 1 column */
    .form-row {
        grid-template-columns: 1fr !important;
    }

    /* Card header stacks */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Company header centres on mobile */
    .company-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Tabs: equal split */
    .tabs {
        gap: 0;
    }

    .tab {
        flex: 1;
        text-align: center;
        padding: 0.625rem 0.5rem;
    }

    /* Action row stacks */
    .action-row {
        flex-direction: column;
        width: 100%;
    }

    .action-row .btn {
        width: 100%;
        justify-content: center;
    }

    /* Search input full width */
    .search-input {
        width: 100% !important;
    }

    /* Filter bar stacks */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    /* Tables: allow horizontal scroll */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Touch targets: 44px min height */
    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 44px;
    }

    /* Typography scaling */
    h1 { font-size: 22px !important; }
    h2 { font-size: 18px !important; }
    .item-title { font-size: 13px; }
    .eri-score { font-size: 36px; }

    /* Source connectivity strip (exec detail) */
    .source-connect-grid {
        grid-template-columns: 1fr !important;
    }

    /* ERI score card columns (exec detail) */
    .eri-score-card-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .risk-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}
