/*
 * Necmettin Erbakan Üniversitesi kurumsal tema katmanı
 * -----------------------------------------------------------------------------
 * Metronic 8'in style.bundle.css dosyasından SONRA yüklenir ve Bootstrap'ın
 * renk değişkenlerini kurumsal palete çeker. Metronic paketine hiç dokunulmaz;
 * tema güncellendiğinde bu dosya olduğu gibi kalır.
 *
 * Palet kaynağı: erbakan.edu.tr kurumsal sitesi ve logo SVG dosyaları.
 *   #11457c  lacivert   (site arayüzünde baskın renk)
 *   #003d78  logo laciverti
 *   #00a1c8  turkuaz    (logo ve vurgu rengi)
 *   #0b2d52  koyu lacivert (gradyan ve koyu yüzeyler)
 */

:root,
[data-bs-theme="light"] {
    --neu-lacivert: #11457c;
    --neu-lacivert-koyu: #0b2d52;
    --neu-lacivert-logo: #003d78;
    --neu-turkuaz: #00a1c8;
    --neu-turkuaz-koyu: #0085a6;
    --neu-gri: #5e5e5e;
    --neu-kenarlik: #e6e6e6;

    /* Bootstrap / Metronic birincil renk ailesi */
    --bs-primary: #11457c;
    --bs-primary-rgb: 17, 69, 124;
    --bs-primary-active: #0b2d52;
    --bs-primary-light: #e7eef6;
    --bs-primary-inverse: #ffffff;

    --bs-info: #00a1c8;
    --bs-info-rgb: 0, 161, 200;
    --bs-info-active: #0085a6;
    --bs-info-light: #e3f5fa;
    --bs-info-inverse: #ffffff;

    --bs-link-color: #11457c;
    --bs-link-hover-color: #0b2d52;

    --bs-text-primary: #11457c;
    --bs-component-active-bg: #11457c;
}

[data-bs-theme="dark"] {
    --bs-primary: #2f6fb5;
    --bs-primary-rgb: 47, 111, 181;
    --bs-primary-active: #11457c;
    --bs-primary-light: #16293f;
    --bs-primary-inverse: #ffffff;

    --bs-info: #00a1c8;
    --bs-info-rgb: 0, 161, 200;
    --bs-info-active: #0085a6;
    --bs-info-light: #0f2b33;

    --bs-link-color: #6fa8e0;
    --bs-link-hover-color: #9cc5ec;
}

/* Metronic yardımcı sınıfları doğrudan hex yazdığı için birkaçı ezilir. */
.btn.btn-primary {
    background-color: var(--neu-lacivert);
    border-color: var(--neu-lacivert);
    color: #fff;
}

.btn.btn-primary:hover:not(.btn-active),
.btn.btn-primary:focus:not(.btn-active),
.btn.btn-primary:active:not(.btn-active),
.btn.btn-primary.active {
    background-color: var(--neu-lacivert-koyu);
    border-color: var(--neu-lacivert-koyu);
    color: #fff;
}

.text-primary {
    color: var(--neu-lacivert) !important;
}

.bg-primary {
    background-color: var(--neu-lacivert) !important;
}

.bg-light-primary {
    background-color: #e7eef6 !important;
}

.link-primary {
    color: var(--neu-lacivert);
}

.link-primary:hover {
    color: var(--neu-turkuaz);
}

.form-control:focus {
    border-color: #7fa3c7;
    box-shadow: 0 0 0 0.2rem rgba(17, 69, 124, 0.15);
}

/* -----------------------------------------------------------------------------
 * Marka paneli (ekranın sağ yarısı)
 * -------------------------------------------------------------------------- */

.neu-brand-panel {
    background: linear-gradient(160deg, #11457c 0%, #0b2d52 55%, #061f3a 100%);
    position: relative;
    overflow: hidden;
}

/* Turkuaz ışık hüzmesi */
.neu-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -20% -35% -20%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(0, 161, 200, 0.35) 0%, rgba(0, 161, 200, 0) 70%);
    pointer-events: none;
}

.neu-brand-panel > * {
    position: relative;
    z-index: 1;
}

.neu-brand-emblem {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.neu-brand-title {
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.neu-brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

.neu-brand-rule {
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: var(--neu-turkuaz);
}

/* -----------------------------------------------------------------------------
 * Adım göstergesi
 *
 * Metronic'in hazır stepper'ı yatayda dar alanda baloncukları birbirine
 * yaklaştırıyor ve etiketler üst üste biniyordu. Burada her adım eşit genişlikte
 * bir sütun; bağlantı çizgisi baloncukların ARKASINDAN geçer, böylece iç içe
 * görünmez.
 * -------------------------------------------------------------------------- */

.neu-steps {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin: 0 0 2.25rem;
    padding: 0;
    list-style: none;
    counter-reset: neu-step;
}

.neu-steps__item {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Bağlantı çizgisi: baloncuğun dikey ortasında, sola doğru. */
.neu-steps__item::before {
    content: "";
    position: absolute;
    top: 17px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--neu-kenarlik);
    z-index: 0;
}

.neu-steps__item:first-child::before {
    display: none;
}

.neu-steps__item--done::before,
.neu-steps__item--current::before {
    background: var(--neu-turkuaz);
}

.neu-steps__bullet {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--neu-kenarlik);
    background: #fff;
    color: #9aa4b1;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    transition: all 0.2s ease;
}

.neu-steps__item--done .neu-steps__bullet {
    background: var(--neu-turkuaz);
    border-color: var(--neu-turkuaz);
    color: #fff;
}

.neu-steps__item--current .neu-steps__bullet {
    background: var(--neu-lacivert);
    border-color: var(--neu-lacivert);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(17, 69, 124, 0.14);
}

.neu-steps__label {
    margin-top: 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    color: #9aa4b1;
    padding: 0 0.25rem;
    overflow-wrap: anywhere;
}

.neu-steps__item--done .neu-steps__label {
    color: var(--neu-gri);
}

.neu-steps__item--current .neu-steps__label {
    color: var(--neu-lacivert);
    font-weight: 600;
}

/* Dar ekranda etiketler gizlenir, baloncuklar küçülür; iç içe geçme olmaz. */
@media (max-width: 575.98px) {
    .neu-steps__bullet {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .neu-steps__item::before {
        top: 13px;
    }

    .neu-steps__label {
        display: none;
    }

    .neu-steps__item--current .neu-steps__label {
        display: block;
        font-size: 0.6875rem;
    }
}

[data-bs-theme="dark"] .neu-steps__bullet {
    background: #1e1e2d;
    border-color: #2b2b40;
    color: #6d6d80;
}

[data-bs-theme="dark"] .neu-steps__item::before {
    background: #2b2b40;
}

/* -----------------------------------------------------------------------------
 * Küçük düzeltmeler
 * -------------------------------------------------------------------------- */

.neu-code-input {
    letter-spacing: 0.5rem;
    text-indent: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.neu-divider {
    height: 1px;
    background: var(--neu-kenarlik);
    margin: 1.5rem 0;
}


/* -----------------------------------------------------------------------------
 * Yönetim paneli (2. faz)
 *
 * Metronic'in kendi "app-default" düzen motoru yerine sade bir ızgara
 * kullanılıyor: panelde yalnızca birkaç ekran var ve düzenin JavaScript'e
 * bağlı olmaması, Livewire gezinmesinde (wire:navigate) kenar çubuğunun
 * yeniden kurulma sorunlarını tamamen ortadan kaldırıyor.
 * -------------------------------------------------------------------------- */

/* Metronic `html, body { height: 100% }` + `body { display: flex }` tanimliyor.
 * Bu yuzden body KESIN 100vh yuksekliginde bir flex konteyner oluyor ve
 * `.neu-panel` varsayilan `flex-shrink: 1` ile tam 100vh'ye sikisiyor: icerik
 * tasiyor ama kapsayici buyumuyor. `position: sticky` bir ogenin kapsayicisi
 * kadar hareket edebildigi icin kenar cubugu ve ust baslik hic sabitlenmiyordu.
 * Cozum: panel sayfalarinda body'yi icerikle buyur ve paneli hic kucultme. */
body.neu-panel-body {
    height: auto;
    min-height: 100%;
}

.neu-panel {
    display: flex;
    min-height: 100vh;
    flex: 1 0 auto;
    background: #f5f7fa;
}

[data-bs-theme="dark"] .neu-panel {
    background: #151521;
}

.neu-panel__sidebar {
    width: 265px;
    flex: 0 0 265px;
    align-self: flex-start;
    background: linear-gradient(180deg, var(--neu-lacivert) 0%, var(--neu-lacivert-koyu) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.neu-panel__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.neu-panel__emblem {
    height: 38px;
}

.neu-panel__brand-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
}

.neu-panel__brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

.neu-panel__nav {
    padding: 1rem 0.75rem;
    flex: 1 1 auto;
    overflow-y: auto;
}

.neu-panel__link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 0.475rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.neu-panel__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.neu-panel__link--active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
}

.neu-panel__sidebar-footer {
    padding: 1rem 1.5rem;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.neu-panel__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.neu-panel__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    position: sticky;
    top: 0;
    z-index: 5;
}

.neu-panel__avatar {
    width: 38px;
    height: 38px;
    border-radius: 0.475rem;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
}

.neu-panel__content {
    padding: 1.5rem;
    flex: 1 1 auto;
}

@media (max-width: 991.98px) {
    .neu-panel__sidebar {
        position: fixed;
        left: -265px;
        z-index: 100;
        transition: left 0.2s ease;
    }

    .neu-panel__sidebar--open {
        left: 0;
    }

    .neu-panel__content {
        padding: 1rem;
    }
}

/* -----------------------------------------------------------------------------
 * Günlük dağılım grafiği
 *
 * Tek bir ölçü (gündeki işlem sayısı) ve bir durum kırılımı (başarılı /
 * başarısız) var; bu yüzden yığılmış sütun kullanılıyor. İkinci bir y ekseni
 * YOK: iki ayrı ölçek tek grafikte karşılaştırılamaz.
 *
 * Renkler seri rengi değil DURUM rengidir (Bootstrap success / danger) ve her
 * zaman gösterge + etiketle birlikte gelir; grafiğin altındaki tablo aynı
 * veriyi renkten bağımsız okunabilir kılar.
 * -------------------------------------------------------------------------- */

.neu-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 160px;
    padding-top: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.neu-chart__col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.neu-chart__stack {
    width: 100%;
    max-width: 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px; /* yüzey boşluğu: iki dilim birbirine yapışmaz */
    height: 100%;
}

.neu-chart__seg {
    width: 100%;
    min-height: 2px;
}

.neu-chart__seg--fail {
    background: var(--bs-danger);
    border-radius: 4px 4px 0 0; /* veri ucu yuvarlatılır */
}

.neu-chart__seg--ok {
    background: var(--bs-success);
}

/* Başarısız dilim yoksa yuvarlatma üst dilime geçer. */
.neu-chart__seg--ok:first-child {
    border-radius: 4px 4px 0 0;
}

.neu-chart__empty {
    width: 100%;
    max-width: 34px;
    height: 2px;
    background: var(--bs-border-color);
}

.neu-chart__label {
    font-size: 0.625rem;
    color: var(--bs-text-muted);
    margin-top: 0.375rem;
    white-space: nowrap;
}

.neu-legend {
    display: flex;
    gap: 1.25rem;
    font-size: 0.75rem;
    color: var(--bs-text-muted);
}

.neu-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 0.375rem;
}

/* Uzun DN ve hata metinleri tabloyu taşırmasın. */
.neu-trunc {
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.neu-mono {
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
}

.neu-log {
    background: #1e1e2d;
    color: #c7c7d4;
    border-radius: 0.475rem;
    padding: 1rem;
    max-height: 70vh;
    overflow: auto;
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78125rem;
    line-height: 1.6;
}

.neu-log__trace {
    color: #8c8ca1;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0.25rem 0 0.75rem 0;
}


/* -----------------------------------------------------------------------------
   DataTables kontrolleri  (DataTables 2.x + Metronic entegrasyonu)
   -----------------------------------------------------------------------------
   GERCEK ISARETLEME (tarayicidan alindi):

       <div>                                        <-- SINIFI YOK
         <input type="search" id="dt-search-0" ...>
         <label for="dt-search-0"></label>          <-- BOS, input'tan SONRA
       </div>

   Iki sey bundan cikiyor:

   1) Sarmalin sinifi olmadigi icin `.dt-search` ya da `.dataTables_filter`
      hedefleyen hicbir kural ESLESMEZ. Sinif adina dayanan denemeler bu
      yuzden sessizce etkisiz kaldi -- hata vermeden, hicbir sey yapmadan.

   2) Bos <label> input'tan SONRA geliyor ve satir ici bir oge olarak satir
      kutusuna katiliyor. Kendi yazi tipi/satir yuksekligi kadar bir "strut"
      uretip kutuyu ASAGI uzatiyor; sarmal boylece input'tan daha yuksek
      oluyor ve `align-items: center` altinda input YUKARI itiliyordu.
      Aranan 5-10px tam olarak bu.

   Bu yuzden kurallar SINIFA DEGIL, ogenin kendisine baglandi: arama girdisi
   type ile, uzunluk secimi DataTables'in uretmeyi garanti ettigi id oneki
   (dt-search-N / dt-length-N) ile bulunuyor. Paket sarmal sinifini yine
   degistirse bile bu secicilerin tutmasi devam eder.
   -------------------------------------------------------------------------- */

/* Arac cubugunun DOGRUDAN cocuklari: hepsi tek satirda, dikeyde ortali. */
.dt-container .neu-dt-tools > div,
.dt-container .neu-dt-length > div {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    float: none;
    white-space: nowrap;
    line-height: 1;
}

/*
   SORUNUN KAYNAGI. Bos etiket kutuyu asagi uzatip girdiyi yukari itiyordu.
   Gorsel bir isi de yok: metin `language.search` ile bilerek bos birakildi,
   yerine placeholder kullaniliyor.

   Erisilebilirlik kaybi yok: etiket BOS oldugu icin ekran okuyucuya zaten
   bir sey soylemiyordu; girdinin adini asagidaki aria-label veriyor.
*/
.dt-container label:empty {
    display: none !important;
}

.dt-container input[type="search"],
.dt-container select[id^="dt-length"] {
    margin: 0 !important;
    align-self: center !important;
}

/* Metronic'in w-250px sinifi paketin `width: auto` kuraliyla eziliyordu. */
.dt-container .neu-dt-tools input[type="search"] {
    min-width: 14rem;
    max-width: 100%;
}

.dt-container select[id^="dt-length"] {
    width: auto;
    min-width: 5rem;
}

/* Uzunluk kontrolunun etiketi ("Sayfada ... kayit") tek satirda kalsin. */
.dt-container .neu-dt-length label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #7e8299;
    line-height: 1;
}

/* Butonlar: paketin `margin-bottom: 0.5em` kurali satiri bozuyor. */
.dt-container .neu-dt-tools .dt-buttons,
.dt-container .neu-dt-tools .dt-buttons.btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 !important;
    padding: 0;
    float: none;
}

.dt-container .neu-dt-tools .dt-buttons .btn,
.dt-container .neu-dt-tools .dt-button {
    margin: 0 !important;
    float: none;
}

/*
   Arac cubugundaki HER ogenin dikey margin'i sifir. `align-items: center`
   olan bir flex kapsayicida cocuklar ancak dikey margin yuzunden kayabilir;
   margin kutusu ortalanir, gorunen govde margin kadar kayar. Kaynagi
   paketler arasinda yer degistirdigi icin kaynak aranmiyor, sonuc
   sabitleniyor. Yatay bosluk `gap` ile verildiginden dikey margin'in isi yok.
*/
.dt-container .neu-dt-tools *,
.dt-container .neu-dt-length * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.dt-container .neu-dt-tools,
.dt-container .neu-dt-length {
    align-items: center;
}

.dt-container .neu-dt-tools > *,
.dt-container .neu-dt-length > * {
    align-self: center !important;
}

/* Satir sarmasi gerektiginde dikey bosluk da olsun. */
.neu-dt-tools {
    row-gap: 0.5rem;
}

@media (max-width: 575.98px) {
    .neu-dt-tools {
        justify-content: flex-start;
    }

    .dt-container .neu-dt-tools > div {
        width: 100%;
    }

    .dt-container .neu-dt-tools input[type="search"] {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* -----------------------------------------------------------------------------
   Satir islem butonlari (bkz. App\Panel\Support\RowActions)
   -----------------------------------------------------------------------------
   Butonlar `me-1` ile yan yana duruyordu; grup olmadigi icin kenarlar
   birlesmiyor ve dar ekranda alt alta kayiyorlardi.
   -------------------------------------------------------------------------- */

.neu-row-actions {
    white-space: nowrap;
}

.neu-row-actions .btn {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

/* Pasif buton "yapilamaz" demek; imlec de bunu soylemeli. */
.neu-row-actions .btn:disabled {
    cursor: not-allowed;
    pointer-events: auto;
}
