/* ============================================================
 * Öğrenci İstatistikleri — Premium Modern Dashboard
 * Mor (#6366f1) tema, glassmorphism, mikro animasyonlar
 * ============================================================ */

.ist-wrap { padding-bottom: 32px; }

/* Ortak keyframe'ler */
@keyframes ist-bg-pan {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes ist-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Genel kart hover lift */
.ist-card {
    transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow .25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: ist-fade-in .4s ease-out;
}
.ist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08),
                0 4px 12px -4px rgba(15, 23, 42, 0.04);
}

/* ── Üst Filtre Çubuğu — Glassmorphism ────────────────────── */
.ist-filtreler {
    position: relative;
    border: 1px solid rgba(199, 210, 254, 0.6);
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #fdfdff 100%);
    box-shadow: 0 4px 20px -4px rgba(99, 102, 241, 0.08),
                0 1px 3px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}
.ist-filtreler::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
}
.ist-filtre-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 8px;
}
.ist-filtre-label i {
    color: #6366f1;
    font-size: 13px;
    background: #eef2ff;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.ist-filtreler .form-select {
    border-radius: 10px;
    border-color: #e5e7eb;
    background-color: #f8fafc;
    padding: 8px 10px;
}
.ist-filtreler .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 .15rem rgba(99, 102, 241, .15);
    background: #fff;
}

/* ── Select2 Override (tag/chip görünümü) ──────────────── */
.ist-filtreler .select2-container--default .select2-selection--multiple,
.ist-filtreler .select2-container--default .select2-selection--single {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    min-height: 40px;
    padding: 2px 6px;
}
.ist-filtreler .select2-container--default.select2-container--focus .select2-selection--multiple,
.ist-filtreler .select2-container--default.select2-container--focus .select2-selection--single,
.ist-filtreler .select2-container--default.select2-container--open .select2-selection--multiple {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 .15rem rgba(99, 102, 241, .12);
}
.ist-filtreler .select2-selection__choice {
    background: linear-gradient(135deg, #eef2ff, #f5f3ff) !important;
    border: 1px solid #c7d2fe !important;
    color: #4338ca !important;
    border-radius: 8px !important;
    padding: 3px 10px 3px 8px !important;
    margin: 4px 4px 4px 0 !important;
    font-size: 12.5px !important;
    font-weight: 500;
}
.ist-filtreler .select2-selection__choice__remove {
    color: #6366f1 !important;
    margin-right: 4px !important;
    border: none !important;
    background: transparent !important;
}
.ist-filtreler .select2-selection__choice__remove:hover {
    background: transparent !important;
    color: #ef4444 !important;
}
.ist-filtreler .select2-selection__rendered { padding: 0 !important; }
.ist-filtreler .select2-search--inline .select2-search__field {
    margin-top: 6px !important;
    font-size: 13px;
}
.ist-filtreler .select2-selection__placeholder {
    color: #94a3b8 !important;
    font-size: 13px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #6366f1 !important;
}
.select2-dropdown {
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}
.select2-search--dropdown .select2-search__field {
    border-radius: 8px !important;
    border-color: #e5e7eb !important;
}

/* ── Sidebar (sayfa menüsü) — Soft mavi minimal ──────────── */
.ist-sidebar-card {
    border: none;
    border-radius: 22px;
    overflow: hidden;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.6);
}
.ist-sidebar-baslik {
    position: relative;
    padding: 22px 22px 14px;
    font-size: 11px;
    font-weight: 800;
    color: #0c4a6e;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.ist-sidebar-baslik i {
    width: 26px;
    height: 26px;
    background: #fff;
    color: #3b82f6;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, .15);
}
.ist-sidebar-menu {
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding: 8px;
}
.ist-sidebar-menu::-webkit-scrollbar { width: 5px; }
.ist-sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.ist-sidebar-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c7d2fe, #a5b4fc);
    border-radius: 8px;
}
.ist-sidebar-menu::-webkit-scrollbar-thumb:hover { background: #8b5cf6; }

.ist-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #475569;
    font-size: 12.5px;
    text-decoration: none;
    margin: 6px 0;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid transparent;
}
.ist-menu-item i {
    font-size: 15px;
    color: #3b82f6;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .08);
}
.ist-menu-item span {
    flex: 1;
    line-height: 1.3;
    font-weight: 500;
}
.ist-menu-item:hover:not(.disabled) {
    background: #fff;
    color: #0c4a6e;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, .08);
}
.ist-menu-item.active {
    background: #fff;
    color: #1e3a8a;
    font-weight: 700;
    border-color: #1e3a8a;
    box-shadow: 0 6px 18px rgba(30, 58, 138, .12);
}
.ist-menu-item.active i {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 58, 138, .35);
}
.ist-menu-item.disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: .65;
}
.ist-menu-rozet {
    font-size: 9.5px;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ── Hero Banner (Toplam değer) — Soft mavi ──────────── */
.ist-hero {
    position: relative;
    border-radius: 22px;
    padding: 28px 32px;
    margin-bottom: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 16px 36px -10px rgba(30, 58, 138, .35),
                0 4px 12px -4px rgba(0, 0, 0, .08);
    display: flex;
    align-items: center;
    gap: 26px;
}
.ist-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 88% 25%, rgba(255,255,255,.2) 0%, transparent 32%),
        radial-gradient(circle at 12% 78%, rgba(255,255,255,.12) 0%, transparent 38%);
    pointer-events: none;
}
.ist-hero::after {
    content: "";
    position: absolute;
    top: -30%;
    right: -8%;
    width: 360px;
    height: 360px;
    background-image: radial-gradient(circle, rgba(255,255,255,.08) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
    opacity: .55;
    pointer-events: none;
    transform: rotate(12deg);
}
.ist-hero-icon {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    animation: ist-icon-glow 4s ease-in-out infinite;
}
@keyframes ist-icon-glow {
    0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.15), 0 0 0 0 rgba(255,255,255,.3); }
    50%      { box-shadow: 0 10px 30px rgba(0,0,0,.15), 0 0 0 12px rgba(255,255,255,0); }
}
.ist-hero-text { flex: 1; position: relative; z-index: 1; }
.ist-hero-sub {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: .9;
    margin-bottom: 8px;
    font-weight: 700;
}
.ist-hero-deger {
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
    margin: 0 0 10px;
    letter-spacing: -2px;
    text-shadow: 0 4px 16px rgba(0,0,0,.15);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.ist-hero-alt {
    font-size: 14px;
    opacity: .94;
    font-weight: 500;
}
.ist-hero-yenile {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .3s;
}
.ist-hero-yenile:hover {
    background: rgba(255,255,255,.32);
    transform: rotate(120deg);
}

/* ── Card / Grafik / Tablo ─────────────────────────────── */
.ist-card {
    border: 1px solid rgba(238, 240, 244, 0.9);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .04),
                0 1px 3px rgba(15, 23, 42, .02);
    background: #fff;
    overflow: hidden;
}
.ist-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2a44;
    display: flex;
    align-items: center;
    letter-spacing: -0.2px;
}
.ist-card-title i {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    color: #1e3a8a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    margin-right: 10px;
}
.ist-card-sub {
    font-size: 12.5px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
}
.card-toolbar .btn-group .btn {
    border-radius: 8px !important;
    margin: 0 2px;
    font-size: 12px;
    font-weight: 600;
}
.card-toolbar .btn-group .btn.active {
    background: #6366f1;
    color: #fff;
}

/* ── Arama Kutusu ──────────────────────────────────────── */
.ist-arama-kutu {
    position: relative;
    width: 220px;
}
.ist-arama-kutu i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 13px;
}
.ist-arama-kutu input {
    padding-left: 30px !important;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
.ist-arama-kutu input:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 .15rem rgba(99, 102, 241, .12);
}

/* ── Tablo — Modern, hover'lı ────────────────────────── */
.ist-tablo {
    border-collapse: separate !important;
    border-spacing: 0;
}
.ist-tablo th,
.ist-tablo td {
    font-size: 13px;
    vertical-align: middle;
}
.ist-tablo thead th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e0e7ff !important;
    padding: 14px 12px;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}
.ist-tablo thead th:first-child { border-top-left-radius: 10px; }
.ist-tablo thead th:last-child { border-top-right-radius: 10px; }
.ist-tablo tbody td {
    padding: 12px 10px;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: none !important;
    transition: background .15s;
}
.ist-tablo tbody tr {
    transition: background .15s;
}
.ist-tablo tbody tr:hover td {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.02), rgba(139, 92, 246, 0.05));
}
.ist-tablo tbody tr:hover .ist-rozet-sayi {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .25);
}

.ist-rozet-sayi {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    color: #4338ca;
    padding: 5px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12.5px;
    font-family: 'JetBrains Mono', "SF Mono", Monaco, monospace;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: all .15s;
    font-variant-numeric: tabular-nums;
}
.ist-rozet-sayi:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, .25);
}

/* Seviye renkleri */
.ist-seviye-rozet {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.ist-seviye-onlisans { background: #dbeafe; color: #1d4ed8; }
.ist-seviye-lisans   { background: #f1f5f9; color: #1f2937; }
.ist-seviye-tezliyl  { background: #dcfce7; color: #15803d; }
.ist-seviye-tezsizyl { background: #fed7aa; color: #c2410c; }
.ist-seviye-doktora  { background: #ede9fe; color: #6d28d9; }
.ist-seviye-sanat    { background: #fee2e2; color: #b91c1c; }

/* ── Sayfalama ─────────────────────────────────────────── */
.ist-sayfalama {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 4px 6px;
    border-top: 1px solid #f1f5f9;
    margin-top: 10px;
}
.ist-sayfa-boyut {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #64748b;
}
.ist-sayfa-boyut select {
    width: 70px;
    border-radius: 8px;
}
.ist-sayfa-bilgi {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 500;
}
.ist-sayfa-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ist-sayfa-nav button {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s cubic-bezier(0.4, 0, 0.2, 1);
}
.ist-sayfa-nav button:hover:not(.disabled):not(.active) {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    transform: translateY(-1px);
}
.ist-sayfa-nav button.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
    transform: translateY(-1px);
}
.ist-sayfa-nav button.disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* ── Türkiye Haritası (Leaflet) ────────────────────────── */
.ist-harita {
    height: 540px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}
.ist-harita .leaflet-container {
    background: #f8fafc;
    font-family: inherit;
}
.ist-harita .leaflet-tooltip {
    background: rgba(31,41,55,.95);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    padding: 8px 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.ist-harita .leaflet-tooltip::before { display: none; }

.ist-harita-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 14px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
}
.ist-harita-legend-baslik {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-right: 12px;
}
.ist-legend-kutu {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 8px;
    font-size: 11.5px;
    color: #475569;
}
.ist-legend-renk {
    width: 22px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 992px) {
    .ist-sidebar-card { position: static; max-height: 400px; }
    .ist-hero-deger { font-size: 32px; }
    .ist-hero { flex-wrap: wrap; padding: 22px; }
    .ist-arama-kutu { width: 160px; }
}
@media (max-width: 576px) {
    .ist-hero-icon { width: 56px; height: 56px; font-size: 26px; }
    .ist-hero-deger { font-size: 28px; }
}
