/* ═══════════════════════════════════════════════
   CertifyVault – Estilos consolidados
   ═══════════════════════════════════════════════ */

/* ─── ADMIN HEADER ─── */
.cv-header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: 12px 20px;
    margin-left: -20px;
    position: relative;
}

.cv-title {
    font-size: 15px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
}

/* ─── WRAP GENERAL ─── */
.cv-wrap {
    max-width: 900px;
}

.cv-page-title {
    margin-top: 60px;
    margin-bottom: 10px;
}

.cv-count {
    font-size: 14px;
    font-weight: 400;
    color: #646970;
}

/* ─── SEARCH FORM ─── */
.cv-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.cv-search-form input[type="text"] {
    padding: 6px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    min-width: 260px;
}

/* ─── PER PAGE LINKS ─── */
.cv-per-page {
    margin-bottom: 8px;
}

.cv-per-page a {
    margin-right: 6px;
    text-decoration: none;
}

.cv-per-page a.cv-active {
    font-weight: 700;
    color: #2271b1;
}

/* ─── PAGINATION ─── */
.tablenav-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

.cv-total {
    margin-right: 10px;
    color: #646970;
}

.cv-paged {
    margin: 0 4px;
}

/* ─── FORM (add / edit / delete) ─── */
.cv-form {
    max-width: 480px;
}

.cv-field {
    margin-bottom: 16px;
}

.cv-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.cv-field input[type="text"],
.cv-field input[type="date"],
.cv-field input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.cv-hint {
    font-weight: 400;
    font-size: 12px;
    color: #646970;
    margin-left: 6px;
}

/* ─── CSV EXAMPLE ─── */
.cv-csv-example {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 20px;
    max-width: 480px;
}

.cv-csv-example h4 {
    margin: 0 0 8px;
}

.cv-csv-example code {
    display: block;
    font-size: 13px;
    line-height: 1.7;
}

/* ─── TOOLS PAGE ─── */
.cv-tool-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 520px;
}

.cv-tool-box h3 {
    margin-top: 0;
}

.cv-danger-box {
    border-color: #d63638;
    background: #fef7f7;
}

.cv-btn-danger {
    background: #d63638 !important;
    color: #fff !important;
    border: none !important;
}

.cv-btn-danger:hover {
    background: #b32d2e !important;
}

.cv-shortcode-display {
    display: flex;
    gap: 8px;
}

.cv-shortcode-display input {
    flex: 1;
    padding: 8px;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #f6f7f7;
}

/* ═══════════════════════════════════════════════
   FRONTEND – Validación de certificados
   ═══════════════════════════════════════════════ */

/* ─── RESULTADO ─── */
.cv-result {
    max-width: 420px;
    margin: 0 auto 20px;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.cv-valid {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.cv-invalid {
    background: #fbe9e7;
    border: 2px solid #f44336;
}

.cv-valid-icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 8px;
}

.cv-invalid-icon {
    font-size: 48px;
    color: #f44336;
    margin-bottom: 8px;
}

.cv-result h3 {
    margin: 0 0 16px;
    font-size: 20px;
}

.cv-invalid p {
    color: #c62828;
    font-size: 15px;
    margin: 0;
}

/* ─── TABLA DE CERTIFICADO ─── */
.cv-cert-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cv-cert-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #c8e6c9;
}

.cv-cert-table td:first-child {
    width: 40%;
    color: #555;
}

/* ─── FORMULARIO DE VALIDACIÓN ─── */
.cv-validate-form {
    max-width: 420px;
    margin: 0 auto;
}

.cv-input-group {
    display: flex;
    gap: 8px;
}

.cv-code-input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    outline: none;
    transition: border-color .2s;
}

.cv-code-input:focus {
    border-color: #2271b1;
}

.cv-btn-validate {
    padding: 12px 24px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}

.cv-btn-validate:hover {
    background: #1678c2;
}

/* ─── ELEMENTOR WIDGET TITLE ─── */
.cv-widget-title {
    text-align: center;
    font-size: 22px;
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media screen and (max-width: 600px) {
    .cv-input-group {
        flex-direction: column;
    }

    .cv-btn-validate {
        width: 100%;
    }

    .cv-search-form {
        flex-direction: column;
    }

    .cv-search-form input[type="text"] {
        min-width: auto;
    }

    .cv-tool-box {
        max-width: 100%;
    }
}
