/* UFEV - Custom Styles */

/* ============================================
   FIX BOOTSTRAP MODALS Z-INDEX
   Garante que modais Bootstrap aparecem acima de 
   todos os outros elementos (overlays, sticky headers, etc)
   ============================================ */
.modal-backdrop {
  z-index: 10050 !important;
}
.modal {
  z-index: 10055 !important;
}
.modal-dialog {
  z-index: 10060 !important;
}

/* Garantir que modais movidos para o body funcionam */
body > .modal {
  z-index: 10055 !important;
}
body > .modal-backdrop {
  z-index: 10050 !important;
}

/* Fix para stacking context - modais dentro de containers posicionados */
.modal.show {
  z-index: 10055 !important;
}
.modal-backdrop.show {
  z-index: 10050 !important;
}

/* Placeholder Styles - mais subtil para distinguir de texto preenchido */
::placeholder {
    color: #adb5bd !important;
    opacity: 0.7 !important;
    font-style: italic;
}

::-webkit-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.7 !important;
    font-style: italic;
}

::-moz-placeholder {
    color: #adb5bd !important;
    opacity: 0.7 !important;
    font-style: italic;
}

:-ms-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.7 !important;
    font-style: italic;
}

:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --bs-primary: var(--bs-primary, #00ACFE);
    --bs-secondary: var(--bs-secondary, #9DA4B1);
    --color-accent: var(--color-accent, #FF8404);
    --color-header: var(--color-header, #013E59);
    --color-sidebar: var(--color-sidebar, #1a4d66);
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --gray-color: #9DA4B1;
    --app-text-primary: #1a1a1a;
    --app-text-secondary: #475569;
    --app-bg-primary: #ffffff;
    --app-bg-secondary: #e9eef5;
    --bs-primary-text-emphasis: var(--color-accent);
    --bs-body-bg: var(--app-bg-secondary);
    --bs-body-color: #0f172a;
}

/* Layout */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--app-bg-secondary);
    color: var(--bs-body-color);
}

/* Header */
.app-header {
    height: var(--header-height);
    background: var(--color-header);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.app-header .brand {
    color: var(--header-text-primary, var(--app-text-primary));
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-header .brand-logo {
    width: 32px;
    height: 32px;
    filter: none;
}

.app-header .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.app-header .user-info {
    color: var(--header-text-secondary, var(--app-text-secondary));
    font-size: 0.9rem;
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--color-sidebar);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 1rem 0;
}

.app-sidebar .nav-link {
    color: var(--sidebar-text-primary, var(--app-text-secondary));
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.app-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text-secondary, var(--app-text-primary));
}

.app-sidebar .nav-link.active {
    background-color: var(--bs-primary);
    color: var(--bs-primary-text-emphasis) !important;
    border-left-color: var(--bs-primary);
    font-weight: 500;
}

.app-sidebar .nav-link.active i {
    color: var(--bs-primary-text-emphasis) !important;
}

.app-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    color: inherit;
}

.sidebar-section {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--sidebar-text-secondary, var(--app-text-secondary));
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

/* Classe para sidebar escura */
.app-sidebar.dark-theme .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.app-sidebar.dark-theme .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-primary-text-emphasis);
}

.app-sidebar.dark-theme .sidebar-section {
    color: rgba(255, 255, 255, 0.6);
}

/* Main Content */
.app-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
    border-radius: 8px;
}

.card-header {
    background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 10%, transparent) 0%, color-mix(in srgb, var(--bs-secondary) 10%, transparent) 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--bs-primary);
}

.card-body {
    background-color: var(--app-bg-primary);
}

.table {
    background-color: var(--app-bg-primary);
}

.table > :not(caption) > * > * {
    border-color: var(--border-color);
}

.table thead th {
    color: var(--bs-body-color);
}

.form-control,
.form-select {
    background-color: var(--app-bg-primary);
    border: 1px solid var(--border-color);
}

.form-control:focus,
.form-select:focus {
    border-color: color-mix(in srgb, var(--bs-primary) 50%, var(--border-color));
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--bs-primary) 18%, transparent);
}

.modal-content {
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.22);
}

/* Placeholder content */
.placeholder-content {
    background-color: var(--bs-body-bg);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Landing Page */
.landing-logo {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

/* Beach Hero Section with Rotating Images */
.landing-hero-beach {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-header) 0%, var(--bs-primary) 50%, var(--color-accent) 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.landing-hero-beach::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.4;
    z-index: 0;
    animation: imageRotation 30s infinite;
}

@keyframes imageRotation {
    0%, 20% {
        background-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    }
    25%, 45% {
        background-image: url('https://images.unsplash.com/photo-1488646953014-85cb44e25828?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    }
    50%, 70% {
        background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    }
    75%, 95% {
        background-image: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    }
    100% {
        background-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    }
}

/* Image indicators */
.image-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 12px;
    opacity: 0.8;
}

.indicator {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #FF8404, #00ACFE);
    animation: indicatorProgress 30s infinite;
}

@keyframes indicatorProgress {
    0%, 20% { left: 0%; }
    25%, 45% { left: 0%; }
    50%, 70% { left: 0%; }
    75%, 95% { left: 0%; }
    100% { left: 100%; }
}

.indicator:nth-child(2)::before {
    animation-delay: 7.5s;
}

.indicator:nth-child(3)::before {
    animation-delay: 15s;
}

.indicator:nth-child(4)::before {
    animation-delay: 22.5s;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Travel type labels */
.travel-labels {
    position: absolute;
    top: 100px;
    right: 50px;
    z-index: 3;
    opacity: 0;
    animation: fadeInOut 30s infinite;
}

.travel-label {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    color: var(--bs-primary-text-emphasis);
    font-weight: 600;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

@keyframes fadeInOut {
    0%, 15% { opacity: 0; transform: translateY(20px); }
    20%, 40% { opacity: 1; transform: translateY(0); }
    45%, 65% { opacity: 0; transform: translateY(-20px); }
    70%, 90% { opacity: 1; transform: translateY(0); }
    95%, 100% { opacity: 0; transform: translateY(20px); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(1, 62, 89, 0.8) 0%, rgba(0, 172, 254, 0.6) 50%, rgba(255, 132, 4, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    margin-bottom: 1.5rem;
    color: var(--bs-primary-text-emphasis);
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
    color: var(--bs-primary-text-emphasis);
    opacity: 1;
    margin-bottom: 2rem;
}

.hero-content .lead strong {
    color: var(--bs-primary-text-emphasis);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-badge {
    animation: fadeInDown 1s ease-out;
}

.hero-badge .badge {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--color-accent) 100%);
    color: var(--bs-primary-text-emphasis);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--bs-primary) 40%, transparent);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hero-buttons {
    margin-top: 2.5rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--color-accent) 100%);
    border: none;
    color: var(--bs-primary-text-emphasis);
    border-radius: 50px;
    padding: 18px 40px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--bs-primary) 50%, transparent);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 50px rgba(255, 132, 4, 0.6);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--bs-primary-text-emphasis);
    border-radius: 50px;
    padding: 18px 40px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.stat-item {
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.15);
}

.stat-item h3 {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--bs-primary-text-emphasis);
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bs-primary-text-emphasis);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary-text-emphasis);
    font-size: 1.5rem;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Footer */
.landing-footer {
    background: var(--bs-primary);
    color: var(--bs-primary-text-emphasis);
    padding: 2rem 0;
}

.landing-footer p {
    margin: 0;
    opacity: 0.8;
}

/* Original Landing Hero (kept for compatibility) */
.landing-hero {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    color: var(--bs-primary-text-emphasis);
    padding: 6rem 0;
    text-align: center;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.landing-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.landing-features {
    padding: 5rem 0;
    background-color: var(--bs-body-bg);
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 172, 254, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-card .icon i {
    font-size: 2rem;
    color: var(--bs-primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--bs-primary);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-primary-text-emphasis);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--bs-primary-hover-bg);
    border-color: var(--bs-primary-hover-border);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--bs-primary) 30%, transparent);
    color: var(--text-adaptive);
}

.text-adaptive {
    color: var(--text-adaptive, #000000);
}

.text-adaptive-light {
    color: var(--text-adaptive-light, #ffffff);
}

/* Logout button fix for light backgrounds */
.btn-outline-light {
    color: var(--text-adaptive) !important;
    border-color: var(--text-adaptive) !important;
}

.btn-outline-light:hover {
    background-color: var(--text-adaptive) !important;
    color: var(--bs-primary-text-emphasis) !important;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--bs-body-bg);
    border-radius: 12px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-logo {
    width: 80px;
    height: 80px;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--bs-primary);
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Footer */
.landing-footer {
    background-color: var(--bs-primary);
    color: var(--bs-primary-text-emphasis);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    font-weight: 500;
    color: var(--bs-primary-text-emphasis);
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #dee2e6;
}

/* Para quando estiver em sidebar escura */
.app-sidebar.dark-theme .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item a {
    color: var(--bs-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--bs-primary);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .app-sidebar.show {
        transform: translateX(0);
    }
    
    .app-content {
        margin-left: 0;
    }
    
    .landing-hero h1 {
        font-size: 2rem;
    }
    
    /* Filtros responsivos */
    .card-body .row.g-3 > [class*="col-"] {
        margin-bottom: 0.75rem;
    }
    
    .card-body .row.g-3 > .col-auto {
        flex: 0 0 auto;
        width: auto;
    }
    
    .card-body .row.g-3 > .col-md-2,
    .card-body .row.g-3 > .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .card-body .row.g-3 > .col-auto .d-flex {
        width: 100%;
        justify-content: stretch;
    }
    
    .card-body .row.g-3 > .col-auto .d-flex .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    /* Ajustes específicos para mobile */
    .card-body .row.g-3 {
        gap: 0.5rem;
    }
    
    .card-body .row.g-3 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
}

/* Nav Tabs - Usando cores da plataforma */
.nav-tabs .nav-link {
    color: var(--bs-secondary);
    border: 1px solid transparent;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--bs-primary);
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: rgba(13, 110, 253, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--bs-primary);
    background-color: var(--bs-body-bg);
    border-color: #dee2e6 #dee2e6 var(--bs-body-bg);
    font-weight: 500;
}

.nav-tabs .nav-link.active i {
    color: var(--bs-primary);
}
