[hidden] { display: none !important; }

.ct-box {
    max-width: 950px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    font-family: "Segoe UI", Arial, sans-serif;
}

.ct-title {
    margin: 0 0 25px;
    text-align: center;
    color: #1e5bb8;
    font-weight: 700;
}

.ct-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.ct-search-row {
    display: flex;
    gap: 10px;
}

#curpInput {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    font-size: 16px;
    text-transform: uppercase;
}

#curpInput:focus {
    outline: none;
    border-color: #1e5bb8;
    box-shadow: 0 0 0 3px rgba(30,91,184,.12);
}

.ct-help {
    margin-top: 7px;
    color: #667085;
    font-size: 13px;
}

#consultarBtn, .ct-print-btn, .ct-validate-btn, .ct-modal-ok {
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

#consultarBtn {
    padding: 12px 25px;
    background: #1e5bb8;
    color: #fff;
    font-size: 16px;
}

#consultarBtn:disabled {
    opacity: .6;
    cursor: wait;
}

.ct-loading {
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    background: #eef5ff;
    border-radius: 8px;
}

.ct-error {
    margin-top: 20px;
    padding: 12px 15px;
    background: #fdecec;
    border: 1px solid #f5b5b5;
    border-radius: 8px;
    color: #b42318;
    text-align: center;
}

.ct-result { margin-top: 25px; }

.ct-user-info {
    padding: 20px;
    background: #f6f8fb;
    border-radius: 10px;
    margin-bottom: 25px;
}

.ct-user-info p { margin: 6px 0; }

.ct-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 15px;
}

.ct-certificados h4 {
    color: #1e5bb8;
    margin: 0;
}

.ct-print-btn {
    padding: 10px 16px;
    background: #1e5bb8;
    color: #fff;
    font-size: 14px;
}

.ct-table-wrapper { overflow-x: auto; }

.ct-table {
    width: 100%;
    border-collapse: collapse;
}

.ct-table th, .ct-table td {
    padding: 12px;
    border: 1px solid #d9dee5;
    text-align: left;
    vertical-align: middle;
}

.ct-table th {
    background: #1e5bb8;
    color: #fff;
}

.ct-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.ct-validate-btn {
    padding: 8px 12px;
    background: #e8f1ff;
    color: #1e5bb8;
    border: 1px solid #b8cff7;
    white-space: nowrap;
}

.ct-modal-open { overflow: hidden; }

.ct-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.ct-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
}

.ct-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 560px);
    margin: 8vh auto 0;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.24);
}

.ct-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.ct-valid-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf8ef;
    color: #157347;
    font-size: 30px;
    font-weight: 700;
}

.ct-modal-dialog h4 {
    margin: 0;
    text-align: center;
    color: #157347;
    font-size: 24px;
}

.ct-validation-message {
    margin: 10px auto 20px;
    max-width: 440px;
    text-align: center;
    color: #475467;
}

.ct-validation-data {
    padding: 18px;
    background: #f7f9fc;
    border-radius: 10px;
}

.ct-validation-data p { margin: 6px 0; }

.ct-modal-ok {
    display: block;
    margin: 20px auto 0;
    padding: 10px 24px;
    background: #1e5bb8;
    color: #fff;
}

@media (max-width: 650px) {
    .ct-box {
        padding: 20px;
        margin: 15px;
    }

    .ct-search-row,
    .ct-section-head {
        flex-direction: column;
    }

    #consultarBtn,
    .ct-print-btn {
        width: 100%;
    }

    .ct-table {
        min-width: 760px;
    }

    .ct-modal-dialog {
        margin-top: 5vh;
        padding: 24px 18px;
    }
}
