/* css/partials/layout.css
   Estrutura principal, sidebar, navbar e área de conteúdo
*/

.main-container {
    display: flex;
}
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left var(--transition-speed) ease;
    margin-left: var(--sidebar-width);
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, #3d2817 0%, #2c1810 50%, #1a0f0a 100%);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-speed) ease;
    overflow: hidden;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    border-right: 3px solid #8b6914;
    box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.1);
}
.logo-container {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: var(--navbar-height);
    flex-shrink: 0;
    gap: 12px;
}
.sidebar-logo { width: 40px; height: 40px; transition: opacity var(--transition-speed) ease; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.logo-text { margin-left: 10px; font-size: 1.2rem; font-weight: 700; color: #ffd700; white-space: nowrap; opacity: 1; transition: opacity var(--transition-speed) ease; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); letter-spacing: 1px; }
.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.sidebar-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
}
.sidebar-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}
.sidebar-nav {
    list-style-type: none;
    margin: 0;
    padding: 12px 0 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-nav a {
    display: flex;
    align-items: flex-start;
    color: #f5f0e8;
    padding: 10px 20px;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    white-space: normal;
    position: relative;
    font-weight: 600;
    line-height: 1.25;
    gap: 10px;
}
.sidebar-nav a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #d4af37 0%, #ffd700 50%, #d4af37 100%); border-radius: 2px; opacity: 0; transition: opacity 0.2s ease; }
.sidebar-nav a:hover { background: rgba(212, 175, 55, 0.15); border-left-color: #ffd700; color: #ffd700; font-weight: 700; box-shadow: inset 0 0 8px rgba(255, 215, 0, 0.2); text-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }
.sidebar-nav li.active a { background-color: rgba(0, 0, 0, 0.15); border-left-color: var(--cor-primaria); color: #fff; font-weight: 500; }
.sidebar-nav .icon { width: 24px; height: 24px; flex-shrink: 0; fill: currentColor; }
.sidebar-nav .nav-icon { width: 28px; height: 28px; flex-shrink: 0; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; margin-right: 0; margin-top: 1px; }
.sidebar-nav .nav-text { margin-left: 0; opacity: 1; transition: opacity var(--transition-speed) ease; flex: 1; min-width: 0; }
.nav-item-logout { margin-top: auto; }
.nav-item-logout a,
.nav-item-perfil a,
.nav-item-admin a { padding: 10px 20px; display: flex; align-items: flex-start; }

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.65);
    border-radius: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.85);
}

@media (max-height: 780px) {
    .sidebar-nav {
        padding: 8px 0 12px;
    }

    .sidebar-nav a,
    .nav-item-logout a,
    .nav-item-perfil a,
    .nav-item-admin a {
        padding: 8px 16px;
        font-size: 0.92rem;
    }

    .sidebar-nav .nav-icon {
        width: 24px;
        height: 24px;
        font-size: 1.2rem;
    }
}

/* BADGES DE NOTIFICAÇÃO NO MENU */
.nav-badge {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffd700;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    animation: pulse-badge 2s ease-in-out infinite;
    border: 1px solid #d4af37;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* CATEGORY LABELS No MENU */
.nav-category {
    list-style: none;
    transition: all 0.3s ease;
}

/* Desabilitar todas as transições durante inicialização */
.nav-category.nav-initializing,
.nav-category.nav-initializing .nav-category-label::after,
.nav-category.nav-initializing .nav-submenu {
    transition: none !important;
}

.nav-category-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 4px 0;
    font-size: 0.75rem;
    font-weight: 900;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-left: 4px solid transparent;
}

.nav-category-label:hover {
    background: rgba(212, 175, 55, 0.1);
    border-left-color: #ffd700;
    color: #ffd700;
}

.nav-category-label::after {
    content: '\f078';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: auto;
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.nav-category.collapsed .nav-category-label::after {
    transform: rotate(-90deg);
}

.nav-category.collapsed .nav-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.nav-category .nav-submenu {
    max-height: 1000px;
    overflow: visible;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    list-style: none;
    padding: 6px 0;
    margin: 0;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
    50% { transform: scale(1.15); box-shadow: 0 0 16px rgba(255, 215, 0, 0.6); }
}

.top-navbar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%);
    padding: 0 20px;
    border-bottom: 3px solid #8b6914;
    flex-shrink: 0;
    box-shadow: var(--sombra-medieval);
    transition: all 0.3s ease;
    height: var(--navbar-height);
}

/* BOTÃO TOGGLE DO SIDEBAR - ESTILO MEDIEVAL */
.sidebar-toggle-btn {
    background: linear-gradient(135deg, rgba(139, 105, 20, 0.15) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 2px solid #d4af37;
    cursor: pointer;
    padding: 8px 10px;
    margin-right: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.sidebar-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(139, 105, 20, 0.25) 0%, rgba(212, 175, 55, 0.15) 100%);
    border-color: #ffd700;
    transform: scale(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.3), 0 0 12px rgba(255, 215, 0, 0.2);
}

.sidebar-toggle-btn:active {
    transform: scale(0.98);
}

.sidebar-toggle-btn svg,
.sidebar-toggle-btn i {
    width: 20px;
    height: 20px;
    color: #8b6914;
    display: block;
    transition: color 0.2s ease;
    margin-top: 6px;
}

.sidebar-toggle-btn:hover svg,
.sidebar-toggle-btn:hover i {
    color: #ffd700;
}

.page-title { font-size: 1.5rem; font-weight: 700; color: #1a0f0a; }

.content { 
    padding: 40px 45px; 
    overflow-y: auto; 
    flex-grow: 1; 
}
h1 { display: none; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.page-header .actions { display: flex; gap: 10px; margin-left: auto; }
.page-header h1, .page-header h3 { display: block; margin: 0; border: none; padding: 0; font-size: 1.8rem; font-weight: 700; color: #1a0f0a; }
.page-header h3 { font-size: 1.25rem; }
.page-subtitle { margin: 0; color: #2c1810; font-weight: 600; font-size: 1rem; }

/* LAYOUT DE AÇÕES E FILTROS NA MESMA LINHA */
.page-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-actions-row .filter-controls {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 300px;
}

.page-actions-row .action-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.page-actions-row .action-buttons .button {
    white-space: nowrap;
}

.page-actions-row .action-buttons .button i {
    margin-right: 6px;
}

/* ABAS - Outras páginas */
.tabs-navigation {
    display: flex;
    border-bottom: 4px solid #d4af37;
    margin-bottom: 6px;
    gap: 6px;
    background: linear-gradient(90deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 100%);
    padding: 4px 0;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.tabs-wrapper {
    overflow: visible;
}

.tabs-content {
    overflow: visible;
}

.tabs-navigation .tabs-links {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tabs-navigation .tabs-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.tabs-navigation .tab-link {
    padding: 8px 14px;
    cursor: pointer;
    border: 3px solid;
    border-radius: 8px;
    background: rgba(139, 105, 20, 0.1);
    font-size: 0.95rem;
    font-weight: 600;
    color: #d4af37;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: #8b6914;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.3px;
}

.tabs-navigation .tab-link i {
    font-size: 1rem;
    color: #8b6914;
    transition: all 0.3s ease;
}

.tabs-navigation .tab-link.active {
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, #8b6914 0%, #6b5010 100%);
    border-color: #d4af37;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 10px;
    box-shadow: 0 10px 30px rgba(139, 105, 20, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px) scale(1.02);
    letter-spacing: 0.5px;
}

.tabs-navigation .tab-link.active i {
    color: #ffd700;
    transform: scale(1.1) rotate(-5deg);
}

.tabs-navigation .tab-link:hover {
    color: #ffffff;
    background: rgba(139, 105, 20, 0.25);
    border-color: #d4af37;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(139, 105, 20, 0.3);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .tabs-navigation {
        justify-content: flex-start;
    }
    .tabs-navigation .tabs-action-btn {
        margin-left: 0;
    }
    .tabs-navigation .tabs-actions {
        width: 100%;
        justify-content: flex-start;
    }

    #tab-pendente.team-log-pendente {
        min-height: 0;
    }
}

.tabs-navigation .tab-link:hover i {
    color: #d4af37;
    transform: scale(1.15) rotate(5deg);
}

.tab-pane, .tab-content { display: none; }
.tab-pane.active, .tab-content.active { display: block; }

#tab-pendente.team-log-pendente {
    min-height: 520px;
}

.teams-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.teams-grid-full { width: 100%; }
.teams-column h2, .pending-column h2, .teams-grid-full h2 {
    font-size: 1.25rem; font-weight: 500; color: var(--cor-secundaria);
    margin-top: 0; margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 1px solid var(--cor-borda);
}
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.team-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(240,240,250,0.95) 100%);
    border-radius: 12px;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15), 
                0 0 20px rgba(212,175,55,0.2),
                inset 0 1px 0 rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212,175,55,0.6) 20%, 
        rgba(255,215,0,0.8) 50%, 
        rgba(212,175,55,0.6) 80%, 
        transparent 100%);
    opacity: 0.7;
}

.team-card:hover { 
    transform: translateY(-6px) scale(1.02); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.25), 
                0 0 30px rgba(212,175,55,0.4),
                inset 0 1px 0 rgba(255,255,255,0.9);
    border-color: #ffd700;
}

.team-card-header {
    padding: 16px 20px;
    border-bottom: 2px solid rgba(212,175,55,0.3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.6) 0%, 
        rgba(212,175,55,0.1) 100%);
    position: relative;
}

.team-card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212,175,55,0.8) 50%, 
        transparent 100%);
}

.team-card-header h3 { 
    margin: 0; 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: #2c1810;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
}

.team-card-header .team-card-actions { 
    display: flex; 
    gap: 8px; 
}

.team-card-body { 
    padding: 20px; 
    flex-grow: 1; 
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.3) 0%, 
        transparent 100%);
}

.team-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, 
        rgba(212,175,55,0.2) 0%, 
        rgba(255,215,0,0.15) 100%);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5d4a1f;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.team-info-badge i {
    color: #d4af37;
    font-size: 1.1rem;
}

.team-card-body h4 { 
    font-size: 1rem; 
    margin: 20px 0 12px; 
    color: #2c1810;
.tabs-navigation .tabs-action-btn {
     align-self: center;
    margin-right: 0;
}
    text-transform: uppercase; 
    letter-spacing: 1px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212,175,55,0.3);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.team-card-body h4 i {
    color: #d4af37;
    font-size: 1.1rem;
}

.team-composition-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
    flex-direction: column;
    gap: 10px;
}

.team-composition-list li { 
    display: flex; 
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.7) 0%, 
        rgba(245,245,250,0.8) 100%);
    border-radius: 8px;
    border: 1px solid rgba(212,175,55,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08),
                inset 0 1px 0 rgba(255,255,255,0.6);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.team-composition-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        rgba(212,175,55,0.6) 0%, 
        rgba(255,215,0,0.8) 50%, 
        rgba(212,175,55,0.6) 100%);
}

.team-composition-list li:hover {
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.9) 0%, 
        rgba(255,250,230,0.9) 100%);
    border-color: rgba(212,175,55,0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12),
                inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateX(4px);
}

.team-composition-list .member-name { 
    flex: 0 0 auto;
    max-width: 35%;
    word-break: break-word; 
    font-weight: 700;
    color: #2c1810;
    font-size: 0.95rem;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

.team-composition-list .fa-long-arrow-alt-right {
    color: #d4af37;
    opacity: 0.7;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.team-composition-list .char-played-details { 
    display: flex; 
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    gap: 3px;
}

.team-composition-list .char-played-details .char-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.team-composition-list .char-played-details .char-info {
    color: #888;
    font-size: 0.8rem;
    font-style: normal;
}

.team-composition-list .char-played-details .char-info-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2px;
}

/* Cores temáticas por tipo de card */
.team-card.team-color-1 { 
    border-color: #c0392b;
    background: linear-gradient(135deg, rgba(255,245,245,0.9) 0%, rgba(255,235,238,0.95) 100%);
}
.team-card.team-color-1::before {
    background: linear-gradient(90deg, transparent 0%, rgba(192,57,43,0.6) 20%, rgba(231,76,60,0.8) 50%, rgba(192,57,43,0.6) 80%, transparent 100%);
}

.team-card.team-color-2 { 
    border-color: #27ae60;
    background: linear-gradient(135deg, rgba(245,255,245,0.9) 0%, rgba(235,255,238,0.95) 100%);
}
.team-card.team-color-2::before {
    background: linear-gradient(90deg, transparent 0%, rgba(39,174,96,0.6) 20%, rgba(46,204,113,0.8) 50%, rgba(39,174,96,0.6) 80%, transparent 100%);
}

.team-card.team-color-3 { 
    border-color: #2980b9;
    background: linear-gradient(135deg, rgba(245,250,255,0.9) 0%, rgba(235,245,255,0.95) 100%);
}
.team-card.team-color-3::before {
    background: linear-gradient(90deg, transparent 0%, rgba(41,128,185,0.6) 20%, rgba(52,152,219,0.8) 50%, rgba(41,128,185,0.6) 80%, transparent 100%);
}

.team-card.team-color-4 { 
    border-color: #8e44ad;
    background: linear-gradient(135deg, rgba(250,245,255,0.9) 0%, rgba(245,235,255,0.95) 100%);
}
.team-card.team-color-4::before {
    background: linear-gradient(90deg, transparent 0%, rgba(142,68,173,0.6) 20%, rgba(155,89,182,0.8) 50%, rgba(142,68,173,0.6) 80%, transparent 100%);
}

.team-card.team-color-5 { 
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(255,250,240,0.9) 0%, rgba(255,245,230,0.95) 100%);
}
.team-card.team-color-5::before {
    background: linear-gradient(90deg, transparent 0%, rgba(243,156,18,0.6) 20%, rgba(241,196,15,0.8) 50%, rgba(243,156,18,0.6) 80%, transparent 100%);
}

/* =====================================================
   MENU LATERAL - ITENS DESABILITADOS (Verificação Pendente)
   ===================================================== */
.sidebar-nav li.nav-disabled a {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.sidebar-nav li.nav-disabled a:hover {
    background-color: transparent;
    color: var(--cor-texto-sidebar);
}

.sidebar-nav li.nav-disabled .nav-lock-icon {
    position: absolute;
    right: 15px;
    font-size: 0.8rem;
    color: #ff9800;
    opacity: 1;
}

/* Clients: payment / maker value styles (refined) */
.payment-info .linked-to,
.payment-info .maker-value {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--cor-texto-leve);
}
.payment-info .linked-to strong {
    color: var(--cor-texto-leve);
    font-weight: 600;
    margin-right: 6px;
}
.payment-info .maker-value {
    padding: 6px 10px;
    border-left: 3px solid var(--cor-primaria);
    border-radius: 6px;
    display: inline-block;
    color: var(--cor-texto);
    background: rgba(0,0,0,0.03);
    margin-top: 8px;
    font-weight: 600;
}

/* Color by scale: k (thousand) = blue, kk (million) = green, kkk (billion) = amber */
.payment-info .maker-value.k { border-left-color: #0ea5ff; background: rgba(14,165,255,0.06); }
.payment-info .maker-value.kk { border-left-color: #10b981; background: rgba(16,185,129,0.06); }
.payment-info .maker-value.kkk { border-left-color: #f59e0b; background: rgba(245,158,11,0.06); }

