/* ===== YÖNETİM MASAÜSTÜ SIDEBAR ===== */
.yms-overlay {
    position: fixed; top: 0; right: 0; bottom: 0; left: 260px;
    z-index: 1049;
    background: transparent; cursor: default;
}
.yms {
    position: fixed; top: 0; left: 0; bottom: 0;
    background: var(--t-sidebar, #1e293b); color: white; z-index: 1050;
    display: flex; flex-direction: column;
    transition: width 0.25s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.yms-collapsed { width: 64px; }
.yms-expanded { width: 260px; box-shadow: 4px 0 24px rgba(0,0,0,0.25); }

.yms-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px; background: var(--t-sidebar-head, #0f172a); flex-shrink: 0; gap: 8px;
    height: 56px; box-sizing: border-box;
}
.yms-title-wrap { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.yms-title {
    font-weight: 900; font-size: 1.15rem; letter-spacing: 2px;
    white-space: nowrap; line-height: 1;
    background: linear-gradient(135deg, #e2e8f0 0%, #ffffff 50%, #93c5fd 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.yms-subtitle { font-size: 0.62rem; font-weight: 700; letter-spacing: 3px; color: #64748b; line-height: 1; }
.yms-toggle {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; color: #fff; font-size: 20px;
    cursor: pointer; border-radius: 6px; flex-shrink: 0;
}
.yms-toggle:hover { background: rgba(255,255,255,0.1); }

.yms-search { padding: 10px; flex-shrink: 0; }
.yms-search-wrap { position: relative; }
.yms-search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; pointer-events: none;
    filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.25));
}
.yms-search-icon svg { width: 18px; height: 18px; }
/* Kullanıcı sidebar'ındaki (.sidebar-search) çalışan kuralla birebir aynı pattern.
   Tek fark: global [data-theme] input[type="search"] !important override'ını yenmek için
   kendi kurallarımıza da !important veriyoruz. */
.yms .yms-search input,
.yms .yms-search input[type="search"],
aside.yms input[type="search"],
aside.yms .yms-search input {
    width: 100%;
    padding: 9px 12px 9px 30px;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 8px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 400 !important;
    outline: none;
    box-sizing: border-box;
    box-shadow: none !important;
    transition: background .15s, border-color .15s;
}
.yms .yms-search input::placeholder,
aside.yms input[type="search"]::placeholder,
aside.yms .yms-search input::placeholder {
    color: rgba(255,255,255,0.4) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.4) !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}
.yms .yms-search input:focus,
aside.yms input[type="search"]:focus,
aside.yms .yms-search input:focus {
    border-color: var(--t-sidebar-active, #38bdf8) !important;
    background: rgba(255,255,255,0.14) !important;
}
/* Chrome/Edge autofill — tarayıcı !important kurallarını bile yenen iç stil.
   -webkit-box-shadow inset hilesi ile arka planı koyu tutuyoruz. */
.yms .yms-search input:-webkit-autofill,
.yms .yms-search input:-webkit-autofill:hover,
.yms .yms-search input:-webkit-autofill:focus,
aside.yms input[type="search"]:-webkit-autofill,
aside.yms input[type="search"]:-webkit-autofill:hover,
aside.yms input[type="search"]:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(30,41,59,1) inset !important;
    box-shadow: 0 0 0 1000px rgba(30,41,59,1) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.yms-nav {
    flex: 1; overflow-y: auto; padding: 4px 0;
    scrollbar-width: none;
}
.yms-nav::-webkit-scrollbar { width: 0; display: none; }
.yms-expanded .yms-nav { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.yms-expanded .yms-nav::-webkit-scrollbar { width: 3px; display: block; }
.yms-expanded .yms-nav::-webkit-scrollbar-track { background: transparent; }
.yms-expanded .yms-nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 20px; }
.yms-expanded .yms-nav:hover { scrollbar-color: rgba(255,255,255,0.08) transparent; }
.yms-expanded .yms-nav:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }
.yms-expanded .yms-nav:hover::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }
.yms-nav.scroll-active { scrollbar-color: rgba(255,255,255,0.12) transparent !important; }
.yms-nav.scroll-active::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12) !important; }

.yms-link {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: 44px;
    text-decoration: none; color: rgba(255,255,255,0.85);
    font-size: 0.92rem; font-weight: 400;
    border-radius: 8px; margin: 2px 6px;
    transition: background 0.15s;
    white-space: nowrap; overflow: hidden;
}
.yms-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.yms-link.active { background: var(--t-sidebar-active, #0ea5e9); color: #fff; }
.yms-link-icon {
    width: 28px; min-width: 28px; height: 28px;
    font-size: 18px; text-align: center; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
    transition: transform 0.18s ease;
}
.yms-link-icon svg.ms-icon { width: 22px; height: 22px; display: block; }
.yms-link:hover .yms-link-icon { transform: scale(1.08); }
.yms-link.active .yms-link-icon { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.28)); }
.yms-link-text { overflow: hidden; text-overflow: ellipsis; }
.yms-collapsed .yms-link { padding: 0; justify-content: center; margin: 2px 8px; }

/* Sidebar badge */
.yms-badge {
    margin-left: auto; flex-shrink: 0;
    min-width: 20px; height: 20px; padding: 0 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; line-height: 1;
    border-radius: 10px;
    background: #ef4444; color: #fff;
}
.yms-badge-warn { background: #f59e0b; color: #1e293b; }
.yms-collapsed .yms-badge {
    position: absolute; top: 4px; right: 4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    font-size: 0.6rem;
}
.yms-collapsed .yms-link { position: relative; }

.yms-footer {
    flex-shrink: 0; padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.yms-switch { color: #93c5fd !important; }
.yms-switch:hover { background: rgba(99,102,241,0.15) !important; }
.yms .yms-logout { color: #fca5a5 !important; }
.yms .yms-logout:hover { background: rgba(239,68,68,0.2) !important; color: #fecaca !important; }

@media (max-width: 768px) {
    .yms { display: none !important; }
    .yms-overlay { display: none !important; }
}

/* ===== YÖNETİM MOBİL MENÜ ===== */

/* ═══ PEEK İPUCU (YÖNETİM) ═══ */
.ymm-peek-hint {
    position: fixed; top: 0; left: 0; bottom: 0; width: 52px;
    z-index: 9997; cursor: pointer; display: none;
    animation: ymm-peek-anim 3s ease-in-out forwards;
}
@keyframes ymm-peek-anim {
    0%   { transform: translateX(-100%); opacity: 0; }
    12%  { transform: translateX(0); opacity: 1; }
    70%  { transform: translateX(0); opacity: 1; }
    85%  { transform: translateX(8px); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}
.ymm-peek-bar {
    position: absolute; top: 50%; right: 0;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white; border-radius: 0 14px 14px 0;
    padding: 14px 10px 14px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    box-shadow: 4px 0 20px rgba(99,102,241,0.35);
}
.ymm-peek-arrow {
    font-size: 1.2rem; font-weight: 900; line-height: 1;
    animation: ymm-peek-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes ymm-peek-pulse {
    from { transform: translateX(0); }
    to   { transform: translateX(4px); }
}
.ymm-peek-text {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; writing-mode: vertical-rl; text-orientation: mixed;
}

.ymm-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 9998; backdrop-filter: blur(2px);
    animation: ymmFadeIn 0.25s ease;
}
.ymm-overlay.closing {
    animation: ymmFadeOut 0.22s ease forwards;
}
@keyframes ymmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ymmFadeOut { from { opacity: 1; } to { opacity: 0; } }
.ymm-panel {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    background: var(--t-sidebar, #1e293b); color: white; z-index: 9999;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    animation: ymmSlideIn 0.25s ease;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ymm-panel.closing {
    animation: ymmSlideOut 0.22s ease forwards;
}
@keyframes ymmSlideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes ymmSlideOut { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.ymm-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px; background: var(--t-sidebar-head, #0f172a); flex-shrink: 0; gap: 8px;
    height: 56px; box-sizing: border-box;
}
.ymm-title-wrap { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ymm-title {
    font-weight: 900; font-size: 1.15rem; letter-spacing: 2px;
    white-space: nowrap; line-height: 1;
    background: linear-gradient(135deg, #e2e8f0 0%, #ffffff 50%, #93c5fd 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ymm-subtitle { font-size: 0.62rem; font-weight: 700; letter-spacing: 3px; color: #64748b; line-height: 1; }
.ymm-close {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; color: #fff;
    font-size: 20px; cursor: pointer; border-radius: 6px; flex-shrink: 0;
}
.ymm-close:hover { background: rgba(255,255,255,0.1); }

.ymm-search { padding: 10px; flex-shrink: 0; }
.ymm-search-wrap { position: relative; }
.ymm-search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; pointer-events: none;
    filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.25));
}
.ymm-search-icon svg { width: 18px; height: 18px; }
.ymm-panel .ymm-search input,
.ymm-panel .ymm-search input[type="search"],
aside.ymm-panel input[type="search"],
aside.ymm-panel .ymm-search input {
    width: 100%;
    padding: 9px 12px 9px 30px;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 8px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 400 !important;
    outline: none;
    box-sizing: border-box;
    box-shadow: none !important;
    transition: background .15s, border-color .15s;
}
.ymm-panel .ymm-search input::placeholder,
aside.ymm-panel input[type="search"]::placeholder,
aside.ymm-panel .ymm-search input::placeholder {
    color: rgba(255,255,255,0.4) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.4) !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}
.ymm-panel .ymm-search input:focus,
aside.ymm-panel input[type="search"]:focus,
aside.ymm-panel .ymm-search input:focus {
    border-color: var(--t-sidebar-active, #38bdf8) !important;
    background: rgba(255,255,255,0.14) !important;
}
/* Chrome/Edge autofill — tarayıcı !important kurallarını bile yenen iç stil.
   -webkit-box-shadow inset hilesi ile arka planı koyu tutuyoruz. */
.ymm-panel .ymm-search input:-webkit-autofill,
.ymm-panel .ymm-search input:-webkit-autofill:hover,
.ymm-panel .ymm-search input:-webkit-autofill:focus,
aside.ymm-panel input[type="search"]:-webkit-autofill,
aside.ymm-panel input[type="search"]:-webkit-autofill:hover,
aside.ymm-panel input[type="search"]:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(30,41,59,1) inset !important;
    box-shadow: 0 0 0 1000px rgba(30,41,59,1) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.ymm-nav {
    flex: 1; overflow-y: auto; padding: 4px 0;
    scrollbar-width: thin; scrollbar-color: transparent transparent;
}
.ymm-nav::-webkit-scrollbar { width: 3px; }
.ymm-nav::-webkit-scrollbar-track { background: transparent; }
.ymm-nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 20px; }
.ymm-nav.scroll-active { scrollbar-color: rgba(255,255,255,0.10) transparent; }
.ymm-nav.scroll-active::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); }

.ymm-link {
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px; height: 44px;
    text-decoration: none; color: rgba(255,255,255,0.85);
    font-size: 0.92rem; font-weight: 400;
    border-radius: 8px; margin: 2px 6px;
    transition: background 0.15s;
    white-space: nowrap; overflow: hidden;
}
.ymm-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ymm-link.active { background: var(--t-sidebar-active, #0ea5e9); color: #fff; }
/* Drawer açılınca aktif öğeye dikkat çeken pulse */
.ymm-link.drawer-highlight {
    animation: ymm-drawer-pulse 1.4s ease-out;
}
@keyframes ymm-drawer-pulse {
    0%   { box-shadow: inset 0 0 0 0 rgba(255,255,255,0.4), 0 0 14px rgba(14,165,233,0.5); }
    30%  { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25), 0 0 20px rgba(14,165,233,0.3); }
    100% { box-shadow: none; }
}
.ymm-link-icon {
    width: 28px; min-width: 28px; height: 28px;
    font-size: 18px; text-align: center; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
    transition: transform 0.18s ease;
}
.ymm-link-icon svg.ms-icon { width: 22px; height: 22px; display: block; }
.ymm-link:active .ymm-link-icon { transform: scale(0.94); }
.ymm-link.active .ymm-link-icon { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.28)); }
.ymm-link-text { overflow: hidden; text-overflow: ellipsis; }

.ymm-footer {
    flex-shrink: 0; padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.ymm-back-home { color: rgba(255,255,255,0.85) !important; }
.ymm-back-home:hover { background: rgba(255,255,255,0.08) !important; }
.ymm-back-user { color: #93c5fd !important; }
.ymm-back-user:hover { background: rgba(99,102,241,0.15) !important; }
.ymm-panel .ymm-logout { color: #fca5a5 !important; }
.ymm-panel .ymm-logout:hover { background: rgba(239,68,68,0.2) !important; color: #fecaca !important; }

@media (max-width: 768px) {
    .ymm-peek-hint { display: block; }
    /* Mobilde sidebar arama ikonu gizlenir (input alanını eziyordu) */
    .ymm-search-icon { display: none; }
    .ymm-panel .ymm-search input,
    aside.ymm-panel input[type="search"],
    aside.ymm-panel .ymm-search input {
        padding-left: 12px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   EN SON OVERRIDE — Yönetim sidebar arama kutuları
   app.css L893 `[data-theme] input[type="search"]` kuralını
   kesin yenmek için [data-theme] prefix + çoklu sınıf zinciri
   ile yazılmış kurallar (specificity 0,4,2). Global = 0,2,1.
   ═══════════════════════════════════════════════════════ */
[data-theme] aside.yms .yms-search input[type="search"],
[data-theme] aside.yms .yms-search input,
[data-theme] aside.ymm-panel .ymm-search input[type="search"],
[data-theme] aside.ymm-panel .ymm-search input {
    background: rgba(255,255,255,0.08) !important;
    background-color: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
}
[data-theme] aside.yms .yms-search input[type="search"]:focus,
[data-theme] aside.yms .yms-search input:focus,
[data-theme] aside.ymm-panel .ymm-search input[type="search"]:focus,
[data-theme] aside.ymm-panel .ymm-search input:focus {
    background: rgba(255,255,255,0.14) !important;
    background-color: rgba(255,255,255,0.14) !important;
    border-color: var(--t-sidebar-active, #38bdf8) !important;
}
[data-theme] aside.yms .yms-search input::placeholder,
[data-theme] aside.ymm-panel .ymm-search input::placeholder {
    color: rgba(255,255,255,0.4) !important;
    -webkit-text-fill-color: rgba(255,255,255,0.4) !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}
