/* ========================================================== */
/* ( ! ) PROFİL HEADER KARTI                                 */
/* ========================================================== */
.profile-header-card {
    background: linear-gradient(135deg, var(--bs-card-bg), var(--bs-tertiary-bg));
    border: 0;
    overflow: hidden; 
}
.profile-header-card .card-body {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 1rem; 
}
.profile-header-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--bs-primary);
    padding: 5px;
    background-color: var(--bs-body-bg);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.profile-header-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}
.profile-header-meta {
    font-size: 1.1rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0;
}
.profile-header-meta span {
    margin: 0 0.5rem;
    opacity: 0.5;
}
.profile-header-meta a {
    color: var(--bs-body-color);
    font-weight: 500;
    text-decoration: none;
}
.profile-header-meta a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.profile-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .profile-header-card .card-body {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-header-card .card-body .d-flex {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    .profile-header-logo {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
    .profile-header-actions {
         flex-direction: column;
         width: 100%;
    }
    .profile-header-actions .btn {
         width: 100%;
    }
}

/* ========================================================== */
/* ( ! ) MODERN FORMA VİTRİNİ (SIDEBAR VERSİYONU)             */
/* ========================================================== */

.kit-display-card {
    background: #0f172a; /* Koyu lacivert/siyah zemin */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.kit-grid {
    display: grid;
    /* Sidebar dar olduğu için minmax değerini düşürdük */
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    justify-items: center;
}

.kit-item {
    position: relative;
    width: 100%;
    /* Yükseklik ve genişlik orantılı olsun */
    aspect-ratio: 1 / 1.4; 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Hover Efekti */
.kit-item:hover {
    transform: translateY(-5px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.15);
}

/* Canvas (Forma) Görünümü */
.kit-canvas {
    filter: drop-shadow(0 8px 8px rgba(0,0,0,0.5));
    transition: transform 0.3s;
    max-width: 100%;
    height: auto;
    flex: 1; /* Alanı kapla */
    object-fit: contain;
}

.kit-item:hover .kit-canvas {
    transform: scale(1.1);
}

/* Alt Etiketler */
.kit-label {
    margin-top: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem; /* Mobilde taşmasın diye küçültüldü */
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.4);
    width: 100%;
    text-align: center;
}

/* Etiket Renkleri */
.kit-label.home { color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); } /* Altın */
.kit-label.away { color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.2); } /* Mavi */
.kit-label.alt  { color: #a1a1aa; border: 1px solid rgba(161, 161, 170, 0.2); } /* Gri */


/* ========================================================== */
/* ( ! ) GENEL İSTATİSTİK KARTLARI                           */
/* ========================================================== */
.stats-grid-container {
    display: grid;
    /* Min. genişlik 120px'ten 135px'e çıkarıldı (Mağlubiyet yazısı sığsın diye) */
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 1rem;
}
.stat-card {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    line-height: 1.2;
}
.stat-card .stat-value.text-success { color: var(--bs-success) !important; }
.stat-card .stat-value.text-danger { color: var(--bs-danger) !important; }
.stat-card .stat-value.text-warning { color: var(--bs-warning) !important; }
.stat-card .stat-value.text-info { color: var(--bs-info) !important; }
.stat-card .stat-value.text-muted { color: var(--bs-secondary-color) !important; }

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    font-weight: 500;
}

/* ========================================================== */
/* ( ! ) YENİ: TAKIM FORM DURUMU (ŞERİT)                      */
/* ========================================================== */

/* Kapsayıcı Stil (Arka plan efekti) */
.form-status-wrapper {
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 100%);
}

/* Kutuların Hizalanması */
.form-status-grid-container {
    display: flex;
    justify-content: flex-end; /* Varsayılan olarak sağa yasla */
    gap: 0.5rem;
}

/* Tekil Form Kutusu (Kare) */
.form-status-item {
    width: 32px;
    height: 32px;
    border-radius: 6px; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: default;
    font-size: 0.85rem;
    color: white;
}

.form-status-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    z-index: 2;
}

/* Renk Overrides */
.form-status-item.bg-success { background-color: #10b981 !important; color: #fff !important; border-color: #059669; }
.form-status-item.bg-warning { background-color: #64748b !important; color: #fff !important; border-color: #475569; } /* Beraberlik için Gri */
.form-status-item.bg-danger { background-color: #ef4444 !important; color: #fff !important; border-color: #dc2626; }

/* Mobil Uyumluluk */
@media (max-width: 576px) {
    .form-status-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .form-status-grid-container {
        justify-content: center;
        margin-top: 0.5rem;
    }
}


/* ========================================================== */
/* ( ! ) LİSTE STİLLERİ                                      */
/* ========================================================== */
.yonetim-listesi {
    padding: 0;
    margin: 0;
    list-style: none;
}
.yonetim-listesi li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem; 
    border-bottom: 1px solid var(--bs-border-color);
}
.yonetim-listesi li:last-child {
    border-bottom: 0;
}
.oyuncu-info {
    display: flex;
    flex-direction: column;
}
.oyuncu-info .oyuncu-ad {
    font-weight: 600;
    font-size: 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: color 0.2s;
}
.oyuncu-info .oyuncu-ad:hover {
    color: var(--bs-primary);
}
.oyuncu-info .oyuncu-mevki {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}
.liste-bos-mesaj {
    padding: 1.5rem;
    text-align: center;
    color: var(--bs-secondary-color);
    margin: 0;
}
.liste-bos-mesaj.small {
    padding: 1rem;
    font-size: 0.9rem;
}

/* ========================================================== */
/* ( ! ) TRANSFER LİSTESİ                                    */
/* ========================================================== */
.transfer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
    text-align: right;
}
.transfer-info .badge { font-size: 0.8rem; }
.transfer-info .transfer-tarihi {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}
.oyuncu-mevki .bi {
    color: var(--bs-primary);
    vertical-align: middle;
    font-weight: bold;
}

/* ========================================================== */
/* ( ! ) DİZİLİŞ (TAKTİK TAHTASI)                            */
/* ========================================================== */
.tactic-board-wrapper .tactic-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
}
.tactic-board-header .season-formation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin: 0;
}
.tactic-board-header .tactic-board-save-spinner {
    font-size: 0.85rem;
    color: var(--bs-success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tactic-board-layout { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 1rem; 
    align-items: flex-start; 
}
.tactic-board { 
    display: flex; 
    flex-direction: column; 
    min-height: auto; 
    background-image: url('../assets/arkaplan1.png'); 
    background-size: 200%; 
    background-position: center bottom; 
    padding: 1rem; 
    border-radius: 0.375rem; 
    border: 1px solid var(--bs-border-color); 
}
.tactic-board-main { 
    display: grid; 
    grid-template-columns: 1fr; 
    min-height: auto; 
    gap: 1rem;
    flex-grow: 1; 
    margin: auto; 
}
.tactic-slot { 
    position: relative; 
    width: auto; 
    height: 50px; 
    min-width: 150px;
    border-radius: 0.5rem;
    margin: 0; 
    border: 2px dashed transparent;
    background-color: transparent;
    transition: all 0.2s;
    display: flex; 
    align-items: center;
    justify-content: center;
    padding: 5px; 
}
.tactic-slot.bench-slot {
    width: auto; 
    height: 50px;
    min-width: 150px;
    margin: 0;
    padding: 5px;
    border-radius: 0.5rem; 
    border: 2px dashed transparent;
}
.player-marker { 
    position: relative; 
    top: auto; 
    left: auto;
    transform: none;
    width: 100%; 
    max-width: 180px;
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 0.5rem; 
    transition: all 0.2s;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 50px;
    padding: 5px; 
}
.player-dot { 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    background-color: var(--bs-body-bg); 
    border: 2px solid var(--bs-border-color); 
    color: var(--bs-primary); 
    font-size: 0.9rem; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 0; 
    flex-shrink: 0;
}
.player-dot-name { 
    font-size: 0.9rem; 
    font-weight: 500; 
    background-color: transparent; 
    padding: 0; 
    padding-right: 0.5rem; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 100px; 
    color: var(--bs-body-color); 
    text-decoration: none;
}

/* Diziliş tahtasındaki hover efektini düzenle (Altı çizili olmasın) */
.player-dot-name:hover { 
    color: var(--bs-secondary-color); 
    text-decoration: none; 
}

.benched-players-container { 
    min-height: auto; 
    background-color: var(--bs-body-bg); 
    border-radius: 0.5rem; 
    border: 1px solid var(--bs-border-color);
    overflow: hidden;
}
.benched-players-container .card-header { 
    padding: 0.5rem 1rem; 
    background-color: var(--bs-tertiary-bg); 
    border-bottom: 1px solid var(--bs-border-color); 
}
.benched-players-container .card-header h6 { margin: 0; font-size: 1rem; }
.benched-players-list { 
    padding: 1rem; 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 0.5rem; 
    max-height: 400px; 
    overflow-y: auto; 
}

/* Edit Mode Styles */
.tactic-board-wrapper.edit-mode .tactic-slot:not(:has(.player-marker)) {
    border-style: dashed;
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}
.tactic-board-wrapper.edit-mode .tactic-slot.bench-slot:not(:has(.player-marker)) {
    border: 2px dashed var(--bs-border-color); 
    background: none;
    min-height: 50px;
}
.tactic-board-wrapper.edit-mode .tactic-slot:not(:has(.player-marker))::before {
    content: attr(data-position-label);
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 1.5rem;
    opacity: 0.3;
}
.tactic-board-wrapper.edit-mode .tactic-slot.bench-slot:not(:has(.player-marker))::before { content: ""; }
.tactic-board-wrapper.edit-mode .tactic-slot:not(:has(.player-marker)):hover {
    background: rgba(var(--bs-primary-rgb), 0.2);
    border-color: var(--bs-primary);
}
.tactic-board-wrapper.edit-mode .tactic-slot:has(.player-marker), 
.tactic-board-wrapper.edit-mode .tactic-slot.bench-slot:has(.player-marker) {
    border-color: transparent;
    background: transparent;
    padding: 5px; 
}
.tactic-board-wrapper.edit-mode .player-marker { cursor: grab; }
.tactic-board-wrapper.edit-mode .player-marker.selected {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--bs-primary);
    border-color: var(--bs-primary);
}		
/* ========================================================== */
/* ( ! ) TABLO LİNKLERİ İÇİN GENEL OVERRIDE                  */
/* Tablo içindeki (Kadro ve Sezon Performansı) linklerin rengini */
/* varsayılan mavi yerine ana metin rengi yapar.             */
/* ========================================================== */
.table tbody a {
    color: var(--bs-body-color) !important; /* Ana metin rengi (beyaz/açık) olarak ayarla */
    text-decoration: none;
    font-weight: 600; 
    transition: color 0.2s;
}

.table tbody a:hover {
    color: var(--bs-secondary-color) !important; /* Fare üzerine gelince ikincil (daha soluk) renge geç */
    text-decoration: none; /* Altı çizili görünümü kaldırır */
}