/* BW-FILE-VERSION: 20260913.092557 | 2026-09-13 09:25:57 Europe/Lisbon */
/*
 * IT Stock Manager - App V2
 * Camada visual nova, isolada do CSS legado.
 *
 * Regras:
 * - usar sempre um wrapper .v2-page nas paginas novas;
 * - usar classes v2-* para componentes novos;
 * - nao redefinir seletores globais nem classes da camada legada;
 * - usar .v2-form-grid para formularios responsivos.
 */

.v2-page {
    --v2-primary: #077ab3;
    --v2-primary-hover: #056696;
    --v2-primary-soft: #e7f5fc;
    --v2-ink: #1e293b;
    --v2-text: #334155;
    --v2-muted: #64748b;
    --v2-surface: #ffffff;
    --v2-surface-soft: #f8fafc;
    --v2-border: #dbe5ef;
    --v2-border-strong: #bfd0df;
    --v2-success: #15803d;
    --v2-success-soft: #dcfce7;
    --v2-danger: #b91c1c;
    --v2-danger-soft: #fee2e2;
    --v2-warning: #b45309;
    --v2-warning-soft: #fef3c7;
    --v2-info: #075985;
    --v2-info-soft: #e0f2fe;
    --v2-security: #111827;
    --v2-security-soft: #e5e7eb;
    --v2-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --v2-focus: 0 0 0 3px rgba(7, 122, 179, 0.18);
    color: var(--v2-text);
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
}

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

.v2-page [hidden] {
    display: none !important;
}

.v2-shell {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 0 20px 32px;
}

.v2-shell--wide {
    width: 100%;
    max-width: none;
}

.v2-stack {
    display: grid;
    gap: 18px;
}

.v2-stack--tight {
    gap: 10px;
}

/* GTFS Manager: ativa superfícies de trabalho V2 sem alterar outros módulos. */
.v2-page.v2-gtfs-page > .container {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.v2-page.v2-gtfs-page .v2-section-band,
.v2-page.v2-gtfs-page .form-card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border-strong);
    border-inline-start: 4px solid var(--v2-section-accent, var(--v2-primary));
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.07);
    min-width: 0;
}

.v2-page.v2-gtfs-page .table-responsive,
.v2-page.v2-gtfs-page .v2-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.v2-page.v2-gtfs-page input,
.v2-page.v2-gtfs-page select,
.v2-page.v2-gtfs-page textarea {
    max-width: 100%;
}

@media (max-width: 850px) {
    .v2-page.v2-gtfs-page > .container {
        gap: 14px;
    }

    .v2-page.v2-gtfs-page .form-card {
        padding: 14px;
    }

    .v2-page.v2-gtfs-page .v2-btn,
    .v2-page.v2-gtfs-page .btn {
        min-height: 44px;
        white-space: normal;
    }

    .v2-page.v2-gtfs-page .form-grid,
    .v2-page.v2-gtfs-page .v2-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-page.v2-gtfs-page .table-responsive,
    .v2-page.v2-gtfs-page .v2-table-wrap {
        margin-inline: 0;
        width: 100%;
    }
}

.v2-page .v2-section-band {
    --v2-section-accent: #077ab3;
    min-width: 0;
    padding: 24px;
    background: var(--v2-surface);
    border-block: 1px solid var(--v2-border-strong);
}

.v2-page .v2-section-band--muted {
    --v2-section-accent: #526476;
    background: #edf2f6;
}

.v2-page .v2-section-band--soft {
    --v2-section-accent: #0f766e;
    background: #edf6f3;
}

.v2-page .v2-section-band--security {
    --v2-section-accent: #9f3245;
    background: #faf1f3;
}

.v2-page .v2-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-inline-start: 12px;
    border-inline-start: 3px solid var(--v2-section-accent, var(--v2-primary));
}

.v2-page .v2-section-head > *,
.v2-page .v2-section-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-page .v2-section-head .v2-title,
.v2-page .v2-section-summary {
    font-size: 1.1rem;
    line-height: 1.4;
}

.v2-page .v2-section-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 12px;
    border-bottom: 1px solid var(--v2-border-strong);
}

.v2-page .v2-section-row > :first-child {
    flex: 1 1 220px;
}

.v2-page .v2-section-summary {
    cursor: pointer;
    overflow-wrap: anywhere;
}

.v2-page .v2-section-summary::marker {
    color: var(--v2-section-accent);
}

.v2-page details[open] > .v2-section-summary {
    margin-bottom: 18px;
}

.v2-page .v2-section-summary:focus-visible {
    outline: 2px solid var(--v2-primary);
    outline-offset: 5px;
}

.v2-page .v2-save-bar {
    min-width: 0;
    padding: 16px 24px;
    background: #e5edf4;
    border-top: 2px solid var(--v2-border-strong);
}

/* Opt-in: o cabecalho legado mantem o aspeto nas restantes paginas. */
.v2-header-responsive .v2-header-identity {
    flex: 1 1 280px;
    min-width: 0;
}

.v2-header-responsive .v2-header-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-header-responsive .v2-header-actions {
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}

.v2-header-responsive .v2-header-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

@media (max-width: 850px) {
    .v2-page .v2-section-band {
        padding: 18px 14px;
    }

    .v2-page .v2-save-bar {
        padding: 14px;
    }

    .v2-header-responsive .v2-header-actions {
        width: 100%;
    }

    .v2-header-responsive .v2-header-actions > a {
        flex: 1 1 180px;
    }
}

.v2-page .v2-choice-list {
    display: grid;
    align-content: start;
    gap: 10px;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--v2-border);
    border-radius: 6px;
}

.v2-page .v2-user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.v2-page .v2-user-identity > div { min-width: 0; overflow-wrap: anywhere; }
.v2-page .v2-user-avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    background: #077ab3;
    font-size: 1.1rem;
    font-weight: 800;
    object-fit: cover;
}
.v2-page .v2-user-avatar--large { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.8rem; }
.v2-page .v2-user-avatar--muted { background: #64748b; }
.v2-page .v2-user-name { color: var(--v2-primary); font-weight: 750; }
.v2-page .v2-users-table thead th { background: #e8f3fb; color: #075985; }
.v2-page .v2-users-table td { vertical-align: middle; }
.v2-page .v2-users-table .v2-cluster { gap: 6px; }
.v2-page .v2-users-filter { padding: 20px; background: #fff; border-block: 1px solid var(--v2-border); }
.v2-page .v2-live-status { min-height: 1.5em; margin: 0; }
.v2-page [data-v2-live-results][aria-busy="true"] { opacity: .6; }
.v2-page .v2-btn-view { background: #e7f3ff; border-color: #bad8ed; color: #075985; }
.v2-page .v2-btn-edit { background: #e9f8ee; border-color: #b8dec7; color: #166534; }
.v2-page.v2-users-form .v2-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-page.v2-users-form .v2-choice-list { background: #fff; }
.v2-page.v2-users-form .v2-section-head { color: var(--v2-primary); }
.v2-page.v2-users-form .v2-section-head .v2-title { color: inherit; }
.v2-page .v2-master-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}
.v2-page .v2-master-detail > * { min-width: 0; }
.v2-page .v2-master-detail--sidebar-first { grid-template-columns: 280px minmax(0, 1fr); }
.v2-page .v2-profile-sidebar { background: #edf6f3; border-top: 3px solid #15803d; padding: 18px; }
.v2-page .v2-profile-sidebar .v2-title { font-size: 1.1rem; }
.v2-page .v2-member { padding: 12px 0; border-bottom: 1px solid #c6ded4; overflow-wrap: anywhere; }
.v2-page .v2-member .v2-cluster { margin-top: 8px; }
.v2-page .v2-permission-group {
    min-width: 0;
    border: 1px solid #c9ddea;
    border-radius: 6px;
    background: #fff;
}
.v2-page .v2-permission-group__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: #e7f3fc;
    color: #075985;
    border-radius: 5px 5px 0 0;
}
.v2-page .v2-permission-group__head > :first-child { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.v2-page .v2-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.v2-page .v2-permission-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}
.v2-page .v2-permission-choice:has(input:checked) { background: #edf9f1; border-color: #bbdfc7; }
.v2-page .v2-permission-choice:has(input:disabled) { cursor: default; }
.v2-page .v2-permission-choice input { flex: 0 0 18px; width: 18px; height: 18px; margin: 3px 0 0; accent-color: #15803d; }
.v2-page .v2-permission-choice > span { min-width: 0; overflow-wrap: anywhere; font-size: .82rem; }
.v2-page .v2-permission-choice small { display: block; margin-top: 5px; color: var(--v2-muted); font-weight: 400; }
.v2-page .v2-permission-branch { margin: 0 14px 0 24px; padding: 12px 0 12px 14px; border-left: 2px solid #c9ddea; border-bottom: 1px solid var(--v2-border); }
.v2-page .v2-permission-branch:last-child { margin-bottom: 12px; }
.v2-page .v2-permission-branch .v2-section-row { padding: 0; border: 0; }
.v2-page .v2-users-overview { border-top: 3px solid var(--v2-primary); }
.v2-page .v2-access-tag { padding: 10px; border: 1px solid #dbe5ef; border-radius: 4px; background: #f8fafc; }
.v2-page .v2-access-tag--enabled { background: #edf9f1; border-color: #bbdfc7; color: #166534; }
.v2-page .v2-users-overview .v2-audit-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-page .v2-users-overview .v2-audit-meta > div { border-bottom: 1px solid var(--v2-border); padding-bottom: 12px; }
@media (max-width: 1000px) {
    .v2-page .v2-master-detail,
    .v2-page .v2-master-detail--sidebar-first { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 850px) {
    .v2-page.v2-users-form .v2-form-grid,
    .v2-page .v2-permission-grid,
    .v2-page .v2-users-overview .v2-audit-meta { grid-template-columns: minmax(0, 1fr); }
    .v2-page .v2-users-filter { padding: 14px; }
    .v2-page .v2-permission-group__head { padding: 12px; }
    .v2-page .v2-permission-branch { margin-inline: 10px; padding-inline-start: 10px; }
}

.v2-page .v2-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-page .v2-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: var(--v2-primary);
}

.v2-page .v2-cell-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-save-spotlight {
    position: fixed;
    inset: 0;
    z-index: 1000100;
    pointer-events: none;
}

.v2-save-spotlight__shade {
    position: absolute;
    background: rgba(15, 23, 42, 0.72);
    pointer-events: auto;
}

.v2-save-spotlight__ring {
    position: absolute;
    border: 3px solid #38bdf8;
    border-radius: 8px;
    pointer-events: none;
}

.v2-save-spotlight__hint {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #bfd0df;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    pointer-events: auto;
}

.v2-save-spotlight__close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    font-size: 22px;
    cursor: pointer;
}

.v2-save-spotlight__close:focus-visible {
    outline: 2px solid #077ab3;
    outline-offset: 2px;
}

.v2-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.v2-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.v2-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.v2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.v2-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v2-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v2-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.v2-panel,
.v2-card {
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    box-shadow: var(--v2-shadow);
}

.v2-panel {
    padding: 20px;
}

.v2-card {
    padding: 16px;
}

.v2-card--compact {
    padding: 12px;
}

.v2-link-card {
    display: grid;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.v2-link-card:hover {
    border-color: var(--v2-primary);
    box-shadow: 0 12px 32px rgba(7, 122, 179, 0.12);
    transform: translateY(-1px);
}

.v2-title {
    margin: 0;
    color: var(--v2-ink);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.v2-subtitle {
    margin: 0;
    color: var(--v2-ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
}

.v2-heading {
    margin: 0;
    color: var(--v2-ink);
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0;
}

.v2-text {
    margin: 0;
    color: var(--v2-text);
}

.v2-muted {
    color: var(--v2-muted);
}

.v2-small {
    font-size: 0.86rem;
}

.v2-link {
    color: var(--v2-primary);
    text-decoration: none;
}

.v2-link:hover {
    color: var(--v2-primary-hover);
    text-decoration: underline;
}

.v2-field {
    display: grid;
    gap: 6px;
}

.v2-label {
    color: var(--v2-ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.v2-title-row,
.v2-label-row,
.v2-check-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
}

.v2-title-row {
    flex-wrap: wrap;
}

.v2-label-row,
.v2-check-title {
    flex-wrap: nowrap;
}

.v2-help-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--v2-primary);
    background: var(--v2-primary-soft);
    border: 1px solid rgba(7, 122, 179, 0.24);
    border-radius: 999px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1;
    cursor: help;
    touch-action: manipulation;
}

.v2-help-button:hover,
.v2-help-button:focus-visible,
.v2-help-button[aria-expanded="true"] {
    color: #ffffff;
    background: var(--v2-primary);
    outline: none;
    box-shadow: var(--v2-focus);
}

.v2-hint {
    color: var(--v2-muted);
    font-size: 0.82rem;
}

.v2-delivery-groups {
    display: grid;
    gap: 20px;
}

.v2-delivery-group {
    min-width: 0;
}

.v2-delivery-list {
    padding: 0;
    margin: 10px 0 0;
    list-style: none;
    border-top: 1px solid var(--v2-border);
}

.v2-delivery-item {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, auto);
    gap: 8px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--v2-border);
}

.v2-delivery-item__identity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.v2-delivery-item__email {
    color: var(--v2-muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.v2-delivery-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.v2-delivery-item__note,
.v2-delivery-item__error {
    grid-column: 1 / -1;
}

.v2-delivery-item__note {
    color: var(--v2-muted);
    font-size: 0.84rem;
}

.v2-popup-form {
    min-width: 0;
    text-align: left;
}

.v2-notification-popup-surface {
    width: 100%;
    min-width: 0;
    color: var(--v2-text);
    text-align: left;
}

.v2-notification-popup-surface .v2-popup-form > :first-child {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-notification-popup-surface .v2-input,
.v2-notification-popup-surface .v2-select,
.v2-notification-popup-surface .v2-textarea {
    background-color: #ffffff;
    border-color: var(--v2-border-strong);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.v2-notification-popup-surface .v2-input:hover,
.v2-notification-popup-surface .v2-select:hover,
.v2-notification-popup-surface .v2-textarea:hover {
    border-color: #8ea8bd;
}

.v2-notification-popup-surface .v2-input:disabled,
.v2-notification-popup-surface .v2-select:disabled,
.v2-notification-popup-surface .v2-textarea:disabled {
    color: var(--v2-muted);
    background: #eef2f6;
    border-color: var(--v2-border);
}

.v2-notification-popup-surface .v2-check-row {
    min-width: 0;
    padding: 12px;
    background: var(--v2-surface-soft);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
}

.v2-notification-popup-surface .v2-recipient-item {
    border-color: var(--v2-border-strong);
}

.v2-notification-popup-surface .v2-popup-native-actions {
    display: none;
}

.v2-popup-form .v2-actions {
    justify-content: flex-end;
}

.v2-parametros-popup-surface {
    width: 100%;
    min-width: 0;
    color: var(--v2-text);
    text-align: left;
}

.v2-parametros-editor {
    display: grid;
    min-width: 0;
    overflow: hidden;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border-strong);
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.07);
}

.v2-parametros-editor__section {
    min-width: 0;
    padding: 20px;
    background: var(--v2-surface);
}

.v2-parametros-editor__section + .v2-parametros-editor__section {
    border-top: 1px solid var(--v2-border-strong);
}

.v2-parametros-editor__section--soft {
    background: #f5f8fb;
}

.v2-parametros-editor__heading {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-parametros-editor__heading h3,
.v2-parametros-editor__heading p {
    margin: 0;
}

.v2-parametros-editor__heading h3 {
    color: var(--v2-ink);
    font-size: 1rem;
    line-height: 1.35;
}

.v2-parametros-editor__heading p {
    margin-top: 2px;
    color: var(--v2-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.v2-parametros-editor__icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--v2-primary-soft);
    border: 1px solid #bfdded;
    border-radius: 8px;
    font-size: 1rem;
}

.v2-parametros-editor__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.v2-parametros-editor__field--wide {
    grid-column: 1 / -1;
}

.v2-parametros-editor .v2-label {
    color: var(--v2-ink);
    font-weight: 700;
}

.v2-parametros-editor .v2-input,
.v2-parametros-editor .v2-select,
.v2-parametros-editor .v2-textarea {
    color: var(--v2-text);
    background: #ffffff;
    border: 1px solid #9fb5c8;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.v2-parametros-editor .v2-input:hover,
.v2-parametros-editor .v2-select:hover,
.v2-parametros-editor .v2-textarea:hover {
    border-color: #6f93af;
}

.v2-parametros-editor .v2-input:focus,
.v2-parametros-editor .v2-select:focus,
.v2-parametros-editor .v2-textarea:focus {
    border-color: var(--v2-primary);
    box-shadow: var(--v2-focus);
}

.v2-parametros-editor .v2-select[multiple] {
    min-height: 176px;
    padding: 5px;
}

.v2-parametros-editor .v2-select[multiple] option {
    padding: 8px 9px;
    border-radius: 5px;
}

.v2-parametros-editor .v2-select[multiple] option:checked {
    color: #ffffff;
    background: #077ab3 linear-gradient(0deg, #077ab3 0%, #077ab3 100%);
}

.v2-parametros-editor .v2-check-row {
    min-height: 72px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #9fb5c8;
    border-radius: 8px;
    cursor: pointer;
}

.v2-parametros-editor .v2-check-row:hover {
    border-color: #6f93af;
    background: #fbfdff;
}

.v2-parametros-editor .v2-check-row input {
    accent-color: var(--v2-primary);
}

@media (max-width: 700px) {
    .v2-delivery-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-delivery-item__meta {
        justify-content: flex-start;
    }

    .v2-parametros-editor__section {
        padding: 16px;
    }

    .v2-parametros-editor__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-parametros-editor__field--wide {
        grid-column: auto;
    }
}

.v2-input,
.v2-select,
.v2-textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--v2-text);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.v2-textarea {
    min-height: 110px;
    resize: vertical;
}

.v2-input:focus,
.v2-select:focus,
.v2-textarea:focus {
    outline: none;
    border-color: var(--v2-primary);
    box-shadow: var(--v2-focus);
}

.v2-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--v2-text);
}

.v2-check-row input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.v2-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.v2-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.v2-switch__track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--v2-border-strong);
    transition: background 0.18s ease;
}

.v2-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--v2-surface);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.22);
    transition: transform 0.18s ease;
}

.v2-switch input:checked + .v2-switch__track {
    background: var(--v2-primary);
}

.v2-switch input:checked + .v2-switch__track .v2-switch__thumb {
    transform: translateX(18px);
}

.v2-switch input:focus-visible + .v2-switch__track {
    box-shadow: var(--v2-focus);
}

.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.v2-btn:active {
    transform: scale(0.98);
}

.v2-btn:focus-visible {
    outline: none;
    box-shadow: var(--v2-focus);
}

.v2-btn[disabled],
.v2-btn.v2-is-disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.v2-btn-primary {
    color: #ffffff;
    background: var(--v2-primary);
}

.v2-btn-primary:hover {
    color: #ffffff;
    background: var(--v2-primary-hover);
}

.v2-btn-secondary {
    color: var(--v2-text);
    background: var(--v2-surface-soft);
    border-color: var(--v2-border);
}

.v2-btn-secondary:hover {
    color: var(--v2-primary);
    border-color: var(--v2-primary);
}

.v2-btn-success {
    color: #ffffff;
    background: var(--v2-success);
}

.v2-btn-danger {
    color: #ffffff;
    background: var(--v2-danger);
}

.v2-btn-warning {
    color: #422006;
    background: #fbbf24;
}

.v2-btn-security {
    color: #ffffff;
    background: var(--v2-security);
}

.v2-btn-ghost {
    color: var(--v2-primary);
    background: transparent;
    border-color: transparent;
}

.v2-btn-ghost:hover {
    background: var(--v2-primary-soft);
}

.v2-btn-sm {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.84rem;
}

.v2-btn-icon {
    width: 40px;
    padding: 0;
}

.v2-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    background: var(--v2-surface-soft);
    color: var(--v2-text);
}

.v2-alert-info {
    color: var(--v2-info);
    background: var(--v2-info-soft);
    border-color: #bae6fd;
}

.v2-alert-success {
    color: var(--v2-success);
    background: var(--v2-success-soft);
    border-color: #bbf7d0;
}

.v2-alert-warning {
    color: var(--v2-warning);
    background: var(--v2-warning-soft);
    border-color: #fde68a;
}

.v2-alert-danger {
    color: var(--v2-danger);
    background: var(--v2-danger-soft);
    border-color: #fecaca;
}

.v2-alert-security {
    color: var(--v2-security);
    background: var(--v2-security-soft);
    border-color: #d1d5db;
}

.v2-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    background: var(--v2-surface-soft);
    color: var(--v2-muted);
    border: 1px solid var(--v2-border);
}

.v2-badge-info {
    color: var(--v2-info);
    background: var(--v2-info-soft);
    border-color: #bae6fd;
}

.v2-badge-success {
    color: var(--v2-success);
    background: var(--v2-success-soft);
    border-color: #bbf7d0;
}

.v2-badge-warning {
    color: var(--v2-warning);
    background: var(--v2-warning-soft);
    border-color: #fde68a;
}

.v2-badge-danger {
    color: var(--v2-danger);
    background: var(--v2-danger-soft);
    border-color: #fecaca;
}

.v2-badge-security {
    color: var(--v2-security);
    background: var(--v2-security-soft);
    border-color: #d1d5db;
}

.v2-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    background: var(--v2-surface);
}

.v2-table-wrap--scroll {
    max-height: 58vh;
    overflow: auto;
}

.v2-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--v2-surface);
}

.v2-table th,
.v2-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--v2-border);
    text-align: left;
    vertical-align: middle;
}

.v2-table th {
    color: var(--v2-muted);
    background: var(--v2-surface-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
}

.v2-table tr:last-child td {
    border-bottom: 0;
}

.v2-table tbody tr:hover {
    background: #f9fbfd;
}

.v2-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.v2-empty {
    padding: 24px;
    color: var(--v2-muted);
    text-align: center;
    background: var(--v2-surface-soft);
    border: 1px dashed var(--v2-border-strong);
    border-radius: 8px;
}

.v2-code-block {
    max-width: 100%;
    margin: 0;
    padding: 10px 12px;
    overflow-x: auto;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.v2-audit-list {
    min-width: 0;
    border-top: 1px solid var(--v2-border-strong);
}

.v2-audit-record {
    min-width: 0;
    border-bottom: 1px solid var(--v2-border-strong);
    background: var(--v2-surface);
}

.v2-audit-record__summary {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 16px 12px;
    cursor: pointer;
    list-style: none;
}

.v2-audit-record__summary::-webkit-details-marker {
    display: none;
}

.v2-audit-record__summary:hover,
.v2-audit-record[open] > .v2-audit-record__summary {
    background: var(--v2-surface-soft);
}

.v2-audit-record__summary:focus-visible {
    outline: 2px solid var(--v2-primary);
    outline-offset: -2px;
}

.v2-audit-record__time,
.v2-audit-record__copy {
    display: grid;
    gap: 5px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-audit-record__time {
    color: var(--v2-muted);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.v2-audit-record__copy strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: var(--v2-ink);
    font-size: 0.92rem;
    font-weight: 650;
}

.v2-audit-record__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: 250px;
}

.v2-audit-record__badges::after {
    content: "+";
    width: 24px;
    text-align: center;
    color: var(--v2-primary);
    font-weight: 800;
}

.v2-audit-record[open] .v2-audit-record__badges::after {
    content: "-";
}

.v2-audit-record__detail {
    min-width: 0;
    padding: 18px 12px;
    border-top: 1px solid var(--v2-border);
    overflow-wrap: anywhere;
}

.v2-audit-record__detail .v2-code-block {
    max-height: 360px;
    overflow: auto;
    overflow-wrap: anywhere;
}

.v2-audit-record__detail .v2-grid > * {
    min-width: 0;
}

.v2-audit-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px 20px;
    margin: 0;
    font-size: 0.84rem;
}

.v2-audit-meta > div {
    min-width: 0;
}

.v2-audit-meta dt {
    color: var(--v2-muted);
    font-weight: 600;
}

.v2-audit-meta dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.v2-log-filter-search {
    grid-column: span 2;
}

.v2-log-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.v2-log-identity--affected {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--v2-border);
}

.v2-log-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

.v2-log-details-copy {
    min-width: 220px;
    margin: 8px 0 4px;
    color: var(--v2-text);
    font-size: 0.84rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.v2-log-value-block {
    width: min(390px, 32vw);
    min-width: 270px;
    max-height: 220px;
    margin: 0;
    padding: 10px 12px;
    overflow: auto;
    color: var(--v2-ink);
    background: var(--v2-surface-soft);
    border: 1px solid var(--v2-border-strong);
    border-left-width: 4px;
    border-radius: 6px;
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.76rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.v2-log-value-block--old {
    background: #fff7f7;
    border-left-color: var(--v2-danger);
}

.v2-log-value-block--new {
    background: #f3fbf5;
    border-left-color: var(--v2-success);
}

.v2-logs-popup-surface {
    width: 100%;
    min-width: 0;
    color: var(--v2-text);
    text-align: left;
}

.v2-logs-popup-surface .v2-log-value-block {
    width: 100%;
    min-width: 0;
    max-height: 360px;
}

@media (max-width: 850px) {
    .v2-audit-record__summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .v2-audit-record__time {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .v2-audit-record__badges {
        justify-content: flex-start;
        max-width: none;
    }

    .v2-audit-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-log-filter-search {
        grid-column: auto;
    }

    .v2-log-details-copy,
    .v2-log-value-block {
        width: 100%;
        min-width: 0;
    }
}

.v2-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--v2-border);
}

.v2-tabs--boxed {
    gap: 10px;
    padding-bottom: 0;
    border-bottom: 0;
}

.v2-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--v2-muted);
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.v2-tabs--boxed .v2-tab {
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    text-decoration: none;
    background: var(--v2-surface-soft);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
}

.v2-tab:hover,
.v2-tab.v2-is-active {
    color: var(--v2-primary);
    border-bottom-color: var(--v2-primary);
}

.v2-tabs--boxed .v2-tab:hover,
.v2-tabs--boxed .v2-tab.v2-is-active {
    color: var(--v2-primary);
    background: var(--v2-primary-soft);
    border-color: var(--v2-primary);
}

.v2-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    color: var(--v2-ink);
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 850;
}

.v2-file-tree {
    max-height: 58vh;
    min-height: 240px;
    overflow: auto;
    padding: 6px;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
}

.v2-file-tree__tools {
    width: min(100%, 360px);
}

.v2-file-tree__folder {
    display: block;
}

.v2-file-tree__folder > summary {
    list-style: none;
}

.v2-file-tree__folder > summary::-webkit-details-marker {
    display: none;
}

.v2-file-tree__row {
    display: grid;
    grid-template-columns: 18px 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 1px 0;
    padding: 4px 8px 4px calc(8px + (var(--v2-tree-depth, 0) * 24px));
    color: var(--v2-text);
    border-radius: 8px;
    cursor: pointer;
}

.v2-file-tree__row:nth-child(even) {
    background: #f7f9fb;
}

.v2-file-tree__row:hover {
    background: var(--v2-primary-soft);
}

.v2-file-tree__row--file {
    cursor: default;
}

.v2-file-tree__folder[open] > .v2-file-tree__row,
.v2-file-tree__folder[open] > summary.v2-file-tree__row {
    background: #f8fafc;
}

.v2-file-tree__chevron {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #64748b;
    transition: transform 0.15s ease;
}

.v2-file-tree__folder[open] > summary .v2-file-tree__chevron {
    transform: rotate(90deg);
}

.v2-file-tree__chevron--empty {
    border-left-color: transparent;
}

.v2-file-tree__icon {
    width: 24px;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1;
}

.v2-file-tree__name {
    min-width: 0;
    overflow: hidden;
    color: var(--v2-ink);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-file-tree__meta {
    color: var(--v2-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.v2-file-tree__children {
    display: block;
}

.v2-file-tree__hidden {
    display: none;
}

.v2-file-tree__match {
    background: var(--v2-warning-soft);
}

.v2-notification-list {
    display: grid;
    gap: 12px;
}

.v2-notification-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
}

.v2-notification-card__main {
    display: grid;
    gap: 8px;
}

.v2-notification-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-recipient-list {
    display: grid;
    gap: 8px;
}

.v2-recipient-type-guidance {
    grid-column: 1 / -1;
}

.v2-recipient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--v2-surface-soft);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
}

.v2-required-marker {
    color: var(--v2-security);
    font-weight: 800;
}

.v2-event-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-event-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid var(--v2-border);
}

.v2-event-chip--insert {
    color: var(--v2-success);
    background: var(--v2-success-soft);
    border-color: #bbf7d0;
}

.v2-event-chip--update {
    color: var(--v2-info);
    background: var(--v2-info-soft);
    border-color: #bae6fd;
}

.v2-event-chip--delete {
    color: var(--v2-danger);
    background: var(--v2-danger-soft);
    border-color: #fecaca;
}

.v2-event-chip--closed {
    color: var(--v2-security);
    background: var(--v2-security-soft);
    border-color: #d1d5db;
}

.v2-event-chip--restore {
    color: var(--v2-warning);
    background: var(--v2-warning-soft);
    border-color: #fde68a;
}

.v2-event-chip--access {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #99f6e4;
}

/* Editor standard de imagem do sistema de media. */
.v2-media-editor {
    width: 100%;
    min-width: 0;
    color: var(--v2-text);
    text-align: left;
}

.v2-media-editor__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
    align-items: start;
}

.v2-media-editor__workspace {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-width: 0;
}

.v2-media-editor__stage {
    position: relative;
    width: min(100%, 600px);
    overflow: hidden;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.v2-media-editor__stage:active,
.v2-media-editor__stage.v2-is-dragging {
    cursor: grabbing;
}

.v2-media-editor__stage:focus-visible {
    outline: none;
    box-shadow: var(--v2-focus), 0 8px 24px rgba(15, 23, 42, 0.16);
}

.v2-media-editor__canvas {
    display: block;
    width: 100%;
    height: auto;
}

.v2-media-editor__mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.v2-media-editor__mask--circle {
    border-radius: 50%;
    box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.48);
}

.v2-media-editor__instruction {
    margin: 0;
    color: var(--v2-muted);
    font-size: 0.84rem;
    text-align: center;
}

.v2-media-editor__controls {
    display: grid;
    gap: 18px;
    min-width: 0;
    padding-left: 20px;
    border-left: 1px solid var(--v2-border);
}

.v2-media-editor__control {
    display: grid;
    gap: 8px;
}

.v2-media-editor__control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.v2-media-editor__zoom {
    width: 100%;
    min-height: 28px;
    accent-color: var(--v2-primary);
    cursor: pointer;
}

.v2-media-editor__tool-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.v2-media-editor__tool-row .v2-btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
}

.v2-media-editor__file {
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid var(--v2-border);
}

.v2-media-editor__filename {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--v2-ink);
    font-size: 0.84rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-media-editor__status {
    min-height: 1.4em;
    margin: 0;
    color: var(--v2-muted);
    font-size: 0.82rem;
}

.v2-media-editor__status.v2-is-error {
    color: var(--v2-danger);
    font-weight: 700;
}

.v2-text-right {
    text-align: right;
}

.v2-nowrap {
    white-space: nowrap;
}

.v2-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 850px) {
    .v2-shell {
        padding: 0 12px 24px;
    }

    .v2-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .v2-actions {
        justify-content: stretch;
    }

    .v2-actions .v2-btn {
        flex: 1 1 180px;
    }

    .v2-tabs--boxed .v2-tab {
        flex: 1 1 150px;
    }

    .v2-file-tree {
        max-height: 64vh;
        min-height: 220px;
    }

    .v2-file-tree__row {
        grid-template-columns: 16px 22px minmax(0, 1fr);
        padding-left: calc(6px + (var(--v2-tree-depth, 0) * 16px));
    }

    .v2-file-tree__meta {
        display: none;
    }

    .v2-grid--2,
    .v2-grid--3 {
        grid-template-columns: 1fr;
    }

    .v2-panel {
        padding: 14px;
    }

    .v2-title {
        font-size: 1.22rem;
    }

    .v2-table-wrap {
        overflow-x: visible;
        border: 0;
        background: transparent;
    }

    .v2-table,
    .v2-table thead,
    .v2-table tbody,
    .v2-table tr,
    .v2-table th,
    .v2-table td {
        display: block;
        width: 100%;
    }

    .v2-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .v2-table tr {
        margin-bottom: 10px;
        background: var(--v2-surface);
        border: 1px solid var(--v2-border);
        border-radius: 8px;
    }

    .v2-table td {
        display: grid;
        grid-template-columns: minmax(110px, 40%) minmax(0, 1fr);
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--v2-border);
    }

    .v2-table td::before {
        content: attr(data-label);
        color: var(--v2-muted);
        font-size: 0.78rem;
        font-weight: 800;
    }

    .v2-table-actions {
        justify-content: stretch;
    }

    .v2-table-actions .v2-btn {
        flex: 1 1 auto;
    }

    .v2-notification-card {
        grid-template-columns: 1fr;
    }

    .v2-recipient-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .v2-media-editor__layout {
        grid-template-columns: 1fr;
    }

    .v2-media-editor__stage {
        width: min(100%, 520px);
    }

    .v2-media-editor__controls {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding-top: 16px;
        padding-left: 0;
        border-top: 1px solid var(--v2-border);
        border-left: 0;
    }

    .v2-media-editor__file,
    .v2-media-editor__status {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .v2-form-grid {
        grid-template-columns: 1fr;
    }

    .v2-btn {
        width: 100%;
        white-space: normal;
    }

    .v2-btn-icon {
        width: 40px;
    }

    .v2-media-editor__controls {
        grid-template-columns: 1fr;
    }

    .v2-media-editor__file,
    .v2-media-editor__status {
        grid-column: auto;
    }

    .v2-media-editor__tool-row .v2-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Frota V2
   ========================================================================== */
.v2-fleet-module {
    --v2-fleet-photo-ratio: 4 / 3;
}

.v2-fleet-observations-input {
    min-height: 150px;
}

.v2-fleet-observations-preview {
    display: -webkit-box;
    min-width: 180px;
    max-width: 360px;
    overflow: hidden;
    color: var(--v2-text);
    font-size: 0.84rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.v2-fleet-observations-copy {
    min-width: 0;
    margin: 0;
    padding: 16px;
    color: var(--v2-text);
    background: var(--v2-surface);
    border-left: 4px solid var(--v2-primary);
    line-height: 1.65;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.v2-fleet-photo-layout {
    display: grid;
    grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
}

.v2-fleet-photo-preview {
    display: grid;
    width: 100%;
    aspect-ratio: var(--v2-fleet-photo-ratio);
    overflow: hidden;
    place-items: center;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    color: var(--v2-muted);
}

.v2-fleet-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-fleet-thumb {
    display: grid;
    width: 82px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    place-items: center;
    background: var(--v2-surface-soft);
    border: 1px solid var(--v2-border);
    border-radius: 7px;
    font-size: 1.35rem;
}

.v2-fleet-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-fleet-plate {
    display: inline-block;
    padding: 3px 8px;
    background: #fff;
    border: 2px solid #26313d;
    border-radius: 5px;
    color: #17202a;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.82rem;
    font-weight: 800;
}

.v2-fleet-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.v2-fleet-details div {
    min-width: 0;
    padding: 12px;
    background: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 7px;
}

.v2-fleet-details dt {
    margin-bottom: 5px;
    color: var(--v2-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.v2-fleet-details dd {
    margin: 0;
    color: var(--v2-ink);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.v2-fleet-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.v2-fleet-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--v2-surface);
    border: 2px solid var(--v2-border);
    border-radius: 8px;
}

.v2-fleet-gallery-item.v2-is-primary {
    border-color: var(--v2-success);
}

.v2-fleet-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-fleet-gallery-item span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 8px;
    background: var(--v2-success);
    border-radius: 5px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

@media (max-width: 850px) {
    .v2-fleet-photo-layout,
    .v2-fleet-details {
        grid-template-columns: 1fr;
    }

    .v2-fleet-photo-preview {
        width: min(100%, 520px);
    }

    .v2-fleet-observations-preview {
        max-width: none;
    }
}
