/* =====================================================
   ÖğrenciSYS - Modern Eğitim Yönetim Sistemi Stili
   ===================================================== */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-nav: #1e1b4b;
    --surface: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--surface);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR ===== */
#mainNavbar {
    background: linear-gradient(135deg, var(--dark-nav) 0%, #312e81 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem 0;
}

.navbar-spacer { height: 70px; }
.main-content { padding: 1.5rem 0 3rem; flex: 1; }

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

.navbar-brand { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.3px; }
.navbar-brand:hover { opacity: 0.9; }

#mainNavbar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
    transition: var(--transition);
}
#mainNavbar .nav-link:hover,
#mainNavbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}

/* Bootstrap tab butonları için doğru renkler */
.nav-tabs .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 8px 8px 0 0;
    transition: var(--transition);
}
.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.nav-tabs .nav-link.active {
    color: var(--primary) !important;
    font-weight: 600;
    background: white;
    border-color: var(--border) var(--border) white;
}

/* ===== AVATAR ===== */
.avatar-sm {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: white;
    flex-shrink: 0;
}

/* ===== ROLE BADGE ===== */
.role-badge {
    font-size: 0.65rem; font-weight: 600;
    padding: 1px 6px; border-radius: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.role-badge.admin { background: #fef3c7; color: #92400e; }
.role-badge.ogretmen { background: #d1fae5; color: #065f46; }
.role-badge.ogrenci { background: #dbeafe; color: #1e40af; }

/* ===== DROPDOWN ===== */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    min-width: 180px;
}
.dropdown-item {
    border-radius: 6px;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
}
.dropdown-item:hover { background: var(--primary-light); color: var(--primary-dark); }

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-nav) 0%, #1e293b 50%, #312e81 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%; max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
}

.auth-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: white;
    margin: 0 auto 1.5rem;
}

.auth-card h2 { font-weight: 700; font-size: 1.5rem; color: var(--dark); }
.auth-card p.text-muted { font-size: 0.875rem; }

/* ===== CARDS ===== */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* ===== STAT CARDS ===== */
.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute; top: -20px; right: -20px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.stat-card::after {
    content: '';
    position: absolute; bottom: -30px; right: 20px;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.stat-card-blue { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
.stat-card-teal { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.stat-card-green { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.stat-card-orange { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }

.stat-number { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.8rem; opacity: 0.85; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-icon { font-size: 2rem; opacity: 0.3; position: absolute; bottom: 1rem; right: 1.25rem; }

/* ===== PAGE HEADER ===== */
.page-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--dark); margin: 0; }
.page-subtitle { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500; font-size: 0.875rem;
    border-radius: 8px; padding: 0.5rem 1rem;
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.4); }
.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.7rem; }

/* ===== FORMS ===== */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 0.55rem 0.85rem;
    transition: var(--transition);
    background: white;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.35rem; }
.form-card {
    background: white; border-radius: var(--radius);
    padding: 1.75rem; box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* ===== TABLE ===== */
.table-wrapper {
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    border: 1px solid var(--border);
}
.table {
    margin: 0;
}
.table thead th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}
.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge { font-size: 0.72rem; font-weight: 600; border-radius: 6px; padding: 3px 8px; }

/* ===== STUDENT CARD ===== */
.ogrenci-no {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* ===== SEARCH BOX ===== */
.search-wrapper { position: relative; }
.search-wrapper .bi-search {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem;
}
.search-wrapper input { padding-left: 36px; }

/* ===== DETAIL CARD ===== */
.detail-item {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.detail-item:last-child { border-bottom: none; }
.detail-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}
.detail-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.detail-value { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }

/* ===== DERS CHIP ===== */
.ders-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-light); color: var(--primary-dark);
    padding: 5px 12px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 500;
    margin: 3px; transition: var(--transition);
}
.ders-chip:hover { background: var(--primary); color: white; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3.5rem; opacity: 0.3; margin-bottom: 1rem; }
.empty-state h5 { font-weight: 600; color: var(--text-secondary); }

/* ===== DASHBOARD QUICK LIST ===== */
.quick-list-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}
.quick-list-item:last-child { border-bottom: none; }
.quick-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0;
}

/* ===== FOOTER ===== */
.footer {
    background: white; border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ===== ALERTS ===== */
.alert { border-radius: var(--radius-sm); border: none; font-size: 0.875rem; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger { background: #fef2f2; color: #991b1b; }
.alert-info { background: #eff6ff; color: #1e40af; }
.alert-warning { background: #fffbeb; color: #92400e; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stat-number { font-size: 2rem; }
    .auth-card { padding: 1.75rem; }
    .main-content { padding: 1rem 0 2rem; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.35s ease forwards; }

.card, .stat-card, .table-wrapper, .form-card {
    animation: fadeInUp 0.35s ease forwards;
}