/* Estilos personalizados para o JogadorN1 */

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #111827;
    --card-bg: #1f2937;
    --border-color: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Space Grotesk', 'Inter', sans-serif;
}

/* Header visual (template jogadorn1.html) */
.jn1-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(22, 27, 34, 0.7);
    border-bottom: 1px solid #252d38;
}

.jn1-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px 0;
}

.jn1-logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jn1-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    margin-right: 0px;
}


.jn1-logo-icon {
    display: none;
}

.jn1-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #f2f2f2;
    line-height: 1.1;
}

.jn1-logo-text span {
    background: linear-gradient(135deg, #f0b429, #d4950a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jn1-logo-sub {
    font-size: 11px;
    color: #6b7a8d;
}

.jn1-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jn1-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(46, 201, 122, 0.1);
    border: 1px solid rgba(46, 201, 122, 0.2);
    font-size: 13px;
    color: #2ec97a;
    font-weight: 500;
}

.jn1-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ec97a;
    animation: pulse 2s infinite;
}

.jn1-status-badge.fechado {
    background: rgba(224, 64, 64, 0.1);
    border-color: rgba(224, 64, 64, 0.25);
    color: #e04040;
}

.jn1-status-badge.fechado .jn1-status-dot {
    background: #e04040;
}

.jn1-header-info {
    font-size: 14px;
    color: #6b7a8d;
}

.jn1-header-info b {
    color: #f2f2f2;
}

.jn1-app-loading {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.jn1-app-loading.hidden {
    display: none;
}

.jn1-app-loading-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
}

.jn1-app-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #34d399;
    animation: pulse 1.2s infinite;
}

.jn1-acompanhamento-wrap {
    background: rgba(31, 41, 55, 0.92);
}

.jn1-time-summary-card {
    margin-top: 10px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.jn1-time-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jn1-time-summary-list-empty {
    border: 1px dashed rgba(107, 122, 141, 0.35);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #9aa7bb;
}

.jn1-time-summary-list-item {
    width: 100%;
    text-align: left;
    background: rgba(31, 41, 55, 0.82);
    border: 1px solid rgba(107, 122, 141, 0.34);
    border-radius: 10px;
    padding: 10px;
    display: block;
}

.jn1-time-summary-list-item.ativo {
    border-color: rgba(16, 185, 129, 0.75);
    background: rgba(16, 185, 129, 0.12);
}

.jn1-time-summary-list-identidade {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jn1-time-summary-list-escudo,
.jn1-time-summary-list-escudo-fallback {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(107, 122, 141, 0.4);
    background: rgba(17, 24, 39, 0.9);
    flex: 0 0 auto;
}

.jn1-time-summary-list-escudo {
    object-fit: contain;
    padding: 3px;
}

.jn1-time-summary-list-escudo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.jn1-time-summary-list-textos {
    min-width: 0;
    display: block;
    flex: 1 1 auto;
}

.jn1-time-summary-list-nome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jn1-time-summary-list-nome {
    color: #f9fafb;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jn1-time-summary-list-check {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.24);
    border: 1px solid rgba(16, 185, 129, 0.6);
    color: #86efac;
    font-size: 10px;
    flex: 0 0 auto;
}

.jn1-time-summary-list-cartoleiro {
    color: #9aa7bb;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jn1-time-summary-identidade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    cursor: pointer;
}

.jn1-time-summary-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.jn1-time-summary-add {
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: rgba(6, 95, 70, 0.55);
    color: #d1fae5;
    font-size: 11px;
    font-weight: 700;
    padding: 0 10px;
    line-height: 1;
}

.jn1-time-summary-add:hover {
    background: rgba(6, 95, 70, 0.75);
}

.jn1-time-summary-add.destaque {
    border-color: rgba(52, 211, 153, 0.95);
    background: rgba(16, 185, 129, 0.9);
    color: #062a1e;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.jn1-time-summary-drop-toggle {
    width: auto;
    height: auto;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #dbe5f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

.jn1-time-summary-drop-toggle i {
    transition: transform 0.2s ease;
    font-size: 20px;
}

.jn1-time-summary-drop-toggle.aberto i {
    transform: rotate(180deg);
}

.jn1-time-summary-drop-toggle:disabled {
    opacity: 0.5;
}

.jn1-time-summary-dropdown {
    padding: 10px 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
}

.jn1-time-summary-identidade {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jn1-time-summary-escudo,
.jn1-time-summary-escudo-fallback {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(30, 41, 59, 0.92);
    flex: 0 0 auto;
}

.jn1-time-summary-escudo {
    object-fit: contain;
    padding: 5px;
}

.jn1-time-summary-escudo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.jn1-time-summary-nome {
    color: #f8fafc;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jn1-time-summary-cartoleiro {
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jn1-time-summary-trash {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.32);
    color: #fecaca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jn1-time-summary-trash:hover {
    background: rgba(153, 27, 27, 0.45);
    color: #fee2e2;
}

.jn1-time-summary-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 12px 10px;
}

.jn1-time-summary-metric-item {
    min-width: 0;
    text-align: center;
    padding: 8px 6px;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.jn1-time-summary-metric-item:last-child {
    border-right: none;
}

.jn1-time-summary-metric-label {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.15;
    min-height: 22px;
}

.jn1-time-summary-metric-value {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

@media (max-width: 900px) {
    .jn1-header .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .jn1-header-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: auto;
        padding: 10px 0;
    }

    .jn1-logo-area {
        min-width: 0;
        width: 100%;
        justify-content: center;
        overflow: visible;
    }

    .jn1-header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
        overflow: visible;
    }

    .jn1-logo-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .jn1-logo-text {
        font-size: 21px;
        text-align: center;
    }

    .jn1-logo-sub {
        font-size: 10px;
        text-align: center;
    }

    .jn1-status-badge {
        padding: 4px 20px 4px 12px;
        font-size: 10px;
        gap: 4px;
        white-space: nowrap;
        max-width: none;
        min-width: 0;
    }

    .jn1-status-dot {
        width: 6px;
        height: 6px;
    }

    .jn1-header-info {
        font-size: 10px;
        white-space: nowrap;
        min-width: 0;
        text-align: center;
    }

    #mercado-status-text {
        max-width: none;
        display: inline-block;
        vertical-align: middle;
    }
}

@media (max-width: 520px) {
    .jn1-logo-text {
        font-size: 19px;
    }

    .jn1-header-right {
        gap: 6px;
    }

    .jn1-header-info {
        font-size: 11px;
    }

    .jn1-time-summary-identidade-row {
        padding: 12px;
    }

    .jn1-time-summary-add {
        height: 28px;
        padding: 0 8px;
        font-size: 10px;
    }

    .jn1-time-summary-dropdown {
        padding: 10px 12px;
    }

    .jn1-time-summary-escudo,
    .jn1-time-summary-escudo-fallback {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .jn1-time-summary-nome {
        font-size: 17px;
    }

    .jn1-time-summary-cartoleiro {
        font-size: 12px;
    }

    .jn1-time-summary-metrics {
        padding: 10px 8px;
        gap: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jn1-time-summary-metric-item {
        min-width: 0;
        border-right: 1px solid rgba(148, 163, 184, 0.14);
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

    .jn1-time-summary-metric-item:nth-child(2n) {
        border-right: none;
    }

    .jn1-time-summary-metric-item:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .jn1-time-summary-metric-label {
        font-size: 10px;
        min-height: 20px;
    }

    .jn1-time-summary-metric-value {
        font-size: 15px;
    }

    .jn1-header-info {
        font-size: 0;
    }

    .jn1-header-info b {
        font-size: 10px;
    }

    #mercado-status-text {
        max-width: 68px;
    }
}

/* Cards de análise no mobile */
.jogador-mobile-card {
    background: #1a2028;
    border: 1px solid #2a3441;
    border-radius: 10px;
    padding: 10px;
}

.jogador-mobile-card-ref {
    background: #161b22;
    border: 1px solid #2a3441;
    border-radius: 12px;
    color: #f2f2f2;
    padding: 0;
    overflow: hidden;
}

.jogador-mobile-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    align-items: stretch;
}

.jogador-mobile-top-left {
    display: flex;
    gap: 10px;
    padding: 10px;
    align-items: center;
}

.jogador-mobile-escudo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 999px;
    border: 1px solid #2f3a48;
    background: #1e242d;
    padding: 2px;
    flex-shrink: 0;
}

.jogador-mobile-escalacoes {
    color: #2b87d3;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
}

.jogador-mobile-nome {
    margin-top: 2px;
    color: #f2f2f2;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.jogador-mobile-subinfo {
    margin-top: 2px;
    color: #9ca3af;
    font-size: 11px;
    line-height: 1.2;
}

.jogador-mobile-variacao {
    color: #b42318;
    font-weight: 600;
}

.jogador-mobile-price-panel {
    background: linear-gradient(135deg, #2ec97a, #24b06a);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.jogador-mobile-price-value {
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.jogador-mobile-bottom {
    background: #1e242d;
    border-top: 1px solid #2a3441;
    padding: 10px 8px;
}

.jogador-mobile-preco {
    font-size: 14px;
    font-weight: 700;
    color: #2ec97a;
    line-height: 1;
    white-space: nowrap;
    margin-top: 2px;
}

.jogador-mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.jogador-mobile-stat-item {
    min-width: 0;
}

.jogador-mobile-stat-title {
    color: #8d9eb4;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
}

.jogador-mobile-stat-value {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Campo tático do time selecionado */
.time-selecionado-campo-surface {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(46, 201, 122, 0.28);
    background: linear-gradient(180deg, #07a315 0%, #02960f 45%, #008a0e 100%);
    padding: 14px;
    min-height: 260px;
}

.time-selecionado-campo-lines {
    position: absolute;
    inset: 0;
    opacity: 0.35;
}

.time-selecionado-campo-lines .mid {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ffffff;
}

.time-selecionado-campo-lines .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.time-selecionado-campo-lines .box-b {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 55px;
    border: 2px solid #ffffff;
    border-bottom: none;
}

.time-selecionado-campo-lines .box-t {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 55px;
    border: 2px solid #ffffff;
    border-top: none;
}

.time-selecionado-campo-content {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.time-selecionado-campo-line {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.time-selecionado-campo-line-tec-gol {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 0;
}

.time-selecionado-campo-slot-left,
.time-selecionado-campo-slot-center,
.time-selecionado-campo-slot-right {
    display: flex;
    align-items: center;
}

.time-selecionado-campo-slot-left {
    justify-content: flex-start;
    padding-left: 2px;
}

.time-selecionado-campo-slot-center {
    justify-content: center;
}

.time-selecionado-campo-slot-right {
    justify-content: flex-end;
}

.time-selecionado-campo-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #f2f2f2;
}

.time-selecionado-campo-player-name-badge {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    color: #eef4ff;
    background: #0f2f63;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
}

.time-selecionado-campo-avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    background: #ffffff;
    border: 2px solid rgba(15, 47, 99, 0.55);
    overflow: hidden;
    position: relative;
}

.time-selecionado-campo-avatar-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

.time-selecionado-campo-avatar-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.time-selecionado-campo-check {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #f4fff7;
    border: 2px solid #79d88d;
    color: #1aa03f;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.time-selecionado-campo-player-price {
    min-width: 68px;
    text-align: center;
    font-size: 9px;
    color: #667085;
    font-weight: 700;
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    padding: 2px 6px;
}

.time-selecionado-campo-player.placeholder {
    opacity: 0.55;
}

.escalacao-manual-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    min-width: 0;
}
.escalacao-manual-layout-unico {
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.escalacao-manual-builder {
    border: 1px solid rgba(55, 65, 81, 0.8);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.7);
    padding: 10px;
}

.escalacao-manual-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.escalacao-manual-filtros {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.escalacao-manual-filtro-btn {
    border: 1px solid rgba(75, 85, 99, 0.75);
    background: rgba(31, 41, 55, 0.72);
    color: #d1d5db;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 8px;
    text-align: center;
}

.escalacao-manual-filtro-btn.ativo {
    border-color: rgba(46, 201, 122, 0.95);
    background: rgba(6, 95, 70, 0.35);
    color: #ecfdf5;
}

.escalacao-manual-label {
    font-size: 11px;
    color: #9ca3af;
}

.escalacao-manual-select {
    flex: 1;
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.9);
    border-radius: 8px;
    color: #f3f4f6;
    padding: 6px 8px;
    font-size: 12px;
}

.escalacao-manual-lista {
    max-height: 360px;
    overflow: auto;
    display: grid;
    gap: 8px;
}

.escalacao-manual-cards {
    display: grid;
    gap: 8px;
}

.escalacao-manual-jogador-card {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    display: grid;
    gap: 4px;
}

.escalacao-manual-jogador-card .jogador-mobile-card-ref {
    border: 1px solid #2a3441;
}

.escalacao-manual-jogador-card.selecionado .jogador-mobile-card-ref {
    border-color: rgba(46, 201, 122, 0.95);
}

.escalacao-manual-card-acao {
    font-size: 10px;
    color: #cbd5e1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.escalacao-manual-jogador-card.selecionado .escalacao-manual-card-acao {
    color: #34d399;
}

.escalacao-manual-grupo {
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 10px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.55);
}

.escalacao-manual-grupo-titulo {
    font-size: 10px;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.escalacao-manual-grupo-lista {
    display: grid;
    gap: 6px;
}

.escalacao-manual-jogador-item {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    text-align: left;
    border: 1px solid rgba(75, 85, 99, 0.7);
    background: rgba(31, 41, 55, 0.7);
    border-radius: 8px;
    padding: 6px 8px;
    color: #e5e7eb;
    font-size: 11px;
}

.escalacao-manual-jogador-item.selecionado {
    border-color: rgba(16, 185, 129, 0.8);
    background: rgba(6, 95, 70, 0.35);
}

.escalacao-manual-jogador-nome {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.escalacao-manual-jogador-meta {
    color: #34d399;
    font-weight: 600;
}

.escalacao-manual-jogador-acao {
    color: #cbd5e1;
    font-weight: 700;
    font-size: 10px;
}

.escalacao-manual-field {
    min-width: 0;
}

@media (max-width: 768px) {
    .escalacao-manual-layout {
        grid-template-columns: 1fr;
    }

    .escalacao-manual-lista {
        max-height: 260px;
    }

    .escalacao-manual-filtros {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .time-selecionado-campo-surface {
        padding: 10px;
        min-height: 220px;
    }

    .time-selecionado-campo-content {
        min-height: 195px;
        gap: 6px;
    }

    .time-selecionado-campo-line {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
    }

    .time-selecionado-campo-player {
        flex: 0 1 auto;
        min-width: 0;
    }

    .time-selecionado-campo-player-name-badge {
        max-width: 74px;
        font-size: 8px;
        padding: 1px 4px;
    }

    .time-selecionado-campo-avatar {
        width: 42px;
        height: 42px;
    }

    .time-selecionado-campo-avatar-img {
        width: 31px;
        height: 31px;
    }

    .time-selecionado-campo-check {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }

    .time-selecionado-campo-player-price {
        min-width: 54px;
        font-size: 8px;
        padding: 1px 4px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.glow {
    animation: glow 2s infinite;
}

/* Cards com efeito glassmorphism */
.card-glass {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Botões com efeitos */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #2563eb);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Inputs com estilo moderno */
.input-modern {
    background: rgba(55, 65, 81, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Tabelas com estilo */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th {
    background: rgba(55, 65, 81, 0.6);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}

.table-modern td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table-modern tbody tr:hover {
    background: rgba(55, 65, 81, 0.4);
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Progress bars animadas */
.progress-bar {
    background: rgba(55, 65, 81, 0.8);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Cards de times */
.time-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(55, 65, 81, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.time-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.time-card:hover::before {
    left: 100%;
}

.time-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.time-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 16px;
}

.time-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.time-pontuacao {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.time-jogadores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.jogador-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(55, 65, 81, 0.6);
    border-radius: 6px;
    font-size: 0.875rem;
}

.jogador-nome {
    color: var(--text-secondary);
    font-weight: 500;
}

.jogador-clube {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.jogador-preco {
    color: var(--accent-color);
    font-weight: 600;
}

/* Tabs animadas */
.tab-button {
    position: relative;
    transition: all 0.3s ease;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(55, 65, 81, 0.8) 25%, rgba(75, 85, 99, 0.8) 50%, rgba(55, 65, 81, 0.8) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive design */
@media (max-width: 768px) {
    .time-jogadores {
        grid-template-columns: 1fr;
    }
    
    .table-modern {
        font-size: 0.75rem;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 8px 12px;
    }
    
    .card-glass {
        margin: 0 8px;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #1f2937;
        --border-color: #374151;
    }
}

/* Seção de Busca e Acompanhamento de Times */
.busca-times-section {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(55, 65, 81, 0.9));
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.busca-times-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.busca-input-wrapper {
    position: relative;
    max-width: 600px;
}

.busca-input {
    width: 100%;
    background: rgba(55, 65, 81, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.busca-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.busca-input::placeholder {
    color: var(--text-muted);
}

.resultados-busca {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(31, 41, 55, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
}

.resultados-busca .resultado-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.resultados-busca .resultado-item:hover {
    background: rgba(55, 65, 81, 0.6);
}

.resultados-busca .resultado-item:last-child {
    border-bottom: none;
}

.resultados-busca .resultado-item.selecionado {
    background: rgba(16, 185, 129, 0.2);
    border-left: 3px solid var(--primary-color);
}

.time-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-detalhes {
    flex: 1;
}

.time-nome {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.time-abreviacao {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

.status-time {
    font-size: 1.2rem;
}

.times-acompanhamento-container {
    background: rgba(55, 65, 81, 0.6);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    min-width: 280px;
}

.times-acompanhamento-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.time-acompanhamento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: all 0.2s ease;
}

.time-acompanhamento-item:hover {
    background: rgba(55, 65, 81, 0.8);
    transform: translateX(2px);
}

.time-acompanhamento-item:last-child {
    margin-bottom: 0;
}

.time-acompanhamento-info {
    flex: 1;
}

.time-acompanhamento-nome {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.2;
}

.time-acompanhamento-abreviacao {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 2px;
}

.btn-remover-time {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-remover-time:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.sem-times {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 16px 0;
    font-style: italic;
}

/* Animações para a seção de busca */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultados-busca {
    animation: slideDown 0.2s ease-out;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.status-time.adicionado {
    animation: pulse-green 0.6s ease-in-out;
}

/* Responsividade para a seção de busca */
@media (max-width: 768px) {
    .busca-times-container {
        padding: 1rem;
    }
    
    .times-acompanhamento-container {
        min-width: auto;
        margin-top: 1rem;
    }
    
    .resultados-busca {
        max-height: 200px;
    }
    
    .time-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .status-time {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .busca-input {
        font-size: 0.875rem;
        padding: 10px 12px;
    }
    
    .time-acompanhamento-nome {
        font-size: 0.8rem;
    }
    
    .time-acompanhamento-abreviacao {
        font-size: 0.7rem;
    }
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.border-glow {
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* Header com gradiente animado */
header {
    background: linear-gradient(-45deg, #059669, #047857, #065f46, #064e3b);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efeito de hover em cards */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Animação de contador */
.counter {
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================================
   Visual global inspirado no template (sem alterar estrutura)
   ============================================================ */

main .bg-gray-800,
#loading-overlay > div,
#modal-adicionar-time > div,
#modal-confirmar-exclusao-time > div,
#modal-confirmar-limpar-times > div,
#debug-panel {
    background: #161b22 !important;
    border-color: #252d38 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

section.bg-gray-800 {
    background: rgba(22, 27, 34, 0.72) !important;
    border-bottom-color: #252d38 !important;
    backdrop-filter: blur(8px);
}

section .bg-gray-700 {
    background: rgba(30, 36, 45, 0.76) !important;
    border-color: #2b3440 !important;
    border-radius: 12px !important;
}

.tab-button {
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 10px 12px !important;
    transition: all 0.2s ease;
}

.tab-button.active {
    background: rgba(46, 201, 122, 0.14);
    border-color: rgba(46, 201, 122, 0.4);
    color: #2ec97a !important;
}

.tab-button:not(.active):hover {
    background: rgba(34, 42, 53, 0.7);
    color: #f2f2f2 !important;
}

input[type="text"],
input[type="number"],
select {
    background: #1e242d !important;
    border-color: #2f3a48 !important;
    color: #f2f2f2 !important;
    border-radius: 10px !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: rgba(46, 201, 122, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(46, 201, 122, 0.14) !important;
}

button.bg-green-600,
#btn-otimizar,
#btn-abrir-modal-time {
    background: linear-gradient(135deg, #2ec97a, #24b06a) !important;
    border: 1px solid rgba(46, 201, 122, 0.35);
    color: #0f1318 !important;
    font-weight: 700;
}

button.bg-green-600:hover,
#btn-otimizar:hover,
#btn-abrir-modal-time:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

button.bg-gray-600,
button.bg-gray-700 {
    background: #222a35 !important;
    border: 1px solid #313d4b;
}

button.bg-red-600 {
    background: #e04040 !important;
    border: 1px solid rgba(224, 64, 64, 0.5);
}

table thead th {
    color: #8d9eb4 !important;
    border-bottom-color: #2b3440 !important;
}

table tbody tr {
    border-bottom-color: #252d38 !important;
}

table tbody tr:hover {
    background: rgba(34, 42, 53, 0.5) !important;
}

#times-container > div,
.time-card {
    background: #161b22 !important;
    border: 1px solid #2a3441 !important;
    border-top-width: 2px !important;
    border-top-color: rgba(46, 201, 122, 0.85) !important;
    border-radius: 12px !important;
}

#loading-overlay {
    backdrop-filter: blur(3px);
}

#modal-adicionar-time,
#modal-confirmar-exclusao-time,
#modal-confirmar-limpar-times {
    backdrop-filter: blur(3px);
}

/* ===================================================
   Campo Builder Esquerdo (campo tático interativo)
   =================================================== */

.escalacao-campo-builder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.escalacao-campo-builder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(55, 65, 81, 0.8);
    border-radius: 10px;
    padding: 8px 10px;
}

.js-slot-campo-builder {
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.js-slot-campo-builder:hover .time-selecionado-campo-avatar,
.js-slot-campo-builder:focus .time-selecionado-campo-avatar {
    box-shadow: 0 0 0 3px rgba(46, 201, 122, 0.9);
}

.js-slot-campo-builder.placeholder:hover .time-selecionado-campo-avatar-fallback {
    background: rgba(46, 201, 122, 0.35);
    color: #ecfdf5;
}

.slot-builder-plus {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

/* ===================================================
   Modal de escolha de jogador
   =================================================== */

.modal-escalacao-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.modal-escalacao-overlay.hidden {
    display: none;
}

.modal-escolha-jogador-box {
    background: #111827;
    border: 1px solid rgba(75, 85, 99, 0.8);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    margin-top: 24px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.modal-escalacao-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.8);
    background: #0f172a;
}

.modal-escalacao-titulo {
    font-size: 16px;
    font-weight: 700;
    color: #f2f2f2;
    line-height: 1.2;
}

.modal-escalacao-subtitulo {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.modal-escalacao-lista {
    padding: 12px;
    display: grid;
    gap: 8px;
    max-height: 68vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Botão Comprar no painel de preço do card do modal */
.jogador-modal-preco-comprar {
    background: linear-gradient(135deg, #2ec97a, #24b06a);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    cursor: pointer;
    min-width: 112px;
    transition: background 0.18s;
    text-align: center;
}

.jogador-modal-preco-comprar:hover,
.jogador-modal-preco-comprar:focus {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.jogador-modal-price-comprar-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ecfdf5;
    margin-top: 4px;
    line-height: 1;
}

@media (max-width: 768px) {
    .modal-escolha-jogador-box {
        margin-top: 8px;
    }

    .modal-escalacao-lista {
        max-height: 75vh;
    }
}