/* =========================================================
   Boğaziçi Akademik Web — Panel, giriş ve dizin arayüzü
   ========================================================= */
:root {
  --bu: #0a3d79;
  --bu-600: #0d4a91;
  --bu-50: #eef4fb;
  --bu-100: #dbe7f6;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --success: #15803d;
  --success-bg: #ecfdf3;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #fffaeb;
  --info-bg: #eff8ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--bu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; }
img { max-width: 100%; }
.ico { width: 18px; height: 18px; flex: none; }
.ico-xl { width: 44px; height: 44px; color: var(--bu); opacity: .8; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .8rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: .9em; }
.nowrap { white-space: nowrap; }
.lead { color: var(--muted); max-width: 70ch; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 600; color: var(--bu); margin: 0 0 .3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link { font-weight: 500; }
.stack > * + * { margin-top: .85rem; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: .6rem 1rem;
  font: 600 .9rem/1 var(--font); cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bu); color: #fff; box-shadow: 0 1px 2px rgba(10, 61, 121, .3); }
.btn-primary:hover { background: var(--bu-600); }
.btn-secondary { background: var(--bu-50); color: var(--bu); border-color: var(--bu-100); }
.btn-secondary:hover { background: var(--bu-100); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn-light:hover { background: rgba(255, 255, 255, .24); }
.btn-link { background: none; border: 0; padding: .4rem 0; color: var(--bu); font-weight: 500; }
.btn-block { width: 100%; }
.danger { color: var(--danger) !important; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn.sm { width: 26px; height: 26px; vertical-align: middle; }
.icon-btn.sm .ico { width: 15px; height: 15px; }
:focus-visible { outline: 3px solid rgba(10, 61, 121, .35); outline-offset: 2px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-weight: 600; font-size: .86rem; color: var(--ink); }
.field.inline { flex-direction: row; align-items: center; gap: .6rem; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid #cfd8e3; border-radius: var(--radius-sm); padding: .6rem .75rem;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bu); box-shadow: 0 0 0 4px rgba(10, 61, 121, .12); }
input:disabled { background: var(--surface-2); color: var(--muted); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); font-weight: 500; }
.help { color: var(--muted); font-size: .8rem; }
.check-field { display: flex; align-items: center; gap: .55rem; font-weight: 500; cursor: pointer; }
.check-field input { width: 18px; height: 18px; accent-color: var(--bu); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.form-card h3 { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.form-card h3:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-card > .field { margin-bottom: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.narrow { max-width: 860px; }
.color-field { display: inline-flex; align-items: center; gap: .5rem; }
.color-field input { width: 42px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); cursor: pointer; }
.file-drop {
  position: relative; display: grid; place-items: center; min-height: 54px; padding: .8rem;
  border: 1.5px dashed #b8c4d4; border-radius: var(--radius-sm); background: var(--surface-2);
  color: var(--bu); font-weight: 600; cursor: pointer; text-align: center; transition: .15s;
}
.file-drop.big { min-height: 120px; }
.file-drop:hover, .file-drop.is-drag { border-color: var(--bu); background: var(--bu-50); }
.file-drop span { display: inline-flex; gap: .45rem; align-items: center; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-list { list-style: none; margin: 0; padding: 0; font-size: .84rem; color: var(--muted); }
.file-list li { padding: .2rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
progress.progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: var(--line); margin: .3rem 0 1rem; }
progress.progress::-webkit-progress-bar { background: var(--line); }
progress.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--bu), #3b82c4); border-radius: 99px; }
progress.progress::-moz-progress-bar { background: var(--bu); }

/* ---------- Kartlar / ızgaralar ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.1rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.grid { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty h3 { margin-top: .8rem; }

/* ---------- Uyarılar ---------- */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert .ico { margin-top: 1px; }
.alert-success { background: var(--success-bg); border-color: #abefc6; color: #065f46; }
.alert-error { background: var(--danger-bg); border-color: #fecdca; color: var(--danger); }
.alert-info { background: var(--info-bg); border-color: #b2ddff; color: #175cd3; }
.alert-secret { background: var(--warn-bg); border-color: #fedf89; color: #93370d; }
.secret { display: inline-block; margin-top: .35rem; font-size: 1rem; padding: .3rem .6rem; user-select: all; }

/* ---------- Rozetler ---------- */
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 99px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-on { background: var(--success-bg); color: var(--success); }
.status-off { background: #f1f5f9; color: var(--muted); }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; background: #f1f5f9; color: var(--muted); }
.pill-on { background: var(--success-bg); color: var(--success); }
.pill-off { background: var(--danger-bg); color: var(--danger); }
.pill-accent { background: var(--bu-50); color: var(--bu); }
.badge { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; background: var(--bu); color: #fff; }
.ext { display: inline-block; min-width: 42px; text-align: center; font: 700 .66rem/1 var(--font); padding: .3rem .35rem; border-radius: 6px; margin-right: .55rem; background: #e2e8f0; color: #334155; }
.ext-pdf { background: #fee4e2; color: #b42318; }
.ext-docx, .ext-doc { background: #dbeafe; color: #1d4ed8; }
.ext-pptx { background: #ffedd5; color: #c2410c; }
.ext-xlsx, .ext-csv { background: #dcfce7; color: #15803d; }
.ext-png, .ext-jpg, .ext-jpeg, .ext-webp, .ext-gif { background: #f3e8ff; color: #7e22ce; }

/* ---------- Tablo ---------- */
.table-card { padding: 0; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table.compact td { padding: .5rem 1rem; }
.primary-cell a { color: var(--ink); font-weight: 600; }
.actions-col { width: 1%; white-space: nowrap; text-align: right; }
.actions-col form { display: inline; }
.is-muted td { opacity: .55; }
.search-box { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid #cfd8e3; border-radius: var(--radius-sm); padding: 0 .75rem; max-width: 360px; margin-bottom: 1rem; color: var(--muted); }
.toolbar .search-box { margin-bottom: 0; flex: 1; }
.search-box input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; background: transparent !important; }
.search-box.big { max-width: 560px; padding: .25rem 1rem; border-radius: 99px; border: 0; box-shadow: var(--shadow-lg); }
.search-box.big input { font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: .55rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .86rem; }
.kv dd { margin: 0; font-weight: 500; }

/* =========================================================
   Panel iskeleti
   ========================================================= */
.panel { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.nav-toggle { display: none; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #08305f 0%, #0a3d79 60%, #0c4689 100%); color: #cfdcef; padding: 1.1rem .8rem;
}
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; padding: .3rem .5rem 1.2rem; text-decoration: none !important; }
.brand-logo {
  width: 44px; height: 44px; flex: none; border-radius: 50%; background: #fff; padding: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}
.brand-logo.lg { width: 84px; height: 84px; padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: .98rem; }
.brand-text small { font-size: .74rem; opacity: .7; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; opacity: .55; padding: 1rem .75rem .4rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .58rem .75rem; border-radius: 9px; color: #d6e2f3; font-weight: 500; font-size: .92rem; text-decoration: none; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a.is-active { background: rgba(255, 255, 255, .15); color: #fff; box-shadow: inset 3px 0 0 #7fb2f0; }
.side-user { display: flex; align-items: center; gap: .6rem; padding: .8rem .5rem 0; margin-top: .6rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.side-user .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; flex: none; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.side-user-text strong { color: #fff; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { font-size: .74rem; opacity: .7; }
.side-user .icon-btn { color: #cfdcef; }
.side-user .icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .8rem;
  padding: .9rem 2rem; background: rgba(244, 246, 250, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.25rem; margin: 0; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: .7rem; }
.menu-btn { display: none; }
.content { padding: 1.6rem 2rem 3rem; max-width: 1280px; width: 100%; }
.nav-scrim { display: none; }

/* Gösterge */
.hero-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  background: linear-gradient(120deg, #fff 0%, #fff 55%, var(--bu-50) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem; margin-bottom: 1.1rem; box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 1.6rem; margin-bottom: .3rem; }
.hero-card p { margin: 0; }
.publish-box { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.publish-box p { margin: 0; display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e1; display: grid; place-items: center; color: transparent; flex: none; }
.checklist .check .ico { width: 13px; height: 13px; stroke-width: 3; }
.checklist .is-done .check { background: var(--success); border-color: var(--success); color: #fff; }
.checklist .is-done a { color: var(--muted); text-decoration: line-through; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .ico { grid-row: span 2; width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--bu-50); color: var(--bu); }
.stat strong { font-size: 1.5rem; line-height: 1.1; color: var(--ink); }
.stat span { color: var(--muted); font-size: .86rem; }
.theme-mini { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: center; }

/* İlk giriş karşılama */
.welcome-card {
  color: #fff; border-radius: var(--radius); padding: 1.6rem 1.8rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-lg);
  background: radial-gradient(600px 200px at 100% 0%, #1f62b3 0%, transparent 70%), linear-gradient(135deg, #07274d, #0a3d79);
}
.welcome-card h2 { color: #fff; font-size: 1.5rem; margin: .6rem 0 .4rem; }
.welcome-card p { margin: 0; opacity: .88; max-width: 75ch; }
.step-pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 99px; background: rgba(255, 255, 255, .15); }

/* Tema seçici */
.theme-form .lead { margin-bottom: 1.2rem; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; margin: 1.2rem 0 1.4rem; }
.theme-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.theme-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card.is-selected, .theme-card:has(input:checked) { border-color: var(--bu); box-shadow: 0 0 0 4px rgba(10, 61, 121, .14); }
.theme-card:has(input:focus-visible) { outline: 3px solid rgba(10, 61, 121, .35); outline-offset: 2px; }
.theme-card-body { padding: .9rem 1rem 1rem; border-top: 1px solid var(--line); }
.theme-card-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.theme-card-body p { margin: 0 0 .4rem; }
.frame-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10.5; overflow: hidden; background: #e9eef5; }
.frame-wrap iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; background: #fff; }
.frame-wrap.small { border-radius: 10px; border: 1px solid var(--line); }
.sticky-actions { position: sticky; bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.inline-fields { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.inline-fields select { width: auto; }

/* Profil */
.photo-box { display: grid; place-items: center; margin: .4rem 0 1rem; }
.photo-preview { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow-lg); }
.photo-preview.placeholder { display: grid; place-items: center; background: var(--bu-50); color: var(--bu); }
.photo-preview.placeholder .ico { width: 60px; height: 60px; opacity: .6; }
.grid-side aside .card { position: sticky; top: 86px; }
.grid-side aside .card + .card { position: static; }

/* =========================================================
   Giriş sayfası
   ========================================================= */
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero {
  position: relative; overflow: hidden; color: #e6eef9; display: flex; align-items: center; padding: 3rem;
  background: radial-gradient(1200px 600px at -10% -20%, #1b5cab 0%, transparent 60%),
              radial-gradient(800px 500px at 120% 120%, #0f5aa8 0%, transparent 55%), #07274d;
}
.auth-hero::after {
  content: ""; position: absolute; inset: auto -120px -120px auto; width: 420px; height: 420px; border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, .04);
}
.auth-hero-inner { position: relative; max-width: 480px; margin: 0 auto; }
.auth-hero h1 { color: #fff; font-size: 2.3rem; letter-spacing: -.02em; margin: 1.4rem 0 1rem; }
.auth-hero p { font-size: 1.05rem; opacity: .85; }
.auth-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.auth-points li { display: flex; align-items: center; gap: .7rem; font-weight: 500; }
.auth-points .ico { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.auth-form { display: grid; place-items: center; padding: 2rem; }
.login-card { width: 100%; max-width: 400px; padding: 2.2rem; }
.login-card h2 { font-size: 1.5rem; }
.login-card .field { margin-bottom: 1rem; }
.login-card .btn { margin-top: .4rem; padding: .8rem 1rem; }
.login-card .tiny { margin: 1.2rem 0 0; }

/* Hata */
.error-page { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.error-card { text-align: center; max-width: 440px; padding: 2.5rem; }
.error-logo { margin: 0 auto 1rem; }
.error-code { display: block; font: 800 4rem/1 Georgia, serif; color: var(--bu); opacity: .25; margin-bottom: .5rem; }

[hidden-by-filter], [hidden-by-chip] { display: none !important; }

/* =========================================================
   İçerik editörü
   ========================================================= */
.md-editor { border: 1px solid #cfd8e3; border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.md-editor:focus-within { border-color: var(--bu); box-shadow: 0 0 0 4px rgba(10, 61, 121, .12); }
.md-editor textarea { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; min-height: 150px; font-family: var(--mono); font-size: .9rem; line-height: 1.65; padding: .9rem 1rem; resize: vertical; }
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .45rem .55rem; background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.md-tabs { display: inline-flex; background: #e8edf4; border-radius: 8px; padding: 2px; }
.md-tab { border: 0; background: transparent; padding: .32rem .8rem; border-radius: 6px; font: 600 .8rem/1 var(--font); color: var(--muted); cursor: pointer; }
.md-tab.is-on { background: var(--surface); color: var(--bu); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.md-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.md-btn { border: 1px solid transparent; background: transparent; padding: .32rem .5rem; border-radius: 6px; font: 600 .78rem/1 var(--font); color: #334155; cursor: pointer; white-space: nowrap; }
.md-btn:hover { background: var(--surface); border-color: var(--line); color: var(--bu); }
.md-btn.b-h { font-family: Georgia, serif; font-weight: 700; min-width: 30px; }
.md-btn.b-bold { font-weight: 800; min-width: 28px; }
.md-btn.b-ital { font-style: italic; font-family: Georgia, serif; min-width: 28px; }
.md-btn.b-acc { color: var(--bu); }
.md-sep { width: 1px; height: 18px; background: var(--line); margin: 0 .25rem; }
.md-preview { display: none; padding: 1.1rem 1.3rem; min-height: 150px; max-height: 70vh; overflow: auto; font-size: .95rem; line-height: 1.65; }
.md-editor.is-preview textarea { display: none; }
.md-editor.is-preview .md-preview { display: block; }
.md-preview h2 { font-size: 1.3rem; margin: 1.2em 0 .5em; } .md-preview h3 { font-size: 1.12rem; margin: 1.1em 0 .4em; } .md-preview h4 { font-size: 1rem; }
.md-preview ul, .md-preview ol { padding-left: 1.3em; }
.md-preview blockquote { margin: 1em 0; padding: .3em 1em; border-left: 3px solid var(--bu); color: var(--muted); }
.md-preview .md-img { max-width: 100%; border-radius: 10px; }
.md-preview .md-table { overflow-x: auto; } .md-preview table { border-collapse: collapse; width: 100%; } .md-preview th, .md-preview td { border: 1px solid var(--line); padding: .4em .6em; text-align: left; }
.md-preview .md-toc { border: 1px solid var(--line); border-left: 3px solid var(--bu); border-radius: 8px; padding: .6em 1em; } .md-preview .md-toc ul { list-style: none; padding: 0; margin: 0; } .md-preview .toc-l3 { padding-left: 1em; }
.md-warn { list-style: none; margin: 0; padding: 0; }
.md-warn li { margin: 0 .8rem .6rem; padding: .5rem .75rem; border-radius: 8px; background: var(--warn-bg); color: #93370d; font-size: .85rem; }
.md-counter { padding: .35rem .8rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); text-align: right; background: var(--surface-2); }
.md-counter.is-near { color: var(--danger); font-weight: 600; }
.md-help { margin-top: .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .85rem; }
.md-help summary { cursor: pointer; padding: .5rem .8rem; font-weight: 600; color: var(--bu); display: flex; align-items: center; gap: .45rem; list-style: none; }
.md-help summary::-webkit-details-marker { display: none; }
.md-help summary .ico { width: 16px; height: 16px; }
.md-help[open] summary { border-bottom: 1px solid var(--line); }
.md-help-body { padding: .6rem .8rem .8rem; overflow-x: auto; }
.md-help table { width: 100%; border-collapse: collapse; }
.md-help td, .md-help th { padding: .35rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.md-help th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.md-help .help { margin: .6rem 0 0; display: block; }
.form-card > .form-grid > .field.wide > span:first-child, .form-card > .field > span:first-child { font-weight: 600; font-size: .86rem; color: var(--ink); }

/* Dosya seçici penceresi */
.md-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); animation: fadeIn .15s ease; }
.md-modal-box { width: min(720px, 100%); max-height: 82vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: popIn .2s ease; }
.md-modal-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.md-modal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; padding: 1rem 1.1rem; overflow: auto; color: var(--muted); }
.md-modal-box > .help { padding: 0 1.1rem 1rem; margin: 0; }
.md-file { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.md-file:hover { border-color: var(--bu); transform: translateY(-2px); box-shadow: var(--shadow); }
.md-file img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.md-file .ext { margin: 0; }
.md-file-name { font-size: .82rem; font-weight: 600; word-break: break-word; }
.md-file small { color: var(--muted); font-size: .72rem; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Sıralanabilir listeler (Görünüm) */
.align-start { align-items: start; }
.sort-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.sort-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: box-shadow .15s, border-color .15s, background .3s; }
.sort-item:hover { border-color: #c5d3e6; }
.sort-item.is-dragging { opacity: .55; border-style: dashed; border-color: var(--bu); }
.sort-item.flash { background: var(--bu-50); }
.sort-item.is-link { background: #fbfcfe; }
.sort-item .grip { cursor: grab; color: #94a3b8; display: grid; place-items: center; }
.sort-item .grip:active { cursor: grabbing; }
.sort-main { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.sort-main input { padding: .4rem .6rem !important; font-size: .9rem; }
.sort-kind { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: inline-flex; align-items: center; gap: .3rem; }
.sort-kind .ico { width: 13px; height: 13px; }
.sort-item select { width: auto !important; padding: .4rem .5rem !important; font-size: .85rem; }
.sort-btns { display: inline-flex; }
.layout-preview { margin-top: 1rem; display: grid; gap: .4rem; }
.card-head h3 { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }

/* Liste araçları */
.list-tools { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.list-tools .search-box { margin: 0; flex: 0 1 300px; }
.list-count { margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .32rem .75rem; font: 500 .8rem/1 var(--font); color: var(--text); cursor: pointer; transition: .15s; }
.chip-btn small { color: var(--muted); margin-left: .15rem; }
.chip-btn:hover { border-color: var(--bu); color: var(--bu); }
.chip-btn.is-on { background: var(--bu); border-color: var(--bu); color: #fff; }
.chip-btn.is-on small { color: rgba(255, 255, 255, .75); }

/* Gösterge eklemeleri */
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 1.1rem; }
.stats-6 .stat { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: .2rem; padding: 1rem; }
.stats-6 .stat .ico { grid-row: auto; width: 36px; height: 36px; padding: 8px; margin-bottom: .3rem; }
.quick-actions h3 { margin-bottom: .9rem; }
.qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.qa { display: flex; gap: .75rem; align-items: center; padding: .9rem; border: 1px dashed #c5d3e6; border-radius: 12px; color: var(--text); text-decoration: none !important; transition: .15s; }
.qa:hover { border-style: solid; border-color: var(--bu); background: var(--bu-50); transform: translateY(-2px); }
.qa .ico { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--bu); color: #fff; flex: none; }
.qa span { display: flex; flex-direction: column; line-height: 1.3; }
.qa small { color: var(--muted); font-size: .8rem; }

/* =========================================================
   Duyarlı tasarım
   ========================================================= */
@media (max-width: 1100px) {
  .grid-side { grid-template-columns: 1fr; }
  .grid-side aside .card { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .panel { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  .nav-toggle:checked ~ .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 20; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: .7rem 1rem; }
  .content { padding: 1.1rem 1rem 2.5rem; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 2rem 1.5rem; }
  .auth-hero h1 { font-size: 1.6rem; }
  .auth-points { display: none; }
  .theme-mini { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .publish-box { align-items: flex-start; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .table th:nth-child(n+3):not(.actions-col), .table td:nth-child(n+3):not(.actions-col) { display: none; }
}

/* Bağlantı / dosya penceresi: sekmeler, adres formu, yükleme alanı */
.md-modal-top { display: grid; gap: .3rem; padding: .9rem 1.1rem .4rem; }
.md-field { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; }
.md-field input, .md-url-form input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; background: var(--surface); color: var(--text); }
.md-field input:focus, .md-url-form input:focus { outline: 2px solid var(--bu); outline-offset: 1px; border-color: var(--bu); }
.md-modal-tabs { display: flex; gap: .3rem; padding: .5rem 1.1rem 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.md-modal-tabs .md-tab { border-radius: 8px 8px 0 0; margin-bottom: -1px; border: 1px solid transparent; }
.md-modal-tabs .md-tab.is-on { border-color: var(--line); border-bottom-color: var(--surface); background: var(--surface); }
.md-modal-pane { padding: 1rem 1.1rem; overflow: auto; min-height: 0; }
.md-modal-pane[hidden] { display: none; }
.md-modal-pane > .md-modal-list { padding: 0; }
.md-modal-pane > .help { display: block; margin-top: .6rem; }
.md-url-form { display: flex; gap: .5rem; }
.md-url-form .btn { flex: none; }
.md-drop { position: relative; display: grid; place-items: center; gap: .3rem; padding: 2rem 1rem; border: 2px dashed var(--line); border-radius: 12px; text-align: center; cursor: pointer; color: var(--muted); transition: border-color .15s, background .15s; }
.md-drop:hover, .md-drop.is-over { border-color: var(--bu); background: var(--surface-2); color: var(--text); }
.md-drop.is-busy { opacity: .6; pointer-events: none; }
.md-drop strong { color: var(--text); }
.md-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.md-drop:focus-within { outline: 2px solid var(--bu); outline-offset: 2px; }
.md-modal-msg { margin: 0; padding: 0 1.1rem .9rem; font-size: .85rem; color: var(--muted); }
.md-modal-msg:empty { display: none; }
.md-modal-msg.is-bad { color: #b42318; }
@media (max-width: 560px) { .md-url-form { flex-direction: column; } }
.md-modal-list.is-empty { display: block; }

/* Kişiye özel e-posta ile giriş (/kullanici/user) */
.auth-simple { min-height: 100vh; background: radial-gradient(900px 380px at 50% -10%, #1b3f80 0%, transparent 70%), linear-gradient(180deg, #0b1d3f 0%, #13306a 100%); }
.auth-single { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-single .login-card { width: min(440px, 100%); padding: 28px; }
.login-head { display: flex; align-items: center; gap: .8rem; padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.login-head div { display: flex; flex-direction: column; line-height: 1.3; }
.login-head .brand-logo { border-radius: 50%; }
.login-title { margin: 0 0 .4rem; font-size: 1.35rem; }
.login-foot { margin: 1.2rem 0 0; }
.auth-single .stack { display: grid; gap: .9rem; margin-top: .9rem; }

/* Yönetim paneli */
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.d-block { display: block; }
.person { display: flex; align-items: center; gap: .7rem; }
.person-photo { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bu-50); }
.person-photo.initials { display: grid; place-items: center; color: var(--bu); font-weight: 700; font-size: .9rem; }
.admin-table td { vertical-align: middle; }
.admin-table .actions-col { white-space: nowrap; }
.admin-table .actions-col form { display: inline; }
.mini-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.admin-lists { margin-top: 1.1rem; }
.danger-card { border-color: var(--danger-bg); }
.danger-card h3 { color: var(--danger); }
.grid-side aside { display: grid; gap: 1.1rem; align-content: start; }
