/* =========================================
   CSI ORGANIZATION - DYNAMIC ROSTER
========================================= */

.csi-org-section {
    width: min(1400px, calc(100% - 32px));
    margin: 65px auto;
    padding: 42px;
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #171717, #101010);
    border: 1px solid #34302a;
    border-radius: 24px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .4);
}

.csi-org-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e8bd45, transparent);
}

.csi-org-header {
    text-align: center;
    margin-bottom: 42px;
}

.csi-org-eyebrow {
    color: #d8ad3c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.csi-org-title {
    margin: 12px 0;
    color: #fff;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 900;
    letter-spacing: 1px;
}

.csi-org-subtitle {
    margin: 0;
    color: #999;
    font-size: 15px;
}

.csi-org-rank {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
}

.csi-org-rank-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
    color: #e8bd45;
    font-size: 19px;
    font-weight: 850;
    text-align: center;
    letter-spacing: 1px;
}

.csi-org-rank-title::before,
.csi-org-rank-title::after {
    content: "";
    width: min(80px, 10%);
    height: 1px;
    background: linear-gradient(90deg, transparent, #98752d);
}

.csi-org-rank-title::after {
    transform: rotate(180deg);
}

.csi-org-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.csi-org-member {
    width: 190px;
    min-height: 220px;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(160deg, #242424, #191919);
    border: 1px solid #38332a;
    border-radius: 16px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.csi-org-member:hover {
    transform: translateY(-5px);
    border-color: #cda43b;
    box-shadow: 0 12px 30px rgba(205, 164, 59, .12);
}

.csi-org-avatar {
    width: 100px;
    height: 115px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.csi-org-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.csi-org-username {
    max-width: 100%;
    margin: 5px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.csi-org-position {
    color: #d8ad3c;
    font-size: 12px;
    font-weight: 750;
}

.csi-org-empty {
    width: 190px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #777;
    background: rgba(0, 0, 0, .16);
    border: 1px dashed #48433a;
    border-radius: 16px;
}

.csi-org-empty i {
    color: #a48642;
    font-size: 25px;
}

.csi-org-founders {
    overflow-x: auto;
    padding: 5px 2px 16px;
    scrollbar-width: thin;
    scrollbar-color: #92722f #222;
}

.csi-org-founders .csi-org-members {
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: max-content;
}

.csi-org-founders .csi-org-member,
.csi-org-founders .csi-org-empty {
    width: 145px;
    min-height: 195px;
    flex: 0 0 145px;
    padding: 15px 10px;
}

.csi-org-founders .csi-org-avatar {
    width: 85px;
    height: 100px;
}

.csi-org-founders .csi-org-username {
    font-size: 13px;
}

.csi-org-founders .csi-org-position {
    font-size: 11px;
}

.csi-org-management {
    margin-top: 55px;
    padding: 28px;
    background: #191919;
    border: 1px solid #6d5628;
    border-radius: 18px;
}

.csi-org-management[hidden] {
    display: none !important;
}

.csi-org-management-header {
    margin-bottom: 24px;
    text-align: center;
}

.csi-org-management-header h3 {
    margin: 0 0 8px;
    color: #e8bd45;
    font-size: 23px;
}

.csi-org-management-header p {
    margin: 0;
    color: #999;
    font-size: 13px;
}

.csi-org-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 12px;
    margin-bottom: 25px;
}

.csi-org-form input,
.csi-org-form select,
.csi-org-edit-input,
.csi-org-edit-select {
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    color: #fff;
    background: #252525;
    border: 1px solid #48433a;
    border-radius: 10px;
    outline: none;
}

.csi-org-form input:focus,
.csi-org-form select:focus,
.csi-org-edit-input:focus,
.csi-org-edit-select:focus {
    border-color: #d8ad3c;
}

.csi-org-form button,
.csi-org-action {
    padding: 12px 18px;
    color: #17130a;
    background: #d8ad3c;
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.csi-org-form button:hover,
.csi-org-action:hover {
    background: #f0cb63;
}

.csi-org-admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csi-org-admin-item {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(160px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #222;
    border: 1px solid #383838;
    border-radius: 12px;
}

.csi-org-admin-user {
    color: #fff;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.csi-org-action-danger {
    color: #fff;
    background: #8c3434;
}

.csi-org-action-danger:hover {
    background: #b74343;
}

.csi-org-message {
    min-height: 20px;
    margin: 12px 0;
    color: #9bd99b;
    font-size: 13px;
}

.csi-org-message.error {
    color: #ff7777;
}

@media (max-width: 760px) {
    .csi-org-section {
        width: calc(100% - 20px);
        margin: 35px auto;
        padding: 22px 13px;
        border-radius: 17px;
    }

    .csi-org-rank {
        padding: 18px 10px;
        margin: 20px 0;
    }

    .csi-org-members {
        gap: 10px;
    }

    .csi-org-member {
        width: calc(50% - 8px);
        min-height: 190px;
        padding: 14px 8px;
    }

    .csi-org-empty {
        width: calc(50% - 8px);
        min-height: 150px;
    }

    .csi-org-avatar {
        width: 82px;
        height: 95px;
    }

    .csi-org-founders .csi-org-member,
    .csi-org-founders .csi-org-empty {
        width: 125px;
        min-height: 175px;
        flex-basis: 125px;
    }

    .csi-org-founders .csi-org-avatar {
        width: 75px;
        height: 85px;
    }

    .csi-org-management {
        padding: 18px 12px;
    }

    .csi-org-form {
        grid-template-columns: 1fr;
    }

    .csi-org-form button {
        min-height: 46px;
    }

    .csi-org-admin-item {
        grid-template-columns: 1fr 1fr;
    }

    .csi-org-admin-user {
        grid-column: 1 / -1;
    }

    .csi-org-admin-item button {
        width: 100%;
    }
}

/* Yeni dinamik yönetim kadrosu görünürlük düzeltmesi */
body.founders-page-active #kurucular.csi-org-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* Kart üzerindeki yetkili silme butonu */
.csi-org-card-delete {
    margin-top: 16px;
    min-width: 105px;
    padding: 9px 16px;
    border: 1px solid rgba(220, 70, 70, .45);
    border-radius: 9px;
    background: rgba(160, 35, 35, .15);
    color: #ff7777;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease, border-color .2s ease;
}

.csi-org-card-delete:hover {
    background: rgba(190, 45, 45, .3);
    border-color: #e45b5b;
}

.csi-org-card-delete:disabled {
    opacity: .5;
    cursor: wait;
}
