/* Okul Yönetim Sistemi — kurumsal tema
   Lacivert kenar menü, kara tahta yeşili ana renk, serif sayfa başlıkları */
:root {
  --navy: #16233F;
  --navy-2: #22325A;
  --navy-text: #C3CCDD;
  --green: #1E6B57;
  --green-dark: #165242;
  --green-soft: #E4F0EB;
  --amber: #B7791F;
  --amber-soft: #FBF1DF;
  --red: #B3261E;
  --paper: #F4F6F8;
  --ink: #1C2433;
  --muted: #5B6577;
  --line: #DFE3EA;
  --serif: 'Source Serif 4', Georgia, serif;
  --sidebar-w: 256px;

  --bs-body-font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-primary: #1E6B57;
  --bs-primary-rgb: 30, 107, 87;
  --bs-success: #2E7D4F;
  --bs-success-rgb: 46, 125, 79;
  --bs-danger: #B3261E;
  --bs-danger-rgb: 179, 38, 30;
  --bs-warning: #D49A2A;
  --bs-warning-rgb: 212, 154, 42;
  --bs-info: #3B7EA1;
  --bs-info-rgb: 59, 126, 161;
  --bs-link-color: #1E6B57;
  --bs-link-color-rgb: 30, 107, 87;
  --bs-link-hover-color: #165242;
  --bs-link-hover-color-rgb: 22, 82, 66;
  --bs-border-color: #DFE3EA;
  --bs-secondary-color: #5B6577;
  --bs-border-radius: .45rem;
  --bs-heading-color: var(--ink);
  --bs-focus-ring-color: rgba(30, 107, 87, .25);
}

body { background: var(--paper); font-size: .94rem; -webkit-font-smoothing: antialiased; }
h1, .h1, .page-title { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
a { text-underline-offset: 2px; }

/* ---------- Bootstrap bileşen renkleri ---------- */
.btn-primary { --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green); --bs-btn-hover-bg: var(--green-dark); --bs-btn-hover-border-color: var(--green-dark);
  --bs-btn-active-bg: #11402F; --bs-btn-active-border-color: #11402F; --bs-btn-disabled-bg: var(--green); --bs-btn-disabled-border-color: var(--green); }
.btn-outline-primary { --bs-btn-color: var(--green); --bs-btn-border-color: #9CC4B6; --bs-btn-hover-bg: var(--green); --bs-btn-hover-border-color: var(--green);
  --bs-btn-active-bg: var(--green-dark); --bs-btn-active-border-color: var(--green-dark); }
.btn-outline-secondary { --bs-btn-color: #44506A; --bs-btn-border-color: #CDD3DE; --bs-btn-hover-bg: #EEF1F5; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #B9C1CF; }
.btn-light { --bs-btn-bg: #EEF1F5; --bs-btn-border-color: #EEF1F5; }
.btn { font-weight: 500; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #6FA593; box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-label { font-weight: 500; font-size: .86rem; color: #3A4458; margin-bottom: .3rem; }
.form-control, .form-select { border-color: #D3D9E3; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--green); }
.nav-link { color: var(--muted); }
.nav-tabs .nav-link.active { color: var(--ink); font-weight: 500; }
.list-group-item.active { background: var(--green); border-color: var(--green); }
.dropdown-item:active { background: var(--green); }
.badge { font-weight: 500; }
.badge.bg-secondary { background: #E6E9EF !important; color: #4A5468; }
.badge.bg-light { background: #F1F3F6 !important; }
.alert { border-radius: .5rem; }
.alert-info { --bs-alert-bg: #EAF2F7; --bs-alert-border-color: #CFE0EA; --bs-alert-color: #24506A; }
.alert-warning { --bs-alert-bg: var(--amber-soft); --bs-alert-border-color: #F0DDB8; --bs-alert-color: #74501A; }
.alert-success { --bs-alert-bg: var(--green-soft); --bs-alert-border-color: #C6E0D6; --bs-alert-color: #154638; }
.modal-content { border: 0; border-radius: .7rem; box-shadow: 0 18px 50px rgba(16, 26, 48, .22); }
.modal-header { border-bottom-color: var(--line); }
.modal-title { font-family: var(--serif); font-weight: 600; }
.modal-footer { border-top-color: var(--line); background: #FAFBFC; border-radius: 0 0 .7rem .7rem; }

/* ---------- Uygulama iskeleti ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--navy) !important; color: var(--navy-text); }
.sidebar .offcanvas-body { background: transparent; }
.sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--navy); --bs-offcanvas-color: var(--navy-text); --bs-offcanvas-width: 280px; }
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .2s ease; }
  .sidebar .offcanvas-body { display: flex; flex-direction: column; height: 100%; }
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }

.brand { display: flex; align-items: center; gap: .75rem; padding: 1.15rem 1rem 1rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand:hover { color: #fff; }
.monogram { width: 40px; height: 40px; flex-shrink: 0; border-radius: .5rem; background: var(--green); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.brand-name { font-weight: 600; line-height: 1.2; font-size: .95rem; }
.brand-sub { font-size: .75rem; color: #8E9BB5; }

.menu { padding: .5rem .6rem 1rem; flex-grow: 1; }
.menu-group { font-size: .74rem; color: #7D8BA6; padding: .9rem .65rem .3rem; letter-spacing: .02em; }
.menu-link { display: flex; align-items: center; gap: .7rem; padding: .48rem .65rem; border-radius: .4rem; color: var(--navy-text);
  text-decoration: none; font-size: .9rem; position: relative; white-space: nowrap; }
.menu-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.menu-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu-link.active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 500; }
.menu-link.active::before { content: ''; position: absolute; left: -.6rem; top: .35rem; bottom: .35rem; width: 3px; border-radius: 0 3px 3px 0; background: #4FB28F; }
.menu-link.active i { opacity: 1; color: #7FD1B3; }
.sidebar-foot { padding: .8rem 1rem; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .75rem; color: #7D8BA6; }

/* Daraltılmış kenar menü (masaüstü) */
@media (min-width: 992px) {
  body.sb-collapsed { --sidebar-w: 72px; }
  body.sb-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  body.sb-collapsed .brand-text, body.sb-collapsed .menu-label, body.sb-collapsed .menu-group, body.sb-collapsed .sidebar-foot { display: none; }
  body.sb-collapsed .menu-link { justify-content: center; padding: .6rem 0; }
  body.sb-collapsed .menu-link i { font-size: 1.15rem; }
  body.sb-collapsed .menu-group-sep { display: block; height: 1px; background: rgba(255, 255, 255, .07); margin: .5rem .4rem; }
}
.menu-group-sep { display: none; }

.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; height: 60px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; }
.icon-btn { border: 0; background: transparent; color: #44506A; width: 36px; height: 36px; border-radius: .4rem; display: inline-grid; place-items: center; font-size: 1.2rem; }
.icon-btn:hover { background: #EEF1F5; color: var(--ink); }
.crumbs { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs strong { color: var(--ink); font-weight: 500; }
.search-trigger { margin-left: auto; display: flex; align-items: center; gap: .55rem; min-width: 260px; height: 38px; padding: 0 .75rem;
  border: 1px solid #D3D9E3; border-radius: .45rem; background: #F7F8FA; color: #7A8498; font-size: .88rem; cursor: pointer; }
.search-trigger:hover { border-color: #B9C1CF; background: #fff; }
.search-trigger kbd { margin-left: auto; background: #fff; color: #5B6577; border: 1px solid #D3D9E3; font-size: .72rem; padding: .05rem .35rem; box-shadow: none; }
@media (max-width: 767px) { .search-trigger { min-width: 0; width: 38px; padding: 0; justify-content: center; } .search-trigger span, .search-trigger kbd { display: none; } }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 600; font-size: .82rem;
  display: inline-grid; place-items: center; }
.user-btn { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); padding: .2rem .4rem; border-radius: .45rem; }
.user-btn:hover { background: #EEF1F5; color: var(--ink); }
.user-meta { line-height: 1.15; }
.user-meta small { color: var(--muted); font-size: .74rem; }

.content { padding: 1.6rem 1.75rem 2.5rem; flex-grow: 1; }
@media (max-width: 575px) { .content { padding: 1.1rem .9rem 2rem; } .topbar { padding: 0 .75rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-title { font-size: 1.65rem; margin: 0; color: var(--ink); }
.page-sub { color: var(--muted); margin: .2rem 0 0; font-size: .9rem; }

/* ---------- Kartlar ve tablolar ---------- */
.card { border: 1px solid var(--line); border-radius: .6rem; box-shadow: none; }
.card .h6, .card h2.h6 { font-weight: 600; font-size: .98rem; }
.table { --bs-table-hover-bg: #F3F8F6; margin-bottom: .25rem; }
.table > thead > tr > th { background: #F7F8FA; color: #4A5468; font-weight: 600; font-size: .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table > :not(caption) > * > * { padding: .6rem .7rem; vertical-align: middle; border-color: #EBEEF3; }
.table-sm > :not(caption) > * > * { padding: .42rem .55rem; }
.table-actions { white-space: nowrap; width: 1%; text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable::after { content: '\F282'; font-family: 'bootstrap-icons'; font-size: .65rem; margin-left: .35rem; opacity: .25; }
th.sortable.asc::after { content: '\F286'; opacity: .8; }
th.sortable.desc::after { content: '\F282'; opacity: .8; }
.table-meta { font-size: .8rem; color: var(--muted); }

.stat { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; height: 100%; color: var(--ink); text-decoration: none; }
a.stat:hover { background: #FAFBFC; color: var(--ink); }
.stat-icon { width: 44px; height: 44px; border-radius: .55rem; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-value { font-size: 1.55rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .82rem; color: var(--muted); }
@media (max-width: 575px) { .stat { padding: .8rem; gap: .6rem; } .stat-icon { width: 34px; height: 34px; font-size: 1rem; } .stat-value { font-size: 1.25rem; } .stat-label { font-size: .76rem; } }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-navy { background: #E6EAF3; color: var(--navy-2); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-red { background: #FBE9E7; color: var(--red); }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; color: #A7B0C0; display: block; margin-bottom: .5rem; }

/* Devamsızlık grafiği */
.att-chart { width: 100%; height: auto; display: block; }
.att-chart .bar { fill: #9CC4B6; transition: fill .15s; }
.att-chart .bar.weekend { fill: #E1E5EC; }
.att-chart .bar.today { fill: var(--green); }
.att-chart g:hover .bar { fill: var(--green-dark); }
.att-chart text { font-size: 10px; fill: #6B7588; font-family: var(--bs-body-font-family); }
.att-chart .val { font-weight: 600; fill: var(--ink); }

/* Zaman çizelgesi listesi (yaklaşan sınavlar, duyurular) */
.feed-item { display: flex; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid #EEF1F5; }
.feed-item:last-child { border-bottom: 0; }
.date-chip { width: 46px; flex-shrink: 0; text-align: center; border: 1px solid var(--line); border-radius: .4rem; overflow: hidden; line-height: 1.1; }
.date-chip b { display: block; font-size: 1.05rem; padding: .2rem 0 .05rem; }
.date-chip span { display: block; font-size: .66rem; background: #F3F5F8; color: var(--muted); padding: .1rem 0; }

/* Yoklama ve sınav */
.att-radio .btn { min-width: 3.4rem; }
.announcement-body { white-space: pre-line; }
.exam-bar { top: 68px; z-index: 1010; }
.karne { max-width: 900px; margin: 0 auto; }
.karne table { font-size: .92rem; }
.karne .h5 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }

/* ---------- Bildirimler ---------- */
.bell { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #44506A;
  display: inline-grid; place-items: center; font-size: 1.2rem; transition: background .15s, color .15s; }
.bell:hover, .bell[aria-expanded="true"] { background: #EEF1F5; color: var(--ink); }
.bell.has-unread { color: var(--green); background: var(--green-soft); }
.bell.has-unread:hover, .bell.has-unread[aria-expanded="true"] { background: #D3E8DF; color: var(--green-dark); }
.bell-dot { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: .66rem; font-weight: 600; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; font-variant-numeric: tabular-nums; }
/* Yeni bildirim geldiğinde zil bir kez sallanır */
.bell.ring i { animation: bell-ring .9s ease-in-out; transform-origin: 50% 10%; }
.bell.ring .bell-dot { animation: dot-pop .4s ease-out; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes dot-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

.notif-menu { width: 380px; max-width: calc(100vw - 1.5rem); overflow: hidden; border: 1px solid var(--line); border-radius: .7rem;
  box-shadow: 0 16px 40px rgba(16, 26, 48, .16); margin-top: .5rem !important; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: #fff; }
.notif-head strong { font-size: .98rem; }
.notif-head .btn-link { font-size: .8rem; text-decoration: none; color: var(--green); white-space: nowrap; }
.notif-pill { background: var(--red); color: #fff; font-size: .7rem; font-weight: 600; border-radius: 1rem; padding: .1rem .5rem; }
#notifList { max-height: min(60vh, 440px); overflow-y: auto; background: #fff; }
.notif-sec { font-size: .74rem; color: var(--muted); padding: .55rem 1rem .25rem; background: #FAFBFC; border-bottom: 1px solid #EEF1F5; }
.notif-item { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 1rem; border-bottom: 1px solid #EEF1F5; color: var(--ink); text-decoration: none; position: relative; }
.notif-item:hover { background: #F7F9FA; color: var(--ink); }
.notif-item.unread { background: #F5FAF8; }
.notif-item.unread::after { content: ''; position: absolute; right: 1rem; top: 1.05rem; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.notif-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .95rem; }
.ni-odev { background: var(--amber-soft); color: var(--amber); }
.ni-ders { background: #E6EEF7; color: #3B6EA1; }
.ni-sinav { background: var(--green-soft); color: var(--green); }
.ni-devamsizlik { background: #FBE9E7; color: var(--red); }
.ni-duyuru { background: #E6EAF3; color: var(--navy-2); }
.ni-karne { background: #EFE8F6; color: #6B4C9A; }
.notif-item .txt { min-width: 0; flex-grow: 1; padding-right: .9rem; }
.notif-item .t { display: block; font-weight: 500; font-size: .88rem; line-height: 1.3; }
.notif-item.unread .t { font-weight: 600; }
.notif-item .b { font-size: .8rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .1rem; }
.notif-item small { display: block; color: #8A94A7; font-size: .72rem; margin-top: .2rem; }
.notif-foot { display: block; text-align: center; padding: .65rem; font-size: .84rem; border-top: 1px solid var(--line); background: #FAFBFC; text-decoration: none; color: var(--green); }
.notif-foot:hover { background: #F1F4F6; color: var(--green-dark); }
.notif-empty { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: .88rem; }
.notif-empty i { display: block; font-size: 1.8rem; color: #A9C9BC; margin-bottom: .4rem; }
.skel { display: flex; gap: .7rem; padding: .75rem 1rem; border-bottom: 1px solid #EEF1F5; }
.skel span { display: block; border-radius: .3rem; background: linear-gradient(90deg, #EEF1F5 25%, #F6F8FA 50%, #EEF1F5 75%); background-size: 200% 100%; animation: skel 1.2s infinite linear; }
.skel .c { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.skel .l1 { height: 11px; width: 70%; margin: .2rem 0 .45rem; }
.skel .l2 { height: 9px; width: 45%; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.notif-row { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; }
.notif-row.unread { background: #F7FBF9; box-shadow: inset 3px 0 0 #4FB28F; }

/* ---------- Dersler ---------- */
.course-card { overflow: hidden; }
.course-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1rem .9rem; color: var(--ink); text-decoration: none; }
.course-head:hover { color: var(--ink); background: #FAFBFC; }
.course-mark { width: 46px; height: 46px; border-radius: .55rem; background: var(--navy); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.course-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: .45rem; margin-bottom: .75rem; }
.course-stats a { text-align: center; padding: .5rem .2rem; color: var(--ink); text-decoration: none; }
.course-stats a + a { border-left: 1px solid var(--line); }
.course-stats a:hover { background: #F7F9FA; }
.course-stats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.course-stats span { font-size: .74rem; color: var(--muted); }
.course-tabs .nav-link { color: var(--muted); }
.course-tabs .nav-link.active { color: var(--ink); }
.live-now { border-color: #E8A39E; box-shadow: inset 3px 0 0 var(--red); }
.file-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: .45rem;
  color: var(--ink); text-decoration: none; background: #fff; max-width: 100%; }
.file-chip:hover { border-color: #9CC4B6; background: #F7FBF9; color: var(--ink); }
.file-chip i { color: var(--green); font-size: 1.1rem; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { color: var(--muted); white-space: nowrap; }
.video-frame { background: #0E1626; border-radius: .6rem .6rem 0 0; overflow: hidden; }
.video-frame video, .video-frame iframe { border: 0; }
.video-external { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; color: #fff; text-decoration: none; }
.video-external i { font-size: 3rem; opacity: .85; }
.note-body summary { cursor: pointer; color: var(--green); font-size: .88rem; }
.min-w-0 { min-width: 0; }


/* ---------- Akademik takvim ---------- */
.cal-card { overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cal-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 0 .5rem; min-width: 9.5rem; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: .45rem .6rem; font-size: .76rem; color: var(--muted); font-weight: 600; background: #F7F8FA; border-bottom: 1px solid var(--line); }
.cal-dow.we { color: #8A94A7; }
.cal-day { min-height: 112px; padding: .3rem .35rem .4rem; border-right: 1px solid #EBEEF3; border-bottom: 1px solid #EBEEF3; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.we { background: #FAFBFC; }
.cal-day.out { background: #F7F8FA; }
.cal-day.out .cal-num { color: #B4BCC9; }
.cal-day.holiday { background: repeating-linear-gradient(135deg, #FFF7F6, #FFF7F6 8px, #FDEFED 8px, #FDEFED 16px); }
.cal-num { font-size: .82rem; font-weight: 500; color: #44506A; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 1px; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-num { background: var(--green); color: #fff; font-weight: 600; }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid; border-radius: 4px; padding: 2px 6px; font-size: .74rem; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-ev.cont { border-left-width: 0; border-radius: 0 4px 4px 0; margin-left: -.35rem; width: calc(100% + .35rem); }
.cal-ev:hover { filter: brightness(.96); }
.cal-ev small { opacity: .7; }
span.cal-ev { cursor: default; }
.cal-day:not(.expanded) .extra { display: none; }
.cal-more { border: 0; background: none; padding: 0 4px; font-size: .72rem; color: var(--green); text-align: left; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .35rem; }
.legend-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; border-radius: 2rem; padding: .2rem .65rem; font-size: .76rem; color: var(--ink); }
.legend-chip span { width: 9px; height: 9px; border-radius: 50%; }
.legend-chip[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.cat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }
.list-month { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin: 1.1rem 0 .3rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.list-ev { display: flex; gap: 1rem; align-items: baseline; padding: .45rem .3rem; border: 0; background: none; border-radius: .3rem; }
.list-ev:hover { background: #F7F9FA; }
.list-date { width: 190px; flex-shrink: 0; font-size: .85rem; color: #44506A; font-variant-numeric: tabular-nums; }
.cat-badge { font-weight: 500; }
@media (max-width: 767px) {
  .cal-day { min-height: 64px; padding: .2rem; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; }
  .cal-ev.cont { margin-left: 0; width: 100%; }
  .cal-more { font-size: .65rem; }
  .list-ev { flex-direction: column; gap: .1rem; }
}
@media print { .cal-legend, .cal-head .icon-btn { display: none !important; } }
.cat-donem.cal-ev, .cat-donem.cat-badge { background: #E4F0EB; color: #1E6B57; border-color: #1E6B57; }
.cat-donem > span, .cat-dot.cat-donem { background: #1E6B57; }
.hide-cat-donem [data-cat="donem"]:not(.legend-chip) { display: none !important; }
.cat-tatil.cal-ev, .cat-tatil.cat-badge { background: #FBE9E7; color: #B3261E; border-color: #B3261E; }
.cat-tatil > span, .cat-dot.cat-tatil { background: #B3261E; }
.hide-cat-tatil [data-cat="tatil"]:not(.legend-chip) { display: none !important; }
.cat-sinav.cal-ev, .cat-sinav.cat-badge { background: #FBF1DF; color: #B7791F; border-color: #B7791F; }
.cat-sinav > span, .cat-dot.cat-sinav { background: #B7791F; }
.hide-cat-sinav [data-cat="sinav"]:not(.legend-chip) { display: none !important; }
.cat-toplanti.cal-ev, .cat-toplanti.cat-badge { background: #E6EEF7; color: #3B6EA1; border-color: #3B6EA1; }
.cat-toplanti > span, .cat-dot.cat-toplanti { background: #3B6EA1; }
.hide-cat-toplanti [data-cat="toplanti"]:not(.legend-chip) { display: none !important; }
.cat-veli.cal-ev, .cat-veli.cat-badge { background: #EFE8F6; color: #6B4C9A; border-color: #6B4C9A; }
.cat-veli > span, .cat-dot.cat-veli { background: #6B4C9A; }
.hide-cat-veli [data-cat="veli"]:not(.legend-chip) { display: none !important; }
.cat-etkinlik.cal-ev, .cat-etkinlik.cat-badge { background: #E2F1F3; color: #1F7A8C; border-color: #1F7A8C; }
.cat-etkinlik > span, .cat-dot.cat-etkinlik { background: #1F7A8C; }
.hide-cat-etkinlik [data-cat="etkinlik"]:not(.legend-chip) { display: none !important; }
.cat-diger.cal-ev, .cat-diger.cat-badge { background: #EEF1F5; color: #5B6577; border-color: #5B6577; }
.cat-diger > span, .cat-dot.cat-diger { background: #5B6577; }
.hide-cat-diger [data-cat="diger"]:not(.legend-chip) { display: none !important; }
.cat-exam.cal-ev, .cat-exam.cat-badge { background: #E6EAF3; color: #22325A; border-color: #22325A; }
.cat-exam > span, .cat-dot.cat-exam { background: #22325A; }
.hide-cat-exam [data-cat="exam"]:not(.legend-chip) { display: none !important; }

/* ---------- Ders planı ---------- */
.plan-table td { padding-top: .65rem; padding-bottom: .65rem; }
.week-now > td, .plan-row.week-now { background: #F2F8F5 !important; }
.plan-table tr.week-now td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.prog-chip { font-size: .7rem; border: 1px solid var(--line); border-radius: 1rem; padding: .05rem .45rem; color: var(--muted); background: #fff; white-space: nowrap; }
.prog-chip.done { background: var(--green-soft); border-color: #B9D9CC; color: var(--green-dark); }
.prog-chip.done::before { content: '✓ '; }
.assign-row { padding: .5rem 0; border-bottom: 1px solid #EEF1F5; }
.assign-row:last-of-type { border-bottom: 0; }
.plan-row { display: flex; gap: 1rem; align-items: flex-start; padding: .75rem 1rem; }
.plan-row.week-now { box-shadow: inset 3px 0 0 var(--green); }
.plan-row.is-done .fw-medium { color: var(--muted); }
.plan-week { width: 82px; flex-shrink: 0; font-size: .85rem; }
.plan-week small { display: block; color: var(--muted); }
.plan-state { min-width: 120px; }
@media (max-width: 575px) { .plan-row { flex-wrap: wrap; } .plan-state { width: 100%; text-align: left !important; } }
@media print { .plan-table { font-size: .8rem; } .plan-table .d-lg-table-cell { display: table-cell !important; } }


/* ---------- Ders programı ---------- */
.tt-table { table-layout: fixed; min-width: 760px; }
.tt-table th, .tt-table td { text-align: center; vertical-align: middle; border-color: #EBEEF3; }
.tt-table thead th { background: #F7F8FA; }
.tt-table td { padding: .3rem !important; height: 62px; }
.tt-time { width: 92px; text-align: left !important; background: #FAFBFC !important; }
.tt-time b { display: block; font-size: .85rem; }
.tt-time small { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.tt-today { background: #F7FBF9; }
thead .tt-today { color: var(--green-dark) !important; box-shadow: inset 0 -2px 0 var(--green); }
.tt-now { box-shadow: inset 0 0 0 2px var(--green); }
.tt-cell { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; min-height: 52px; border: 0; border-radius: .4rem; padding: .25rem .4rem; text-align: left; }
button.tt-cell:hover { filter: brightness(.96); }
.tt-subj { font-weight: 600; font-size: .82rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-meta { font-size: .72rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-empty { width: 100%; height: 100%; min-height: 52px; border: 1px dashed #D3D9E3; border-radius: .4rem; background: transparent; color: #A7B0C0; opacity: 0; transition: opacity .15s; }
.tt-table tr:hover .tt-empty, .tt-empty:focus-visible { opacity: 1; }
.tt-empty:hover { border-color: var(--green); color: var(--green); background: #F7FBF9; }
.tt-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
@media print { .tt-empty { display: none; } .tt-table { min-width: 0; font-size: .75rem; } }
.subj-0.tt-cell { background: #E4F0EB; color: #165242; } .subj-0.tt-dot { background: #165242; }
.subj-1.tt-cell { background: #E6EEF7; color: #2C5A85; } .subj-1.tt-dot { background: #2C5A85; }
.subj-2.tt-cell { background: #FBF1DF; color: #7A5214; } .subj-2.tt-dot { background: #7A5214; }
.subj-3.tt-cell { background: #EFE8F6; color: #5A3E85; } .subj-3.tt-dot { background: #5A3E85; }
.subj-4.tt-cell { background: #FBE9E7; color: #8F2019; } .subj-4.tt-dot { background: #8F2019; }
.subj-5.tt-cell { background: #E2F1F3; color: #17606E; } .subj-5.tt-dot { background: #17606E; }
.subj-6.tt-cell { background: #EEF1F5; color: #3A4458; } .subj-6.tt-dot { background: #3A4458; }
.subj-7.tt-cell { background: #F4EEE4; color: #6B4F2A; } .subj-7.tt-dot { background: #6B4F2A; }

/* Ders saati kartları (yoklama ve ana panel) */
.lesson-strip { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .25rem; }
.lesson-card { flex: 0 0 auto; min-width: 190px; display: flex; flex-direction: column; gap: .15rem; padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: .55rem; background: #fff; color: var(--ink); text-decoration: none; position: relative; }
.lesson-card:hover { border-color: #9CC4B6; color: var(--ink); }
.lesson-card.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30, 107, 87, .15); }
.lesson-card .lc-time { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lesson-card .lc-title { font-weight: 600; font-size: .9rem; }
.lesson-card .lc-state { font-size: .76rem; color: var(--amber); }
.lesson-card.taken .lc-state { color: var(--green); }

/* ---------- Toplu aktarma ---------- */
.import-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.2rem; flex-wrap: wrap; }
.import-steps li { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .45rem; border: 1px solid var(--line); border-radius: 2rem; background: #fff; color: var(--muted); font-size: .86rem; }
.import-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #EEF1F5; font-weight: 600; font-size: .78rem; }
.import-steps li.on { border-color: var(--green); color: var(--ink); font-weight: 500; }
.import-steps li.on span { background: var(--green); color: #fff; }
.import-steps li.done span { background: var(--green-soft); color: var(--green); }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2rem 1rem; border: 2px dashed #CDD3DE; border-radius: .7rem; background: #FAFBFC; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop-zone i { font-size: 2.2rem; color: var(--green); }
.drop-zone:hover, .drop-zone.drag { border-color: var(--green); background: #F2F8F5; }
.drop-zone.has-file { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.drop-zone:focus-within { box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.map-select.mapped { border-color: #9CC4B6; background-color: #F7FBF9; }
a.stat.stat-on { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30, 107, 87, .15); }
.stat-icon b { font-size: 1rem; }
#previewTable thead th { position: sticky; top: 0; z-index: 1; }

/* Toplu seçim çubuğu */
.bulk-bar { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem .3rem .8rem; border: 1px solid #F0C9C5; background: #FDF3F2; border-radius: .5rem; }

/* ---------- Komut paleti ---------- */
#cmdk .modal-dialog { max-width: 620px; margin-top: 12vh; }
#cmdk .modal-content { overflow: hidden; }
.cmdk-input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem 1rem 2.8rem; font-size: 1.02rem; }
.cmdk-input:focus { box-shadow: none; border-color: var(--line); }
.cmdk-search-icon { position: absolute; left: 1.1rem; top: 1.05rem; color: #8A94A7; font-size: 1.05rem; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: .4rem; }
.cmdk-group { font-size: .74rem; color: var(--muted); padding: .55rem .7rem .25rem; }
.cmdk-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: .4rem; color: var(--ink); text-decoration: none; cursor: pointer; }
.cmdk-item i { color: #7A8498; width: 1.2rem; text-align: center; }
.cmdk-item small { color: var(--muted); margin-left: auto; font-size: .78rem; }
.cmdk-item.active { background: var(--green-soft); color: var(--green-dark); }
.cmdk-item.active i { color: var(--green); }
.cmdk-foot { border-top: 1px solid var(--line); padding: .5rem .9rem; font-size: .75rem; color: var(--muted); background: #FAFBFC; display: flex; gap: 1rem; }
.cmdk-foot kbd { background: #fff; color: var(--muted); border: 1px solid var(--line); font-size: .7rem; padding: 0 .3rem; box-shadow: none; }

/* Ajax ilerleme çubuğu */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: #4FB28F; z-index: 2000; opacity: 0; transition: width .4s ease, opacity .3s; }
#progress.on { opacity: 1; width: 70%; }
#progress.done { width: 100%; opacity: 0; }

/* ---------- Giriş ekranı ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; background: #fff; }
.auth-panel { background: var(--navy); color: var(--navy-text); padding: 3rem 3.2rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-panel::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%;
  border: 56px solid rgba(79, 178, 143, .08); }
.auth-panel .monogram { width: 54px; height: 54px; font-size: 1.7rem; }
.auth-school { font-family: var(--serif); color: #fff; font-size: 2.1rem; font-weight: 600; line-height: 1.15; margin: 2.4rem 0 .8rem; max-width: 14ch; }
.auth-lead { max-width: 36ch; line-height: 1.6; }
.auth-roles { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 2rem; position: relative; z-index: 1; }
.auth-roles span { border: 1px solid rgba(255, 255, 255, .14); border-radius: 2rem; padding: .3rem .8rem; font-size: .8rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.auth-card .form-control { padding: .65rem .8rem; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-panel { padding: 1.6rem 1.4rem; }
  .auth-school { font-size: 1.45rem; margin: 1rem 0 .3rem; max-width: none; }
  .auth-lead, .auth-roles, .auth-panel::after { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, #progress { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; }
  .karne { max-width: none; }
  .exam-bar { position: static; }
}
