/* ============================================
   BASE.CSS - Estilos do layout principal
   ============================================ */

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a2540, #1a6d8f);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loader-logo { width: 180px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}
.loader-text { margin-top: 20px; color: rgba(255,255,255,0.9); letter-spacing: 2px; }
.loader-bar { width: 200px; height: 3px; background: rgba(255,255,255,0.2); margin-top: 20px; border-radius: 10px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 100%; background: #f59e0b; animation: loading 1.2s ease-in-out infinite; }
@keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Search Bar Desktop */
.search-bar-desktop { flex: 0 0 380px; margin: 0 20px; }
.search-bar-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}
.search-bar-wrapper:focus-within {
    background: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.search-bar-wrapper:focus-within .search-icon { color: #0b2b5c; }
.search-icon {
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    transition: color 0.3s ease;
}
.search-input {
    flex: 1;
    border: none;
    padding: 12px 0;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    color: white;
}
.search-bar-wrapper:focus-within .search-input { color: #1a2c3e; }
.search-input::placeholder { color: rgba(255, 255, 255, 0.7); }
.search-bar-wrapper:focus-within .search-input::placeholder { color: #94a3b8; }
.search-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    padding: 8px 28px;
    font-weight: 600;
    border-radius: 60px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 4px;
}
.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.3);
}

/* Search Mobile */
.search-bar-mobile { padding: 0 16px; margin: 12px 0; }
.search-bar-mobile .search-bar-wrapper { background: white; border: 1px solid #e2e8f0; }
.search-bar-mobile .search-icon { color: #94a3b8; }
.search-bar-mobile .search-input { color: #1a2c3e; }
.search-bar-mobile .search-input::placeholder { color: #94a3b8; }

/* Notificações e Avatar */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: bold;
}
.user-avatar-nav { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-avatar-nav-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b2b5c, #1a6d8f);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Footer */
.footer { background: linear-gradient(135deg, #0a2540, #0d2b44); margin-top: 4rem; }
.footer a { transition: all 0.3s ease; }
.footer a:hover { color: #f59e0b !important; transform: translateX(5px); display: inline-block; }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.social-links a:hover { background: #f59e0b; transform: translateY(-3px); }

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
}
.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsividade */
@media (max-width: 768px) {
    .search-bar-desktop { flex: 0 0 280px; }
    .search-btn { padding: 6px 18px; font-size: 0.85rem; }
    .loader-logo { width: 120px; }
    .toast-notification { max-width: 280px; }
}