/* Kenar menusu v2: katlanabilir bolumler, menude arama, simge seridi (rail), sade kullanici alani.
   app.css'teki temel kabuk kurallarinin ustune yazar. */

:root { --az-side-width: 256px; --az-rail-width: 68px; }

.az-side {
    background: #0f1218;
    border-right: 1px solid rgba(255, 255, 255, .05);
    font-size: .9rem;
}

/* ----------------------------------------------------------- ust: marka + daralt */
.az-side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 12px 10px 14px; }
.az-brand { padding: 0; gap: 10px; font-size: 1.05rem; min-width: 0; }
.az-brand-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); flex: 0 0 auto; }
.az-brand-text { white-space: nowrap; overflow: hidden; }
.az-brand-text small { font-size: .64rem; letter-spacing: .08em; }
.az-rail-btn {
    display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px;
    background: transparent; color: var(--az-side-muted); cursor: pointer; flex: 0 0 auto;
}
.az-rail-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }

/* ----------------------------------------------------------- arama */
.az-menu-search { position: relative; padding: 2px 12px 10px; }
.az-menu-search input {
    width: 100%; height: 34px; padding: 0 52px 0 12px; border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: #fff; font: inherit; font-size: .85rem;
}
.az-menu-search input::placeholder { color: var(--az-side-muted); }
.az-menu-search input:focus { outline: none; border-color: rgba(249, 115, 22, .6); background: rgba(255, 255, 255, .07); }
.az-menu-search kbd {
    position: absolute; right: 20px; top: 9px; font: 600 .62rem/1 inherit; color: var(--az-side-muted);
    border: 1px solid rgba(255, 255, 255, .12); border-radius: 4px; padding: 3px 5px; pointer-events: none;
}

.az-menu-search input:focus + kbd, .az-menu-search input:not(:placeholder-shown) + kbd { display: none; }
.az-menu-search input:focus, .az-menu-search input:not(:placeholder-shown) { padding-right: 12px; }

/* ----------------------------------------------------------- gezinme */
.az-nav { padding: 2px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.az-nav::-webkit-scrollbar { width: 6px; }
.az-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }

.az-nav a {
    position: relative; gap: 10px; padding: 7px 10px; margin: 1px 0; border-radius: 7px;
    font-weight: 500; font-size: .875rem; color: #c3c8d0; line-height: 1.3;
}
.az-nav a .az-icon { width: 18px; height: 18px; opacity: .75; }
.az-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.az-nav a:hover .az-icon { opacity: 1; }
.az-nav a.is-active { background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; }
.az-nav a.is-active .az-icon { opacity: 1; color: #fb923c; }
.az-nav a.is-active::before {
    content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #f97316;
}
.az-nav a > span:not(.az-badge) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.az-nav-top { padding: 2px 0 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); }

/* Bolum (details) */
.az-nav-sec { margin: 2px 0; }
.az-nav-sec > summary {
    list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px;
    cursor: pointer; color: #e4e7ec; font-weight: 600; font-size: .86rem; user-select: none;
}
.az-nav-sec > summary::-webkit-details-marker { display: none; }
.az-nav-sec > summary .az-icon { width: 18px; height: 18px; color: var(--az-side-muted); }
.az-nav-sec > summary:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.az-nav-sec.has-active > summary { color: #fff; }
.az-nav-sec.has-active > summary .az-icon { color: #fb923c; }
.az-nav-sec-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.az-chev { flex: 0 0 auto; color: var(--az-side-muted); transition: transform .15s ease; }
.az-nav-sec[open] > summary .az-chev { transform: rotate(90deg); }
.az-nav-items { margin: 1px 0 6px 19px; padding-left: 9px; border-left: 1px solid rgba(255, 255, 255, .08); }
.az-nav-items a { padding-left: 10px; }
.az-nav-items a.is-active::before { left: -10px; }

.az-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; background: #dc2626; color: #fff; }
.az-nav-sec[open] > summary .az-badge-dot { display: none; }

.az-menu-bos { margin: 14px 10px; color: var(--az-side-muted); font-size: .85rem; }
.az-nav.is-searching .az-nav-items { margin-left: 0; border-left: 0; padding-left: 0; }

/* ----------------------------------------------------------- alt: kullanici */
.az-side-foot { padding: 8px 10px 10px; border-top: 1px solid rgba(255, 255, 255, .06); }
.az-user-menu { position: relative; }
.az-user-menu > summary { list-style: none; cursor: pointer; border-radius: 8px; padding: 6px 8px; margin: 0; }
.az-user-menu > summary::-webkit-details-marker { display: none; }
.az-user-menu > summary:hover, .az-user-menu[open] > summary { background: rgba(255, 255, 255, .05); }
.az-user { gap: 10px; padding: 6px 8px; }
.az-avatar { width: 32px; height: 32px; background: linear-gradient(135deg, #fb923c, #c2410c); font-size: .85rem; }
.az-user-text { flex: 1; font-size: .85rem; white-space: nowrap; overflow: hidden; }
.az-user-text small { font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
.az-user-pop {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); padding: 6px; border-radius: 10px;
    background: #1b2029; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 -8px 30px rgba(0, 0, 0, .4);
}
.az-side-btn { padding: 8px 10px; font-size: .86rem; border-radius: 7px; text-decoration: none; }
.az-side-btn .az-icon { width: 18px; height: 18px; }
.az-side-btn-danger:hover { background: rgba(220, 38, 38, .18); color: #fecaca; }

/* ----------------------------------------------------------- simge seridi (masaustu) */
@media (min-width: 901px) {
    body.az-rail { --az-side-width: var(--az-rail-width); }
    body.az-rail .az-side { width: var(--az-rail-width); }
    body.az-rail .az-content { margin-left: var(--az-rail-width); }
    body.az-rail .az-side-head { flex-direction: column; padding: 14px 0 8px; }
    body.az-rail .az-brand-text,
    body.az-rail .az-menu-search,
    body.az-rail .az-nav-sec-label,
    body.az-rail .az-nav a > span,
    body.az-rail .az-chev,
    body.az-rail .az-user-text,
    body.az-rail .az-nav-items { display: none; }
    body.az-rail .az-nav { padding: 4px 8px; }
    body.az-rail .az-nav a, body.az-rail .az-nav-sec > summary { justify-content: center; padding: 9px 0; }
    body.az-rail .az-nav a.is-active::before { left: -8px; }
    body.az-rail .az-nav-top { border-bottom: 0; }
    /* daraltilmis bolum: simgeye tiklayinca menu genisler ve bolum acilir (menu.js) */
    body.az-rail .az-nav-sec { position: relative; }
    body.az-rail .az-badge-dot { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: .62rem; padding: 0 4px; }
    body.az-rail .az-user-pop { left: 0; right: auto; min-width: 200px; }
    body.az-rail .az-user-menu > summary { padding: 6px 0; display: flex; justify-content: center; }
}

/* mobil cekmece: daralt dugmesi gizli */
@media (max-width: 900px) {
    .az-rail-btn { display: none; }
    .az-nav a, .az-nav-sec > summary { min-height: 42px; }
}
