.kex-public-area{max-width:1100px;margin:0 auto}.kex-public-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.kex-public-header h2{margin:0 0 5px}.kex-public-header p{margin:0}.kex-public-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:12px;margin:18px 0}.kex-public-card{background:#fff;border:1px solid #e1e5e9;border-radius:10px;padding:16px}.kex-public-card span{display:block;font-size:13px;color:#667085;margin-bottom:5px}.kex-public-card strong{display:block;font-size:22px}.kex-public-section{background:#fff;border:1px solid #e1e5e9;border-radius:10px;padding:20px;margin-top:16px}.kex-public-section h3{margin-top:0}.kex-public-period{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.kex-public-period label{font-weight:600}.kex-public-period input{width:100px}.kex-form{max-width:720px}.kex-field{margin-bottom:16px}.kex-field label{display:block;font-weight:600;margin-bottom:6px}.kex-field input,.kex-field select{width:100%;box-sizing:border-box}.kex-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.kex-button{display:inline-block;border:0;border-radius:6px;padding:10px 16px;background:#1d2327;color:#fff!important;text-decoration:none;cursor:pointer}.kex-button-secondary{background:#f0f2f4;color:#1d2327!important}.kex-public-table-wrap{overflow-x:auto}.kex-public-table{width:100%;border-collapse:collapse}.kex-public-table th,.kex-public-table td{text-align:left;border-bottom:1px solid #eaecf0;padding:11px 9px;vertical-align:top}.kex-public-table th{font-size:12px;text-transform:uppercase;color:#667085}.kex-public-note{font-size:12px;color:#667085;margin-top:3px}.kex-row-commission,.kex-row-pending_authorization{color:#667085;background:#fafafa}.kex-public-notice{padding:12px 14px;border-radius:8px;margin:14px 0}.kex-public-success{background:#d1e7dd;color:#0f5132}.kex-public-error{background:#f8d7da;color:#842029}.description{font-size:12px;color:#667085}@media(max-width:760px){.kex-public-grid{grid-template-columns:1fr 1fr}.kex-form-row{grid-template-columns:1fr}.kex-public-table th:nth-child(3),.kex-public-table td:nth-child(3){display:none}}@media(max-width:430px){.kex-public-grid{grid-template-columns:1fr}}
.kex-public-form textarea,.kex-public-form input[type=text],.kex-public-form select{width:100%;box-sizing:border-box}.kex-checkbox-field label{display:flex;gap:8px;align-items:center}.kex-checkbox-field input{width:auto}.kex-current-receipt{padding:12px;border:1px solid #e1e5e9;background:#f8fafc;border-radius:8px;margin-bottom:16px}.kex-receipt-preview{display:block;max-width:280px;max-height:360px;border:1px solid #e1e5e9;border-radius:8px;background:#fff}.kex-small-strong{font-size:16px!important;line-height:1.3}.kex-summary-grid .kex-public-card strong{font-size:18px}.kex-public-table a{color:inherit}
.kex-ocr-panel{border:1px solid #d0d5dd;border-radius:10px;background:#f8fafc;padding:16px;margin:20px 0}.kex-ocr-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.kex-ocr-heading h4{font-size:17px;margin:0 0 5px}.kex-ocr-heading p{margin:0;color:#475467}.kex-ocr-privacy{font-size:12px;color:#667085;margin:12px 0}.kex-ocr-progress{margin:14px 0}.kex-ocr-progress-track{height:9px;background:#e4e7ec;border-radius:999px;overflow:hidden}.kex-ocr-progress-track span{display:block;width:0;height:100%;background:#3858e9;transition:width .2s ease}.kex-ocr-progress p{margin:6px 0 0;font-size:12px;color:#475467}.kex-ocr-message{border-radius:7px;padding:10px 12px;margin:12px 0}.kex-ocr-message-success{background:#d1e7dd;color:#0f5132}.kex-ocr-message-error{background:#f8d7da;color:#842029}.kex-ocr-fields{margin-top:14px}.kex-ocr-total-field{max-width:330px}.kex-amount-input{display:flex;align-items:center;gap:8px}.kex-amount-input input{flex:1}.kex-amount-input span{font-weight:600}.kex-ocr-match{font-size:12px;margin-top:5px}.kex-ocr-match-ok{color:#067647}.kex-ocr-match-warning{color:#b54708}.kex-ocr-raw{margin-top:12px}.kex-ocr-raw summary{cursor:pointer;font-weight:600}.kex-ocr-raw textarea{margin-top:10px;font-family:monospace;font-size:12px}@media(max-width:760px){.kex-ocr-heading{flex-direction:column}.kex-ocr-heading button{width:100%}.kex-ocr-total-field{max-width:none}}
.kex-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.kex-section-heading h3{margin:0 0 4px}.kex-section-heading p{margin:0;color:#667085}.kex-public-pill{display:inline-block;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}.kex-public-pill-warning{background:#fff3cd;color:#664d03}.kex-button-danger{background:#b42318!important}.kex-delete-form{margin-top:14px}.kex-inbox-section .kex-public-table a{color:#1d2327}@media(max-width:760px){.kex-public-header,.kex-section-heading{align-items:stretch;flex-direction:column}.kex-public-header .kex-button,.kex-section-heading .kex-button{width:100%;box-sizing:border-box;text-align:center}}
.kex-file-input-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.kex-upload-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.kex-upload-button{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;cursor:pointer}.kex-selected-file{margin:10px 0 0;color:#667085;font-size:13px}.kex-capture-preview{margin-top:12px}.kex-capture-preview img{display:block;max-width:280px;max-height:360px;object-fit:contain;border:1px solid #e1e5e9;border-radius:10px;background:#fff}@media(max-width:760px){.kex-upload-actions{display:grid;grid-template-columns:1fr 1fr}.kex-upload-button{width:100%;box-sizing:border-box;text-align:center}.kex-capture-preview img{max-width:100%;height:auto}}@media(max-width:390px){.kex-upload-actions{grid-template-columns:1fr}}

/* Conciliación de tickets */
.kex-public-matching .kex-section-heading,
.kex-matching-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.kex-matching-panel > h3 { flex-basis: 100%; margin: 0; }
.kex-matching-panel .kex-public-table-wrap { flex-basis: 100%; width: 100%; overflow-x: auto; }
.kex-match-success { flex: 1 1 100%; padding: 14px 16px; border-radius: 10px; background: #e7f5ed; border: 1px solid #b9dfc9; }
.kex-match-success p { margin: 4px 0; }
@media (max-width: 640px) {
    .kex-public-matching .kex-section-heading,
    .kex-matching-panel { align-items: stretch; }
    .kex-public-matching form,
    .kex-matching-panel form,
    .kex-public-matching button,
    .kex-matching-panel button { width: 100%; }
}

/* Portal y administración en front-end */
.kex-portal-tabs,.kex-manager-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 auto 18px;max-width:1100px;border-bottom:1px solid #e1e5e9;padding-bottom:10px}.kex-portal-tabs a,.kex-manager-nav a{display:inline-block;padding:10px 14px;border-radius:7px;text-decoration:none;color:#344054;background:#f2f4f7;font-weight:600}.kex-portal-tabs a.is-active,.kex-manager-nav a.is-active{background:#3858e9;color:#fff}.kex-manager-nav{margin:0 0 18px;max-width:none}.kex-inline-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.kex-inline-actions form{margin:0}.kex-manager-area .kex-public-grid{grid-template-columns:repeat(3,minmax(160px,1fr))}.kex-manager-area input[type=search],.kex-manager-area input[type=text],.kex-manager-area input[type=number],.kex-manager-area input[type=date],.kex-manager-area input[type=file],.kex-manager-area select,.kex-manager-area textarea{max-width:100%;box-sizing:border-box}.kex-manager-area .kex-button[disabled]{opacity:.45;cursor:not-allowed}@media(max-width:760px){.kex-portal-tabs,.kex-manager-nav{display:grid;grid-template-columns:1fr}.kex-portal-tabs a,.kex-manager-nav a{text-align:center}.kex-manager-area .kex-public-grid{grid-template-columns:1fr 1fr}.kex-inline-actions{align-items:stretch;flex-direction:column}.kex-inline-actions form,.kex-inline-actions button{width:100%}}@media(max-width:430px){.kex-manager-area .kex-public-grid{grid-template-columns:1fr}}


/* v1.0.1 · Controles visibles en el área privada Kerlux */
html body .kex-public-area input[type="text"],
html body .kex-public-area input[type="search"],
html body .kex-public-area input[type="number"],
html body .kex-public-area input[type="date"],
html body .kex-public-area input[type="email"],
html body .kex-public-area input[type="file"],
html body .kex-public-area select,
html body .kex-public-area textarea,
html body .kex-manager-area input[type="text"],
html body .kex-manager-area input[type="search"],
html body .kex-manager-area input[type="number"],
html body .kex-manager-area input[type="date"],
html body .kex-manager-area input[type="email"],
html body .kex-manager-area input[type="file"],
html body .kex-manager-area select,
html body .kex-manager-area textarea {
    background-color: #fff !important;
    color: #1d2939 !important;
    border: 1px solid #98a2b3 !important;
    border-radius: 7px !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.05) !important;
    box-sizing: border-box !important;
    min-height: 44px;
    padding: 9px 12px !important;
    font: inherit !important;
    line-height: 1.4 !important;
}
html body .kex-public-area textarea,
html body .kex-manager-area textarea {
    min-height: 112px;
    resize: vertical;
}
html body .kex-public-area select,
html body .kex-manager-area select {
    -webkit-appearance: menulist !important;
    appearance: auto !important;
    cursor: pointer;
}
html body .kex-public-area select option,
html body .kex-manager-area select option {
    background: #fff;
    color: #1d2939;
}
html body .kex-public-area input::placeholder,
html body .kex-public-area textarea::placeholder,
html body .kex-manager-area input::placeholder,
html body .kex-manager-area textarea::placeholder {
    color: #667085 !important;
    opacity: 1;
}
html body .kex-public-area input:focus,
html body .kex-public-area select:focus,
html body .kex-public-area textarea:focus,
html body .kex-manager-area input:focus,
html body .kex-manager-area select:focus,
html body .kex-manager-area textarea:focus {
    border-color: #3858e9 !important;
    box-shadow: 0 0 0 3px rgba(56,88,233,.16) !important;
    outline: none !important;
}
html body .kex-public-area input[type="checkbox"],
html body .kex-public-area input[type="radio"],
html body .kex-manager-area input[type="checkbox"],
html body .kex-manager-area input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 1px solid #667085 !important;
    background: #fff !important;
    box-shadow: none !important;
}
html body .kex-public-area .kex-field > label,
html body .kex-manager-area .kex-field > label,
html body .kex-public-area .kex-public-period > label {
    color: #344054 !important;
    font-weight: 700 !important;
}
html body .kex-public-area .kex-public-period,
html body .kex-manager-area .kex-public-period {
    display: grid !important;
    grid-template-columns: minmax(180px, 230px) 120px auto;
    gap: 10px !important;
    align-items: end !important;
    max-width: 520px;
}
html body .kex-public-area .kex-public-period > label,
html body .kex-manager-area .kex-public-period > label {
    grid-column: 1 / -1;
    margin: 0 !important;
}
html body .kex-public-area .kex-public-period select,
html body .kex-public-area .kex-public-period input[type="number"],
html body .kex-manager-area .kex-public-period select,
html body .kex-manager-area .kex-public-period input[type="number"] {
    width: 100% !important;
    margin: 0 !important;
}
html body .kex-public-area .kex-button,
html body .kex-public-area .kex-button-secondary,
html body .kex-manager-area .kex-button,
html body .kex-manager-area .kex-button-secondary {
    background: #1d2327 !important;
    color: #ffffff !important;
    border: 1px solid #1d2327 !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.12) !important;
}
html body .kex-public-area .kex-button:hover,
html body .kex-public-area .kex-button:focus,
html body .kex-public-area .kex-button-secondary:hover,
html body .kex-public-area .kex-button-secondary:focus,
html body .kex-manager-area .kex-button:hover,
html body .kex-manager-area .kex-button:focus,
html body .kex-manager-area .kex-button-secondary:hover,
html body .kex-manager-area .kex-button-secondary:focus {
    background: #11161a !important;
    color: #ffffff !important;
    border-color: #11161a !important;
}
html body .kex-public-area .kex-button[disabled],
html body .kex-public-area .kex-button-secondary[disabled],
html body .kex-manager-area .kex-button[disabled],
html body .kex-manager-area .kex-button-secondary[disabled] {
    background: #98a2b3 !important;
    border-color: #98a2b3 !important;
    color: #ffffff !important;
}
html body .kex-public-area .kex-public-section,
html body .kex-public-area .kex-public-card,
html body .kex-manager-area .kex-public-section,
html body .kex-manager-area .kex-public-card {
    border-color: #d0d5dd;
}
@media (max-width: 600px) {
    html body .kex-public-area .kex-public-period,
    html body .kex-manager-area .kex-public-period {
        grid-template-columns: minmax(0, 1fr) 110px;
        max-width: none;
    }
    html body .kex-public-area .kex-public-period .kex-button,
    html body .kex-manager-area .kex-public-period .kex-button {
        grid-column: 1 / -1;
        width: 100%;
        text-align: center;
    }
}
@media (max-width: 390px) {
    html body .kex-public-area .kex-public-period,
    html body .kex-manager-area .kex-public-period {
        grid-template-columns: 1fr;
    }
    html body .kex-public-area .kex-public-period > *,
    html body .kex-manager-area .kex-public-period > * {
        grid-column: 1 !important;
    }
}


/* Integración con el portal de clientes */
.kex-portal-back {
    margin: 0 0 18px;
}

.kex-portal-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3158e8;
    font-weight: 600;
    text-decoration: none;
}

.kex-portal-back a:hover,
.kex-portal-back a:focus {
    text-decoration: underline;
}

.kex-dashboard-expenses-card {
    text-decoration: none !important;
}


/* Ajuste vertical de la página /gastos/ dentro del tema Kerlux.
   Compensa el espacio superior que añade la plantilla de contenido. */
.kex-portal-shell {
    position: relative;
    margin-top: -72px;
}

@media (max-width: 900px) {
    .kex-portal-shell {
        margin-top: -42px;
    }
}

@media (max-width: 600px) {
    .kex-portal-shell {
        margin-top: -24px;
    }
}


/* v1.1.3 · Garantizar texto visible en botones del front-end */
html body .kex-public-area button.kex-button,
html body .kex-public-area button.kex-button-secondary,
html body .kex-manager-area button.kex-button,
html body .kex-manager-area button.kex-button-secondary,
html body .kex-public-area a.kex-button,
html body .kex-public-area a.kex-button-secondary,
html body .kex-manager-area a.kex-button,
html body .kex-manager-area a.kex-button-secondary {
    color: #ffffff !important;
}


/* ==========================================================================\n   v1.2.0 · Acabado visual definitivo del portal de gastos\n   ========================================================================== */

:root {
    --kex-ink: #171c20;
    --kex-text: #273142;
    --kex-muted: #667085;
    --kex-border: #d7dde5;
    --kex-border-strong: #98a2b3;
    --kex-surface: #ffffff;
    --kex-soft: #f7f8fa;
    --kex-soft-2: #eef1f4;
    --kex-focus: #3858e9;
    --kex-success-bg: #e7f5ed;
    --kex-success-border: #b8dfc8;
    --kex-warning-bg: #fff7df;
    --kex-warning-border: #f0d38b;
    --kex-error-bg: #fcebea;
    --kex-error-border: #edb7b2;
    --kex-radius: 12px;
    --kex-shadow: 0 2px 8px rgba(16, 24, 40, .055);
}

html body .kex-portal-shell,
html body .kex-public-area,
html body .kex-manager-area {
    color: var(--kex-text);
}

html body .kex-public-area,
html body .kex-manager-area {
    max-width: 1180px;
    width: 100%;
}

html body .kex-public-area h2,
html body .kex-manager-area h2 {
    margin: 0;
    color: #211d3b;
    font-size: clamp(38px, 4vw, 58px);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -.025em;
}

html body .kex-public-area h3,
html body .kex-manager-area h3 {
    color: var(--kex-ink);
    font-size: 23px;
    font-weight: 500;
    line-height: 1.25;
}

html body .kex-public-area h4,
html body .kex-manager-area h4 {
    color: var(--kex-ink);
    font-weight: 600;
}

html body .kex-public-area p,
html body .kex-manager-area p {
    line-height: 1.55;
}

/* Cabeceras y navegación */
html body .kex-public-header {
    align-items: center;
    gap: 24px;
    margin: 0 0 22px;
}

html body .kex-public-header > div > p {
    margin-top: 7px;
    color: #594762;
}

html body .kex-portal-back {
    margin-bottom: 16px;
}

html body .kex-portal-back a {
    color: #3158e8;
    font-size: 15px;
}

html body .kex-portal-tabs,
html body .kex-manager-nav {
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 28px;
    border-color: var(--kex-border);
}

html body .kex-portal-tabs a,
html body .kex-manager-nav a {
    padding: 10px 16px;
    border: 1px solid var(--kex-border);
    border-radius: 8px;
    background: var(--kex-surface);
    color: #344054;
    box-shadow: 0 1px 2px rgba(16,24,40,.035);
    transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

html body .kex-portal-tabs a:hover,
html body .kex-manager-nav a:hover {
    border-color: var(--kex-ink);
    transform: translateY(-1px);
}

html body .kex-portal-tabs a.is-active,
html body .kex-manager-nav a.is-active {
    border-color: var(--kex-ink);
    background: var(--kex-ink);
    color: #fff;
}

/* Selector de periodo */
html body .kex-public-area .kex-public-period,
html body .kex-manager-area .kex-public-period {
    grid-template-columns: minmax(220px, 280px) 140px 112px;
    max-width: 560px;
    margin: 2px 0 20px;
}

html body .kex-public-area .kex-public-period > label,
html body .kex-manager-area .kex-public-period > label {
    font-size: 16px;
    letter-spacing: .01em;
}

/* Campos */
html body .kex-public-area input[type="text"],
html body .kex-public-area input[type="search"],
html body .kex-public-area input[type="number"],
html body .kex-public-area input[type="date"],
html body .kex-public-area input[type="email"],
html body .kex-public-area input[type="file"],
html body .kex-public-area select,
html body .kex-public-area textarea,
html body .kex-manager-area input[type="text"],
html body .kex-manager-area input[type="search"],
html body .kex-manager-area input[type="number"],
html body .kex-manager-area input[type="date"],
html body .kex-manager-area input[type="email"],
html body .kex-manager-area input[type="file"],
html body .kex-manager-area select,
html body .kex-manager-area textarea {
    min-height: 48px;
    border-color: var(--kex-border-strong) !important;
    border-radius: 8px !important;
    background: #fff !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}

html body .kex-public-area textarea,
html body .kex-manager-area textarea {
    min-height: 128px;
}

html body .kex-field {
    margin-bottom: 19px;
}

html body .kex-field > label {
    margin-bottom: 7px;
    font-size: 14px;
}

html body .kex-form-row {
    gap: 16px;
}

/* Botones unificados */
html body .kex-public-area .kex-button,
html body .kex-public-area .kex-button-secondary,
html body .kex-public-area .kex-button-danger,
html body .kex-manager-area .kex-button,
html body .kex-manager-area .kex-button-secondary,
html body .kex-manager-area .kex-button-danger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 17px !important;
    border: 1px solid var(--kex-ink) !important;
    border-radius: 7px !important;
    background: var(--kex-ink) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(16,24,40,.12) !important;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

html body .kex-public-area .kex-button:hover,
html body .kex-public-area .kex-button-secondary:hover,
html body .kex-public-area .kex-button-danger:hover,
html body .kex-manager-area .kex-button:hover,
html body .kex-manager-area .kex-button-secondary:hover,
html body .kex-manager-area .kex-button-danger:hover {
    background: #080b0d !important;
    border-color: #080b0d !important;
    color: #fff !important;
    box-shadow: 0 5px 12px rgba(16,24,40,.18) !important;
    transform: translateY(-1px);
}

html body .kex-public-area .kex-button:focus-visible,
html body .kex-public-area .kex-button-secondary:focus-visible,
html body .kex-manager-area .kex-button:focus-visible,
html body .kex-manager-area .kex-button-secondary:focus-visible {
    outline: 3px solid rgba(56,88,233,.24) !important;
    outline-offset: 2px;
}

html body .kex-public-area .kex-button[disabled],
html body .kex-public-area .kex-button-secondary[disabled],
html body .kex-manager-area .kex-button[disabled],
html body .kex-manager-area .kex-button-secondary[disabled] {
    opacity: 1 !important;
    background: #a7afb9 !important;
    border-color: #a7afb9 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Resumen */
html body .kex-public-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0 22px;
}

html body .kex-summary-grid {
    grid-template-columns: repeat(5, minmax(145px, 1fr));
}

html body .kex-public-card {
    min-height: 92px;
    padding: 18px 19px;
    border: 1px solid var(--kex-border) !important;
    border-radius: var(--kex-radius);
    background: var(--kex-surface);
    box-shadow: var(--kex-shadow);
}

html body .kex-public-card span {
    margin-bottom: 7px;
    color: var(--kex-muted);
    font-size: 13px;
    font-weight: 500;
}

html body .kex-public-card strong,
html body .kex-summary-grid .kex-public-card strong {
    color: #2a2848;
    font-size: 24px !important;
    font-weight: 600;
    line-height: 1.15;
}

/* Secciones */
html body .kex-public-section,
html body .kex-ocr-panel {
    padding: 23px;
    border: 1px solid var(--kex-border) !important;
    border-radius: var(--kex-radius);
    background: var(--kex-surface);
    box-shadow: var(--kex-shadow);
}

html body .kex-public-section {
    margin-top: 18px;
}

html body .kex-section-heading {
    align-items: center;
    margin-bottom: 17px;
}

html body .kex-section-heading p {
    color: var(--kex-muted);
}

html body .kex-ocr-panel {
    background: #f9fafb;
}

html body .kex-current-receipt,
html body .kex-match-success {
    border-radius: 10px;
}

html body .kex-current-receipt {
    padding: 15px;
    border-color: var(--kex-border);
    background: var(--kex-soft);
}

html body .kex-receipt-preview,
html body .kex-capture-preview img {
    border-color: var(--kex-border);
    box-shadow: 0 4px 16px rgba(16,24,40,.08);
}

/* Tablas */
html body .kex-public-table-wrap {
    width: 100%;
    border: 1px solid var(--kex-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16,24,40,.035);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

html body .kex-public-table {
    min-width: 720px;
}

html body .kex-public-table th {
    padding: 12px 13px;
    border-bottom: 1px solid var(--kex-border);
    background: var(--kex-soft);
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .055em;
    white-space: nowrap;
}

html body .kex-public-table td {
    padding: 13px;
    border-bottom: 1px solid #eaecf0;
    color: #344054;
}

html body .kex-public-table tbody tr:last-child td {
    border-bottom: 0;
}

html body .kex-public-table tbody tr:hover td {
    background: #fafbfc;
}

html body .kex-public-table td strong {
    color: #202738;
}

/* No ocultar columnas importantes en móvil: la tabla dispone de scroll */
@media (max-width: 760px) {
    html body .kex-public-table th:nth-child(3),
    html body .kex-public-table td:nth-child(3) {
        display: table-cell !important;
    }
}

/* Estados */
html body .kex-public-pill {
    padding: 5px 10px;
    border: 1px solid transparent;
}

html body .kex-public-pill-warning {
    border-color: var(--kex-warning-border);
    background: var(--kex-warning-bg);
    color: #76540a;
}

html body .kex-public-notice,
html body .kex-ocr-message {
    border: 1px solid transparent;
    border-radius: 9px;
}

html body .kex-public-success,
html body .kex-ocr-message-success,
html body .kex-match-success {
    border-color: var(--kex-success-border);
    background: var(--kex-success-bg);
}

html body .kex-public-error,
html body .kex-ocr-message-error {
    border-color: var(--kex-error-border);
    background: var(--kex-error-bg);
}

html body .kex-ocr-progress-track {
    height: 8px;
    background: #e1e5ea;
}

html body .kex-ocr-progress-track span {
    background: var(--kex-ink);
}

/* Acciones */
html body .kex-inline-actions {
    gap: 10px;
}

html body .kex-upload-actions {
    gap: 10px;
}

html body .kex-selected-file,
html body .kex-public-note,
html body .description {
    color: var(--kex-muted);
}

/* Responsive */
@media (max-width: 1050px) {
    html body .kex-summary-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 760px) {
    html body .kex-public-area,
    html body .kex-manager-area {
        padding: 0 2px;
    }

    html body .kex-public-header {
        align-items: stretch;
    }

    html body .kex-public-header .kex-button,
    html body .kex-section-heading .kex-button {
        width: 100%;
    }

    html body .kex-summary-grid,
    html body .kex-manager-area .kex-public-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html body .kex-public-section,
    html body .kex-ocr-panel {
        padding: 18px;
    }

    html body .kex-public-area h2,
    html body .kex-manager-area h2 {
        font-size: 42px;
    }
}

@media (max-width: 600px) {
    html body .kex-public-area .kex-public-period,
    html body .kex-manager-area .kex-public-period {
        grid-template-columns: minmax(0, 1fr) 110px;
    }

    html body .kex-public-area .kex-public-period .kex-button,
    html body .kex-manager-area .kex-public-period .kex-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 460px) {
    html body .kex-summary-grid,
    html body .kex-manager-area .kex-public-grid,
    html body .kex-public-grid {
        grid-template-columns: 1fr;
    }

    html body .kex-public-section,
    html body .kex-ocr-panel,
    html body .kex-public-card {
        border-radius: 10px;
    }

    html body .kex-public-area h2,
    html body .kex-manager-area h2 {
        font-size: 36px;
    }
}


/* v1.2.1 · Acciones principales y descarga del Excel del empleado */
.kex-public-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.kex-public-header-actions form {
    margin: 0;
}
.kex-public-header-actions .kex-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
@media (max-width: 760px) {
    .kex-public-header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }
    .kex-public-header-actions form,
    .kex-public-header-actions .kex-button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}


/* v1.3.0 · Zona de eliminación protegida */
html body .kex-period-danger{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;border:1px solid #f0a8aa!important;background:#fff7f7!important}.kex-period-danger h3{color:#b42318!important}.kex-period-danger form{min-width:360px}.kex-delete-confirm{display:flex;align-items:flex-start;gap:9px;margin:0 0 14px;font-weight:700;color:#7a271a}.kex-delete-confirm input[type="checkbox"]{flex:0 0 auto;margin-top:2px}.kex-delete-period-button,.kex-delete-period-button.kex-button{background:#b42318!important;border-color:#b42318!important;color:#fff!important}.kex-delete-period-button:hover,.kex-delete-period-button:focus{background:#912018!important;border-color:#912018!important;color:#fff!important}@media(max-width:760px){html body .kex-period-danger{flex-direction:column}.kex-period-danger form,.kex-delete-period-button{width:100%;min-width:0;box-sizing:border-box}}


/* v1.3.3 · Bandeja de tickets como pestaña independiente */
html body .kex-inbox-summary-grid {
    grid-template-columns: repeat(2, minmax(220px, 300px));
    justify-content: start;
}

html body .kex-button-compact {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
    white-space: nowrap;
}

html body .kex-empty-state {
    padding: 10px 0 2px;
    color: var(--kex-muted);
}

html body .kex-empty-state p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    html body .kex-inbox-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* v1.4.0 · Calidad de fotografía y confianza OCR */
html body .kex-quality-report {
    display: grid;
    gap: 4px;
    max-width: 620px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--kex-border);
    border-radius: 9px;
    background: #f8fafc;
    color: #344054;
}
html body .kex-quality-report strong { color: #202738; }
html body .kex-quality-report span { font-size: 13px; }
html body .kex-quality-report small { color: var(--kex-muted); }
html body .kex-quality-report-success { border-color: var(--kex-success-border); background: var(--kex-success-bg); }
html body .kex-quality-report-warning { border-color: #f0d58c; background: #fff9e8; }
html body .kex-quality-report-error { border-color: var(--kex-error-border); background: var(--kex-error-bg); }
html body .kex-ocr-message-warning {
    border-color: #f0d58c;
    background: #fff9e8;
    color: #76540a;
}
html body .kex-field-confidence {
    min-height: 18px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
}
html body .kex-confidence-high { color: #067647; }
html body .kex-confidence-medium { color: #9a6700; }
html body .kex-confidence-low { color: #b42318; }
html body .kex-confidence-manual { color: #475467; }
html body .kex-capture-preview {
    position: relative;
    max-width: 420px;
}
html body .kex-capture-preview img {
    width: auto;
    max-width: 100%;
    max-height: 520px;
}
@media (max-width: 760px) {
    html body .kex-quality-report { max-width: none; }
    html body .kex-capture-preview { max-width: none; }
    html body .kex-capture-preview img { width: 100%; max-height: 70vh; }
}

/* v1.5.0 · Duplicados y conciliación inteligente */
html body .kex-duplicate-warning {
    border: 1px solid #f0c36d !important;
    background: #fff9e8 !important;
}
html body .kex-duplicate-warning h3 { color: #7a5200 !important; }
html body .kex-duplicate-warning ul { margin: 10px 0 12px 20px; }
html body .kex-duplicate-warning li { margin: 7px 0; color: #594300; }
html body .kex-match-ambiguity {
    flex-basis: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 4px 0 12px;
    padding: 12px 14px;
    border: 1px solid #f0c36d;
    border-radius: 9px;
    background: #fff9e8;
    color: #6f4d00;
}

/* 1.6.0 · Moneda extranjera */
.kex-currency-input {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(180px, 240px);
    gap: 10px;
    align-items: stretch;
}

.kex-currency-input input,
.kex-currency-input select {
    min-height: 46px;
}

.kex-foreign-currency-panel {
    margin: 16px 0 20px;
    padding: 18px;
    border: 1px solid #d8dfeb;
    border-left: 4px solid #243a66;
    border-radius: 12px;
    background: #f7f9fc;
}

.kex-foreign-currency-panel[hidden] {
    display: none !important;
}

.kex-foreign-currency-panel h4 {
    margin: 0 0 6px;
    color: #172033;
}

@media (max-width: 640px) {
    .kex-currency-input {
        grid-template-columns: 1fr;
    }
}

/* v1.7.0 · Experiencia móvil y PWA */
html body .kex-pwa-install {
    max-width: 1100px;
    margin: 0 auto 18px;
    padding: 14px 16px;
    border: 1px solid #cfd6df;
    border-radius: 12px;
    background: #f7f8fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-sizing: border-box;
}
html body .kex-pwa-install[hidden] { display: none !important; }
html body .kex-pwa-install strong { display: block; color: #171b1f; }
html body .kex-pwa-install p { margin: 3px 0 0; color: #667085; }
html body .kex-pwa-install-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
html body .kex-pwa-dismiss {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #475467;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
html body .kex-pwa-dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(17, 24, 39, .55);
    box-sizing: border-box;
}
html body .kex-pwa-dialog-card {
    position: relative;
    width: min(100%, 520px);
    padding: 26px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}
html body .kex-pwa-dialog-card h2 { margin: 0 40px 14px 0; }
html body .kex-pwa-dialog-card li { margin: 12px 0; }
html body .kex-pwa-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    font-size: 24px;
    cursor: pointer;
}

html body .kex-mobile-home { display: block; max-width: 760px; }
html body .kex-mobile-home-hero {
    padding: 22px;
    border-radius: 20px;
    background: #171b1f;
    color: #fff;
}
html body .kex-mobile-home-hero h2 { margin: 4px 0 8px; color: #fff; font-size: 31px; }
html body .kex-mobile-home-hero p { margin: 0; color: rgba(255,255,255,.78); }
html body .kex-mobile-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
html body .kex-mobile-camera-action {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    margin-top: 22px;
    padding: 16px;
    border-radius: 15px;
    background: #fff;
    color: #171b1f !important;
    text-decoration: none;
}
html body .kex-mobile-camera-action > span { grid-row: 1 / 3; font-size: 36px; }
html body .kex-mobile-camera-action strong { font-size: 18px; }
html body .kex-mobile-camera-action small { color: #667085; }
html body .kex-mobile-home-grid { display: grid; gap: 12px; margin-top: 14px; }
html body .kex-mobile-home-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    background: #fff;
    color: #171b1f !important;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .04);
}
html body .kex-mobile-home-card strong,
html body .kex-mobile-home-card small { display: block; }
html body .kex-mobile-home-card strong { font-size: 17px; }
html body .kex-mobile-home-card small { margin-top: 3px; color: #667085; }
html body .kex-mobile-home-card > b { min-width: 29px; text-align: center; font-size: 20px; }
html body .kex-mobile-home-icon { font-size: 29px; }
html body .kex-mobile-online-status { margin-top: 14px; padding: 11px 13px; border-radius: 10px; font-size: 13px; }
html body .kex-mobile-online-status.is-online { background: #ecfdf3; color: #067647; }
html body .kex-mobile-online-status.is-offline { background: #fff4e5; color: #9a3412; }

html body .kex-mobile-nav { display: none; }
html body .kex-compression-status {
    max-width: 720px;
    margin: 8px 0 12px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
}
html body .kex-compression-status[hidden] { display: none !important; }
html body .kex-compression-status.is-working { background: #eef2ff; color: #3448a5; }
html body .kex-compression-status.is-ready { background: #ecfdf3; color: #067647; }
html body .kex-compression-status.is-warning { background: #fff4e5; color: #9a3412; }
html body .kex-retake-photo {
    display: block;
    width: 100%;
    min-height: 46px;
    margin-top: 9px;
    border: 1px solid #cfd6df;
    border-radius: 9px;
    background: #fff;
    color: #171b1f;
    font-weight: 700;
    cursor: pointer;
}
html body .kex-retake-photo[hidden] { display: none !important; }

@media (max-width: 760px) {
    html body .kex-portal-shell { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
    html body .kex-portal-tabs { display: none !important; }
    html body .kex-mobile-home { display: block; }
    html body .kex-pwa-install {
        margin: 0 0 14px;
        align-items: stretch;
        flex-direction: column;
    }
    html body .kex-pwa-install-actions { width: 100%; }
    html body .kex-pwa-install-actions .kex-button { flex: 1; text-align: center; }
    html body .kex-mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99990;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        min-height: 66px;
        padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom, 0px)) max(5px, env(safe-area-inset-left));
        border-top: 1px solid #d9dde3;
        background: rgba(255,255,255,.97);
        box-shadow: 0 -8px 26px rgba(16,24,40,.08);
        backdrop-filter: blur(14px);
        box-sizing: content-box;
    }
    html body .kex-mobile-nav a {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 56px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 2px;
        border-radius: 10px;
        color: #667085 !important;
        text-decoration: none;
        font-size: 10px;
        font-weight: 700;
    }
    html body .kex-mobile-nav a.is-active { color: #171b1f !important; background: #f2f4f7; }
    html body .kex-mobile-nav-icon { font-size: 21px; line-height: 1.1; }
    html body .kex-mobile-nav b {
        position: absolute;
        top: 2px;
        left: calc(50% + 8px);
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 999px;
        background: #b42318;
        color: #fff;
        font-size: 10px;
        line-height: 18px;
        text-align: center;
        box-sizing: border-box;
    }
    html body .kex-public-area,
    html body .kex-portal-back,
    html body .kex-pwa-install { width: 100%; box-sizing: border-box; }
    html body .kex-public-header h2 { font-size: 34px; line-height: 1.05; }
    html body .kex-field input,
    html body .kex-field select,
    html body .kex-field textarea,
    html body .kex-public-period input,
    html body .kex-public-period select { min-height: 48px; font-size: 16px !important; }
    html body .kex-button,
    html body button.kex-button,
    html body .kex-upload-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
    html body .kex-ticket-upload .kex-upload-actions { grid-template-columns: 1fr; }
    html body .kex-ticket-upload label.kex-upload-button:first-of-type { min-height: 58px; font-size: 17px; }
    html body .kex-public-section { padding: 17px; }
    html body .kex-capture-preview img { border-radius: 14px; }
}

html.kex-is-standalone body .l-header,
html.kex-is-standalone body .l-footer,
html.kex-is-standalone body #wpadminbar { display: none !important; }
html.kex-is-standalone { margin-top: 0 !important; }
html.kex-is-standalone body { padding-top: env(safe-area-inset-top, 0px); }
html.kex-is-offline body .kex-button[type="submit"],
html.kex-is-offline body button[type="submit"].kex-button { opacity: .55; }

/* v1.8.0 · Borradores sin conexión y sincronización */
html.kex-is-offline body form[data-kex-offline-capable="1"] .kex-button[type="submit"],
html.kex-is-offline body form[data-kex-offline-capable="1"] button[type="submit"].kex-button {
    opacity: 1;
}

html body .kex-offline-form-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 18px 0 8px;
    padding: 13px 15px;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    background: #f4f7ff;
    color: #344054;
}
html body .kex-offline-form-note strong { flex: 0 0 auto; color: #173f7a; }
html body .kex-offline-form-note span { line-height: 1.45; }
html body .kex-offline-form-note.is-offline {
    border-color: #f0c36a;
    background: #fff8e7;
}
html body .kex-offline-form-note.is-offline strong { color: #9a3412; }

html body .kex-offline-drafts-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #f0c36a;
    border-radius: 15px;
    background: #fffaf0;
    box-shadow: 0 7px 22px rgba(16, 24, 40, .05);
}
html body .kex-offline-drafts-panel[hidden] { display: none !important; }
html body .kex-offline-drafts-copy {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
html body .kex-offline-drafts-icon { font-size: 28px; line-height: 1; }
html body .kex-offline-drafts-copy strong { display: block; color: #713b00; font-size: 16px; }
html body .kex-offline-drafts-copy p { margin: 4px 0 0; color: #7a5b2c; }
html body .kex-offline-drafts-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
html body .kex-offline-sync-progress {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #eef2f6;
    color: #344054;
    font-size: 13px;
}
html body .kex-offline-sync-progress[hidden] { display: none !important; }
html body .kex-offline-sync-progress.is-success { background: #ecfdf3; color: #067647; }
html body .kex-offline-sync-progress.is-warning { background: #fff4e5; color: #9a3412; }
html body .kex-offline-sync-progress.is-error { background: #fef3f2; color: #b42318; }
html body .kex-offline-sync-progress.is-working { background: #eef2ff; color: #3448a5; }

html body .kex-floating-drafts {
    position: fixed;
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    z-index: 99980;
    max-width: min(360px, calc(100vw - 32px));
}
html body .kex-floating-drafts button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #f0c36a;
    border-radius: 14px;
    background: #fffaf0;
    color: #713b00;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
    cursor: pointer;
}
html body .kex-floating-drafts strong { flex: 1; text-align: left; }
html body .kex-floating-drafts span { font-weight: 800; }

html body .kex-offline-review-dialog {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(17, 24, 39, .58);
    box-sizing: border-box;
}
html body .kex-offline-review-card {
    width: min(100%, 720px);
    max-height: min(86vh, 820px);
    overflow: auto;
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}
html body .kex-offline-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
html body .kex-offline-review-head span { color: #667085; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
html body .kex-offline-review-head h2 { margin: 4px 0 0; font-size: 24px; }
html body .kex-offline-review-head button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    font-size: 25px;
    cursor: pointer;
}
html body .kex-offline-review-list { display: grid; gap: 10px; }
html body .kex-offline-review-actions { margin-top: 16px; }
html body .kex-offline-draft-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    background: #fff;
}
html body .kex-offline-draft-row.has-error { border-color: #f2b8b5; background: #fff8f7; }
html body .kex-offline-draft-row > img {
    width: 64px;
    height: 64px;
    border-radius: 9px;
    object-fit: cover;
    background: #f2f4f7;
}
html body .kex-offline-draft-row-copy { min-width: 0; }
html body .kex-offline-draft-row-copy strong,
html body .kex-offline-draft-row-copy span,
html body .kex-offline-draft-row-copy small { display: block; }
html body .kex-offline-draft-row-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .kex-offline-draft-row-copy span { margin-top: 3px; color: #667085; font-size: 13px; }
html body .kex-offline-draft-row-copy small { margin-top: 5px; color: #b42318; }
html body .kex-offline-draft-delete {
    border: 0;
    background: transparent;
    color: #b42318;
    font-weight: 800;
    cursor: pointer;
}

body.kex-offline-shell {
    min-height: 100vh;
    margin: 0;
    padding: max(18px, env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
    background: #f3f4f6;
    color: #171b1f;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
}
body.kex-offline-shell * { box-sizing: border-box; }
body.kex-offline-shell .kex-offline-capture { width: min(100%, 620px); margin: 0 auto; }
body.kex-offline-shell .kex-offline-capture > header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
body.kex-offline-shell .kex-offline-capture > header img { width: 54px; height: 54px; border-radius: 13px; }
body.kex-offline-shell .kex-offline-capture > header span { color: #b54708; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
body.kex-offline-shell .kex-offline-capture > header h1 { margin: 2px 0 0; font-size: 27px; }
body.kex-offline-shell .kex-offline-capture-card,
body.kex-offline-shell .kex-offline-pending {
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid #dde1e6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(16, 24, 40, .06);
}
body.kex-offline-shell .kex-offline-capture-card h2 { margin: 0 0 6px; }
body.kex-offline-shell .kex-offline-capture-card > p { margin: 0 0 16px; color: #667085; }
body.kex-offline-shell form { display: grid; gap: 12px; }
body.kex-offline-shell form > label { display: grid; gap: 6px; font-weight: 700; }
body.kex-offline-shell input,
body.kex-offline-shell select {
    width: 100%;
    min-height: 49px;
    padding: 10px 12px;
    border: 1px solid #cfd6df;
    border-radius: 10px;
    background: #fff;
    color: #171b1f;
    font-size: 16px;
}
body.kex-offline-shell .kex-offline-camera input { position: absolute; width: 1px; height: 1px; opacity: 0; }
body.kex-offline-shell .kex-offline-camera span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    border-radius: 13px;
    background: #171b1f;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
body.kex-offline-shell .kex-offline-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.kex-offline-shell .kex-offline-row label { display: grid; gap: 6px; font-weight: 700; }
body.kex-offline-shell .kex-offline-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: #f3f4f6; }
body.kex-offline-shell [data-kex-offline-shell-status] { margin: 0; padding: 10px 12px; border-radius: 9px; }
body.kex-offline-shell [data-kex-offline-shell-status]:empty { display: none; }
body.kex-offline-shell [data-kex-offline-shell-status].is-success { background: #ecfdf3; color: #067647; }
body.kex-offline-shell [data-kex-offline-shell-status].is-error { background: #fef3f2; color: #b42318; }
body.kex-offline-shell [data-kex-offline-shell-status].is-working { background: #eef2ff; color: #3448a5; }
body.kex-offline-shell .kex-offline-pending > div:first-child { display: flex; align-items: center; justify-content: space-between; }
body.kex-offline-shell .kex-offline-pending > div:first-child span { min-width: 30px; height: 30px; border-radius: 999px; background: #171b1f; color: #fff; line-height: 30px; text-align: center; font-weight: 800; }
body.kex-offline-shell .kex-offline-pending > p { color: #667085; }
body.kex-offline-shell .kex-offline-draft-row { grid-template-columns: 52px minmax(0, 1fr); margin-top: 8px; }
body.kex-offline-shell .kex-offline-draft-row > img { width: 52px; height: 52px; }

@media (max-width: 560px) {
    html body .kex-offline-draft-row { grid-template-columns: 54px minmax(0, 1fr); }
    html body .kex-offline-draft-row > img { width: 54px; height: 54px; }
    html body .kex-offline-draft-delete { grid-column: 2; justify-self: start; padding: 5px 0; }
    html body .kex-offline-review-dialog { align-items: flex-end; padding: 0; }
    html body .kex-offline-review-card { max-height: 92vh; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
    body.kex-offline-shell .kex-offline-row { grid-template-columns: 1fr; }
}

/* v1.9.1 · Revisión inteligente y aprendizaje */
html body .kex-public-pill-success{background:#dcfce7;color:#166534}
html body .kex-public-pill-danger{background:#fee2e2;color:#991b1b}
html body .kex-public-pill-info{background:#e0f2fe;color:#075985}
html body .kex-inbox-summary-grid .kex-public-card small{display:block;margin-top:5px;color:#667085;font-size:12px;line-height:1.35}
html body .kex-quick-review-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 12px}
html body .kex-quick-review-head h2{margin:3px 0 4px}
html body .kex-quick-review-head p{margin:0;color:#667085}
html body .kex-review-state{display:inline-flex;align-items:center;min-height:32px;padding:5px 11px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap;background:#e0f2fe;color:#075985}
html body .kex-review-state.is-error,html body .kex-review-state.is-incomplete{background:#fee2e2;color:#991b1b}
html body .kex-review-state.is-needs_ocr{background:#fff3cd;color:#664d03}
html body .kex-review-state.is-ready{background:#dcfce7;color:#166534}
html body .kex-review-progress{height:8px;overflow:hidden;margin:0 0 18px;border-radius:999px;background:#e5e7eb}
html body .kex-review-progress span{display:block;height:100%;border-radius:inherit;background:#202428;transition:width .25s ease}
html body .kex-quick-review-form{margin-top:0}
html body .kex-quick-review-form .kex-current-receipt{display:grid;justify-items:center;padding:14px;border:1px solid #e5e7eb;border-radius:16px;background:#f8fafc}
html body .kex-quick-review-form .kex-current-receipt p{justify-self:start;width:100%;margin-top:0}
html body .kex-quick-review-form .kex-receipt-preview{max-height:520px;width:auto;max-width:100%;object-fit:contain;border-radius:10px;box-shadow:0 8px 22px rgba(15,23,42,.10)}
html body .kex-quick-review-actions{position:sticky;bottom:76px;z-index:15;display:flex;gap:10px;align-items:center;margin:22px -18px -18px;padding:14px 18px;border-top:1px solid #e5e7eb;background:rgba(255,255,255,.96);backdrop-filter:blur(8px)}
html body .kex-smart-suggestion{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:12px 0 18px;padding:16px;border:1px solid #c7d7fe;border-radius:14px;background:#f4f7ff}
html body .kex-smart-suggestion[hidden]{display:none!important}
html body .kex-smart-suggestion strong{display:block;margin:3px 0;color:#172554}
html body .kex-smart-suggestion p{margin:0;color:#475569}
html body .kex-smart-suggestion-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
html body .kex-smart-suggestion-dismiss{border:0;background:transparent;color:#475569;text-decoration:underline;cursor:pointer}
html body .kex-smart-suggestion.is-applied{border-color:#86efac;background:#f0fdf4}
html body .kex-review-complete{text-align:center;padding:46px 24px}
html body .kex-review-complete>span{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#dcfce7;color:#166534;font-size:32px;font-weight:800}
html body .kex-review-complete h2{margin:16px 0 6px}
@media(max-width:760px){
 html body .kex-quick-review-head{flex-direction:column;gap:10px}
 html body .kex-smart-suggestion{align-items:stretch;flex-direction:column}
 html body .kex-smart-suggestion-actions{width:100%;flex-direction:column;align-items:stretch}
 html body .kex-smart-suggestion-actions .kex-button{width:100%;text-align:center}
 html body .kex-quick-review-actions{bottom:68px;flex-direction:column;align-items:stretch}
 html body .kex-quick-review-actions .kex-button{width:100%;box-sizing:border-box;text-align:center}
 html body .kex-quick-review-form .kex-receipt-preview{max-height:58vh}
}
html body .kex-sync-review-link{display:inline-flex;margin-left:10px;font-weight:700;color:inherit;text-decoration:underline}
@media(max-width:760px){html body .kex-sync-review-link{display:flex;margin:8px 0 0}}
