/* ================================================================
   app-menu.css — Sağdan açılan uygulama navigasyon menüsü
   ================================================================ */

/* ── Hamburger Tetikleyici Buton ──────────────────────────────── */
#appMenuToggle {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 9000;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(102,126,234,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}
#appMenuToggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(102,126,234,0.55);
}
#appMenuToggle .ham-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#appMenuToggle .ham-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}
#appMenuToggle.open .ham-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#appMenuToggle.open .ham-icon span:nth-child(2) {
    opacity: 0;
}
#appMenuToggle.open .ham-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Backdrop (arka plan karartma) ────────────────────────────── */
#appMenuBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
#appMenuBackdrop.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Drawer Paneli ────────────────────────────────────────────── */
#appMenuDrawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100dvh;
    background: #fff;
    z-index: 9200;
    display: flex;
    flex-direction: column;
    box-shadow: -6px 0 30px rgba(0,0,0,0.15);
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    border-radius: 14px 0 0 14px;
    overflow: hidden;
}
#appMenuDrawer.open {
    right: 0;
}

/* ── Drawer Başlık ───────────────────────────────────────────── */
.appmenu-header {
    padding: 18px 18px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.appmenu-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.appmenu-header-info {
    flex: 1;
    min-width: 0;
}
.appmenu-header-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.appmenu-header-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Menü Listesi ────────────────────────────────────────────── */
.appmenu-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
}
.appmenu-list::-webkit-scrollbar { width: 4px; }
.appmenu-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.appmenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
    margin-bottom: 2px;
}
.appmenu-item:hover {
    background: #f1f5f9;
    color: #667eea;
}
.appmenu-item.aktif {
    background: linear-gradient(135deg, #eff3ff 0%, #e8d5ff 100%);
    color: #667eea;
}
.appmenu-item-icon {
    font-size: 20px;
    min-width: 28px;
    text-align: center;
    line-height: 1;
}
.appmenu-item-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.appmenu-item-toggle {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #94a3b8;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
}
.appmenu-item:hover .appmenu-item-toggle {
    opacity: 1;
}
.appmenu-item-toggle:hover {
    background: rgba(0,0,0,0.06);
    color: #475569;
}
.appmenu-item.gizli {
    opacity: 0.4;
}
.appmenu-item.gizli .appmenu-item-toggle {
    opacity: 1;
    color: #94a3b8;
}

/* ── Bölücü ──────────────────────────────────────────────────── */
.appmenu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 10px;
}
.appmenu-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.6px;
    padding: 8px 14px 4px;
    text-transform: uppercase;
}

/* ── Footer ──────────────────────────────────────────────────── */
.appmenu-footer {
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.appmenu-footer-user {
    flex: 1;
    min-width: 0;
}
.appmenu-footer-name {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.appmenu-footer-role {
    font-size: 10px;
    color: #667eea;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.appmenu-logout {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.15s;
    text-decoration: none;
}
.appmenu-logout:hover {
    background: rgba(239,68,68,0.2);
}

/* ── Gizli öğeler bölümü toggle ──────────────────────────────── */
.appmenu-show-hidden {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
}
.appmenu-show-hidden:hover {
    background: #f8fafc;
    color: #667eea;
}

/* ── Mobil için: hamburger her zaman görünür ──────────────────── */
@media (max-width: 768px) {
    #appMenuToggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}
