/**
 * ESTILOS DASHBOARD "MI CUENTA" - v2.2 UX Refinada
 * Incluye Toasts Gigantes y Botón de Logout Destacado.
 */

/* Contenedor Principal */
.ap-dashboard-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}

/* BARRA DE ESTADO */
.ap-status-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
    margin: -30px -30px 20px -30px; 
}
.ap-user-info { font-size: 0.9rem; color: #555; font-weight: 600; }
.ap-code-badge { background: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-family: monospace; color: #333; }

/* Botón Cerrar Sesión Agrandado */
.ap-btn-logout-mini {
    background: transparent; border: 2px solid #ff4d4f; color: #ff4d4f;
    padding: 10px 20px; font-size: 1.05rem; font-weight: bold; border-radius: 8px; cursor: pointer;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.ap-btn-logout-mini:hover { background: #ff4d4f; color: #fff; box-shadow: 0 4px 10px rgba(255, 77, 79, 0.3); }

/* INPUTS MODERNOS */
.ap-input-group { margin-bottom: 20px; text-align: left; }
.ap-label { display: block; margin-bottom: 6px; font-weight: 600; color: #444; font-size: 0.9rem; }
.ap-helper-text { font-size: 0.8rem; color: #888; margin-top: 4px; }

.ap-input-modern {
    width: 100%; padding: 12px 15px; border: 2px solid #e2e8f0; border-radius: 10px;
    font-size: 1rem; transition: border-color 0.2s; box-sizing: border-box;
}
.ap-input-modern:focus { border-color: #0FD291; outline: none; }

/* Wrapper para Contraseña */
.ap-password-wrapper { position: relative; width: 100%; }
.ap-password-wrapper input { padding-right: 45px; }
.ap-toggle-password {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: #aaa; font-size: 1.2rem; user-select: none;
}
.ap-toggle-password:hover { color: #555; }

/* BOTONES CON SPINNER */
.ap-btn-main, .ap-submit-btn {
    background: #0FD291; color: #fff; width: 100%; padding: 15px;
    border: none; border-radius: 50px; font-size: 1.1rem; font-weight: 800;
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(15, 210, 145, 0.3); transition: transform 0.2s, background 0.2s;
    position: relative;
    display: flex; justify-content: center; align-items: center;
}
.ap-btn-main:hover, .ap-submit-btn:hover { background: #0bc084; transform: translateY(-2px); }
.ap-btn-main:disabled, .ap-submit-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

/* Spinner CSS */
.ap-spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
    margin-right: 10px;
}
.ap-btn-loading .ap-spinner { display: block; }
.ap-btn-loading span.ap-btn-text { display: none; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* TOAST NOTIFICATIONS (Gigantes y Centrados) */
.ap-toast-container {
    position: fixed; top: 30px; left: 50%; transform: translateX(-50%); z-index: 99999;
    display: flex; flex-direction: column; gap: 15px; width: 90%; max-width: 450px;
}
.ap-toast {
    background: #333; color: #fff; padding: 18px 25px; border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); font-size: 1.15rem; font-weight: 600;
    opacity: 0; transform: translateY(-50px); animation: slideDown 0.4s forwards;
    display: flex; align-items: center; justify-content: center; text-align: center; gap: 12px; 
}
.ap-toast.success { background: #10b981; } 
.ap-toast.error { background: #ef4444; }   
.ap-toast.warning { background: #f59e0b; color: #000; } 

@keyframes slideDown { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-30px); } }

.ap-toast.hiding { animation: fadeOutUp 0.4s forwards; }

/* FORMULARIO EDICIÓN (Inyectado) */
.ap-edit-container { max-width: 800px; margin: 0 auto; }