/* Kurumsal görünüm: Selçuk Üniversitesi sitesindeki lacivert + beyaz + altın sarısı.
   Tek tema (açık); koyu mod, renkli kutu ve süsleme yok. */
:root {
  color-scheme: light;
  --su-navy: #153165;
  --su-navy-dark: #0d2d5e;
  --su-gold: #f0b429;
  --su-border: #d5dae1;
  --su-muted: #5b6573;
  --su-bg: #f4f5f7;
  --su-soft: #f7f8fa;
  --su-green: #2e7d32;
  --su-amber: #b7791f;
  --su-red: #a3261e;
}

html { font-size: 16px; min-height: 100%; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--su-bg); color: #1f2329; line-height: 1.55;
  font-family: Montserrat, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
main { flex: 1; }
a { color: var(--su-navy); }
a:hover { color: var(--su-navy-dark); }
.text-muted { color: var(--su-muted) !important; }

/* ---------- Üst şerit ve menü ---------- */
.site-header { background: var(--su-navy); color: #fff; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.site-header .brand { color: #fff; text-decoration: none; line-height: 1.25; }
.site-header .brand-top { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.site-header .brand-main { font-size: 1.15rem; font-weight: 600; }
.site-header .user { display: flex; align-items: center; gap: .9rem; font-size: .85rem; white-space: nowrap; }
.site-header .user a { color: #fff; opacity: .9; }
.site-header .btn-logout { color: var(--su-navy); background: var(--su-gold); border: 0; font-weight: 600; font-size: .8rem; padding: .3rem .8rem; border-radius: 3px; }

.site-menu { background: #fff; border-bottom: 1px solid var(--su-border); border-top: 3px solid var(--su-gold); }
.site-menu ul { display: flex; flex-wrap: wrap; gap: .25rem 0; list-style: none; margin: 0; padding: 0; }
.site-menu a {
  display: block; padding: .7rem 1rem; color: var(--su-navy); text-decoration: none; white-space: nowrap;
  font-size: .9rem; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.site-menu a:hover { background: var(--su-soft); }
.site-menu a.active { border-bottom-color: var(--su-navy); background: var(--su-soft); }
.nav-count { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .35rem; background: var(--su-gold); color: var(--su-navy); font-size: .75rem; font-weight: 700; text-align: center; border-radius: 3px; }

/* ---------- Sayfa ---------- */
.page-surface { background: #fff; border: 1px solid var(--su-border); padding: 1.75rem 2rem; margin: 1.5rem 0; }
@media (max-width: 575px) { .page-surface { padding: 1.1rem 1rem; } }

h1, h2, h3 { color: var(--su-navy); font-weight: 600; }
h1, h1.h3 { font-size: 1.55rem; margin: 0 0 1rem; }
h2, h2.h5, h2.h6 { font-size: 1.15rem; margin: 2.25rem 0 .9rem; padding-bottom: .45rem; border-bottom: 1px solid var(--su-border); }
h2:first-child { margin-top: 0; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
.lead-note { color: var(--su-muted); margin: -.4rem 0 1.25rem; max-width: 52rem; }
.small, small { font-size: .85rem; }

/* Öğrenci başlığı ve sekmeler */
.student-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: .25rem; }
.student-head h1 { margin: 0; }
.student-meta { color: var(--su-muted); margin-bottom: 1rem; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--su-border); margin: 0 0 1.5rem; padding: 0; list-style: none; }
.tabs a { display: block; padding: .6rem 1.1rem; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--su-muted); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.tabs a:hover { color: var(--su-navy); }
.tabs a.active { color: var(--su-navy); background: #fff; border-color: var(--su-border); border-top: 3px solid var(--su-navy); }

/* Özet rakamları: sade, çerçeveli */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); border: 1px solid var(--su-border); border-right: 0; margin-bottom: 1rem; }
.fact { padding: .8rem 1rem; border-right: 1px solid var(--su-border); }
.fact .label { font-size: .78rem; color: var(--su-muted); text-transform: uppercase; letter-spacing: .04em; }
.fact .value { font-size: 1.35rem; font-weight: 600; color: var(--su-navy); line-height: 1.3; }
.fact .value small { font-size: .85rem; font-weight: 500; color: var(--su-muted); }

.info-list { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.5rem; margin: 0 0 1rem; }
.info-list dt { color: var(--su-muted); font-weight: 500; }
.info-list dd { margin: 0; }

/* ---------- Düğmeler: üç net tür ---------- */
.btn { font-weight: 600; font-size: .9rem; padding: .45rem 1rem; border-radius: 3px; border-width: 1px; white-space: nowrap; }
.btn-sm { font-size: .85rem; padding: .32rem .75rem; }
/* 1) Ana işlem: dolu lacivert */
.btn-primary, .btn-primary:disabled { color: #fff; background-color: var(--su-navy); border-color: var(--su-navy); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary:active:focus { color: #fff; background-color: var(--su-navy-dark); border-color: var(--su-navy-dark); }
/* 2) İkincil işlem: beyaz zemin, lacivert çerçeve */
.btn-outline-secondary { color: var(--su-navy); background: #fff; border-color: var(--su-navy); }
.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active { color: #fff; background-color: var(--su-navy); border-color: var(--su-navy); }
/* 3) Olumsuz işlem (reddet, iptal et, çıkar): beyaz zemin, koyu kırmızı çerçeve */
.btn-outline-danger { color: var(--su-red); background: #fff; border-color: var(--su-red); }
.btn-outline-danger:hover, .btn-outline-danger:focus, .btn-outline-danger:active { color: #fff; background-color: var(--su-red); border-color: var(--su-red); }
.btn-link { color: var(--su-navy); font-weight: 500; }
.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(21, 49, 101, .25); border-color: var(--su-navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Formlar ---------- */
.form-control, .form-select { border-radius: 3px; border-color: #b9c0ca; font-size: .95rem; }
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .25rem; }
.form-text { color: var(--su-muted); }

/* İşlem kutusu: her işlem kendi başlığıyla ayrı durur */
.action-box { border: 1px solid var(--su-border); background: var(--su-soft); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.action-box > h3 { margin-bottom: .2rem; }
.action-box > p { color: var(--su-muted); font-size: .88rem; margin-bottom: .75rem; }
.action-box form + form { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--su-border); }
.pending-box { border: 1px solid var(--su-border); border-left: 4px solid var(--su-amber); padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.pending-item { padding: .8rem 0; border-top: 1px solid var(--su-border); }
.pending-item:first-of-type { border-top: 0; padding-top: .3rem; }

/* ---------- Tablolar ---------- */
.table { --bs-table-bg: #fff; margin-bottom: 1rem; }
.table > :not(caption) > * > * { padding: .6rem .7rem; }
.table > thead > tr > th { background: #eef1f5; color: var(--su-navy); font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid var(--su-border); white-space: nowrap; }
.table td { vertical-align: top; }
.table td .sub { display: block; font-size: .85rem; color: var(--su-muted); }
.table .actions { text-align: right; white-space: nowrap; }
.table-plain > :not(caption) > * > * { padding: .35rem .7rem; }

/* ---------- Bildirimler: beyaz zemin + sol çizgi ---------- */
.alert { background: #fff; color: inherit; border: 1px solid var(--su-border); border-left-width: 4px; border-radius: 0; padding: .8rem 1rem; }
.alert-success { border-left-color: var(--su-green); }
.alert-info { border-left-color: var(--su-navy); }
.alert-warning { border-left-color: var(--su-amber); }
.alert-danger { border-left-color: var(--su-red); }

.tag { display: inline-block; white-space: nowrap; padding: .1rem .5rem; border: 1px solid var(--su-navy); background: #fff; color: var(--su-navy); font-size: .78rem; font-weight: 700; letter-spacing: .03em; }

/* Durum: küçük nokta + metin */
.status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; flex: none; width: .65rem; height: .65rem; border-radius: 50%; background: #8a94a3; }
.status-ok::before { background: var(--su-green); }
.status-warn::before { background: #d39e00; }
.status-fail::before { background: var(--su-red); }

/* Kural sonuçları listesi */
.rule-list { border: 1px solid var(--su-border); }
.rule { display: grid; grid-template-columns: 6.5rem 1fr; gap: .25rem 1rem; padding: .8rem 1rem; border-top: 1px solid var(--su-border); }
.rule:first-child { border-top: 0; }
.rule .title { font-weight: 600; }
.rule .source { font-size: .82rem; color: var(--su-muted); }

details > summary { cursor: pointer; color: var(--su-navy); font-weight: 600; }
details[open] > summary { margin-bottom: .6rem; }
.list-group, .list-group-item { border-radius: 0; }
.list-group-item { border-color: var(--su-border); padding: .9rem 1.1rem; }
.list-group-item-action:hover { background: var(--su-soft); }

/* Yazışma dökümü */
.message-thread { border: 1px solid var(--su-border); }
.message { padding: .85rem 1.1rem; border-bottom: 1px solid var(--su-border); border-left: 4px solid transparent; }
.message:last-child { border-bottom: 0; }
.message-coordinator { border-left-color: var(--su-navy); background: var(--su-soft); }
.message-head { font-size: .85rem; margin-bottom: .3rem; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }

.site-footer { background: var(--su-navy-dark); color: rgba(255,255,255,.8); font-size: .82rem; padding: 1rem 0; }

/* Genişlikler: içerik güvenlik politikası satır içi stile izin vermediği için sınıf olarak tanımlı. */
.colw-18 { width: 18rem; }
.colw-20 { width: 20rem; }
.colw-22 { width: 22rem; }
.colw-24 { width: 24rem; }
.colw-26 { width: 26rem; }
.colw-2h { width: 2.5rem; }
.colw-30 { width: 30rem; }
.colw-9 { width: 9rem; }
.maxw-34 { max-width: 34rem; }
.maxw-40 { max-width: 40rem; }
.maxw-48 { max-width: 48rem; }
.minw-26 { min-width: 26rem; }

/* Giden E-postalar: e-posta metni olduğu gibi, satırlar kırılarak */
.mail-body { white-space: pre-wrap; font-family: inherit; font-size: .95rem; }
