/* 1. Gereksiz Tabların Gizlenmesi (Stok ve Varyant) */
#itemDetailTabs li:nth-child(2),
#itemDetailTabs li:nth-child(3) {
    display: none !important;
}

/* Sporcu maç takvimi */
#modalSporcuMatches .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
#modalSporcuMatches .modal-header { background: #f5f8ff; border-bottom: 1px solid #e4eaf4; padding: 1.15rem 1.5rem; }
#modalSporcuMatches .modal-body { max-height: min(75vh, 800px); overflow-y: auto; padding: 1.5rem; }
.sporcu-match-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sporcu-match-summary { display: flex; flex-wrap: wrap; gap: .5rem; }
.sporcu-match-summary span { background: #f1f5fb; border: 1px solid #e2e9f4; border-radius: 12px; padding: .55rem .85rem; color: #475569; font-size: .85rem; }
.sporcu-match-summary strong { color: #1766d8; margin-right: .25rem; }
.sporcu-match-filters { display: grid; grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(115px, 1fr)) repeat(2, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }
.sporcu-match-filters .form-control, .sporcu-match-filters .form-select { min-width: 0; font-size: .84rem; }
.sporcu-match-list { display: grid; gap: .7rem; }
.sporcu-match-card { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid #e2e9f4; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(25, 57, 101, .035); }
.sporcu-match-date { width: 105px; flex: 0 0 105px; display: grid; gap: .2rem; color: #1d4e9c; font-size: .84rem; }
.sporcu-match-date span { color: #64748b; }
.sporcu-match-main { flex: 1; min-width: 0; }
.sporcu-match-title { display: block; margin: .4rem 0 .25rem; font-size: 1rem; color: #1e293b; }
.sporcu-match-tag { display: inline-flex; background: #edf4ff; color: #2364b8; border-radius: 99px; padding: .17rem .55rem; font-size: .72rem; font-weight: 700; }
.sporcu-match-tag.status-played { background: #e5f8ee; color: #14834a; }
.sporcu-match-tag.status-cancelled { background: #feecec; color: #bd3b3b; }
.sporcu-match-tag.status-postponed { background: #fff2d8; color: #a66a00; }
.sporcu-match-end { display: grid; justify-items: end; gap: .5rem; }
.sporcu-match-score { font-size: 1.2rem; color: #142e58; white-space: nowrap; }
.sporcu-match-empty { display: grid; justify-items: center; gap: .5rem; padding: 3.5rem 1rem; border: 1px dashed #ced9eb; border-radius: 13px; color: #64748b; }
.sporcu-match-empty i { font-size: 2rem; color: #92add2; }
.sporcu-match-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .45rem; max-height: 200px; overflow-y: auto; padding: .7rem; border: 1px solid #dce5f1; border-radius: 10px; }
.sporcu-roster-option { display: flex; align-items: center; gap: .5rem; padding: .5rem .65rem; border-radius: 8px; background: #f6f9fd; cursor: pointer; font-size: .86rem; }
.sporcu-roster-option small { margin-left: auto; color: #64748b; }
.sporcu-match-performance { border: 1px solid #dce5f1; border-radius: 10px; overflow: hidden; }
.sporcu-performance-row { display: flex; align-items: center; gap: 1rem; padding: .75rem; border-bottom: 1px solid #e8eef6; }
.sporcu-performance-row:last-child { border-bottom: 0; }
.sporcu-performance-row > strong { width: 150px; flex: 0 0 150px; font-size: .85rem; }
.sporcu-performance-fields { display: flex; flex: 1; flex-wrap: wrap; gap: .5rem; }
.sporcu-performance-fields label { flex: 1 1 86px; min-width: 80px; font-size: .7rem; color: #64748b; }
.sporcu-performance-fields input { margin-top: .2rem; }
.sporcu-match-form-actions { display: flex; justify-content: flex-end; gap: .6rem; border-top: 1px solid #e5eaf1; margin-top: 1.5rem; padding-top: 1rem; }
@media (max-width: 1100px) { .sporcu-match-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  #modalSporcuMatches .modal-body { padding: 1rem; max-height: 80vh; }
  .sporcu-match-toolbar { align-items: stretch; flex-direction: column; }
  .sporcu-match-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sporcu-match-filters input[type="search"] { grid-column: 1 / -1; }
  .sporcu-match-card { align-items: flex-start; flex-wrap: wrap; }
  .sporcu-match-date { width: auto; flex: 1 1 100%; display: flex; gap: .6rem; }
  .sporcu-match-end { align-self: stretch; }
  .sporcu-performance-row { display: block; }
  .sporcu-performance-fields { margin-top: .5rem; }
}

/* 2. Marka ve Model Inputlarının Gizlenmesi */
input[name="brand"], 
input[name="model"],
select[name="brand"],
select[name="model"],
label[for*="brand"], 
label[for*="model"] {
    display: none !important;
}

.mb-3:has(input[name="brand"]),
.mb-3:has(input[name="model"]),
.col-md-6:has(input[name="brand"]),
.col-md-6:has(input[name="model"]) {
    display: none !important;
}

/* 3. Sporcu & Üye Listesi (modalItemList) Tablo ve Sütun Genişlikleri */
#modalItemList .modal-dialog {
    max-width: 1240px !important;
}

#modalItemList table {
    table-layout: auto !important;
    width: 100% !important;
    min-width: 950px;
}

#modalItemList table > thead > tr > th,
#modalItemList table > tbody > tr > td {
    vertical-align: middle !important;
}

/* Sütun 1: Sporcu & Forma No */
#modalItemList table th:first-child,
#modalItemList table td:first-child {
    width: 230px !important;
    min-width: 210px !important;
    max-width: 250px !important;
}

/* Sütun 2: Branş / Grup */
#modalItemList table th:nth-child(2),
#modalItemList table td:nth-child(2) {
    width: 130px !important;
    min-width: 120px !important;
    max-width: 150px !important;
}

/* Sütun 3: Veli & İletişim */
#modalItemList table th:nth-child(3),
#modalItemList table td:nth-child(3) {
    width: 190px !important;
    min-width: 170px !important;
}

/* Sütun 4: Sözleşme & Okul Bilgileri */
#modalItemList table th:nth-child(4),
#modalItemList table td:nth-child(4) {
    width: 200px !important;
    min-width: 180px !important;
}

/* Sütun 5: Aylık Aidat */
#modalItemList table th:nth-child(5),
#modalItemList table td:nth-child(5) {
    width: 125px !important;
    min-width: 115px !important;
    text-align: right !important;
    white-space: nowrap !important;
}

/* Sütun 6: Aidat Durumu */
#modalItemList table th:nth-child(6),
#modalItemList table td:nth-child(6) {
    width: 140px !important;
    min-width: 130px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Sütun 7: İşlem Butonları */
#modalItemList table th:last-child,
#modalItemList table td:last-child {
    width: 100px !important;
    min-width: 95px !important;
    text-align: right !important;
    white-space: nowrap !important;
}

.jersey-wrapper-list {
    min-width: 38px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-color: #c7d2fe !important;
    font-size: 0.85rem;
}

/* 4. Hızlı Toplu Yoklama Modülü (modalQuickAttendance) */
#modalQuickAttendance .modal-dialog {
    max-width: 1240px !important;
}

#modalQuickAttendance table {
    table-layout: auto !important;
    width: 100% !important;
    min-width: 950px;
}

#modalQuickAttendance table > thead > tr > th,
#modalQuickAttendance table > tbody > tr > td {
    vertical-align: middle !important;
}

#modalQuickAttendance table th:last-child,
#modalQuickAttendance table td:last-child {
    width: 250px !important;
    min-width: 240px !important;
    text-align: right !important;
    white-space: nowrap !important;
}

#modalQuickAttendance table th:nth-child(4),
#modalQuickAttendance table td:nth-child(4) {
    width: 150px !important;
    min-width: 130px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

#modalQuickAttendance .btn-group {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

#modalQuickAttendance .btn-group .btn {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    font-size: 11.5px !important;
    padding: 5px 10px !important;
    line-height: 1.2 !important;
    gap: 4px !important;
    height: auto !important;
}

#modalQuickAttendance .btn-group .btn i {
    display: inline-block !important;
    margin: 0 !important;
    font-size: 11px !important;
    vertical-align: middle !important;
}

#modalQuickAttendance tr.table-success td {
    background-color: rgba(25, 135, 84, 0.05) !important;
}

#modalQuickAttendance tr.table-danger td {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

#modalPlayerDetail .player-tab-icon {
    display: none;
}

/* Mobile player detail: retain all tabs while reducing vertical form density. */
@media (max-width: 575.98px) {
    #modalPlayerDetail .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #modalPlayerDetail .modal-header {
        padding: 0.75rem !important;
    }

    #modalPlayerDetail .modal-header .jersey-wrapper {
        width: 38px !important;
        height: 38px !important;
        margin-right: 0.75rem !important;
        font-size: 1rem !important;
    }

    #modalPlayerDetail .modal-title {
        font-size: 1rem;
    }

    #modalPlayerDetail .player-detail-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    #modalPlayerDetail .player-detail-tabs .nav-item {
        flex: 1 1 25%;
        min-width: 0;
    }

    #modalPlayerDetail .player-detail-tabs .nav-link {
        width: 100%;
        min-width: 0;
        padding: 0.8rem 0.2rem !important;
        font-size: 0.68rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    #modalPlayerDetail .player-tab-label {
        display: none;
    }

    #modalPlayerDetail .player-tab-icon {
        display: inline-block;
        font-size: 0.95rem;
    }

    #modalPlayerDetail .player-detail-content {
        padding: 1rem !important;
    }

    #modalPlayerDetail #formPlayerDetail .row {
        --bs-gutter-x: 0.65rem;
        --bs-gutter-y: 0.75rem;
    }

    #modalPlayerDetail #formPlayerDetail label {
        margin-bottom: 0.2rem;
        font-size: 0.7rem;
    }

    #modalPlayerDetail #formPlayerDetail .form-control,
    #modalPlayerDetail #formPlayerDetail .form-select {
        min-height: 38px;
        padding: 0.4rem 0.55rem;
        font-size: 0.88rem;
    }

    #modalPlayerDetail .player-dues-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 0.72rem;
    }

    #modalPlayerDetail .player-dues-table th,
    #modalPlayerDetail .player-dues-table td {
        padding: 0.45rem 0.35rem;
        vertical-align: middle;
    }

    #modalPlayerDetail .player-dues-table th:nth-child(1) { width: 23%; }
    #modalPlayerDetail .player-dues-table th:nth-child(2) { width: 24%; }
    #modalPlayerDetail .player-dues-table th:nth-child(3) { width: 25%; }
    #modalPlayerDetail .player-dues-table th:nth-child(4) { width: 28%; }

    #modalPlayerDetail .player-dues-action {
        min-width: 34px;
        padding: 0.42rem 0.55rem;
    }

    #modalPlayerDetail .player-dues-action span,
    #modalPlayerDetail .player-attendance-action span {
        display: none;
    }

    #modalPlayerDetail .player-attendance-action {
        flex: 0 0 50px;
        padding: 0.7rem 0.5rem;
        font-size: 1rem;
    }
}
