/* ==========================================================================
   SISTEMA DE SKELETON LOADING PREMIUM (skeleton.css)
   ========================================================================== */

/* Keyframe de Shimmer Suave */
@keyframes yetu-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Fade Out Elegante para o Overlay do Loader */
.yetu-skeleton-fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ==========================================================================
   OVERLAY PRINCIPAL DO LOADER (FULLSCREEN)
   ========================================================================== */
.yetu-skeleton-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    background: #080a0f;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    opacity: 1;
    visibility: visible;
}

/* Scrollbar do overlay do loader para se fundir de forma invisível */
.yetu-skeleton-overlay::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Ajustes de cor de fundo baseados no tema nativo da página */
body.partner-dashboard-body .yetu-skeleton-overlay {
    background: #070311 !important;
}

body.user-dashboard-body .yetu-skeleton-overlay {
    background: #0B1120 !important;
}

/* body.fullscreen-auth overlay uses the same premium blurred background as homepage */

/* ==========================================================================
   VARIAÇÕES DE SHIMMER COLORIDO (ORANGE & PURPLE)
   ========================================================================== */
.yetu-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.02) 25%,
        rgba(255, 122, 0, 0.05) 37%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 122, 0, 0.05) 63%,
        rgba(255, 255, 255, 0.02) 75%
    );
    background-size: 200% 100%;
    animation: yetu-shimmer 1.8s infinite linear;
}

body.partner-dashboard-body .yetu-shimmer,
.yetu-shimmer-purple {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.015) 25%,
        rgba(178, 44, 255, 0.04) 37%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(178, 44, 255, 0.04) 63%,
        rgba(255, 255, 255, 0.015) 75%
    ) !important;
    background-size: 200% 100% !important;
    animation: yetu-shimmer 1.8s infinite linear !important;
}

/* ==========================================================================
   ELEMENTOS ATÓMICOS DE SKELETON (DESIGN LANGUAGE MATCHED)
   ========================================================================== */
.sk-element {
    border-radius: 8px;
    display: block;
}

/* Linha de Texto Básica */
.sk-text {
    height: 14px;
    margin-bottom: 12px;
    width: 100%;
    border-radius: 6px;
}
.sk-text-short { width: 45%; }
.sk-text-medium { width: 70%; }
.sk-text-long { width: 90%; }

/* Linha de Título */
.sk-title {
    height: 28px;
    margin-bottom: 16px;
    border-radius: 8px;
    width: 60%;
}
.sk-title-large { height: 42px; width: 75%; }
.sk-title-center { margin-left: auto; margin-right: auto; }

/* Formato Circular (Avatar, Ícone) */
.sk-circle {
    width: 46px;
    height: 46px;
    border-radius: 50% !important;
    flex-shrink: 0;
}
.sk-circle-large {
    width: 70px;
    height: 70px;
}
.sk-circle-xlarge {
    width: 150px;
    height: 150px;
}

/* Formato Retangular (Card, Imagem) */
.sk-rect {
    height: 120px;
    width: 100%;
    border-radius: 16px;
}

/* Botões Shimmer */
.sk-btn {
    height: 46px;
    border-radius: 12px;
    width: 130px;
}
.sk-btn-full { width: 100%; }
.sk-btn-circle { width: 44px; height: 44px; border-radius: 50%; }

/* Borda Translúcida de Vidro */
.sk-glass-border {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   ESTRUTURA INTEGRAL DA HOMEPAGE
   ========================================================================== */
.sk-homepage-nav {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.sk-homepage-nav-links {
    display: flex;
    gap: 2.5rem;
}
.sk-homepage-nav-link {
    width: 80px;
    height: 12px;
    border-radius: 4px;
}

.sk-homepage-hero {
    min-height: 90vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

/* Barra de Pesquisa Flutuante Exclusiva da Yetu */
.sk-search-container {
    width: 100%;
    max-width: 1100px;
    margin-top: 5rem;
    padding: 1.5rem 2rem;
    border-radius: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    box-sizing: border-box;
}
.sk-search-field {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sk-search-input {
    height: 48px;
    border-radius: 12px;
    width: 100%;
}

.sk-solutions-section {
    padding: 6rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.sk-solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.2rem;
    width: 100%;
    margin-top: 3.5rem;
}
.sk-solution-item {
    border-radius: 30px;
    padding: 3rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   ESTRUTURA INTEGRAL DO USER DASHBOARD
   ========================================================================== */
.sk-user-dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}
.sk-user-sidebar {
    width: 280px;
    background: #0F172A; /* --bg-sidebar */
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    height: 100vh;
    position: sticky;
    top: 0;
    box-sizing: border-box;
}
.sk-user-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.5rem;
}
.sk-user-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.sk-user-sidebar-item {
    height: 42px;
    border-radius: 12px;
    width: 100%;
}

.sk-user-main {
    flex: 1;
    padding: 3rem 4rem;
    box-sizing: border-box;
}
.sk-stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.sk-stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    height: 106px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}
.sk-dashboard-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.sk-panel-card {
    border-radius: 16px;
    padding: 2rem;
    min-height: 350px;
    box-sizing: border-box;
}
.sk-table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   ESTRUTURA INTEGRAL DO PARTNER DASHBOARD
   ========================================================================== */
.sk-partner-nav {
    background: rgba(7, 3, 17, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
}
.sk-partner-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 4rem;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   ESTRUTURA INTEGRAL DO LOGIN / AUTH PORTAL
   ========================================================================== */
/* ==========================================================================
   ESTRUTURA INTEGRAL DO LOGIN / AUTH PORTAL
   ========================================================================== */
.sk-auth-wrapper {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    height: 100vh;
    width: 100%;
}
.sk-auth-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 3rem 4rem 6rem;
    box-sizing: border-box;
    position: relative;
}
.sk-auth-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 122, 0, 0.30),
        transparent
    );
}
.sk-auth-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 3rem 3.625rem 3rem 2rem;
    box-sizing: border-box;
}
.sk-auth-box {
    width: 100%;
    max-width: 400px;
    background: transparent;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================================================
   DYNAMIS CARD SKELETON (Usado em pesquisas e tabelas dinâmicas)
   ========================================================================== */
.sk-route-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 180px;
    align-items: center;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    box-sizing: border-box;
    gap: 1.5rem;
}
.sk-route-card-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   RESPONSIVIDADE E ADAPTAÇÃO MOBILE / TABLET
   ========================================================================== */
@media (max-width: 992px) {
    .sk-homepage-nav {
        padding: 0 1.5rem;
    }
    .sk-homepage-nav-links {
        display: none; /* Esconde links no mobile tal como na nav real */
    }
    .sk-search-container {
        flex-direction: column;
        padding: 1.2rem;
        margin-top: 3rem;
        border-radius: 20px;
    }
    .sk-search-field {
        width: 100%;
    }
    .sk-solutions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
        padding: 0 1rem;
    }
    .sk-solutions-section {
        padding: 3rem 1rem;
    }
    .sk-dashboard-columns {
        grid-template-columns: 1fr;
    }
    .sk-partner-nav {
        padding: 0 1.5rem;
    }
    .sk-partner-main {
        padding: 1.5rem 1rem;
    }
    .sk-route-card-grid {
        grid-template-columns: 1fr;
        padding: 1.2rem;
        gap: 1.2rem;
    }
    .sk-route-card-col:last-child {
        align-items: flex-start;
        text-align: left;
    }
}

/* Breakpoint de Autenticação Alinhado com auth.css */
@media (max-width: 768px) {
    .sk-auth-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }
    .sk-auth-left {
        display: none !important;
    }
    .sk-auth-right {
        width: 100%;
        padding: 2rem 1.5rem;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .sk-solutions-grid {
        grid-template-columns: 1fr;
    }
    .sk-title-large {
        height: 32px;
    }
}

/* Transição de Fade-In Premium para Elementos Reais */
@keyframes yetu-fade-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sk-fade-in {
    animation: yetu-fade-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================================================
   ELEMENTOS DE LOADER RESPONSIVOS (SEARCH & TABLES MOCKS)
   ========================================================================== */
.sk-search-grid-mock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}
.sk-search-grid-mock .sk-search-field {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sk-search-grid-mock .btn-swap-dash-mock {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-top: 1.5rem;
    flex-shrink: 0;
}
.sk-search-grid-mock .btn-search-dash-mock {
    width: 160px;
    height: 48px;
    border-radius: 12px;
    margin-top: 1.5rem;
    flex-shrink: 0;
}

/* Skeleton Table */
.sk-table-header-mock {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 10px;
    margin-bottom: 15px;
    align-items: center;
}
.sk-table-row-mock {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sk-table-cell-mock {
    display: flex;
    align-items: center;
}
.sk-table-cell-mock.col-id { width: 60px; margin-right: 20px; }
.sk-table-cell-mock.col-route { flex: 1; min-width: 150px; margin-right: 20px; }
.sk-table-cell-mock.col-date { width: 80px; margin-right: 40px; }
.sk-table-cell-mock.col-price { width: 80px; margin-right: 40px; }
.sk-table-cell-mock.col-status { width: 80px; margin-right: 40px; }
.sk-table-cell-mock.col-payment { width: 60px; margin-right: 40px; }
.sk-table-cell-mock.col-actions { width: 170px; }

.sk-cell-label-shimmer {
    display: none;
    height: 10px;
    width: 80px;
    border-radius: 4px;
    background: rgba(255,255,255,0.02) !important;
}

@media (max-width: 768px) {
    .sk-search-grid-mock {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    .sk-search-grid-mock .sk-search-field {
        width: 100% !important;
    }
    .sk-search-grid-mock .btn-swap-dash-mock {
        margin-top: 0 !important;
        align-self: center !important;
        transform: rotate(90deg) !important;
    }
    .sk-search-grid-mock .btn-search-dash-mock {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }

    .sk-table-header-mock {
        display: none !important;
    }
    .sk-table-row-mock {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.875rem !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 16px !important;
        margin-bottom: 1rem !important;
    }
    .sk-table-cell-mock {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-right: 0 !important;
        padding: 0.25rem 0 !important;
    }
    .sk-table-cell-mock.col-actions {
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        padding-top: 0.75rem !important;
        margin-top: 0.35rem !important;
    }
    .sk-cell-label-shimmer {
        display: block !important;
    }
    .sk-table-cell-mock .sk-element {
        margin: 0 !important;
    }
    .sk-table-cell-mock.col-actions .action-buttons-shimmer {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
        justify-content: stretch !important;
    }
    .sk-table-cell-mock.col-actions .action-buttons-shimmer .sk-element {
        flex: 1 !important;
        height: 36px !important;
        margin: 0 !important;
    }
    .hide-mobile, .mobile-hide {
        display: none !important;
    }
}

/* Breakpoints específicos do User Dashboard para coincidir com user-dashboard.css */
@media (max-width: 1024px) {
    .sk-dashboard-columns {
        grid-template-columns: 1fr !important;
    }
    .sk-stat-cards-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .sk-user-sidebar {
        display: none !important;
    }
    .sk-user-main {
        padding: 1.25rem 1rem !important;
        padding-top: calc(74px + 1.25rem) !important;
        padding-bottom: calc(108px + 1.25rem) !important;
    }
    .sk-stat-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 0.875rem !important;
        margin-bottom: 1.5rem !important;
    }
    .sk-mobile-nav {
        display: flex !important;
    }
    .sk-mobile-bottom-nav {
        display: flex !important;
    }
}

/* Custom mobile navs styles */
.sk-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 74px;
    background: rgba(15, 23, 42, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0 0 16px 16px;
    padding: 0.9rem 0.75rem;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    z-index: 1001000;
}

.sk-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(15, 23, 42, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px 16px 0 0;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom)) 0.75rem;
    align-items: center;
    justify-content: space-around;
    box-sizing: border-box;
    z-index: 1001000;
}

.sk-mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 3px;
}

/* Estilos de Tabela para Skeletons baseados no layout real */
.yetu-skeleton-overlay .user-table-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.yetu-skeleton-overlay .user-table {
    width: 100%;
    border-collapse: collapse;
}

.yetu-skeleton-overlay .user-table th {
    padding: 0.875rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.yetu-skeleton-overlay .user-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

@media (max-width: 768px) {
    .yetu-skeleton-overlay .user-table thead {
        display: none !important;
    }
    .yetu-skeleton-overlay .user-table,
    .yetu-skeleton-overlay .user-table tbody,
    .yetu-skeleton-overlay .user-table tr,
    .yetu-skeleton-overlay .user-table td {
        display: block !important;
        width: 100% !important;
    }
    .yetu-skeleton-overlay .user-table tr {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.875rem 0 !important;
    }
    .yetu-skeleton-overlay .user-table td {
        padding: 0.25rem 0 !important;
        border-bottom: none !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
    .yetu-skeleton-overlay .user-table td::before {
        content: attr(data-label) !important;
        font-size: 0.68rem !important;
        font-weight: 600;
        color: var(--text-muted) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        flex-shrink: 0 !important;
        min-width: 90px !important;
        text-align: left !important;
    }
}
