/**
 * Header.css - Estilos do Header Universal UILLIU
 * Design moderno, responsivo e adaptativo
 */

/* ===== BASE HEADER STYLES ===== */
.landing-header,
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.landing-header:hover,
.app-header:hover {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* ===== NAVIGATION CONTAINERS ===== */
.landing-nav,
.app-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.app-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

/* ===== BRAND SECTION ===== */
.nav-brand,
.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s ease;
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.brand-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    margin-left: 1rem;
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    color: #9ca3af;
    font-size: 0.875rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: #6b7280;
}

.breadcrumbs a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #6366f1;
}

.breadcrumb-current {
    color: #ffffff;
    font-weight: 500;
}

/* ===== SEARCH BAR ===== */
.search-container {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-bar {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    color: #9ca3af;
    font-size: 1.125rem;
    margin-right: 0.75rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.875rem;
    outline: none;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-shortcut {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    margin-left: 0.5rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-results.active {
    display: block;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d1d5db;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
    transform: translateY(-1px);
}

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    position: relative;
}

.user-dropdown-trigger {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
}

.user-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.user-avatar,
.user-avatar-large,
.user-avatar-mobile {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
}

.user-avatar-large {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.2;
}

.dropdown-arrow {
    font-size: 1rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== DROPDOWN MENU ===== */
.user-dropdown-menu,
.notifications-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.75rem;
    min-width: 280px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.user-dropdown.active .user-dropdown-menu,
.notifications-dropdown.active .notifications-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.dropdown-username {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
}

.dropdown-email {
    color: #9ca3af;
    font-size: 0.75rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.dropdown-item ion-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* ===== NOTIFICATIONS ===== */
.notifications-dropdown {
    position: relative;
}

.notifications-trigger {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d1d5db;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notifications-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.notifications-header h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: rgba(99, 102, 241, 0.1);
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #6366f1;
    border-radius: 50%;
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.notification-text {
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-time {
    color: #6b7280;
    font-size: 0.625rem;
}

.notifications-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    text-align: center;
}

.notifications-footer a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
    z-index: 1002;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu,
.app-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1001;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}

.mobile-menu.active,
.app-mobile-menu.active {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    gap: 1.5rem;
}

.mobile-nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.mobile-nav-link:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.mobile-user-section,
.mobile-user-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 2rem;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-username {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.125rem;
}

.mobile-user-role {
    color: #9ca3af;
    font-size: 0.875rem;
}

.mobile-logout,
.mobile-auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f87171;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.mobile-cta {
    margin-top: 1rem;
}

/* ===== COMMAND PALETTE ===== */
.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.command-palette-overlay.active {
    opacity: 1;
    visibility: visible;
}

.command-palette {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 500px;
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.2s ease;
}

.command-palette-overlay.active .command-palette {
    transform: translateY(0) scale(1);
}

.command-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.command-search ion-icon {
    color: #9ca3af;
    font-size: 1.25rem;
}

.command-search input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.125rem;
    outline: none;
}

.command-search input::placeholder {
    color: #6b7280;
}

.command-categories {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.command-category {
    margin-bottom: 1.5rem;
}

.category-title {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.command-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.command-item ion-icon {
    color: #9ca3af;
    font-size: 1.125rem;
}

.command-item span {
    flex: 1;
    color: #ffffff;
    font-size: 0.875rem;
}

.command-shortcut {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* ===== AUTH ACTIONS ===== */
.auth-actions,
.mobile-auth-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-auth-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 2rem;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .landing-nav,
    .app-nav {
        padding: 0.75rem 1.5rem;
    }
    
    .search-container {
        max-width: 400px;
    }
}

@media (max-width: 968px) {
    .app-nav {
        grid-template-columns: auto auto;
        gap: 1rem;
    }
    
    .nav-center {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-actions,
    .quick-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu,
    .app-mobile-menu {
        display: block;
    }
    
    .landing-nav,
    .app-nav {
        padding: 0.75rem 1rem;
    }
    
    .user-dropdown-menu,
    .notifications-menu {
        right: -1rem;
        min-width: calc(100vw - 2rem);
    }
}

@media (max-width: 640px) {
    .brand-name {
        font-size: 1.35rem;
    }
    
    .breadcrumbs {
        display: none;
    }
    
    .mobile-nav-link {
        font-size: 1.125rem;
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .landing-nav,
    .app-nav {
        padding: 0.5rem 1rem;
        min-height: 60px;
    }
    
    .brand-name {
        font-size: 1.25rem;
    }
    
    .command-palette {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .command-search {
        padding: 1rem;
    }
    
    .mobile-user-section,
    .mobile-user-header {
        padding: 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* ===== SCROLL BEHAVIOR ===== */
.landing-header.scrolled,
.app-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* ===== FOCUS STATES ===== */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.dropdown-item:focus-visible,
.command-item:focus-visible {
    outline: none;
    background: rgba(99, 102, 241, 0.1);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}