/* --- BUTTONS --- */
.btn {
    padding: 1rem 1.5rem; border-radius: 1rem; font-weight: 900; font-size: 0.85rem;
    cursor: pointer; border: none; transition: var(--transition); display: inline-flex; 
    align-items: center; gap: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
}
.btn-primary { background: var(--primary); color: #000; box-shadow: 0 4px 15px rgba(255, 204, 2, 0.2); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-primary:disabled { background: #10b981; color: white; cursor: default; transform: none; box-shadow: none; }

.btn-outline { background: #ffffff; color: var(--text); border: 2px solid #f1f5f9; }
.btn-outline:hover { background: #f8fafc; border-color: #e2e8f0; }

.btn-full { width: 100%; justify-content: center; }

/* --- MODALS (CON SCROLL) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
}
.modal-content {
    background: white; border-radius: 2rem; width: 100%; max-width: 700px;
    max-height: 90vh; overflow-y: auto; position: relative; 
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f5f9;
}
/* Scrollbar para Webkit */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: #f1f5f9; }
.modal-content::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; cursor: pointer; font-size: 2.5rem; line-height: 1; z-index: 10; transition: 0.2s; }
.modal-close:hover { color: var(--primary-dark); transform: scale(1.1); }

/* Responsive modals */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-content {
        max-width: 100%;
        width: 95%;
        margin: 1rem auto;
        border-radius: 1rem;
        max-height: 95vh;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }
    
    .modal-content > div[style*="padding:2rem"] {
        padding: 1rem !important;
    }
}

/* --- CARDS --- */
.card { background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; border: 1px solid rgba(0,0,0,0.03); box-shadow: var(--shadow); }

/* --- INPUTS --- */
input, textarea, select {
    width: 100%; padding: 1.1rem 1.4rem; border-radius: 1rem; border: 2px solid #f1f5f9;
    background: #ffffff; font-family: inherit; font-size: 1rem; transition: var(--transition);
}
input:focus { outline: none; border-color: var(--primary); background: #fffdf5; }

/* --- TOAST --- */
#toast-container {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 3000;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
    padding: 1rem 1.5rem; border-radius: 1rem; font-weight: 700; font-size: 0.9rem;
    color: white; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out; transition: opacity 0.5s;
}
.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-info { background: linear-gradient(135deg, #3b82f6, #2563eb); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- LOADER OVERLAY --- */
.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 2500;
}
.spinner {
    width: 50px; height: 50px; border: 4px solid #f1f5f9;
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-overlay p {
    margin-top: 1rem; font-weight: 700; color: var(--text);
}

/* --- SKELETON --- */
.skeleton-container { display: flex; flex-direction: column; gap: 1rem; }
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* --- BADGE --- */
.badge {
    display: inline-block; padding: 0.3rem 0.8rem; border-radius: 2rem;
    font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px;
}
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-error { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }

/* --- GUEST CONTAINER --- */
.guest-container {
    min-height: 100vh;
}

/* --- LOGOUT BUTTON --- */
.btn-logout {
    background: var(--primary); color: var(--text); border: none;
    padding: 0.6rem 1.2rem; border-radius: 0.8rem; font-weight: 800;
    font-size: 0.75rem; cursor: pointer; transition: var(--transition);
}
.btn-logout:hover { background: var(--primary-dark); }