:root {
    --navy: #102a3e;
    --navy-dark: #0b1d2b;
    --blue: #166e8a;
    --teal: #35a7a0;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #17212b;
    --muted: #70808f;
    --line: #dde4e9;
    --success: #1d8f6f;
    --danger: #b54343;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(53,167,160,.18),
            transparent 28%
        ),
        var(--navy-dark);
}

.login-shell {
    width: min(1020px, calc(100% - 40px));
    min-height: 590px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    overflow: hidden;
    border-radius: 26px;
    background: white;
    box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

.login-brand {
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    background:
        linear-gradient(
            145deg,
            var(--navy) 0%,
            #164f64 100%
        );
}

.logo-box {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: white;
    color: var(--navy);
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-box.small {
    width: 43px;
    height: 43px;
    border-radius: 11px;
    font-size: 12px;
}

.login-copy h1 {
    margin: 10px 0 18px;
    font-size: 48px;
    letter-spacing: -2px;
}

.login-copy p {
    max-width: 480px;
    margin: 0;
    color: #c6d7df;
    font-size: 17px;
    line-height: 1.7;
}

.eyebrow {
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.login-card {
    padding: 75px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -1px;
}

.muted {
    margin: 9px 0 34px;
    color: var(--muted);
}

.login-card label {
    display: block;
    margin: 20px 0 7px;
    font-size: 13px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    height: 48px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
}

.login-card input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(22,110,138,.10);
}

.primary-button {
    width: 100%;
    min-height: 49px;
    margin-top: 26px;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.primary-button.compact {
    width: auto;
    margin: 0;
    padding: 0 18px;
}

.primary-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.login-footer {
    margin-top: 30px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.alert {
    padding: 12px 14px;
    margin: 5px 0 8px;
    border-radius: 8px;
    color: #842b2b;
    background: #fbecec;
    border: 1px solid #f1caca;
    font-size: 13px;
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 245px 1fr;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    color: white;
    background: var(--navy-dark);
}

.sidebar-brand {
    height: 68px;
    padding: 5px 7px 20px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid rgba(255,255,255,.09);
}

.sidebar-brand strong {
    display: block;
    font-size: 17px;
}

.sidebar-brand span {
    display: block;
    margin-top: 3px;
    color: #88a2b1;
    font-size: 10px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
}

.nav-list a {
    padding: 11px 12px;
    border-radius: 8px;
    color: #aebfc8;
    font-size: 13px;
    font-weight: 600;
}

.nav-list a:hover,
.nav-list a.active {
    color: white;
    background: rgba(255,255,255,.09);
}

.nav-list a.active {
    box-shadow:
        inset 3px 0 0 var(--teal);
}

.nav-separator {
    height: 1px;
    margin: 8px 4px;
    background: rgba(255,255,255,.08);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 7px 2px;
    border-top: 1px solid rgba(255,255,255,.09);
}

.user-block strong {
    display: block;
    font-size: 12px;
}

.user-block span {
    display: block;
    margin-top: 4px;
    color: #7893a2;
    font-size: 9px;
}

.logout-button {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    color: #c8d5db;
    background: transparent;
    cursor: pointer;
}

.main-content {
    grid-column: 2;
    min-width: 0;
}

.topbar {
    height: 68px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--line);
}

.topbar strong,
.topbar span {
    display: block;
}

.topbar strong {
    font-size: 13px;
}

.topbar span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.system-state {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.system-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.page {
    padding: 28px;
}

.page-heading {
    margin-bottom: 23px;
}

.row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.page-heading h1 {
    margin: 6px 0 5px;
    color: var(--navy);
    font-size: 29px;
    letter-spacing: -1px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    min-height: 105px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.stat-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.stat-card strong {
    color: var(--navy);
    font-size: 31px;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.panel-header {
    min-height: 74px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.panel-header h2 {
    margin: 0;
    font-size: 15px;
}

.panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.text-button {
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.table-wrap {
    width: 100%;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th,
td {
    padding: 11px 13px;
    text-align: left;
    border-bottom: 1px solid #edf0f2;
    font-size: 11px;
}

th {
    color: #647481;
    background: #f8f9fa;
    font-size: 9px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

tbody tr:hover {
    background: #fafcfd;
}

.center {
    text-align: center;
}

.stage {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    color: #176653;
    background: #eaf7f3;
    font-size: 9px;
    font-weight: 800;
}

.empty-state {
    min-height: 210px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    color: var(--navy);
    font-size: 14px;
}

.empty-state span {
    margin-top: 7px;
    font-size: 11px;
}

.notice-panel {
    margin-top: 15px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #d9e8e6;
    background: #f1f8f7;
}

.notice-panel strong,
.notice-panel span {
    display: block;
}

.notice-panel strong {
    color: #246d62;
    font-size: 11px;
}

.notice-panel span {
    margin-top: 4px;
    color: #60756f;
    font-size: 10px;
}

@media (max-width: 1050px) {
    .stats {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 760px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-card {
        padding: 45px 30px;
    }

    .app-layout {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
    }

    .main-content {
        grid-column: auto;
    }
}
/* CVB OPERATION R1 */

a.primary-button.compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    min-width: 0;
}

.field.wide {
    grid-column: 1 / -1;
}

.field label,
.upload-form label {
    display: block;
    margin-bottom: 7px;
    color: #52636f;
    font-size: 11px;
    font-weight: 700;
}

.field input,
.field select,
.upload-form input,
.upload-form select {
    width: 100%;
    min-height: 43px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: #52636f;
    font-size: 11px;
    font-weight: 700;
}

.workflow-strip {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 7px;
    margin-bottom: 18px;
}

.flow-step {
    min-height: 78px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
}

.flow-step span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.flow-step strong {
    color: var(--success);
    font-size: 18px;
}

.flow-step.final {
    background: var(--navy);
}

.flow-step.final span,
.flow-step.final strong {
    color: white;
}

.operation-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 15px;
    margin-bottom: 15px;
}

.operation-data {
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 17px;
}

.operation-data span,
.operation-data strong {
    display: block;
}

.operation-data span {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.operation-data strong {
    margin-top: 5px;
    font-size: 12px;
}

.upload-form {
    padding: 18px;
}

.upload-form label {
    margin-top: 13px;
}

.upload-form label:first-child {
    margin-top: 0;
}

.upload-form small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 9px;
}

.upload-result {
    margin: 0 18px 18px;
    padding: 11px;
    border-radius: 8px;
    background: #f1f8f7;
    color: #246d62;
    font-size: 11px;
}

.operation-documents,
.operation-history {
    margin-top: 15px;
}

.hash {
    font-family: Consolas, monospace;
    color: #60717e;
    font-size: 9px;
}

.operation-link {
    color: var(--blue);
}

.history-list {
    padding: 8px 18px 18px;
}

.history-item {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 190px 1fr auto;
    gap: 15px;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.history-item strong {
    font-size: 10px;
}

.history-item span,
.history-item small {
    color: var(--muted);
    font-size: 10px;
}

.m-readiness {
    margin-top: 15px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    background: var(--navy-dark);
    color: white;
}

.m-readiness span,
.m-readiness strong {
    display: block;
}

.m-readiness span {
    color: #88a2b1;
    font-size: 9px;
    letter-spacing: 1px;
}

.m-readiness strong {
    margin-top: 5px;
    font-size: 15px;
}

.m-readiness button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #63727b;
    color: #cbd4d9;
    font-weight: 800;
}

@media (max-width: 1100px) {

    .workflow-strip {
        grid-template-columns: repeat(4, 1fr);
    }

    .operation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.wide {
        grid-column: auto;
    }

    .workflow-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .operation-data {
        grid-template-columns: 1fr;
    }
}
/* CVB MAIL INTAKE R1 */

.mail-toolbar {
    margin-bottom: 14px;
    display: flex;
    justify-content: flex-end;
}

.mail-result-card {
    margin-bottom: 20px;
    padding: 22px;
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0,1fr));
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.mail-result-card > div {
    min-height: 85px;
    padding: 14px;
    border-radius: 9px;
    background: #f7f9fa;
}

.mail-result-card span,
.mail-result-card strong {
    display: block;
}

.mail-result-card span {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.mail-result-card strong {
    margin-top: 8px;
    color: var(--navy);
    font-size: 13px;
}

@media (max-width: 900px) {

    .mail-result-card {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }
}
/* CVB INVOICE REVIEW R1 */

.cvb-invoice-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
}

.cvb-invoice-alert.success {
    background: #eef8f3;
    border: 1px solid #b9dfcd;
}

.cvb-invoice-alert.error {
    background: #fff4f4;
    border: 1px solid #edc0c0;
}

.cvb-invoice-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.cvb-invoice-summary > div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.cvb-invoice-summary span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.cvb-invoice-summary strong {
    color: var(--navy);
    font-size: 13px;
}

.cvb-invoice-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.cvb-invoice-grid .wide {
    grid-column: span 2;
}

.cvb-section-title {
    margin-bottom: 12px;
}

.cvb-section-title h2 {
    margin: 0 0 4px 0;
}

.cvb-section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.cvb-items-scroll {
    overflow-x: auto;
}

.cvb-items-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

.cvb-items-table th,
.cvb-items-table td {
    padding: 7px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.cvb-items-table th {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.cvb-items-table input {
    width: 100%;
    min-width: 85px;
    box-sizing: border-box;
}

@media (max-width: 900px) {

    .cvb-invoice-summary,
    .cvb-invoice-grid {
        grid-template-columns: 1fr;
    }

    .cvb-invoice-grid .wide {
        grid-column: span 1;
    }
}

/* CVB CASETA R2C */

.caseta-mode-selector {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.caseta-mode-button {
    width: 100%;
    min-height: 110px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.caseta-mode-button strong,
.caseta-mode-button span {
    display: block;
}

.caseta-mode-button strong {
    font-size: 22px;
    color: var(--navy);
}

.caseta-mode-button span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.caseta-mode-button.active {
    border-width: 2px;
    border-color: var(--navy);
}

.caseta-work-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.caseta-panel-heading {
    margin-bottom: 20px;
}

.caseta-panel-heading h2 {
    margin: 4px 0;
    color: var(--navy);
}

.caseta-panel-heading p {
    margin: 0;
    color: var(--muted);
}

.caseta-placeholder-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.caseta-placeholder-card {
    min-height: 125px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafb;
}

.caseta-placeholder-card > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
}

.caseta-placeholder-card strong,
.caseta-placeholder-card small {
    display: block;
}

.caseta-placeholder-card strong {
    color: var(--navy);
    font-size: 14px;
}

.caseta-placeholder-card small {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 760px) {

    .caseta-mode-selector {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .caseta-mode-button {
        min-height: 92px;
        padding: 14px;
    }

    .caseta-mode-button strong {
        font-size: 18px;
    }

    .caseta-work-panel {
        padding: 14px;
    }

    .caseta-placeholder-grid {
        grid-template-columns: 1fr;
    }

    .caseta-placeholder-card {
        min-height: auto;
    }
}

/* CVB CASETA ENTRADA R2F */

.cvb-caseta-success {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #b9dfcd;
    border-radius: 12px;
    background: #eef8f3;
}

.cvb-caseta-success strong,
.cvb-caseta-success span {
    display: block;
}

.cvb-caseta-section-title {
    margin: 22px 0 12px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
}

.cvb-caseta-form-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cvb-caseta-form label > span,
.cvb-caseta-notes > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.cvb-caseta-form input[type="text"],
.cvb-caseta-form select,
.cvb-caseta-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font: inherit;
}

.cvb-caseta-notes {
    display: block;
    margin-top: 14px;
}

.cvb-caseta-help {
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.cvb-camera-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cvb-camera-card {
    display: block;
    min-height: 120px;
    padding: 14px;
    border: 1px dashed #9daab0;
    border-radius: 12px;
    background: #f8fafb;
    cursor: pointer;
}

.cvb-camera-card.required {
    border-style: solid;
}

.cvb-camera-card strong,
.cvb-camera-card span {
    display: block;
}

.cvb-camera-card strong {
    color: var(--navy);
    font-size: 13px;
}

.cvb-camera-card span {
    margin: 5px 0 12px;
    color: var(--muted);
    font-size: 11px;
}

.cvb-camera-card input[type="file"] {
    display: block;
    width: 100%;
    font-size: 11px;
}

.cvb-caseta-confirm {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.cvb-caseta-submit {
    min-height: 50px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.cvb-caseta-confirm > span {
    color: var(--muted);
    font-size: 11px;
}

.cvb-caseta-recent {
    margin-top: 28px;
}

.cvb-caseta-entry-row {
    display: grid;
    grid-template-columns:
        1.4fr repeat(4, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.cvb-caseta-entry-row span,
.cvb-caseta-entry-row strong {
    display: block;
}

.cvb-caseta-entry-row span {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.cvb-caseta-entry-row strong {
    margin-top: 4px;
    color: var(--navy);
    font-size: 12px;
}

@media (max-width: 900px) {

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

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

    .cvb-caseta-entry-row {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .cvb-caseta-form-grid {
        grid-template-columns: 1fr;
    }

    .cvb-camera-grid {
        grid-template-columns: 1fr;
    }

    .cvb-camera-card {
        min-height: 105px;
    }

    .cvb-caseta-confirm {
        display: block;
    }

    .cvb-caseta-submit {
        width: 100%;
        min-height: 58px;
        font-size: 15px;
    }

    .cvb-caseta-confirm > span {
        display: block;
        margin-top: 10px;
        text-align: center;
    }

    .cvb-caseta-entry-row {
        grid-template-columns: 1fr 1fr;
    }

    .cvb-caseta-success {
        display: block;
    }

    .cvb-caseta-success span {
        margin-top: 5px;
    }
}

/* CVB CASETA PHOTO PREVIEW R2G */

.cvb-camera-card.has-photo {
    background: #fff;
}

.cvb-photo-preview {
    display: block;
    width: 100%;
    height: 240px;
    margin-top: 12px;
    border-radius: 10px;
    object-fit: contain;
    background: #eef2f4;
    cursor: zoom-in;
}

.cvb-photo-preview[hidden] {
    display: none;
}

.cvb-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.94);
}

.cvb-photo-modal[hidden] {
    display: none;
}

.cvb-photo-modal-image {
    display: block;
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
}

.cvb-photo-modal-close {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 10001;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
}

body.cvb-photo-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {

    .cvb-photo-preview {
        height: 330px;
    }

    .cvb-photo-modal {
        padding: 8px;
    }

    .cvb-photo-modal-image {
        max-width: 100vw;
        max-height: 95vh;
    }
}

/* CVB CASETA PHOTO ERROR R2G1 */

.cvb-camera-card.photo-error::after {
    content: "No se pudo mostrar esta imagen. Vuelve a tomarla.";
    display: block;
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #fff4f2;
    color: #8a2f25;
    font-size: 12px;
    font-weight: 700;
}
