/* ====================================================================
   VisiDog Enterprise — Système de Design du Portail d'Administration
   Charte graphique VisiDog Vanilla : CSS natif, aucun framework, responsive.
   ==================================================================== */

:root {
    /* Couleurs institutionnelles VisiDog */
    --vd-navy: #002858;
    --vd-blue: #4898d8;
    --vd-blue-light: rgba(72, 152, 216, 0.14);
    --vd-ink: #101820;
    --vd-surface: #ffffff;
    --vd-bg: #f8f8f0;
    --vd-line: #e3e0d8;
    --vd-muted: #5a6472;

    /* Sémantiques */
    --vd-success: #1a7f37;
    --vd-warning: #9a6700;
    --vd-danger: #c62828;
    --vd-info: #4898d8;

    /* Typographie */
    --vd-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --vd-font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

    /* Espacements & Rayons */
    --vd-radius: 14px;
    --vd-radius-sm: 6px;
    --vd-radius-lg: 16px;

    /* Ombres */
    --vd-shadow: 0 4px 20px rgba(0, 40, 88, 0.06);
    --vd-shadow-lg: 0 16px 40px rgba(0, 40, 88, 0.14);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--vd-font);
    color: var(--vd-ink);
    background: var(--vd-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.vd-portal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.vd-portal-header {
    background: var(--vd-navy);
    color: white;
    height: 60px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 40, 88, 0.2);
}

.vd-portal-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.vd-portal-brand-img {
    height: 1.8rem;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.vd-portal-brand-badge {
    background: var(--vd-blue);
    font-size: 0.65rem;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
}

.vd-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vd-user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.vd-user-role-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.vd-layout {
    display: flex;
    flex: 1;
}

.vd-sidebar {
    width: 250px;
    background: var(--vd-surface);
    border-right: 1px solid var(--vd-line);
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease;
}

.vd-sidebar-nav {
    padding: 1.25rem 0;
}

.vd-sidebar-section {
    padding: 0.75rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vd-muted);
}

.vd-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--vd-ink);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

.vd-sidebar-link:hover {
    background: var(--vd-blue-light);
    color: var(--vd-navy);
}

.vd-sidebar-link.active {
    background: var(--vd-blue-light);
    color: var(--vd-navy);
    font-weight: 600;
    border-left-color: var(--vd-blue);
}

.vd-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--vd-line);
}

/* ============================================
   CONTENU CENTRAL
   ============================================ */
.vd-main-content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 1400px;
}

.vd-page-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.vd-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--vd-navy);
    margin: 0;
}

.vd-page-subtitle {
    font-size: 0.85rem;
    color: var(--vd-muted);
    margin: 0.25rem 0 0;
}

/* ============================================
   CARTES KPI
   ============================================ */
.vd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.vd-kpi-card {
    background: var(--vd-surface);
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--vd-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vd-kpi-label {
    font-size: 0.8rem;
    color: var(--vd-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.vd-kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--vd-navy);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.vd-kpi-sub {
    font-size: 0.78rem;
    color: var(--vd-muted);
}

/* ============================================
   PANNEAUX, TABLES & BOÎTES
   ============================================ */
.vd-card {
    background: var(--vd-surface);
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius);
    box-shadow: var(--vd-shadow);
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.vd-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--vd-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vd-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vd-navy);
    margin: 0;
}

.vd-card-body {
    padding: 1.5rem;
}

/* Tableaux */
.vd-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.vd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.vd-table th {
    background: var(--vd-bg);
    color: var(--vd-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 0.8rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--vd-line);
}

.vd-table td {
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--vd-line);
    color: var(--vd-ink);
    vertical-align: middle;
}

.vd-table tr:hover td {
    background: rgba(72, 152, 216, 0.04);
}

/* ============================================
   BOUTONS & BADGES
   ============================================ */
.vd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: var(--vd-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    font-family: inherit;
}

.vd-btn-primary {
    background: var(--vd-navy);
    color: white;
}
.vd-btn-primary:hover {
    background: #001a3d;
}

.vd-btn-secondary {
    background: var(--vd-surface);
    border-color: var(--vd-line);
    color: var(--vd-ink);
}
.vd-btn-secondary:hover {
    background: var(--vd-bg);
}

.vd-btn-danger {
    background: var(--vd-danger);
    color: white;
}
.vd-btn-danger:hover {
    background: #9a1c1c;
}

.vd-btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.vd-btn:disabled,
.vd-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
}

@keyframes vd-spin {
    to { transform: rotate(360deg); }
}

.vd-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: vd-spin 0.8s linear infinite;
    vertical-align: middle;
}

.vd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}
.vd-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: currentColor;
}

.vd-badge-success { background: rgba(26, 127, 55, 0.12); color: var(--vd-success); }
.vd-badge-warning { background: rgba(154, 103, 0, 0.12); color: var(--vd-warning); }
.vd-badge-danger { background: rgba(198, 40, 40, 0.12); color: var(--vd-danger); }
.vd-badge-info { background: var(--vd-blue-light); color: var(--vd-navy); }
.vd-badge-muted { background: var(--vd-line); color: var(--vd-muted); }

/* ============================================
   BANDEAUX D'ALERTE ET NOTIFICATIONS IN-PAGE
   ============================================ */
.vd-alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--vd-radius-sm);
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    display: block;
    text-align: left;
    box-sizing: border-box;
}
.vd-alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    border-left: 4px solid var(--vd-danger);
    color: #991b1b;
}
.vd-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left: 4px solid var(--vd-success);
    color: #166534;
}
.vd-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 4px solid var(--vd-warning);
    color: #92400e;
}
.vd-alert-info {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-left: 4px solid var(--vd-blue);
    color: var(--vd-navy);
}

/* ============================================
   PROGRESS BARS & CHARTS CSS
   ============================================ */
.vd-progress {
    height: 8px;
    background: var(--vd-line);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.vd-progress-bar {
    height: 100%;
    background: var(--vd-blue);
    border-radius: 4px;
    transition: width 0.4s ease;
}
.vd-progress-bar.warning { background: var(--vd-warning); }
.vd-progress-bar.danger { background: var(--vd-danger); }

/* Bar Chart */
.vd-chart-bars-wrap {
    height: 180px;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem 0 0.5rem;
    border-bottom: 1px solid var(--vd-line);
}

.vd-chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.vd-chart-bar-fill {
    width: 100%;
    max-width: 36px;
    background: var(--vd-blue);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    position: relative;
}
.vd-chart-bar-fill:hover {
    background: var(--vd-navy);
}

.vd-chart-bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vd-ink);
    color: white;
    font-size: 0.68rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    margin-bottom: 4px;
}
.vd-chart-bar-fill:hover .vd-chart-bar-tooltip {
    opacity: 1;
}

.vd-chart-bar-label {
    font-size: 0.7rem;
    color: var(--vd-muted);
    margin-top: 0.4rem;
    text-align: center;
}

/* Donut Chart */
.vd-donut-chart {
    position: relative;
    width: 110px;
    height: 110px;
}
.vd-donut-chart svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.vd-donut-bg {
    fill: none;
    stroke: var(--vd-line);
    stroke-width: 3.2;
}
.vd-donut-fill {
    fill: none;
    stroke: var(--vd-blue);
    stroke-width: 3.2;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}
.vd-donut-fill.warning { stroke: var(--vd-warning); }
.vd-donut-fill.danger { stroke: var(--vd-danger); }

.vd-donut-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.vd-donut-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vd-navy);
    display: block;
    line-height: 1;
}
.vd-donut-sub {
    font-size: 0.65rem;
    color: var(--vd-muted);
    display: block;
    margin-top: 2px;
}

/* ============================================
   MODALES
   ============================================ */
.vd-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 40, 88, 0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.vd-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.vd-modal-content {
    background: var(--vd-surface);
    border-radius: var(--vd-radius);
    width: min(550px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--vd-shadow-lg);
    border: 1px solid var(--vd-line);
    transform: translateY(15px);
    transition: transform 0.2s ease;
}
.vd-modal-backdrop.active .vd-modal-content {
    transform: translateY(0);
}

.vd-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--vd-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vd-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vd-navy);
    margin: 0;
}
.vd-modal-close {
    background: none;
    border: none;
    font-size: 1.35rem;
    cursor: pointer;
    color: var(--vd-muted);
    line-height: 1;
    padding: 0;
}

.vd-modal-body {
    padding: 1.5rem;
}
.vd-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--vd-line);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Formulaires */
.vd-form-group {
    margin-bottom: 1.25rem;
}
.vd-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--vd-ink);
}
.vd-form-input, .vd-form-select, .vd-form-textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--vd-surface);
    color: var(--vd-ink);
}
.vd-form-input:focus, .vd-form-select:focus, .vd-form-textarea:focus {
    outline: none;
    border-color: var(--vd-blue);
    box-shadow: 0 0 0 3px var(--vd-blue-light);
}
.vd-form-hint {
    font-size: 0.75rem;
    color: var(--vd-muted);
    margin-top: 0.35rem;
}

/* Code personnel display */
.vd-code-box {
    font-family: var(--vd-font-mono);
    font-size: 1rem;
    font-weight: 700;
    background: var(--vd-bg);
    border: 1px dashed var(--vd-blue);
    padding: 0.6rem 0.85rem;
    border-radius: var(--vd-radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--vd-navy);
}

/* Toast notifications */
.vd-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.vd-toast {
    background: var(--vd-surface);
    border: 1px solid var(--vd-line);
    border-left: 4px solid var(--vd-blue);
    box-shadow: var(--vd-shadow);
    padding: 0.75rem 1.1rem;
    border-radius: var(--vd-radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: toastSlide 0.25s ease;
}
.vd-toast-success { border-left-color: var(--vd-success); }
.vd-toast-error { border-left-color: var(--vd-danger); }
.vd-toast-warning { border-left-color: var(--vd-warning); }

@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .vd-layout {
        flex-direction: column;
    }
    .vd-sidebar {
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--vd-line);
    }
    .vd-sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }
    .vd-sidebar-section {
        display: none;
    }
    .vd-sidebar-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.5rem 0.75rem;
    }
    .vd-sidebar-link.active {
        border-bottom-color: var(--vd-blue);
    }
    .vd-main-content {
        padding: 1.25rem;
    }
}

/* ============================================
   SÉLECTEUR DE LANGUE BILINGUE (FR / EN)
   ============================================ */
.vd-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    user-select: none;
}

.vd-lang-switcher button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: var(--vd-font);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 4px;
    padding: 4px 7px;
    transition: all 0.15s ease;
}

.vd-lang-switcher button:hover {
    filter: brightness(1.15);
}

/* ============================================
   TABLE TOOLBAR, FILTRES COLONNES & PAGINATION
   ============================================ */
.vd-table-toolbar {
    padding: 0.85rem 1.25rem;
    background: var(--vd-surface);
    border-bottom: 1px solid var(--vd-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vd-table-toolbar-left,
.vd-table-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.vd-per-page-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--vd-muted);
}

.vd-per-page-select {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    font-family: inherit;
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius-sm);
    background: var(--vd-surface);
    color: var(--vd-ink);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}

.vd-per-page-select:focus {
    border-color: var(--vd-blue);
}

.vd-filter-row th {
    background: #f1f4f8;
    padding: 0.45rem 0.5rem;
    border-bottom: 2px solid var(--vd-line);
    vertical-align: middle;
}

.vd-col-filter {
    width: 100%;
    min-width: 70px;
    padding: 0.35rem 0.5rem;
    font-size: 0.76rem;
    font-family: inherit;
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius-sm);
    background: var(--vd-surface);
    color: var(--vd-ink);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
    outline: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.vd-col-filter:focus {
    border-color: var(--vd-blue);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(72, 152, 216, 0.2);
}

.vd-col-filter::placeholder {
    color: #9aa5b5;
    font-size: 0.74rem;
}

select.vd-col-filter {
    cursor: pointer;
}

.vd-pagination-bar {
    padding: 0.85rem 1.25rem;
    background: var(--vd-surface);
    border-top: 1px solid var(--vd-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vd-pagination-info {
    font-size: 0.82rem;
    color: var(--vd-muted);
}

.vd-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.vd-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius-sm);
    background: var(--vd-surface);
    color: var(--vd-ink);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.vd-page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--vd-blue);
    color: var(--vd-navy);
    background: var(--vd-blue-light);
}

.vd-page-btn.active {
    background: var(--vd-navy);
    color: #ffffff;
    border-color: var(--vd-navy);
    cursor: default;
}

.vd-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f8f9fa;
}

.vd-page-ellipsis {
    padding: 0 0.35rem;
    color: var(--vd-muted);
    font-size: 0.82rem;
    user-select: none;
}

.vd-active-filters-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: var(--vd-blue-light);
    color: var(--vd-navy);
}

/* Styles Alertes & Webhooks */
.vd-alerts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .vd-alerts-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }
}

.vd-channel-card {
    background: var(--vd-surface);
    border: 1px solid var(--vd-line);
    border-radius: var(--vd-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.vd-channel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.vd-channel-card.active {
    border-color: #38bdf8;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.vd-channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.vd-channel-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--vd-ink);
}
.vd-channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--vd-blue-light);
    color: var(--vd-navy);
    font-size: 1.1rem;
}

.vd-code-preview-container {
    position: relative;
    background: #0f172a;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #e2e8f0;
    border: 1px solid #1e293b;
}
.vd-code-preview-container pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.vd-code-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1e293b;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.vd-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.vd-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.vd-quota-progress-container {
    background: #f1f5f9;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
    position: relative;
    margin: 0.5rem 0 0.75rem 0;
}
.vd-quota-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}
.vd-quota-threshold-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dc2626;
    z-index: 2;
}

.vd-test-result-box {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.vd-test-result-box.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.vd-test-result-box.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}



