/* ==========================================================================
   KTOKampüs — tasarım sistemi
   Konsept: kampüs ilan panosu / etkinlik afişi. Tek cesur öğe: bilet kartı.
   ========================================================================== */

:root {
  --bg: #f2f3f9;
  --surface: #ffffff;
  --surface-2: #e9ebf6;
  --line: #dadeef;
  --ink: #161a33;
  --ink-2: #565c7d;
  --brand: #2438e0;
  --brand-ink: #ffffff;
  --brand-soft: #e4e7ff;
  --hi: #ffd60a;
  --hi-ink: #231d00;
  --ok: #0b7a5a;
  --ok-soft: #d9f4ea;
  --warn: #9a4a06;
  --warn-soft: #ffebcf;
  --bad: #c01b36;
  --bad-soft: #ffdde2;
  --notch: var(--bg);

  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --side-w: 248px;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Bahnschrift, "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1022;
    --surface: #171a33;
    --surface-2: #20244a;
    --line: #2b3060;
    --ink: #eef0ff;
    --ink-2: #a3a9d6;
    --brand: #8f9dff;
    --brand-ink: #0e1022;
    --brand-soft: #252b66;
    --ok: #4fd1a5;
    --ok-soft: #123a31;
    --warn: #ffb35c;
    --warn-soft: #3d2a10;
    --bad: #ff8095;
    --bad-soft: #43151f;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1022;
  --surface: #171a33;
  --surface-2: #20244a;
  --line: #2b3060;
  --ink: #eef0ff;
  --ink-2: #a3a9d6;
  --brand: #8f9dff;
  --brand-ink: #0e1022;
  --brand-soft: #252b66;
  --ok: #4fd1a5;
  --ok-soft: #123a31;
  --warn: #ffb35c;
  --warn-soft: #3d2a10;
  --bad: #ff8095;
  --bad-soft: #43151f;
  color-scheme: dark;
}

/* ---------- Temel ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.05; }
h2 { font-size: 1.4rem; line-height: 1.15; }
h3 { font-size: 1.1rem; line-height: 1.2; }
p { margin: 0 0 .8rem; }
ul { margin: 0; padding: 0; list-style: none; }

.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pre { white-space: pre-line; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.right { margin-left: auto; }
.mt { margin-top: 20px; }
.mt-lg { margin-top: 32px; }
.mb { margin-bottom: 16px; }

.i { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; flex: none; }
.i.lg { width: 2rem; height: 2rem; }
.i.xl { width: 3rem; height: 3rem; }

/* ---------- Kabuk: kenar çubuğu, üst çubuk, mobil sekme çubuğu ---------- */

.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 18px 12px 24px; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--ink); font: 700 1.25rem var(--font-display); }
.brand:hover { text-decoration: none; }
.mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 700 1.25rem var(--font-display); box-shadow: 3px 3px 0 var(--hi); }

.nav-t { margin: 16px 10px 4px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.nav:hover { background: var(--surface-2); text-decoration: none; }
.nav.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--hi); color: var(--hi-ink); font-size: .75rem; font-weight: 700; text-align: center; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
}

.topbar .brand { display: none; padding: 0; }
.tsearch { flex: 1; max-width: 460px; position: relative; }
.tsearch .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.tsearch input { padding-left: 38px; background: var(--surface); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.iconbtn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer;
}
.iconbtn:hover { background: var(--surface-2); text-decoration: none; }
.iconbtn .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--hi); color: var(--hi-ink); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }

.theme-ico-dark { display: none; }
:root[data-theme="dark"] .theme-ico-light { display: none; }
:root[data-theme="dark"] .theme-ico-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico-light { display: none; }
  :root:not([data-theme="light"]) .theme-ico-dark { display: inline; }
}

.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px 24px 56px; flex: 1; }

.foot { padding: 20px 24px 28px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; display: flex; gap: 16px; flex-wrap: wrap; }

.tabbar { display: none; }
.scrim { display: none; }

@media (max-width: 899px) {
  .shell { display: block; }
  .side {
    position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: 8px 0 32px rgba(0, 0, 0, .25);
  }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(8, 10, 30, .5); }
  .topbar { padding: 8px 14px; }
  .topbar .brand { display: flex; }
  .topbar .brand span:last-child { display: none; }
  .page { padding: 18px 16px 96px; }
  .foot { padding-bottom: 96px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 0; background: none;
    color: var(--ink-2); font: 500 .68rem var(--font-body); cursor: pointer; text-decoration: none;
  }
  .tabbar .i { width: 1.45rem; height: 1.45rem; }
  .tabbar .on { color: var(--brand); font-weight: 700; }
}

/* ---------- Düğmeler ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px;
  border: 1.5px solid var(--brand); border-radius: 10px; background: var(--brand); color: var(--brand-ink);
  font: 600 .95rem var(--font-body); cursor: pointer; text-decoration: none; transition: filter .15s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.quiet { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.hi { background: var(--hi); border-color: var(--hi); color: var(--hi-ink); }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: .86rem; border-radius: 8px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btnrow form { margin: 0; }
button.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
button.linkbtn:hover { text-decoration: underline; }

/* ---------- Rozet, çip ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink-2); font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand); }
.badge.live { background: var(--hi); color: var(--hi-ink); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 500;
}
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip .n { color: var(--ink-2); font-size: .8rem; }
.chip.on .n { color: inherit; opacity: .8; }

/* ---------- Form ---------- */

input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--brand); }
input[type="file"] { padding: 8px; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .9rem; }
.field > small { color: var(--ink-2); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.check input { margin-top: 3px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 140px; }
.formcard { max-width: 640px; }
@media (max-width: 599px) { .two { grid-template-columns: 1fr; } }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .grow { flex: 1; min-width: 200px; position: relative; }
.filters .grow .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.filters .grow input { padding-left: 38px; }
.filters select { width: auto; min-width: 150px; }

/* ---------- Yüzeyler ---------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.sec-h:first-child { margin-top: 0; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead .lede { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; font-size: .9rem; font-weight: 600; }

.rows > .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows > .row:first-child { border-top: 0; padding-top: 0; }
.rows > .row:last-child { padding-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .grow strong { display: block; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.split.rev { grid-template-columns: 330px minmax(0, 1fr); }
.sticky { position: sticky; top: 76px; }
@media (max-width: 959px) { .split, .split.rev { grid-template-columns: 1fr; } .sticky { position: static; } }

.empty { padding: 32px 20px; text-align: center; color: var(--ink-2); border: 1.5px dashed var(--line); border-radius: var(--r-lg); }
.empty .i { width: 2.4rem; height: 2.4rem; margin-bottom: 8px; }
.empty p { max-width: 44ch; margin: 0 auto 12px; }

.flash {
  display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--ok-soft); color: var(--ok); border: 1px solid currentColor; font-weight: 500;
}
.flash.err { background: var(--bad-soft); color: var(--bad); }
.flash .i { margin-top: 2px; }

.note { padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: .92rem; }
.note.info { background: var(--brand-soft); color: var(--brand); }

.meta li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.meta .i { margin-top: 3px; color: var(--ink-2); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden;
  background: var(--g, var(--brand)); color: #fff; font: 700 .95rem var(--font-body);
}
.avatar.sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.sq { border-radius: 12px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 24px 0 0; }
.tabs a { padding: 10px 14px; border-bottom: 3px solid transparent; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tabs a:hover { color: var(--brand); text-decoration: none; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- Ana sayfa vitrini ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: center; padding: 8px 0 12px; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); line-height: .98; }
.hero .lede { margin: 14px 0 20px; color: var(--ink-2); font-size: 1.08rem; max-width: 46ch; }
.hero-search { position: relative; max-width: 520px; }
.hero-search .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.hero-search input { min-height: 54px; padding: 0 130px 0 46px; border-radius: 14px; font-size: 1.02rem; }
.hero-search .btn { position: absolute; right: 6px; top: 6px; min-height: 42px; }
.hero .chips { margin-top: 16px; }
.hero-tickets { display: grid; gap: 14px; }
.hero-tickets .ticket { animation: drop .55s cubic-bezier(.2, .8, .2, 1) both; }
.hero-tickets .ticket:nth-child(2) { animation-delay: .12s; }
.hero-tickets .ticket:nth-child(3) { animation-delay: .24s; }
.factline { margin: 18px 0 0; color: var(--ink-2); font-size: .95rem; }
.factline b { color: var(--ink); font-weight: 700; }
@media (max-width: 899px) { .hero { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Bilet kartı (imza öğe) ---------- */

.ticket {
  --h: 230;
  --stub: hsl(var(--h) 68% 42%);
  position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ticket:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--stub); text-decoration: none; }
.ticket::before, .ticket::after {
  content: ""; position: absolute; left: 81px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--notch); border: 1px solid var(--line);
}
.ticket::before { top: -8px; }
.ticket::after { bottom: -8px; }
.ticket .stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px;
  background: var(--stub); color: #fff; border-right: 2px dashed rgba(255, 255, 255, .6);
}
.ticket .stub b { font: 700 2.3rem/1 var(--font-display); }
.ticket .stub span { font-size: .8rem; font-weight: 600; }
.ticket .body { padding: 12px 14px; min-width: 0; display: grid; gap: 3px; align-content: center; }
.ticket .body h3 { font-size: 1.12rem; }
.ticket .body .who { font-size: .86rem; color: var(--ink-2); }
.ticket .info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: .86rem; color: var(--ink-2); }
.ticket .info span { display: inline-flex; align-items: center; gap: 5px; }
.ticket.past { opacity: .75; }
.ticket.past:hover { opacity: 1; }
.ticket .bar { height: 5px; margin-top: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ticket .bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--stub); }
.tickets { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 420px) { .tickets { grid-template-columns: 1fr; } }

@keyframes drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Topluluk kartı ---------- */

.ccard { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); }
.ccard:hover { border-color: var(--brand); text-decoration: none; }
.ccard-top { height: 76px; background: var(--g) center / cover; }
.ccard-logo {
  width: 52px; height: 52px; margin: -26px 0 0 16px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background: var(--surface); border: 3px solid var(--surface); font-size: 1.7rem; position: relative; box-shadow: 0 0 0 1px var(--line);
}
.ccard-logo img { width: 100%; height: 100%; object-fit: cover; }
.ccard-body { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ccard-body h3 { font-size: 1.15rem; }
.ccard-body p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.ccard-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .86rem; color: var(--ink-2); }

.chero { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.chero-cover { height: 170px; background: var(--g) center / cover; }
.chero-body { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 0 22px 22px; margin-top: -42px; }
.chero-logo {
  width: 92px; height: 92px; border-radius: 22px; display: grid; place-items: center; overflow: hidden; flex: none;
  background: var(--surface); border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 2.6rem;
}
.chero-logo img { width: 100%; height: 100%; object-fit: cover; }
.chero-txt { flex: 1; min-width: 220px; padding-top: 48px; }
.chero-txt .lede { margin: 6px 0 0; color: var(--ink-2); }
.chero-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chero-act form { margin: 0; }
.social { display: flex; gap: 8px; flex-wrap: wrap; }

.poster { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); display: block; }
.banner {
  --h: 230;
  aspect-ratio: 16 / 7; border-radius: var(--r-lg); display: grid; place-items: center; text-align: center; padding: 20px;
  background: linear-gradient(135deg, hsl(var(--h) 68% 42%), hsl(calc(var(--h) + 40) 70% 30%)); color: #fff;
}
.banner b { font: 700 clamp(2.4rem, 7vw, 4.4rem)/1 var(--font-display); }
.banner span { display: block; font-size: 1.05rem; opacity: .9; }

/* ---------- İstatistik, grafik ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.stat b { display: block; font: 700 2rem/1.05 var(--font-display); }
.stat span { color: var(--ink-2); font-size: .86rem; }
.stat.alert { border-color: var(--warn); background: var(--warn-soft); }
.stat.alert span { color: var(--warn); }
a.stat { color: inherit; }
a.stat:hover { border-color: var(--brand); text-decoration: none; }

.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 36%) 1fr 34px; gap: 10px; align-items: center; font-size: .88rem; }
.hbar i { position: relative; display: block; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--brand); border-radius: 99px; }
.hbar b { text-align: right; }

.cols { display: flex; align-items: flex-end; gap: 10px; height: 170px; }
.col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.col i { display: block; width: 100%; max-width: 46px; height: var(--p, 0%); min-height: 3px; border-radius: 6px 6px 0 0; background: var(--brand); }
.col b { font-size: .82rem; }
.col span { max-width: 100%; font-size: .75rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colwrap { display: flex; flex-direction: column; justify-content: flex-end; flex: 1; width: 100%; align-items: center; }

/* ---------- Tablo ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.table thead th { border-top: 0; background: var(--surface-2); font-size: .82rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.table form { margin: 0; }

/* ---------- Takvim ---------- */

.calnav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.calnav h2 { margin: 0 8px; min-width: 9ch; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-h { padding: 8px 4px; text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.cal-d { min-height: 104px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); font-size: .78rem; min-width: 0; }
.cal-d:nth-child(7n + 1) { border-left: 0; }
.cal-d.out { background: var(--bg); color: var(--ink-2); }
.cal-d .n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 99px; font-weight: 600; }
.cal-d.today .n { background: var(--brand); color: var(--brand-ink); }
.cal-ev {
  --h: 230;
  display: block; margin-top: 4px; padding: 2px 6px; border-left: 3px solid hsl(var(--h) 68% 44%); border-radius: 5px;
  background: hsl(var(--h) 80% 93%); color: hsl(var(--h) 60% 22%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-ev:hover { text-decoration: none; filter: brightness(.96); }
:root[data-theme="dark"] .cal-ev { background: hsl(var(--h) 38% 24%); color: hsl(var(--h) 85% 88%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cal-ev { background: hsl(var(--h) 38% 24%); color: hsl(var(--h) 85% 88%); }
}
@media (max-width: 699px) {
  .cal-d { min-height: 58px; padding: 4px 3px; }
  .cal-ev { height: 6px; padding: 0; margin-top: 3px; font-size: 0; }
}

/* ---------- Sayfalama ---------- */

.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 28px 0 0; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 10px; display: inline-grid; place-items: center; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600;
}
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager .on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pager .gap { border: 0; background: none; color: var(--ink-2); }

/* ---------- Yıldız puanı ---------- */

.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { cursor: pointer; font-size: 2rem; line-height: 1; color: var(--line); }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--hi); }
.stars input:focus-visible + label { outline: 3px solid var(--brand); border-radius: 4px; }
.rating { font-weight: 700; }
.rating .s { color: #e0a800; }

/* ---------- QR ---------- */

.qrbox { display: inline-block; padding: 16px; background: #fff; border-radius: 18px; border: 1px solid var(--line); line-height: 0; }
.qrbox svg { width: min(340px, 72vw); height: auto; display: block; }
.copyline { display: flex; gap: 8px; align-items: center; }
.copyline input { font-size: .85rem; }

/* ---------- Belge ---------- */

.cert {
  max-width: 880px; margin: 0 auto; padding: 14px; background: #fffdf7; color: #1b1b1b; border-radius: 6px;
  border: 1px solid #d8d2bd; font-family: Georgia, "Times New Roman", serif;
}
.cert-in { border: 3px double #8c7a3a; padding: 44px 40px; text-align: center; }
.cert h1 { font: 700 2.6rem/1.1 Georgia, serif; letter-spacing: .02em; color: #3b3217; }
.cert .name { margin: 22px 0 6px; font: italic 700 2.2rem/1.2 Georgia, serif; border-bottom: 1px solid #8c7a3a; display: inline-block; padding: 0 28px 4px; }
.cert p { font-size: 1.1rem; line-height: 1.7; margin: 10px auto; max-width: 56ch; }
.cert .code { margin-top: 28px; font: 600 .9rem ui-monospace, Menlo, Consolas, monospace; color: #5d5230; }
.cert .sign { display: flex; justify-content: space-around; gap: 20px; margin-top: 36px; font-size: .95rem; }
.cert .sign div { min-width: 180px; border-top: 1px solid #8c7a3a; padding-top: 6px; }
@media (max-width: 599px) { .cert-in { padding: 28px 16px; } .cert h1 { font-size: 1.8rem; } .cert .name { font-size: 1.5rem; } }

/* ---------- Giriş ekranı ---------- */

.authwrap { display: grid; place-items: center; min-height: 60vh; }
.authcard { width: 100%; max-width: 440px; }
.authcard h1 { margin-bottom: 6px; }

/* ---------- Yazdırma ---------- */

@media print {
  .side, .topbar, .tabbar, .foot, .noprint, .scrim { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .cert { border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Raporlar */
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.filters .field { min-width: 150px; }
.filters .field input, .filters .field select { width: 100%; }
@media print {
  .table-wrap { overflow: visible; border-color: #bbb; }
  .table { font-size: .74rem; }
  .panel, .stat, .table tr { break-inside: avoid; }
}

/* Karne, rozet, liderlik */
.level .bar { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 12px 0 8px; }
.level .bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--brand), var(--hi)); border-radius: inherit; }
.level-pts { font: 600 1rem var(--font-display); }
.level-pts b { font-size: 2rem; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.bdg { display: grid; gap: 4px; justify-items: start; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); opacity: .6; }
.bdg.on { opacity: 1; border-style: solid; border-color: var(--brand); color: var(--ink); }
.bdg-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); }
.bdg.on .bdg-i { background: var(--hi); color: var(--hi-ink); }
.row.me { background: var(--surface-2); }
.rank { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font: 700 1rem var(--font-display); background: var(--surface-2); flex: none; }
.rank.top { background: var(--hi); color: var(--hi-ink); }
.pts { font-family: var(--font-display); font-size: 1.2rem; white-space: nowrap; }

/* Yemekhane */
.panel.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.meal { padding: 12px 0; border-top: 1px solid var(--line); }
.meal:first-of-type { border-top: 0; padding-top: 0; }
.courses { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.courses li { display: flex; gap: 10px; }
.courses li span { flex: none; width: 74px; color: var(--ink-2); font-size: .82rem; padding-top: 2px; }
.rate { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-top: 6px; }
.rate button { background: none; border: 0; padding: 2px 3px; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--line); }
.rate button.on { color: #e0a800; }
.rate button:hover, .rate button:focus-visible { color: #e0a800; }
.rate .small { margin-left: 8px; }
.notice.urgent { background: var(--bad-soft); }
.row.notice:hover { background: var(--surface-2); text-decoration: none; }

/* Talep yazışması */
.thread { display: grid; gap: 10px; }
.msg { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.msg.staff { border-color: var(--brand); background: var(--brand-soft); }
.msg.internal { border-style: dashed; background: var(--warn-soft); border-color: var(--warn); }
.msg-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Ders programı */
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.slot { display: grid; gap: 2px; padding: 8px 10px; margin-top: 8px; border-left: 4px solid hsl(var(--h) 65% 46%); background: var(--surface-2); border-radius: 8px; }
.slot b { font: 700 .86rem var(--font-display); color: hsl(var(--h) 65% 40%); }
.day.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

/* Kayıp eşya */
.lost.done { opacity: .6; }
.lost-img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }

/* Kampüs haritası */
.campusmap { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); line-height: 0; }
.campusmap img { width: 100%; height: auto; display: block; }
.campusmap.blank { min-height: 340px; line-height: 1.4; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; }
.campusmap.pickable { cursor: crosshair; }
.blank-note { position: absolute; left: 16px; top: 12px; margin: 0; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); line-height: 1; }
.pin:hover { text-decoration: none; transform: translate(-50%, -50%) scale(1.15); }
.pin .i { width: 16px; height: 16px; }
.pin.sel { background: var(--hi); color: var(--hi-ink); width: 38px; height: 38px; z-index: 2; box-shadow: 0 0 0 4px var(--brand), 0 2px 8px rgba(0,0,0,.4); }
.pin.ghostpin { width: 12px; height: 12px; background: #888; pointer-events: none; }
.pin.pick { pointer-events: none; }
.pin[hidden] { display: none; }
.rows.scroll { max-height: 420px; overflow-y: auto; }

[hidden] { display: none !important; }
