/* =====================================================
   BursOkul – Ana Stil Dosyası
   ===================================================== */

:root {
    --primary: #1a3a5c;
    --primary-light: #2756a0;
    --accent: #f0a500;
    --success: #198754;
    --danger: #dc3545;
    --bg-light: #f5f7fa;
    --card-radius: 16px;
    --shadow: 0 2px 16px rgba(26,58,92,0.10);
    --shadow-hover: 0 6px 28px rgba(26,58,92,0.18);
    --font-main: 'Nunito', sans-serif;
}

/* ── Base ─────────────────────────────────────────── */
body {
    font-family: var(--font-main);
    background: var(--bg-light);
    color: #2d3748;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
}

.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }

/* ── Navbar ───────────────────────────────────────── */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    box-shadow: 0 2px 12px rgba(26,58,92,0.25);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.navbar .nav-link {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.navbar .nav-link:hover {
    background: rgba(255,255,255,0.15);
}

/* ── Cards ────────────────────────────────────────── */
.card {
    border-radius: var(--card-radius) !important;
    border: none;
    box-shadow: var(--shadow);
    transition: box-shadow 0.25s, transform 0.25s;
}

.hover-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(26,58,92,0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 4px 14px rgba(26,58,92,0.35);
    transform: translateY(-1px);
}

.btn-success {
    box-shadow: 0 2px 8px rgba(25,135,84,0.25);
}

/* ── Forms ────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.5rem 0.9rem;
    font-family: var(--font-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(39,86,160,0.15);
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 1.5px solid #e2e8f0;
    border-right: none;
}

/* ── Badges ───────────────────────────────────────── */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
}

/* ── Alerts ───────────────────────────────────────── */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Tables ───────────────────────────────────────── */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: rgba(26,58,92,0.04);
}

.table td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* ── Admin Layout ─────────────────────────────────── */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary) 0%, #0f2540 100%);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(26,58,92,0.25);
    transition: transform 0.3s;
}

.admin-sidebar-brand {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-brand .brand-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.admin-sidebar-brand .brand-sub {
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
    margin: 0;
}

.admin-nav {
    padding: 1rem 0;
    flex: 1;
}

.admin-nav-label {
    color: rgba(255,255,255,0.4);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem 0.25rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.5rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--accent);
}

.admin-nav-link.active {
    background: rgba(255,255,255,0.12);
    color: white;
    border-left-color: var(--accent);
}

.admin-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.admin-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.admin-main {
    padding: 2rem;
    flex: 1;
    background: var(--bg-light);
}

.admin-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Stat Cards (Dashboard) ───────────────────────── */
.stat-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green  { background: #d1fae5; color: #065f46; }
.stat-icon.orange { background: #fef3c7; color: #92400e; }
.stat-icon.purple { background: #ede9fe; color: #5b21b6; }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
}

.stat-label {
    font-size: 0.82rem;
    color: #718096;
    font-weight: 600;
}

/* ── Pagination ───────────────────────────────────── */
.page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    font-weight: 600;
    color: var(--primary);
    border-color: #e2e8f0;
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── Modal ────────────────────────────────────────── */
.modal-content {
    border-radius: var(--card-radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
}

/* ── Sonuç Badges ─────────────────────────────────── */
.badge-kazandi {
    background: #d1fae5;
    color: #065f46;
    padding: 0.4em 0.9em;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-kazanamadi {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.4em 0.9em;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-260px);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
    }
    .admin-main {
        padding: 1rem;
    }
}

/* ── Print ────────────────────────────────────────── */
@media print {
    .admin-sidebar, .admin-topbar, .no-print, .btn, nav, footer {
        display: none !important;
    }
    .admin-content {
        margin-left: 0 !important;
    }
    .admin-main {
        padding: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    body {
        background: white !important;
    }
}

/* ── Öğrenci Paneli Animasyon ─────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease both;
}

.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.10s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.20s; }
.fade-in-up:nth-child(5) { animation-delay: 0.25s; }
.fade-in-up:nth-child(6) { animation-delay: 0.30s; }

/* ── Hero Section ─────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #3a7bd5 100%);
    color: white;
    border-radius: 20px;
    padding: 3.5rem 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.hero-section::before {
    content: '';
    position: absolute;
    right: 80px;
    bottom: -80px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

/* ── Sınav Kart Renk Şeridi ───────────────────────── */
.sinav-card-open   { border-top: 4px solid #2563eb; }
.sinav-card-closed { border-top: 4px solid #9ca3af; }
.sinav-card-result { border-top: 4px solid #16a34a; }
.sinav-card-soon   { border-top: 4px solid #d97706; }

/* ── Admin Toggle Button ──────────────────────────── */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
}

@media (max-width: 991px) {
    .sidebar-toggle { display: block; }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

.sidebar-overlay.show { display: block; }
