/* =====================================================================
   MJ UI — "Cam" teması (önizleme). Yalnızca <html class="mj-cam"> iken etkindir.
   Açma: herhangi bir sayfaya ?tema=cam   Kapatma: ?tema=duz   (tarayıcıda hatırlanır)
   Yarı saydam yüzeyler + arka plan bulanıklığı + üst kenarda ince parlaklık.
   Okunabilirlik için tablo/form zeminleri daha opak tutulur.
   ===================================================================== */

html.mj-cam {
    --cam-yuzey: rgba(255, 255, 255, .52);
    --cam-yuzey-yogun: rgba(255, 255, 255, .80);
    --cam-kenar: rgba(255, 255, 255, .85);
    --cam-cizgi: rgba(15, 23, 42, .07);
    --cam-bulanik: blur(18px) saturate(170%);
    --cam-golge: 0 1px 1px rgba(15, 23, 42, .03), 0 10px 30px -12px rgba(49, 46, 129, .18);
    --cam-isik: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .35);
}

/* Arka plan: soluk çivit / gök / leylak ışık lekeleri (sabit) */
html.mj-cam body {
    background-color: #f5f6fe;
    background-image:
        radial-gradient(46rem 36rem at 6% -8%, rgba(129, 140, 248, .62), transparent 60%),
        radial-gradient(40rem 32rem at 98% 2%, rgba(56, 189, 248, .45), transparent 62%),
        radial-gradient(48rem 38rem at 72% 108%, rgba(192, 132, 252, .48), transparent 60%),
        radial-gradient(34rem 28rem at 16% 96%, rgba(99, 102, 241, .32), transparent 60%),
        radial-gradient(30rem 24rem at 48% 46%, rgba(244, 114, 182, .14), transparent 65%);
    background-attachment: fixed;
}

/* Sidebar ve üst çubuk */
html.mj-cam .mj-sidebar {
    background: rgba(255, 255, 255, .42);
    backdrop-filter: var(--cam-bulanik);
    -webkit-backdrop-filter: var(--cam-bulanik);
    border-right: 1px solid var(--cam-kenar);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .6), 8px 0 30px -18px rgba(49, 46, 129, .25);
}
html.mj-cam .mj-sidebar-footer, html.mj-cam .mj-brand { border-color: var(--cam-cizgi) !important; }
html.mj-cam .mj-nav-item.active > .mj-nav-link {
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--cam-isik), 0 4px 14px -6px rgba(79, 70, 229, .35);
}
html.mj-cam .mj-nav-link:hover, html.mj-cam .mj-sublink:hover { background: rgba(255, 255, 255, .55); }
html.mj-cam .mj-submenu-inner { border-left-color: rgba(99, 102, 241, .18); }
html.mj-cam .mj-topbar {
    background: rgba(255, 255, 255, .32);
    backdrop-filter: var(--cam-bulanik);
    -webkit-backdrop-filter: var(--cam-bulanik);
    border-bottom: 1px solid var(--cam-kenar);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}
html.mj-cam .mj-user-btn { background: rgba(255, 255, 255, .6); border-color: var(--cam-kenar); box-shadow: var(--cam-isik); }
html.mj-cam .mj-brand-logo {
    background: linear-gradient(145deg, #818cf8 0%, #4f46e5 55%, #4338ca 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px -6px rgba(79, 70, 229, .65);
}

/* Kartlar: cam yüzey + üst kenarda parlaklık */
html.mj-cam .card {
    background: var(--cam-yuzey);
    backdrop-filter: var(--cam-bulanik);
    -webkit-backdrop-filter: var(--cam-bulanik);
    border: 1px solid var(--cam-kenar);
    box-shadow: var(--cam-isik), var(--cam-golge);
    overflow: visible;
}
html.mj-cam .card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 32%),
        linear-gradient(115deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 22%);
}
html.mj-cam .card > * { position: relative; }
html.mj-cam .card-header, html.mj-cam .card-footer { background: transparent; border-color: var(--cam-cizgi); }
html.mj-cam .kpi-icon {
    background: linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(224, 231, 255, .9));
    box-shadow: inset 0 1px 0 #fff, 0 2px 6px -2px rgba(79, 70, 229, .35);
}

/* Tablolar: satırlar okunaklı kalsın */
html.mj-cam .table { border-color: var(--cam-cizgi); }
html.mj-cam .card .table > tbody > tr > * { background-color: rgba(255, 255, 255, .38); }
html.mj-cam .table > thead th { background: rgba(255, 255, 255, .35) !important; border-bottom-color: var(--cam-cizgi); }
html.mj-cam .table-hover > tbody > tr:hover > * { background-color: rgba(255, 255, 255, .55); }
html.mj-cam tfoot td, html.mj-cam tfoot th { background: rgba(255, 255, 255, .45); }

/* Formlar */
html.mj-cam .form-control, html.mj-cam .form-select,
html.mj-cam .select2-container.select2-container--default .select2-selection--single,
html.mj-cam .select2-container.select2-container--default .select2-selection--multiple {
    background-color: var(--cam-yuzey-yogun);
    border-color: rgba(148, 163, 184, .38);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
}
html.mj-cam .form-select { background-image: var(--mj-chevron); }
html.mj-cam .form-control:focus, html.mj-cam .form-select:focus { background-color: #fff; border-color: #a5b4fc; box-shadow: var(--mj-ring); }
html.mj-cam .input-group-text { background: rgba(255, 255, 255, .55); border-color: rgba(148, 163, 184, .38); }
html.mj-cam .inv-seg, html.mj-cam .inv-entry { background: rgba(241, 245, 249, .55); }

/* Butonlar: parlak birincil, cam ikincil */
html.mj-cam .btn-primary, html.mj-cam .btn-success {
    --mj-btn-bg: transparent;
    background-image: linear-gradient(180deg, #6d6bf3 0%, #4f46e5 55%, #4338ca 100%);
    border-color: #4338ca;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px -6px rgba(79, 70, 229, .6);
}
html.mj-cam .btn-primary:hover, html.mj-cam .btn-success:hover {
    background-image: linear-gradient(180deg, #7472f5 0%, #4f46e5 50%, #3730a3 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 22px -8px rgba(79, 70, 229, .7);
}
html.mj-cam .btn-secondary, html.mj-cam .btn-light, html.mj-cam .btn-info, html.mj-cam .btn-warning,
html.mj-cam .btn-outline-secondary, html.mj-cam .btn-outline-primary {
    --mj-btn-bg: rgba(255, 255, 255, .6);
    --mj-btn-hover-bg: rgba(255, 255, 255, .9);
    --mj-btn-border: rgba(148, 163, 184, .38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(15, 23, 42, .05);
}
html.mj-cam .row-actions .btn { background: transparent; backdrop-filter: none; box-shadow: none; }
html.mj-cam .row-actions .btn:hover { background: rgba(255, 255, 255, .8); }

/* Rozetler: hafif cam */
html.mj-cam .badge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }

/* Katmanlar: modal, açılır menü, select2 listesi */
html.mj-cam .modal-content, html.mj-cam .dropdown-menu, html.mj-cam .select2-container .select2-dropdown {
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--cam-kenar);
    box-shadow: var(--cam-isik), 0 24px 60px -16px rgba(30, 27, 75, .35);
}
html.mj-cam .modal-header, html.mj-cam .modal-footer { background: transparent !important; border-color: var(--cam-cizgi); }
html.mj-cam .modal-backdrop { background-color: rgba(30, 27, 75, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html.mj-cam .alert { background-color: rgba(255, 255, 255, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
html.mj-cam .inv-bar { background: rgba(255, 255, 255, .55); backdrop-filter: var(--cam-bulanik); -webkit-backdrop-filter: var(--cam-bulanik); border-top-color: var(--cam-kenar); }
html.mj-cam .page-link { background: rgba(255, 255, 255, .6); border-color: var(--cam-kenar); }
html.mj-cam .page-item.active .page-link { background-image: linear-gradient(180deg, #6d6bf3, #4f46e5); border-color: #4338ca; }
html.mj-cam .mj-auth { background: transparent; }
html.mj-cam .mj-auth-marka { background: rgba(255, 255, 255, .35); backdrop-filter: var(--cam-bulanik); border-right-color: var(--cam-kenar); }

/* Bulanıklığı desteklemeyen ya da hareket azaltmak isteyenlerde yüzeyler opak */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html.mj-cam .card, html.mj-cam .mj-sidebar, html.mj-cam .mj-topbar, html.mj-cam .modal-content, html.mj-cam .dropdown-menu { background: rgba(255, 255, 255, .94); }
}
@media (prefers-reduced-transparency: reduce) {
    html.mj-cam .card, html.mj-cam .mj-sidebar, html.mj-cam .mj-topbar, html.mj-cam .modal-content, html.mj-cam .dropdown-menu { background: #fff; backdrop-filter: none; }
}
