/* ============================================================
   DershanePro 2.0 — Tasarım Sistemi
   Bootstrap 5.3 üzerine kurulu tema katmanı.
   ============================================================ */

:root {
  /* Marka */
  --primary:         #2f4fd8;
  --primary-dark:    #2340b8;
  --primary-light:   #eef2ff;
  --primary-rgb:     47, 79, 216;
  --accent:          #e8a317;   /* akademik altın */
  --accent-light:    #fdf5e1;
  --navy:            #0e1a3a;
  --navy-2:          #15244d;

  /* Durum renkleri */
  --success:         #12a150;
  --success-light:   #e7f7ee;
  --warning:         #d98a00;
  --warning-light:   #fff6e0;
  --danger:          #dc3545;
  --danger-light:    #fdecee;
  --info:            #0b8fc7;
  --info-light:      #e5f5fc;
  --purple:          #7c3aed;
  --purple-light:    #f2ebff;

  /* Nötr */
  --ink:             #0f172a;
  --ink-2:           #334155;
  --muted:           #64748b;
  --muted-2:         #94a3b8;
  --line:            #e5e9f2;
  --line-2:          #eef1f7;
  --surface:         #ffffff;
  --bg:              #f4f6fb;

  /* Yerleşim */
  --sidebar-width:   268px;
  --topbar-height:   64px;
  --radius:          14px;
  --radius-sm:       10px;
  --shadow-sm:       0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow:          0 1px 2px rgba(15,23,42,.04), 0 6px 20px -6px rgba(15,23,42,.10);
  --shadow-lg:       0 20px 50px -12px rgba(15,23,42,.25);

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Bootstrap değişkenleri */
  --bs-primary: var(--primary);
  --bs-primary-rgb: var(--primary-rgb);
  --bs-body-font-family: var(--font-main);
  --bs-body-color: var(--ink-2);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
  --bs-link-color: var(--primary);
  --bs-link-color-rgb: var(--primary-rgb);
  --bs-link-hover-color: var(--primary-dark);
  --bs-border-radius: var(--radius-sm);
  --bs-border-radius-lg: var(--radius);
  --bs-success-rgb: 18, 161, 80;
  --bs-danger-rgb: 220, 53, 69;
  --bs-warning-rgb: 217, 138, 0;
  --bs-info-rgb: 11, 143, 199;
}

/* ============================================================
   TEMEL
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  font-size: .925rem;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink-2);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.text-primary { color: var(--primary) !important; }
.bg-primary   { background-color: var(--primary) !important; }
.text-muted   { color: var(--muted) !important; }
.text-dark    { color: var(--ink) !important; }
.bg-light     { background-color: #f6f8fc !important; }
.fw-800       { font-weight: 800 !important; }
.text-purple  { color: var(--purple) !important; }
.bg-purple    { background-color: var(--purple) !important; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.fs-7 { font-size: .8rem !important; }
.x-small { font-size: .72rem !important; }
.italic { font-style: italic; }

::selection { background: rgba(var(--primary-rgb), .18); }

:focus-visible { outline: 2px solid rgba(var(--primary-rgb), .55); outline-offset: 2px; }

/* ============================================================
   UYGULAMA YERLEŞİMİ
   ============================================================ */
.app-shell { min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(232,163,23,.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #c7d0e8;
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  border-right: 1px solid rgba(255,255,255,.04);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem 1rem;
}

.brand-link { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brand-link:hover { color: #fff; }

.brand-logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #f4c55a 100%);
  color: var(--navy);
  font-size: 1.25rem;
  box-shadow: 0 6px 16px -4px rgba(232,163,23,.55);
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: #fff; }
.brand-sub  { font-size: .7rem; color: #8d9bc2; font-weight: 500; margin-top: 2px; }

.sidebar-close-btn {
  display: none;
  background: rgba(255,255,255,.06);
  border: 0;
  color: #c7d0e8;
  width: 34px; height: 34px;
  border-radius: 10px;
}

.sidebar-user {
  margin: .25rem 1rem .75rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .7rem;
}

.sidebar-user .avatar { width: 36px; height: 36px; font-size: .8rem; }
.sidebar-user-name { color: #fff; font-weight: 600; font-size: .85rem; line-height: 1.2; }
.sidebar-user-role { font-size: .72rem; color: #8d9bc2; display: flex; align-items: center; gap: .3rem; }
.sidebar-user-role .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .25rem .75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

.sidebar-section-label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6f7ea8;
  padding: 1rem .75rem .4rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .58rem .75rem;
  margin-bottom: 2px;
  border-radius: 10px;
  color: #c7d0e8;
  font-size: .875rem;
  font-weight: 500;
  position: relative;
  transition: background .15s, color .15s;
}

.sidebar-item:hover { background: rgba(255,255,255,.06); color: #fff; }

.sidebar-item.active {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), .55) 0%, rgba(var(--primary-rgb), .22) 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -.75rem; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.sidebar-icon { font-size: 1.05rem; width: 20px; text-align: center; opacity: .9; }
.sidebar-item.active .sidebar-icon { color: #ffd479; opacity: 1; }
.sidebar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer {
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-footer .sidebar-item { color: #f2a7ae; }
.sidebar-footer .sidebar-item:hover { background: rgba(220,53,69,.12); color: #ffd0d4; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(10,16,35,.5);
  backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1.5rem;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  align-items: center; justify-content: center;
}

.topbar-title { min-width: 0; }
.topbar-title .title { font-weight: 700; color: var(--ink); font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .crumb { font-size: .75rem; color: var(--muted); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.topbar-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background .15s, border-color .15s;
}
.topbar-btn:hover { background: var(--primary-light); border-color: #d9e0ff; color: var(--primary); }

.topbar-btn .count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--danger); color: #fff;
  font-size: .65rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

.topbar-user {
  display: flex; align-items: center; gap: .6rem;
  padding: .3rem .5rem .3rem .3rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.topbar-user:hover { border-color: #d9e0ff; color: var(--ink); }
.topbar-user .meta { line-height: 1.15; text-align: left; }
.topbar-user .meta .n { font-weight: 600; font-size: .83rem; }
.topbar-user .meta .r { font-size: .7rem; color: var(--muted); }

.notif-menu { width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.notif-menu .notif-head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.notif-menu .notif-body { max-height: 360px; overflow-y: auto; }
.notif-menu .notif-foot { padding: .6rem; border-top: 1px solid var(--line); background: #fafbfe; }
.notif-entry { display: flex; gap: .7rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line-2); }
.notif-entry:last-child { border-bottom: 0; }
.notif-entry .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); flex-shrink: 0; }
.notif-entry .t { font-weight: 600; font-size: .83rem; color: var(--ink); }
.notif-entry .m { font-size: .8rem; color: var(--muted); }
.notif-entry .d { font-size: .7rem; color: var(--muted-2); margin-top: 2px; }

/* ---------- İçerik ---------- */
.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.content-area { flex: 1; min-width: 0; }

.app-footer {
  padding: 1rem 1.5rem 1.5rem;
  font-size: .78rem;
  color: var(--muted-2);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}

.page-content { padding: 1.5rem; }
.page-content > .container-fluid,
.page-content > .container { padding-left: 0; padding-right: 0; }
.page-content .container-fluid .page-content { padding: 0; }

.page-header {
  padding: 1.5rem 1.5rem .25rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-content .page-header { padding: 0 0 1.25rem; }
.page-title { font-size: 1.45rem; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -.02em; }
.page-subtitle { font-size: .875rem; color: var(--muted); margin: .25rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.app-alert { margin: 1rem 1.5rem 0; }

/* ============================================================
   KARTLAR
   ============================================================ */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.card.border-0 { border: 1px solid var(--line) !important; }
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card.shadow, .card.shadow-lg { box-shadow: var(--shadow) !important; }

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
.card-header:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.card-header.bg-white, .card-header.bg-light { background: transparent !important; }
.card-body { padding: 1.25rem; }
.card-footer { background: #fafbfe; border-top: 1px solid var(--line); }
.card-title { color: var(--ink); font-weight: 700; }

.rounded-4 { border-radius: var(--radius) !important; }

/* İstatistik kartı */
.stat-card {
  position: relative;
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
  height: 100%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::after {
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: currentColor; opacity: .05;
  pointer-events: none;
}
.stat-card.primary { color: var(--primary); }
.stat-card.success { color: var(--success); }
.stat-card.warning { color: var(--warning); }
.stat-card.danger  { color: var(--danger); }
.stat-card.info    { color: var(--info); }
.stat-card.purple  { color: var(--purple); }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: .85rem;
  background: var(--primary-light); color: var(--primary);
}
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.danger  { background: var(--danger-light);  color: var(--danger); }
.stat-icon.info    { background: var(--info-light);    color: var(--info); }
.stat-icon.purple  { background: var(--purple-light);  color: var(--purple); }

.stat-value { font-size: clamp(1.15rem, 1.9vw, 1.65rem); font-weight: 800; line-height: 1.15; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-change { font-size: .75rem; font-weight: 600; margin-top: .4rem; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* İkon kutusu (genel) */
.icon-box {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Hızlı erişim kartları */
.quick-link {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  color: var(--ink);
}
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d9e0ff !important; color: var(--primary); }

/* ============================================================
   TABLOLAR
   ============================================================ */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }

.table { --bs-table-bg: transparent; --bs-table-hover-bg: #f7f9fe; margin-bottom: 0; color: var(--ink-2); }
.table > :not(caption) > * > * { padding: .8rem 1rem; border-bottom-color: var(--line-2); }
.table thead th {
  background: #f8fafd;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line) !important;
  white-space: nowrap;
}
.table thead.table-light th, .table thead.table-dark th { background: #f8fafd; color: var(--muted); }
.table td { vertical-align: middle; font-size: .875rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #f7f9fe; }

.table-responsive { border-radius: inherit; -webkit-overflow-scrolling: touch; }

/* DataTables */
.dataTables_wrapper { padding: .75rem 1rem; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: .4rem .75rem;
  font-size: .85rem;
  margin-left: .4rem;
}
.dataTables_wrapper .dataTables_info { font-size: .8rem; color: var(--muted); }
.dataTables_wrapper .pagination { margin-top: .5rem; }

/* ============================================================
   FORMLAR
   ============================================================ */
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #d9dfeb;
  font-size: .9rem;
  padding: .58rem .85rem;
  color: var(--ink);
  background-color: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #a3adc2; }
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12);
}
.form-control-lg, .form-select-lg { padding: .75rem 1rem; font-size: 1rem; }
.form-control-sm, .form-select-sm { padding: .35rem .65rem; font-size: .82rem; border-radius: 8px; }
.form-label { font-weight: 600; font-size: .82rem; color: var(--ink-2); margin-bottom: .35rem; }
.form-text { font-size: .76rem; color: var(--muted); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.input-group-text { background: #f6f8fc; border-color: #d9dfeb; color: var(--muted); border-radius: 10px; }

/* Bazı sayfalarda kullanılan özel input sınıfları */
.form-control-custom { border-radius: 10px !important; border: 1px solid #d9dfeb !important; background: #fff !important; }
.form-control-custom:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12) !important; }

/* ============================================================
   BUTONLAR
   ============================================================ */
.btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: .875rem;
  padding: .52rem 1.05rem;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
}
.btn.w-100, .btn.d-block { display: flex; }
.btn-lg { padding: .75rem 1.4rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: .32rem .7rem; font-size: .8rem; border-radius: 8px; }

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
  box-shadow: 0 4px 12px -4px rgba(var(--primary-rgb), .55);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: #cdd6ff;
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-bg: var(--primary-dark);
}
.btn-success { --bs-btn-bg: var(--success); --bs-btn-border-color: var(--success); --bs-btn-hover-bg: #0e8743; --bs-btn-hover-border-color: #0e8743; }
.btn-danger  { --bs-btn-bg: var(--danger);  --bs-btn-border-color: var(--danger); }
.btn-light   { --bs-btn-bg: #f2f5fb; --bs-btn-border-color: #e6eaf3; --bs-btn-hover-bg: #e8edf7; --bs-btn-hover-border-color: #dbe2ef; --bs-btn-color: var(--ink-2); }
.btn-accent  { background: var(--accent); color: var(--navy); border: 0; }
.btn-accent:hover { background: #d69410; color: var(--navy); }

.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn-icon.btn-sm { width: 30px; height: 30px; }

/* ============================================================
   ROZETLER & UYARILAR
   ============================================================ */
.badge { font-weight: 600; border-radius: 999px; padding: .38em .7em; font-size: .72rem; letter-spacing: .01em; }
.badge.bg-success   { background: var(--success-light) !important; color: #0b7a3c !important; }
.badge.bg-danger    { background: var(--danger-light) !important;  color: #b42332 !important; }
.badge.bg-warning   { background: var(--warning-light) !important; color: #9a6200 !important; }
.badge.bg-info      { background: var(--info-light) !important;    color: #076a95 !important; }
.badge.bg-primary   { background: var(--primary-light) !important; color: var(--primary) !important; }
.badge.bg-secondary { background: #eef1f6 !important; color: #55627a !important; }
.badge.bg-purple    { background: var(--purple-light) !important; color: var(--purple) !important; }
.badge.bg-dark      { background: var(--ink) !important; color: #fff !important; }

.alert { border-radius: 12px; border: 1px solid transparent; font-size: .875rem; }
.alert-success { background: var(--success-light); border-color: #c9eed8; color: #0b6b35; }
.alert-danger  { background: var(--danger-light);  border-color: #f8cdd2; color: #9b1c2a; }
.alert-warning { background: var(--warning-light); border-color: #f7e1a8; color: #845300; }
.alert-info    { background: var(--info-light);    border-color: #c4e7f6; color: #075d83; }
.alert-primary { background: var(--primary-light); border-color: #d6defe; color: var(--primary-dark); }

/* ============================================================
   MODAL / DROPDOWN / NAV
   ============================================================ */
.modal-content { border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; }
.modal-footer { border-top: 1px solid var(--line); background: #fafbfe; border-radius: 0 0 18px 18px; }
.modal-title { font-weight: 700; color: var(--ink); }
.modal-backdrop.show { opacity: .45; }

.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .4rem; font-size: .875rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; display: flex; align-items: center; gap: .5rem; }
.dropdown-item:active { background: var(--primary); }

.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; border-radius: 0; padding: .7rem 1rem; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.nav-pills .nav-link { border-radius: 10px; font-weight: 600; color: var(--muted); }
.nav-pills .nav-link.active { background: var(--primary); }

.pagination { --bs-pagination-border-radius: 8px; --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); gap: 4px; }
.page-link { border-radius: 8px !important; border-color: var(--line); color: var(--ink-2); }

.progress { border-radius: 99px; background: #edf0f7; }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar, .user-avatar, .user-avatar-sm {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
  background: var(--primary);
}
.avatar-sm, .user-avatar-sm { width: 32px; height: 32px; font-size: .72rem; border-radius: 10px; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 16px; }

/* ============================================================
   YOKLAMA
   ============================================================ */
.attendance-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: .9rem 1rem;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.attendance-card.present { border-color: #9fdcb9; background: #f3fbf6; }
.attendance-card.absent  { border-color: #f3b0b8; background: #fff6f7; }
.attendance-card.late    { border-color: #f1d18c; background: #fffaf0; }
.attendance-card.excused { border-color: #a9daf0; background: #f3fafd; }

.attendance-radio-group .btn { font-weight: 600; }
.attendance-radio-group .btn-check:checked + .btn-outline-success { background: var(--success); border-color: var(--success); color: #fff; }
.attendance-radio-group .btn-check:checked + .btn-outline-danger  { background: var(--danger);  border-color: var(--danger);  color: #fff; }
.attendance-radio-group .btn-check:checked + .btn-outline-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.attendance-radio-group .btn-check:checked + .btn-outline-info    { background: var(--info);    border-color: var(--info);    color: #fff; }

/* ============================================================
   YARDIMCILAR
   ============================================================ */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: .75rem; color: #c3cbe0; }
.empty-state h6 { color: var(--ink); margin-bottom: .25rem; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: .5rem; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0; }

.timeline-item { display: flex; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line-2); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }

.chart-container { position: relative; padding: 1rem; }

.soft-divider { height: 1px; background: var(--line); margin: 1.25rem 0; }

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .875rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink); font-weight: 600; text-align: right; }

.fade-in-up { animation: fadeInUp .35s ease both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Abonelik uyarı şeridi */
.sub-banner {
  margin: 1rem 1.5rem 0;
  padding: .75rem 1rem;
  border-radius: 12px;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--accent-light), #fff);
  border: 1px solid #f3dea6;
  color: #7a5200;
  font-size: .875rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd6e4; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #b5bfd3; }

/* ============================================================
   GİRİŞ / KİMLİK SAYFALARI
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}

.auth-hero {
  position: relative;
  color: #fff;
  padding: 3.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(232,163,23,.22) 0%, transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(47,79,216,.45) 0%, transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #1a2b63 100%);
  overflow: hidden;
}
.auth-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  pointer-events: none;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { color: #fff; font-size: 2.4rem; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 1rem; }
.auth-hero h1 span { color: #ffd479; }
.auth-hero p.lead { color: #c7d0e8; font-size: 1.05rem; max-width: 30rem; }
.auth-features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.auth-features li { display: flex; gap: .85rem; align-items: flex-start; color: #dfe5f5; }
.auth-features li i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #ffd479; flex-shrink: 0; font-size: 1rem; }
.auth-features li b { color: #fff; display: block; font-size: .92rem; }
.auth-features li small { color: #a9b5d6; font-size: .8rem; }
.auth-hero .foot { font-size: .8rem; color: #8d9bc2; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card {
  width: 100%; max-width: 430px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: var(--shadow);
}
.auth-card .brand-logo { width: 46px; height: 46px; margin-bottom: 1rem; }
.auth-title { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin: 0 0 .25rem; letter-spacing: -.02em; }
.auth-subtitle { color: var(--muted); margin-bottom: 1.5rem; font-size: .9rem; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #f1f4fa; margin-bottom: 1.5rem; }
.auth-tabs button { border: 0; background: transparent; padding: .55rem; border-radius: 9px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.5rem; }
.input-icon > .toggle-pass { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); padding: .25rem .5rem; }

.auth-simple {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(232,163,23,.12) 0%, transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(47,79,216,.12) 0%, transparent 60%),
    var(--bg);
}

/* ============================================================
   DUYARLI TASARIM
   ============================================================ */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
  body.sidebar-open { overflow: hidden; }
  .sidebar-close-btn { display: inline-flex; align-items: center; justify-content: center; }
  .main-wrapper { margin-left: 0; }
  .topbar-toggle { display: inline-flex; }
  .topbar { padding: 0 1rem; }

  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { padding: 2rem 1.5rem; }
  .auth-hero h1 { font-size: 1.75rem; }
  .auth-hero .auth-features, .auth-hero .foot { display: none; }
}

@media (max-width: 767.98px) {
  .page-content { padding: 1rem; }
  .page-header { padding: 1rem 1rem 0; }
  .page-title { font-size: 1.25rem; }
  .app-alert, .sub-banner { margin: .75rem 1rem 0; }
  .topbar-user .meta { display: none; }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.4rem; }
  .card-body { padding: 1rem; }
  .table > :not(caption) > * > * { padding: .65rem .75rem; }
  .auth-card { padding: 1.5rem; border-radius: 16px; }
  .modal-dialog { margin: .75rem; }
}

/* ============================================================
   YAZDIRMA
   ============================================================ */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; font-size: 11pt; }
  .sidebar, .topbar, .sidebar-overlay, .app-footer, .no-print, .btn, .sub-banner, .app-alert,
  .dataTables_filter, .dataTables_length, .dataTables_paginate, .dataTables_info { display: none !important; }
  .main-wrapper { margin: 0 !important; }
  .page-content { padding: 0 !important; }
  .card, .table-card, .stat-card { box-shadow: none !important; border: 1px solid #d5dbe6 !important; break-inside: avoid; }
  .table td, .table th { border: 1px solid #d5dbe6 !important; }
  a { color: inherit !important; }
}
