* { box-sizing: border-box; }

/* Código de seguridad de la consulta pública. */
/* Posiciones deliberadamente superpuestas para reproducir la referencia. */
.pedimento-publico {
    min-width: 1285px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
.pedimento-stage {
    position: relative;
    width: 1285px;
    min-width: 1285px;
    margin: 0;
    padding: 0;
    isolation: isolate;
}
.pedimento-stage > .page { position: relative; z-index: 0; }
.pedimento-stage > .captcha-overlay { position: absolute; z-index: 1; top: 0; left: 0; width: 1285px; height: 220px; margin: 0; padding: 0; pointer-events: none; color: #000; font: 16px Arial, sans-serif; }
.captcha-overlay form { margin: 0; padding: 0; }
.captcha-overlay button, .captcha-overlay input { -webkit-appearance: none; appearance: none; }
.captcha-overlay button, .captcha-overlay input { pointer-events: auto; }
.captcha-preview img { position: absolute; left: 812px; top: 91px; width: 160px; height: 62px; }
.captcha-link { position: absolute; left: 977px; top: 138px; padding: 0; border: 0; background: transparent; color: #0000ee; text-decoration: underline; white-space: nowrap; font: 16px "Times New Roman", serif; cursor: pointer; }
.captcha-overlay .captcha-code { position: absolute; left: 1013px; top: 156px; width: 123px; height: 21px; padding: 1px 2px; border: 1px solid #888; border-radius: 0; background: #fff; font: 13px Arial, sans-serif; text-transform: uppercase; }
.captcha-label-start { position: absolute; left: 1140px; top: 157px; white-space: nowrap; font-weight: bold; }
.captcha-label-end { position: absolute; left: 903px; top: 177px; white-space: nowrap; font-weight: bold; }
.captcha-actions .btn { position: absolute; z-index: 0; left: 5px; top: 195px; padding: 1px 6px; height: 21px; border: 1px solid #888; border-radius: 2px; background: #efefef; color: #000; font: 13px Arial, sans-serif; }
.captcha-status { position: absolute; left: 812px; top: 213px; width: 460px; margin: 0; color: #9d2449; font: 13px Arial, sans-serif; }
.captcha-overlay button:disabled { opacity: .55; }
.captcha-overlay :focus-visible { outline: 2px solid #286253; outline-offset: 2px; }
.login-page { background: #fff; }
.login-shell { width: 100%; max-width: 1005px; }
.login-header img { display: block; width: 100%; height: auto; }
.login-title {
    margin: 0;
    padding: 8px 18px;
    color: rgb(157, 36, 73);
    font-size: 16px;
    font-weight: bold;
}
.login-shell .login-card { max-width: 440px; margin: 24px auto; }
.login-description, .login-footer { color: #636363; font-size: 13px; line-height: 1.5; }
.login-form .form-grid { grid-template-columns: 1fr; }
.login-form input:focus-visible, .btn:focus-visible { outline: 3px solid #9cbcad; outline-offset: 3px; }
.login-footer { margin: 20px 0 0; font-size: 12px; }
.login-error { padding: 12px; margin-bottom: 16px; background: #fff0f0; border: 1px solid #deb6b6; border-radius: 4px; color: #7a1f1f; font-size: 13px; line-height: 1.5; }
@media (max-width: 480px) { .login-shell .login-card { margin: 20px 14px; } }
.admin-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; color: #14301f; }


body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef1f0;
    color: #222;
}

.page {
    max-width: 950px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid #c7cfcb;
}

/* ---------- Encabezado estilo SAT ---------- */
.soia-header {
    display: flex;
    align-items: stretch;
}
.soia-header .brand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: #f3f4f4;
}
.soia-header .brand .seal {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #285C4D;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}
.soia-header .brand .names b {
    display: block;
    font-size: 17px;
    color: #222;
    line-height: 1.1;
}
.soia-header .brand .names small {
    color: #666;
    font-size: 10px;
}
.soia-header .brand .sat-dots {
    display: grid;
    grid-template-columns: repeat(2, 8px);
    grid-gap: 3px;
    margin-left: 8px;
}
.soia-header .brand .sat-dots span {
    width: 8px; height: 8px; border-radius: 50%; background: #1b3fae;
}
.soia-header .sistema {
    background: #14301f;
    color: #fff;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    min-width: 230px;
    font-size: 15px;
}

.soia-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid #d7dcd9;
    font-weight: bold;
    color: rgb(157, 36, 73);
}
.soia-title .back {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2e8b57;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.badge-interno {
    font-size: 10px;
    font-weight: normal;
    color: #7a1f1f;
    border: 1px solid #7a1f1f;
    border-radius: 3px;
    padding: 2px 6px;
    margin-left: 10px;
    text-transform: uppercase;
}

/* ---------- Datos generales ---------- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 30px;
    padding: 16px 18px;
    font-size: 13.5px;
}
.info-row {
    display: flex;
    gap: 8px;
    z-index: 4;
    position: relative;
    padding: 3px 0;
}
.info-row .label {
    color: #636363;
    min-width: 130px;
}
.info-row .value {
    font-weight: bold;
    color: #111;
}
.factura {
    text-align: right;
    padding: 0 18px 10px;
    font-weight: bold;
    color: #333;
}

/* ---------- Movimientos ---------- */
.mov-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #333;
    border-top: 1px solid #d7dcd9;
}
table.movs {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
table.movs thead th {
    background: #285C4D;
    color: #fff;
    text-align: left;
    padding: 8px 18px;
    font-weight: bold;
}
table.movs tbody td {
    padding: 9px 18px;
    border-bottom: 1px solid #e4e7e5;
}
table.movs tbody tr:nth-child(odd) { background: #f3f6f4; }
table.movs tbody tr.pagado { background: #dcefe1; }
table.movs a.situacion-link {
    color: #1b4fae;
    text-decoration: underline;
    font-weight: bold;
}

/* ---------- Formulario / listado ---------- */
.container {
    max-width: 950px;
    margin: 24px auto;
    padding: 0 14px;
}
.card {
    background: #fff;
    border: 1px solid #d7dcd9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card h2 {
    margin-top: 0;
    color: #14301f;
    border-bottom: 2px solid #14301f;
    padding-bottom: 8px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}
.form-grid label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
    font-weight: bold;
}
.form-grid input, .form-grid select {
    width: 100%;
    padding: 8px;
    border: 1px solid #c3c9c6;
    border-radius: 4px;
    font-size: 14px;
}
.movs-table-edit {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.movs-table-edit th {
    text-align: left;
    background: #14301f;
    color: #fff;
    padding: 6px 8px;
    font-size: 12.5px;
}
.movs-table-edit td {
    padding: 5px;
}
.movs-table-edit input {
    width: 100%;
    padding: 6px;
    border: 1px solid #c3c9c6;
    border-radius: 4px;
}
.btn {
    display: inline-block;
    background: #14301f;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
.btn.secondary {
    background: #6b6b6b;
}
.btn.danger {
    background: #7a1f1f;
    padding: 6px 10px;
    font-size: 12px;
}
.btn.small {
    padding: 6px 10px;
    font-size: 12px;
}
.actions-bar {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}
table.list {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
table.list th {
    background: #14301f;
    color: #fff;
    text-align: left;
    padding: 8px;
}
table.list td {
    padding: 8px;
    border-bottom: 1px solid #e4e7e5;
    vertical-align: middle;
}
table.list tr:nth-child(odd) td { background: #f7f9f8; }
.qr-thumb {
    width: 54px;
    height: 54px;
}
.flash-ok {
    background: #dcefe1;
    border: 1px solid #2e8b57;
    color: #14301f;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}
.qr-box {
    text-align: center;
    padding: 20px;
}
.qr-box img {
    border: 1px solid #d7dcd9;
    padding: 10px;
    background: #fff;
}
.qr-box .link {
    word-break: break-all;
    font-size: 12.5px;
    color: #555;
    margin-top: 10px;
}

/* ---------- Vista pública del pedimento (escritorio) ---------- */
body:has(.page) {
    background: #fff;
    color: #454545;
}
.page {
    width: 1005px;
    max-width: none;
    min-height: 480px;
    margin: 0;
    border: 0;
}
.page .soia-header {
    display: block;
    width: 1005px;
    height: 96px;
}
.page .soia-header img {
    display: block;
    width: 1005px;
    height: 96px;
}
.page .soia-title {
    width: 930px;
    height: 28px;
    padding: 0 13px 0 9px;
    border: 0;
    color: rgb(157, 36, 73);
    font-size: 16px;
}
.page .soia-title .back {
    display: block;
    width: 25px;
    height: 25px;
    border: 0;
}
.page .info-grid {
    grid-template-columns: 410px 335px 130px;
    column-gap: 29px;
    width: 930px;
    padding: 7px 0 0 27px;
    font-size: 14px;
}
.page .info-row {
    gap: 5px;
    padding: 6px 0;
}
.page .info-row .label {
    min-width: 93px;
    font-weight: bold;
}
.page .info-grid > div:nth-child(2) .label {
    width: 143px;
    min-width: 143px;
}
.page .info-row .value {
    color: #454545;
    font-weight: normal;
    font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
}
.page .factura {
    display: flex;
    align-items: flex-end;
    gap: 13px;
    padding: 0 0 6px;
    color: #454545;
    text-align: left;
}
.page .factura .label { font-weight: bold; }
.page .mov-header {
    width: 903px;
    margin: 81px 0 3px 27px;
    border: 0;
    color: #00754a;
    font-family: "Times New Roman", serif;
    font-size: 15px;
    font-weight: normal;
}
.page .mov-header span:last-child {
    color: #5c656d;
    font: 14px Arial, Helvetica, sans-serif;
    width: 183px;
}
.page table.movs {
    width: 903px;
    margin-left: 27px;
    table-layout: fixed;
    font-size: 12px;
}
.page table.movs th:nth-child(1) { width: 40.3%; }
.page table.movs th:nth-child(2) { width: 39.4%; }
.page table.movs th:nth-child(3) { width: 20.3%; }
.page table.movs thead { height: 45px; }
.page table.movs thead th {
    background: #286253;
    padding: 0 3px;
    text-align: center;
}
.page table.movs tbody td {
    height: 25px;
    padding: 3px 2px;
    border: 0;
    color: #000;
}
.page table.movs tbody tr:nth-child(odd),
.page table.movs tbody tr.pagado { background: #f3f3f3; }
.page table.movs tbody tr:nth-child(even) { background: #fff; }
.page table.movs tbody td:first-child {
    background: #d2f2df;
    text-align: center;
}
.page table.movs a.situacion-link {
    color: #000;
    font-weight: normal;
}
.page table.movs a.situacion-link.pagado {
    color: #0000ee;
}
