/* =========================================================
   Yetki yonetimi sayfasi — list/detail + izin matrisi
   ========================================================= */

.yt-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 1080px) { .yt-row { grid-template-columns: 1fr; } }

.yt-detail-wrap { min-width: 0; }

/* Sol liste */
.yt-list-panel { padding: 16px; }
.yt-list-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.yt-list-head h3 { margin: 0; }

.yt-list { display: flex; flex-direction: column; gap: 6px; }

.yt-list-item {
    appearance: none;
    text-align: left;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: center;
    background: var(--ja-card-soft);
    border: 1px solid var(--ja-border);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.yt-list-item:hover {
    background: #fff;
    border-color: rgba(43,168,224,0.4);
    box-shadow: var(--ja-shadow-sm);
}
.yt-list-item.is-secili {
    background: linear-gradient(135deg, #ECF6FE 0%, #F0F9FF 100%);
    border-color: var(--ja-blue);
    box-shadow: 0 0 0 2px rgba(43,168,224,0.15);
}

.yt-list-ad {
    grid-column: 1;
    grid-row: 1;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ja-ink);
    letter-spacing: -0.2px;
    line-height: 1.25;
}
.yt-list-aciklama {
    grid-column: 1;
    grid-row: 2;
    font-size: 11.5px;
    color: var(--ja-muted);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: normal;
}
.yt-list-sayac {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--ja-blue);
    background: rgba(43,168,224,0.10);
    padding: 6px 9px;
    border-radius: 10px;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    flex-direction: column;
    min-width: 44px;
}
.yt-list-sayac svg { opacity: 0.85; margin-bottom: 1px; }
.yt-list-item.is-secili .yt-list-sayac {
    background: var(--ja-blue);
    color: #fff;
}

/* Sag form */
.yt-form { padding: 22px 24px; }
.yt-form-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
    gap: 10px;
    flex-wrap: wrap;
}
.yt-form-head h3 {
    margin: 0;
    display: flex; align-items: center; gap: 8px;
    font-size: 18px;
    color: var(--ja-ink);
}

.yt-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px 16px;
    margin-bottom: 22px;
}
@media (max-width: 720px) { .yt-grid { grid-template-columns: 1fr; } }

/* Matris ust */
.yt-matrix-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap; gap: 8px;
}
.yt-matrix-head h4 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ja-ink);
    letter-spacing: 0.2px;
}
.yt-toplu-secim { display: flex; gap: 6px; flex-wrap: wrap; }
.yt-toplu-btn {
    background: var(--ja-bg);
    border: 1px solid var(--ja-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ja-ink-2);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.yt-toplu-btn:hover {
    background: rgba(43,168,224,0.08);
    color: var(--ja-blue);
    border-color: rgba(43,168,224,0.35);
}

/* Matris */
.yt-matrix {
    background: var(--ja-card-soft);
    border: 1px solid var(--ja-border);
    border-radius: 12px;
    overflow: hidden;
}
.yt-matrix-header,
.yt-matrix-row {
    display: grid;
    grid-template-columns: 2.5fr 90px 110px 100px 80px;
    align-items: center;
}
.yt-matrix-header {
    background: #F1F5F9;
    color: var(--ja-muted);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ja-border);
}
.yt-matrix-header > div { text-align: center; }
.yt-matrix-header > div:first-child { text-align: left; padding-left: 16px; }

.yt-matrix-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--ja-border-soft);
    transition: background 0.12s;
}
.yt-matrix-row:last-child { border-bottom: 0; }
.yt-matrix-row:hover { background: #fff; }
.yt-matrix-row.is-root {
    background: #FAFBFD;
    font-weight: 700;
}
.yt-matrix-row.is-root:hover { background: #F4F6FA; }

.yt-menu-cell {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px;
    color: var(--ja-ink);
    overflow: hidden;
}
.yt-matrix-row:not(.is-root) .yt-menu-cell { font-weight: 500; color: var(--ja-ink-2); }
.yt-tree-bullet {
    flex: 0 0 4px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--ja-faint);
}
.yt-menu-icon {
    color: var(--ja-blue);
    display: grid; place-items: center;
    flex: 0 0 16px;
}
.yt-menu-baslik {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.yt-cell { display: grid; place-items: center; }

/* Checkbox custom */
.yt-check {
    display: inline-grid; place-items: center;
    cursor: pointer;
}
.yt-check input { position: absolute; opacity: 0; pointer-events: none; }
.yt-check-box {
    width: 18px; height: 18px;
    border-radius: 5px;
    background: #fff;
    border: 1.5px solid #CBD5E1;
    position: relative;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.yt-check-box::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.18s cubic-bezier(.2,.8,.2,1);
}
.yt-check input:checked + .yt-check-box {
    background: linear-gradient(135deg, #2BA8E0, #1E88F5);
    border-color: #1E88F5;
    box-shadow: 0 2px 6px rgba(43,168,224,0.35);
}
.yt-check input:checked + .yt-check-box::after { transform: rotate(45deg) scale(1); }
.yt-check:hover .yt-check-box { border-color: var(--ja-blue); }

/* Kaydet aksiyon barı */
.yt-actions {
    display: flex; justify-content: flex-end;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ja-border);
}

@media (max-width: 820px) {
    .yt-matrix-header, .yt-matrix-row {
        grid-template-columns: 2fr 60px 70px 70px 60px;
    }
    .yt-matrix-header > div, .yt-cell {
        font-size: 10px;
    }
}
