/* QB Comunicado Manager — listado + formulario + aviso de plan */

.qbco-lista-wrapper,
.qbco-form-wrapper,
.qbco-aviso-plan {
    --qbco-primary: #1e7d4f;
    --qbco-primary-dark: #145c39;
    --qbco-border: #e2e5e9;
    --qbco-radius: 12px;

    max-width: 760px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2b2f33;
}

.qbco-lista-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qbco-lista-header h3 { margin: 0; font-size: 20px; }

.qbco-btn-nuevo {
    background: var(--qbco-primary);
    color: #fff !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.qbco-btn-nuevo:hover { background: var(--qbco-primary-dark); }

.qbco-vacio { text-align: center; color: #6b7280; padding: 40px 0; }

.qbco-tabla {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qbco-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--qbco-border);
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.12s ease;
}

.qbco-fila:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

.qbco-fila-info strong { display: block; font-size: 15px; margin-bottom: 4px; }
.qbco-fila-info span { font-size: 12px; color: #6b7280; }

.qbco-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.qbco-badge-borrador      { background: #f1f2f4; color: #6b7280; }
.qbco-badge-programado    { background: #fef6e7; color: #b7791f; }
.qbco-badge-enviado       { background: #ecfdf3; color: var(--qbco-primary-dark); }
.qbco-badge-error_parcial,
.qbco-badge-error_total   { background: #fef3f2; color: #b42318; }

.qbco-volver {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--qbco-primary);
    text-decoration: none;
}

.qbco-volver:hover { text-decoration: underline; }

.qbco-nota {
    font-size: 13px;
    color: #b7791f;
    background: #fef6e7;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.qbco-form-wrapper .acf-form {
    background: #fff;
    border: 1px solid var(--qbco-border);
    border-radius: var(--qbco-radius);
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.qbco-form-wrapper .acf-field {
    border: none;
    padding: 16px 0;
    border-bottom: 1px solid #f1f2f4;
}

.qbco-btn-guardar {
    background: var(--qbco-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
}

.qbco-btn-guardar:hover { background: var(--qbco-primary-dark); }
.qbco-btn-guardar.qbco-loading { opacity: 0.7; cursor: not-allowed; }

.qbco-aviso {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
    padding: 20px;
    background: #fef3f2;
    border: 1px solid #fda29b;
    border-radius: 12px;
    color: #b42318;
}

.qbco-aviso-plan {
    text-align: center;
    padding: 40px 24px;
    background: #fef6e7;
    border: 1px solid #f6c667;
    border-radius: var(--qbco-radius);
    color: #7a5300;
}

@media (max-width: 600px) {
    .qbco-form-wrapper .acf-form { padding: 20px; }
    .qbco-lista-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .qbco-fila { flex-direction: column; align-items: flex-start; gap: 8px; }
}
