/* ----------------------------------------------------------
   Voyage Risk / RiskBroker – Portal theme
   ---------------------------------------------------------- */

:root {
    --vr-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --vr-bg-page: #f3f4f6;
    --vr-bg-sidebar: #020617; /* deep navy base */
    --vr-border-subtle: #1f2933;
    --vr-text-muted: #9ca3af;
    --vr-text-strong: #f9fafb;
    --vr-primary: #2563eb;
    --vr-radius-lg: 1rem;
}

/* Global layout ------------------------------------------------ */

html, body {
    height: 100%;
}

.vr-body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--vr-bg-page);
    font-family: var(--vr-font-sans);
    color: #111827;
}

/* App shell: sidebar + main ------------------------------------ */

.vr-app-shell {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */

.vr-sidebar {
    width: 250px;
    background: linear-gradient( 180deg, #3A5E98 0%, /* bright blue at the very top */
    #3A5E98 100%, /* dark blue through most of the bar */
    #3A5E98 100% /* deep navy at the bottom */
    );
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.9rem 1.5rem;
}

.vr-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 0.7rem;
    text-decoration: none;
}

    .vr-sidebar-logo:hover {
        text-decoration: none;
    }

/* logo image (combined mark + text) */
.vr-logo-img {
    display: block;
    height: 60px;
}

/* (old logo icon styles kept in case you reuse them elsewhere) */
.vr-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vr-logo-icon-svg {
    width: 20px;
    height: 20px;
    fill: #f9fafb;
}

.vr-logo-text {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f9fafb;
}

.vr-logo-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Sidebar navigation */

.vr-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
}

.vr-nav-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7280;
    padding: 0.9rem 0.9rem 0.35rem;
}

.vr-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    margin: 0.05rem 0.55rem;
    border-radius: 0.9rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background-color 0.12s ease-out, color 0.12s ease-out, box-shadow 0.12s ease-out;
}

    .vr-nav-link:hover {
        background-color: rgba(55, 65, 81, 0.9);
        text-decoration: none;
        color: #ffffff;
    }

.vr-nav-link-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.5);
}

.vr-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vr-nav-icon-svg {
    width: 16px;
    height: 16px;
    fill: rgba(209, 213, 219, 0.9);
}

.vr-nav-link-active .vr-nav-icon-svg {
    fill: #ffffff;
}

.vr-nav-label {
    white-space: nowrap;
}

/* Sidebar footer / user info */

.vr-sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(31, 41, 55, 0.85);
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Main column */

.vr-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Top bar ------------------------------------------------------ */

.vr-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem 0.75rem;
}

.vr-topbar-title {
    font-size: 1.35rem;
    font-weight: 600;
}

.vr-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vr-topbar-auth .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.vr-topbar-auth .nav-link {
    padding: 0.25rem 0.5rem;
    color: #6b7280;
}

/* Main content and footer ------------------------------------- */

.vr-content {
    padding: 0.5rem 1.75rem 1.5rem;
    background-color: var(--vr-bg-page);
}

.vr-footer {
    margin-top: auto;
    padding: 0.75rem 1.75rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8rem;
}

/* Dashboard header -------------------------------------------- */

.vr-dashboard-header {
    margin: 1.25rem 0 1.2rem; /* pushes Dashboard down a bit */
}

.vr-dashboard-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.vr-dashboard-title {
    font-size: 2.1rem;
    font-weight: 700;
}

.vr-dashboard-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.vr-dashboard-actions {
    display: flex;
    gap: 0.6rem;
}

/* Cards & tables (for dashboard/pages) ------------------------ */

.vr-card {
    background-color: #ffffff;
    border-radius: var(--vr-radius-lg);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.3rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.vr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.vr-card-title {
    font-size: 1.05rem; /* bigger section titles */
    font-weight: 600;
}

.vr-card-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Metric row / cards ------------------------------------------ */

/* Optional grid helper */
.vr-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Used on Index */
.vr-metrics-row {
    margin-bottom: 1.25rem;
}

.vr-metric-card {
    background: #ffffff;
    border-radius: var(--vr-radius-lg);
    padding: 1.1rem 1.2rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.vr-metric-label {
    font-size: 1.05rem; /* bigger metric headings */
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.vr-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.vr-metric-subtext {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Tables ------------------------------------------------------ */

.vr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

    /* tighter rows & much tighter horizontal padding, top-aligned */
    .vr-table th,
    .vr-table td {
        padding: 0.22rem 0.08rem; /* vertical, horizontal */
        vertical-align: top;
        border-bottom: 1px solid #edf0f4;
    }

    .vr-table th {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #6b7280;
        font-weight: 600;
    }

/* Make headline columns wider (used on Dashboard tables) */
.vr-col-headline {
    width: 50%;
}

/* headline cells – allow full wrapping, no clipping */
.vr-table-headline {
    font-weight: 500;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* datetime helper */
.vr-table-datetime {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Pills ------------------------------------------------------- */

.vr-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.vr-pill-low {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.vr-pill-medium {
    background: #fef9c3;
    color: #92400e;
    border-color: #facc15;
}

.vr-pill-high {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

.vr-pill-critical {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.vr-pill-status-open {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.vr-pill-status-closed {
    background: #e0f2fe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.vr-pill-status-hidden {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

/* Primary button (New incident / New alert) ------------------- */

.vr-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: #f9fafb;
    text-decoration: none;
}

    .vr-btn-primary:hover {
        text-decoration: none;
        filter: brightness(1.03);
    }

/* Responsive tweaks ------------------------------------------ */

@media (max-width: 992px) {
    .vr-sidebar {
        width: 220px;
    }

    .vr-topbar {
        padding-inline: 1.25rem;
    }

    .vr-content,
    .vr-footer {
        padding-inline: 1.25rem;
    }

    .vr-metric-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .vr-app-shell {
        flex-direction: column;
    }

    .vr-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .vr-main {
        min-height: calc(100vh - 64px);
    }

    .vr-metric-row {
        grid-template-columns: 1fr;
    }

    .vr-dashboard-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .vr-dashboard-actions {
        align-self: stretch;
    }
}

/* Sidebar user block ------------------------------------------- */

.vr-sidebar-user {
    margin-top: 0.5rem;
    padding: 0 0.7rem;
}

.vr-user {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border-radius: 0.9rem;

}

.vr-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.vr-user-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #e5e7eb;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 160px;
}

.vr-user-logout-form {
    margin: 0;
}

.vr-user-logout-link {
    border: 0;
    padding: 0;
    background: none;
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    cursor: pointer;
}

    .vr-user-logout-link:hover {
        text-decoration: underline;
        color: #e5e7eb;
    }
