/* ===========================================================
   Cockpit Google Ads
   Charte d'inspiration Material
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    --vw-blue: #4285F4;
    --vw-blue-dark: #1a73e8;
    --vw-blue-soft: #e8f0fe;
    --vw-red: #EA4335;
    --vw-red-soft: #fce8e6;
    --vw-yellow: #FBBC04;
    --vw-yellow-soft: #fef7e0;
    --vw-green: #34A853;
    --vw-green-soft: #e6f4ea;
    --vw-grey-900: #202124;
    --vw-grey-800: #3c4043;
    --vw-grey-700: #5f6368;
    --vw-grey-500: #9aa0a6;
    --vw-grey-300: #dadce0;
    --vw-grey-200: #e8eaed;
    --vw-grey-100: #f1f3f4;
    --vw-grey-50:  #f8f9fa;
    --vw-white:    #ffffff;
    --vw-bg:       #f6f8fb;

    --vw-shadow-1: 0 1px 2px rgba(60,64,67,.08), 0 1px 3px rgba(60,64,67,.06);
    --vw-shadow-2: 0 1px 2px rgba(60,64,67,.10), 0 2px 6px rgba(60,64,67,.10);
    --vw-shadow-3: 0 1px 3px rgba(60,64,67,.12), 0 4px 12px rgba(60,64,67,.12);
    --vw-shadow-glow: 0 0 0 4px rgba(66,133,244,.18);

    --vw-radius-sm: 6px;
    --vw-radius:    10px;
    --vw-radius-lg: 16px;
    --vw-radius-pill: 999px;

    --vw-fs-xs: 11px;
    --vw-fs-sm: 13px;
    --vw-fs-base: 14px;
    --vw-fs-md: 15px;
    --vw-fs-lg: 18px;
    --vw-fs-xl: 22px;
    --vw-fs-2xl: 28px;
    --vw-fs-3xl: 36px;

    --vw-sidebar-width: 256px;
    --vw-topbar-height: 60px;
    --vw-content-max: 1380px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--vw-fs-base);
    line-height: 1.5;
    color: var(--vw-grey-900);
    background: var(--vw-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--vw-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
hr { border: none; border-top: 1px solid var(--vw-grey-200); margin: 24px 0; }
button { font: inherit; cursor: pointer; }

h1,h2,h3,h4,h5 { margin: 0 0 12px; font-weight: 600; color: var(--vw-grey-900); letter-spacing: -0.01em; }
h1 { font-size: var(--vw-fs-2xl); }
h2 { font-size: var(--vw-fs-xl); }
h3 { font-size: var(--vw-fs-lg); }
h4 { font-size: var(--vw-fs-md); }
p  { margin: 0 0 12px; }

.muted { color: var(--vw-grey-700); }
.text-xs { font-size: var(--vw-fs-xs); }
.text-sm { font-size: var(--vw-fs-sm); }
.text-md { font-size: var(--vw-fs-md); }
.text-lg { font-size: var(--vw-fs-lg); }
.text-xl { font-size: var(--vw-fs-xl); }
.text-bold { font-weight: 600; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* =========== Layout =========== */
.layout {
    display: grid;
    grid-template-columns: var(--vw-sidebar-width) 1fr;
    min-height: 100vh;
}
.layout-public {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.sidebar {
    background: var(--vw-white);
    border-right: 1px solid var(--vw-grey-200);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand {
    padding: 18px 16px 16px;
    border-bottom: 1px solid var(--vw-grey-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.sidebar-brand-img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
}
.sidebar-brand-tagline {
    font-size: 12px;
    font-weight: 500;
    color: var(--vw-grey-700);
    letter-spacing: 0.02em;
}

.sidebar-section {
    padding: 12px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vw-grey-500);
}
.sidebar-nav { padding: 4px 8px 12px; flex: 1; overflow-y: auto; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: var(--vw-radius);
    color: var(--vw-grey-800);
    font-weight: 500;
    font-size: var(--vw-fs-sm);
    transition: background .12s, color .12s;
}
.sidebar-link:hover { background: var(--vw-grey-100); text-decoration: none; }
.sidebar-link.active {
    background: var(--vw-blue-soft);
    color: var(--vw-blue-dark);
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link .badge { margin-left: auto; }

.sidebar-footer {
    border-top: 1px solid var(--vw-grey-100);
    padding: 12px;
    font-size: 12px;
    color: var(--vw-grey-700);
}

.main-area { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--vw-topbar-height);
    background: var(--vw-white);
    border-bottom: 1px solid var(--vw-grey-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-weight: 600; font-size: var(--vw-fs-md); color: var(--vw-grey-900); }
.topbar-subtitle { font-size: 12px; color: var(--vw-grey-500); }

.client-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--vw-grey-300);
    border-radius: var(--vw-radius-pill);
    font-size: var(--vw-fs-sm);
    color: var(--vw-grey-800);
    background: var(--vw-white);
    cursor: pointer;
}
.client-switcher:hover { background: var(--vw-grey-50); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--vw-radius-pill);
    background: var(--vw-grey-100);
    font-size: var(--vw-fs-sm);
    color: var(--vw-grey-800);
}
.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vw-blue), var(--vw-blue-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.content {
    padding: 28px;
    max-width: var(--vw-content-max);
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.page-header-text h1 { margin: 0 0 4px; }
.page-header-text p { margin: 0; color: var(--vw-grey-700); font-size: var(--vw-fs-sm); }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========== Cards =========== */
.card {
    background: var(--vw-white);
    border-radius: var(--vw-radius-lg);
    box-shadow: var(--vw-shadow-1);
    border: 1px solid var(--vw-grey-200);
}
.card-pad { padding: 20px 22px; }
.card-pad-lg { padding: 28px 30px; }
.card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--vw-grey-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header h3 { margin: 0; font-size: var(--vw-fs-md); }
.card-body { padding: 20px 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--vw-grey-200);
    background: var(--vw-grey-50);
    border-radius: 0 0 var(--vw-radius-lg) var(--vw-radius-lg);
}

/* =========== Grid =========== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* =========== KPIs =========== */
.kpi {
    background: var(--vw-white);
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius-lg);
    padding: 18px 20px;
    box-shadow: var(--vw-shadow-1);
}
.kpi-label {
    color: var(--vw-grey-700);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--vw-grey-900);
    line-height: 1.1;
}
.kpi-value-sm { font-size: 20px; }
.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}
.kpi-trend.up { color: var(--vw-green); }
.kpi-trend.down { color: var(--vw-red); }
.kpi-trend.flat { color: var(--vw-grey-500); }
.kpi-icon {
    float: right;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--vw-blue-soft);
    color: var(--vw-blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========== Buttons =========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--vw-radius);
    font-weight: 500;
    font-size: var(--vw-fs-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .05s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--vw-shadow-glow); }
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--vw-blue-dark); color: white; }
.btn-primary:hover { background: #1557b0; color: white; }

.btn-google {
    background: var(--vw-white);
    color: var(--vw-grey-800);
    border-color: var(--vw-grey-300);
}
.btn-google:hover { background: var(--vw-grey-50); }

.btn-outline {
    background: var(--vw-white);
    color: var(--vw-grey-800);
    border-color: var(--vw-grey-300);
}
.btn-outline:hover { background: var(--vw-grey-50); }

.btn-ghost { background: transparent; color: var(--vw-grey-800); }
.btn-ghost:hover { background: var(--vw-grey-100); }

.btn-danger { background: var(--vw-red); color: white; }
.btn-danger:hover { background: #c5221f; color: white; }

.btn-success { background: var(--vw-green); color: white; }
.btn-success:hover { background: #1e8e3e; color: white; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: var(--vw-fs-md); }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-block { width: 100%; }

/* =========== Forms =========== */
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.field-label {
    display: block;
    font-weight: 500;
    font-size: var(--vw-fs-sm);
    color: var(--vw-grey-800);
    margin-bottom: 6px;
}
.field-help { font-size: 12px; color: var(--vw-grey-500); margin-top: 4px; }
.input,
.select,
.textarea {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: var(--vw-fs-sm);
    color: var(--vw-grey-900);
    background: var(--vw-white);
    border: 1px solid var(--vw-grey-300);
    border-radius: var(--vw-radius);
    transition: border-color .12s, box-shadow .12s;
}
.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--vw-blue);
    box-shadow: var(--vw-shadow-glow);
}
.textarea { min-height: 96px; resize: vertical; }
.input-prefix-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--vw-grey-300);
    border-radius: var(--vw-radius);
    overflow: hidden;
    background: var(--vw-white);
}
.input-prefix-wrap:focus-within { border-color: var(--vw-blue); box-shadow: var(--vw-shadow-glow); }
.input-prefix {
    background: var(--vw-grey-100);
    padding: 10px 12px;
    color: var(--vw-grey-700);
    font-size: var(--vw-fs-sm);
    border-right: 1px solid var(--vw-grey-300);
}
.input-prefix-wrap input {
    border: 0; flex: 1;
    padding: 10px 12px;
    font-size: var(--vw-fs-sm);
}
.input-prefix-wrap input:focus { outline: none; box-shadow: none; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: var(--vw-fs-sm); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--vw-blue-dark); }

/* =========== Tables =========== */
.table-wrap {
    background: var(--vw-white);
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius-lg);
    overflow: hidden;
    box-shadow: var(--vw-shadow-1);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--vw-fs-sm);
}
.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--vw-grey-200);
    vertical-align: middle;
}
.table th {
    background: var(--vw-grey-50);
    font-weight: 600;
    font-size: 12px;
    color: var(--vw-grey-700);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.table tbody tr:hover { background: var(--vw-grey-50); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* =========== Badges =========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--vw-radius-pill);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-blue { background: var(--vw-blue-soft); color: var(--vw-blue-dark); }
.badge-green { background: var(--vw-green-soft); color: var(--vw-green); }
.badge-red { background: var(--vw-red-soft); color: var(--vw-red); }
.badge-yellow { background: var(--vw-yellow-soft); color: #b06000; }
.badge-grey { background: var(--vw-grey-100); color: var(--vw-grey-800); }

/* =========== Dot indicators =========== */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-blue { background: var(--vw-blue); }
.dot-green { background: var(--vw-green); }
.dot-red { background: var(--vw-red); }
.dot-yellow { background: var(--vw-yellow); }
.dot-grey { background: var(--vw-grey-500); }
.dot-pulse {
    box-shadow: 0 0 0 0 rgba(52,168,83,.6);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52,168,83,.6); }
    70% { box-shadow: 0 0 0 8px rgba(52,168,83,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,168,83,0); }
}

/* =========== Flash =========== */
.flash-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}
.flash {
    padding: 12px 16px;
    border-radius: var(--vw-radius);
    background: var(--vw-white);
    box-shadow: var(--vw-shadow-3);
    font-size: var(--vw-fs-sm);
    border-left: 4px solid var(--vw-blue);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.flash-success { border-left-color: var(--vw-green); }
.flash-error { border-left-color: var(--vw-red); }
.flash-warning { border-left-color: var(--vw-yellow); }

/* =========== Login =========== */
.auth-card {
    background: var(--vw-white);
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius-lg);
    padding: 36px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--vw-shadow-3);
}
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    text-align: center;
}
.auth-brand-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}
.auth-brand-tagline {
    font-size: 13px;
    font-weight: 500;
    color: var(--vw-grey-700);
    letter-spacing: 0.02em;
}
.auth-title { font-size: 22px; font-weight: 600; margin-bottom: 6px; color: var(--vw-grey-900); text-align: center; }
.auth-sub { color: var(--vw-grey-700); font-size: var(--vw-fs-sm); margin-bottom: 22px; text-align: center; }

/* =========== Journey timeline =========== */
.journey {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.journey:before {
    content: '';
    position: absolute;
    left: 17px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--vw-blue) 0%, var(--vw-blue) 60%, var(--vw-green) 100%);
    border-radius: 2px;
}
.journey-step {
    position: relative;
    padding: 0 0 20px 50px;
}
.journey-step:last-child { padding-bottom: 0; }
.journey-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vw-white);
    border: 2px solid var(--vw-blue);
    color: var(--vw-blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 0 4px var(--vw-blue-soft);
    z-index: 1;
}
.journey-step.success .journey-marker {
    background: var(--vw-green);
    border-color: var(--vw-green);
    color: white;
    box-shadow: 0 0 0 4px var(--vw-green-soft);
}
.journey-step.warning .journey-marker {
    background: var(--vw-yellow);
    border-color: var(--vw-yellow);
    color: white;
    box-shadow: 0 0 0 4px var(--vw-yellow-soft);
}
.journey-card {
    background: var(--vw-white);
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius);
    padding: 12px 16px;
    box-shadow: var(--vw-shadow-1);
}
.journey-time { color: var(--vw-grey-500); font-size: 12px; }
.journey-title { font-weight: 600; font-size: var(--vw-fs-sm); margin: 2px 0 4px; }
.journey-detail { color: var(--vw-grey-700); font-size: var(--vw-fs-sm); }

/* =========== Slider =========== */
.slider-wrap { padding: 12px 0; }
.range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--vw-grey-200);
    outline: none;
}
.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--vw-blue-dark);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(26,115,232,.4);
}
.range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--vw-blue-dark);
    cursor: pointer;
    border: none;
}

/* =========== Score circles =========== */
.score-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
    position: relative;
}
.score-circle.good { background: var(--vw-green); }
.score-circle.medium { background: var(--vw-yellow); color: #4a3500; }
.score-circle.poor { background: var(--vw-red); }
.score-row { display: flex; align-items: center; gap: 14px; }
.score-row-info { display: flex; flex-direction: column; }
.score-row-label { color: var(--vw-grey-700); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.scores-quad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.score-item {
    text-align: center;
    padding: 18px 12px;
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius);
    background: var(--vw-white);
}
.score-item-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}
.score-item-label {
    font-size: 11px;
    color: var(--vw-grey-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 6px;
}

/* =========== Progress bar =========== */
.progress {
    height: 6px;
    background: var(--vw-grey-200);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--vw-blue-dark);
    transition: width .4s;
}
.progress-fill.green { background: var(--vw-green); }
.progress-fill.red { background: var(--vw-red); }
.progress-fill.yellow { background: var(--vw-yellow); }

/* =========== Empty state =========== */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--vw-grey-700);
}
.empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--vw-grey-100);
    color: var(--vw-grey-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.empty h4 { color: var(--vw-grey-900); margin-bottom: 6px; }

/* =========== Misc =========== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }

.split { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
.split-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }

/* =========== Modal =========== */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(32,33,36,.55);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.modal {
    background: white;
    border-radius: var(--vw-radius-lg);
    max-width: 560px;
    width: 100%;
    box-shadow: var(--vw-shadow-3);
    max-height: 92vh;
    overflow: auto;
}
.modal-lg { max-width: 800px; }
.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--vw-grey-200);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 22px 24px; }
.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--vw-grey-200);
    display: flex; gap: 10px; justify-content: flex-end;
    background: var(--vw-grey-50);
    border-radius: 0 0 var(--vw-radius-lg) var(--vw-radius-lg);
}
.close-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: transparent;
    color: var(--vw-grey-700);
    border: 0;
    display: flex; align-items: center; justify-content: center;
}
.close-btn:hover { background: var(--vw-grey-100); }

/* =========== Tabs =========== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--vw-grey-200);
    margin-bottom: 18px;
}
.tab {
    padding: 10px 16px;
    font-weight: 500;
    font-size: var(--vw-fs-sm);
    color: var(--vw-grey-700);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    background: transparent;
    border-top: 0; border-left: 0; border-right: 0;
}
.tab:hover { color: var(--vw-grey-900); }
.tab.active { color: var(--vw-blue-dark); border-bottom-color: var(--vw-blue-dark); }

/* =========== Alert / leak detector cards =========== */
.alert-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius);
    background: var(--vw-white);
    margin-bottom: 10px;
}
.alert-card.warning { border-left: 4px solid var(--vw-yellow); }
.alert-card.critical { border-left: 4px solid var(--vw-red); }
.alert-card.info { border-left: 4px solid var(--vw-blue); }
.alert-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.alert-icon.warning { background: var(--vw-yellow-soft); color: #b06000; }
.alert-icon.critical { background: var(--vw-red-soft); color: var(--vw-red); }
.alert-icon.info { background: var(--vw-blue-soft); color: var(--vw-blue-dark); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 600; font-size: var(--vw-fs-sm); }
.alert-desc { color: var(--vw-grey-700); font-size: 12px; margin-top: 2px; }

/* =========== Audit results =========== */
.audit-section {
    background: white;
    border: 1px solid var(--vw-grey-200);
    border-radius: var(--vw-radius);
    padding: 18px 20px;
    margin-bottom: 14px;
}
.audit-section-title {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; margin-bottom: 8px;
}
.audit-finding {
    padding: 10px 12px;
    border-left: 3px solid var(--vw-grey-300);
    background: var(--vw-grey-50);
    margin: 8px 0;
    border-radius: 0 var(--vw-radius-sm) var(--vw-radius-sm) 0;
}
.audit-finding.warning { border-left-color: var(--vw-yellow); background: var(--vw-yellow-soft); }
.audit-finding.critical { border-left-color: var(--vw-red); background: var(--vw-red-soft); }
.audit-finding.positive { border-left-color: var(--vw-green); background: var(--vw-green-soft); }

@media (max-width: 1024px) {
    .layout { grid-template-columns: 70px 1fr; }
    .sidebar-brand-tagline,
    .sidebar-section,
    .sidebar-link span:not(.badge) { display: none; }
    .sidebar-brand { padding: 12px 6px; }
    .sidebar-brand-img { max-width: 50px; }
    .sidebar-link { justify-content: center; padding: 10px; }
    .scores-quad { grid-template-columns: repeat(2, 1fr); }
    .split, .split-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .content { padding: 18px 14px; }
    .topbar { padding: 0 14px; }
    .field-row, .field-row-3 { grid-template-columns: 1fr; }
}
