/* =========================================
   Pucodela — Panel Protectora
   ========================================= */

.pdp-panel-wrap {
    font-family: 'DM Sans', sans-serif;
    max-width: 860px;
    margin: 0 auto;
    color: #464947;
}

/* ---- Login ---- */
.pdp-panel-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 16px;
}
.pdp-panel-login__box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 48px 40px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(70,73,71,.08);
}
.pdp-panel-login__logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}
.pdp-panel-login__logo svg {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(148,157,121,.25));
}
.pdp-panel-login__box h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #464947;
    margin: 0 0 6px;
    letter-spacing: -.01em;
}
.pdp-panel-login__box > p {
    color: #999;
    font-size: 14px;
    margin: 0 0 28px;
}
.pdp-panel-login__error {
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}
.pdp-login-campo { margin-bottom: 16px; text-align: left; }
.pdp-login-campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #464947;
}
.pdp-login-campo input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    color: #464947;
    background: #fafafa;
}
.pdp-login-campo input:focus {
    outline: none;
    border-color: #949D79;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(148,157,121,.15);
}
.pdp-panel-login__btn,
.pdp-panel-login__btn:not(.wp-block-button__link) {
    width: 100% !important;
    background: #949D79 !important;
    color: #fff !important;
    border: none !important;
    padding: 13px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: background .15s, transform .1s !important;
    margin-top: 8px !important;
    letter-spacing: .01em !important;
    box-shadow: 0 4px 12px rgba(148,157,121,.3) !important;
}
.pdp-panel-login__btn:hover {
    background: #7a8460 !important;
    transform: translateY(-1px) !important;
}
.pdp-panel-login__btn:active { transform: translateY(0) !important; }
.pdp-login-forgot { margin-top: 20px; font-size: 13px; }
.pdp-login-forgot a { color: #949D79; text-decoration: none; }
.pdp-login-forgot a:hover { text-decoration: underline; }

/* ---- Header ---- */
.pdp-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.pdp-panel-header__avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f6f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pdp-panel-header__avatar img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.pdp-panel-header__avatar span {
    font-family: 'Fredoka', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #949D79;
    text-transform: uppercase;
}
.pdp-panel-header__info { flex: 1; min-width: 0; }
.pdp-panel-header__info h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 20px;
    margin: 0 0 4px;
    color: #464947;
}
.pdp-panel-header__info p { font-size: 13px; color: #888; margin: 0; }
.pdp-panel-logout {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    white-space: nowrap;
    transition: all .15s;
}
.pdp-panel-logout:hover { border-color: #d32f2f; color: #d32f2f; }

/* ---- Stats ---- */
.pdp-panel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 640px) { .pdp-panel-stats { grid-template-columns: repeat(2, 1fr); } }

.pdp-panel-stat {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.pdp-panel-stat--main   { border-top: 3px solid #949D79; }
.pdp-panel-stat--ok     { border-top: 3px solid #4caf50; }
.pdp-panel-stat--pending{ border-top: 3px solid #ff9800; }

.pdp-panel-stat__num {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #464947;
    line-height: 1.2;
}
.pdp-panel-stat__num .woocommerce-Price-amount { font-size: 22px; font-family: 'Fredoka', sans-serif; }
.pdp-panel-stat__label { display: block; font-size: 11px; color: #888; margin-top: 4px; }

/* ---- Tabs ---- */
.pdp-panel-tabs {
    display: flex;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 20px;
    gap: 0;
    flex-wrap: wrap;
}
.pdp-panel-tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.pdp-panel-tab:hover { color: #949D79; }
.pdp-panel-tab.active { color: #949D79; border-bottom-color: #949D79; font-weight: 600; }

/* ---- Content ---- */
.pdp-panel-content {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
}

/* ---- Tabla ---- */
.pdp-panel-table-wrap { overflow-x: auto; }
.pdp-panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.pdp-panel-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid #f0f0f0;
}
.pdp-panel-table td {
    padding: 12px;
    border-bottom: 1px solid #f5f5f5;
    color: #464947;
}
.pdp-panel-table tr:last-child td { border-bottom: none; }
.pdp-panel-table code {
    background: #f5f6f2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #464947;
}

/* Badges */
.pdp-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pdp-badge-ok   { background: #e8f5e9; color: #2e7d32; }
.pdp-badge-warn { background: #fff3e0; color: #e65100; }
.pdp-badge-off  { background: #ffebee; color: #b71c1c; }

/* Botón certificado */
.pdp-panel-cert-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #949D79;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #c5cba8;
    border-radius: 4px;
    transition: all .15s;
}
.pdp-panel-cert-btn:hover { background: #949D79; color: #fff; border-color: #949D79; }

/* ---- Perfil ---- */
.pdp-perfil-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.pdp-perfil-section:last-child { border-bottom: none; margin-bottom: 0; }
.pdp-perfil-section h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 17px;
    color: #464947;
    margin: 0 0 16px;
}
.pdp-perfil-section--pass { margin-top: 24px; }
.pdp-perfil-hint-text { font-size: 13px; color: #888; margin: -8px 0 14px; }

.pdp-perfil-campo { margin-bottom: 14px; }
.pdp-perfil-campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #464947;
}
.pdp-perfil-hint { font-weight: 400; color: #888; font-size: 12px; }
.pdp-perfil-campo input,
.pdp-perfil-campo textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s;
    color: #464947;
}
.pdp-perfil-campo input:focus,
.pdp-perfil-campo textarea:focus {
    outline: none;
    border-color: #949D79;
    box-shadow: 0 0 0 3px rgba(148,157,121,.12);
}
.pdp-perfil-campo textarea { resize: vertical; min-height: 72px; }

.pdp-perfil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .pdp-perfil-grid { grid-template-columns: 1fr; } }

.pdp-perfil-prefix { display: flex; align-items: center; border: 1.5px solid #ddd; border-radius: 6px; overflow: hidden; }
.pdp-perfil-prefix:focus-within { border-color: #949D79; box-shadow: 0 0 0 3px rgba(148,157,121,.12); }
.pdp-perfil-prefix span { background: #f5f5f5; padding: 9px 10px; color: #888; font-size: 13px; border-right: 1px solid #ddd; }
.pdp-perfil-prefix input { border: none !important; box-shadow: none !important; flex: 1; }

.pdp-perfil-actions { margin-top: 8px; }
.pdp-panel-wrap .pdp-perfil-btn,
.pdp-panel-wrap .pdp-perfil-btn:not(.wp-block-button__link) {
    background: #949D79 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: background .15s !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    width: auto !important;
}
.pdp-panel-wrap .pdp-perfil-btn:hover { background: #7a8460 !important; color: #fff !important; }
.pdp-panel-wrap .pdp-perfil-btn--secondary { background: #f5f6f2 !important; color: #464947 !important; border: 1px solid #ddd !important; margin-top: 12px !important; }
.pdp-panel-wrap .pdp-perfil-btn--secondary:hover { background: #eceee8 !important; }
.pdp-panel-wrap .pdp-perfil-btn:disabled { background: #ccc !important; cursor: not-allowed !important; }

.pdp-panel-notice { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.pdp-panel-notice--ok  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.pdp-panel-notice--err { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

.pdp-perfil-msg { padding: 10px 14px; border-radius: 6px; font-size: 13px; }
.pdp-perfil-msg--ok  { background: #e8f5e9; color: #2e7d32; }
.pdp-perfil-msg--err { background: #ffebee; color: #c62828; }

/* Empty state */
.pdp-panel-empty { text-align: center; padding: 48px 16px; color: #888; }
.pdp-panel-empty span { font-size: 40px; display: block; margin-bottom: 12px; }
.pdp-panel-empty p { font-size: 15px; margin: 0; }
.pdp-panel-desc { font-size: 13px; color: #888; margin: 0 0 16px; }

/* Error */
.pdp-panel-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
}

/* ---- Pestaña Cobros — guía paso a paso ---- */
.pdp-cobros-guia {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.pdp-cobros-guia h4 {
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #464947;
    margin: 0 0 16px;
}
.pdp-cobros-paso {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.pdp-cobros-paso:last-child { margin-bottom: 0; }
.pdp-cobros-paso-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #949D79;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}
.pdp-cobros-paso-txt strong {
    display: block;
    font-size: 14px;
    color: #464947;
    margin-bottom: 4px;
}
.pdp-cobros-paso-txt p {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}
