/* frontend/assets/css/app.css */

/* ── Fonts ─────────────────────────────────────────── */
/* Plus Jakarta Sans, kendi sunucumuzdan (Google Fonts'un harici CSS istegi ilk
   boyamayi ~0.8 sn engelliyordu). Degisken font: tek dosya 200-800 tum
   kalinliklari tasir. latin-ext Turkce s/g/I icin gerekli; ı, ç, ö, ü latin'de.
   Onceki Space Grotesk + Syne ikilisi okunakli bulunmadigi icin degistirildi. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Variables ─────────────────────────────────────── */
:root {
  --bg:        #0a0d15;
  --bg2:       #121726;
  --bg3:       #192033;
  --border:    #293149;
  --border2:   #3a4767;
  --text:      #edf1fb;
  --text2:     #a8b0c5;
  --text3:     #69748f;
  --accent:    #7c8cff;
  --accent2:   #b0bcff;
  --accent-bg: rgba(124,140,255,0.15);
  /* Beyaz yazili dolgu butonlar icin: --accent beyazla 2.98:1 veriyordu,
     WCAG AA 4.5:1 ister. Bu ikisi 5.1:1 ve 4.8:1. */
  --accent-strong:       #4f5fe6;
  --accent-strong-hover: #5564ea;
  --green:     #22c55e;
  --green-bg:  rgba(34,197,94,0.12);
  --red:       #ef4444;
  --red-bg:    rgba(239,68,68,0.12);
  --yellow:    #f59e0b;
  --yellow-bg: rgba(245,158,11,0.12);
  --surface:   rgba(18,23,38,0.78);
  --surface-strong: rgba(19,24,39,0.96);
  --hero-warm: #f5c26b;
  --hero-warm-bg: rgba(245,194,107,0.14);
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 20px 60px rgba(0,0,0,0.36);
  --shadow-sm: 0 8px 22px rgba(0,0,0,0.22);
  --sidebar-w: 240px;
  --topbar-h:  72px;
  --font:      'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.18s ease;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--accent); }
input, select, textarea, button { font-family: var(--font); }
button { cursor: pointer; border: none; background: none; }

/* ── Utilities ─────────────────────────────────────── */
.hidden { display: none !important; }
.auth-form-hidden { display: none; }
.req { color: var(--red); }

/* ── Toast ─────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border2);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  min-width: 240px;
  max-width: 360px;
  animation: slideInUp 0.25s ease;
  color: var(--text);
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }
.toast-icon { font-size: 1.1rem; }
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Loading overlay ───────────────────────────────── */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,15,20,0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-ring {
  width: 44px; height: 44px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ─────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 32px;
  min-width: 340px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow);
  animation: popIn 0.2s ease;
}
@keyframes popIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-box h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.modal-hint { color: var(--text2); font-size: 0.88rem; margin-bottom: 16px; }
.modal-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.modal-icon svg { width: 24px; height: 24px; }
.modal-icon.danger { background: var(--red-bg); color: var(--red); }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }
.share-input-group { display: flex; gap: 8px; }
.share-input-group input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.85rem;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-strong-hover); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-icon:hover { background: var(--border2); color: var(--text); }
.btn-icon svg { width: 16px; height: 16px; }

/* ── Acilis sayfasi (#page-auth: giris yapmamis ziyaretci) ───────── */
#page-auth {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(124,140,255,0.16), transparent 70%),
    radial-gradient(700px 420px at -10% 8%, rgba(155,120,255,0.09), transparent 70%),
    var(--bg);
}
.lp-container { width: min(1120px, 100%); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Ust bar */
.lp-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,13,21,0.78);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(41,49,73,0.6);
}
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.lp-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em;
}
.lp-brand:hover { color: var(--text); }
.lp-brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.lp-nav-links { display: flex; align-items: center; gap: 8px; }
.lp-nav-link { color: var(--text2); font-size: 0.9rem; font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.lp-nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

/* Hero */
.lp-hero { padding: 56px 0 40px; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 64px; align-items: center; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-bg); border: 1px solid rgba(124,140,255,0.28);
  color: var(--accent2); font-size: 0.8rem; font-weight: 600;
}
.lp-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
}
.lp-title {
  font-size: clamp(2.15rem, 5.2vw, 3.6rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -0.035em; color: var(--text); margin-bottom: 18px;
}
.lp-title-accent { color: var(--accent2); }
.lp-lead { font-size: clamp(1rem, 1.6vw, 1.14rem); line-height: 1.6; color: var(--text2); max-width: 54ch; margin-bottom: 28px; }

.lp-search {
  display: flex; align-items: center; gap: 6px; max-width: 540px; padding: 6px;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.lp-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,140,255,0.16), 0 14px 40px rgba(0,0,0,0.35); }
.lp-search-icon { width: 20px; height: 20px; margin-left: 10px; color: var(--text2); flex-shrink: 0; }
.lp-search input {
  flex: 1; min-width: 0; padding: 10px 4px;
  background: transparent; border: 0; outline: none; color: var(--text); font-size: 1rem;
}
.lp-search input::placeholder { color: #8791ab; }
.lp-search .btn { padding: 11px 20px; border-radius: 10px; font-size: 0.95rem; }
.lp-points { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; }
.lp-points li { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; color: var(--text2); }
.lp-points svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

/* Giris / kayit karti */
.lp-auth {
  scroll-margin-top: 80px; padding: 28px;
  background: linear-gradient(180deg, rgba(25,32,51,0.92), rgba(18,23,38,0.96));
  border: 1px solid var(--border2); border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}
.lp-auth-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.015em; }
.lp-auth-sub { font-size: 0.9rem; color: var(--text2); margin: 4px 0 20px; }

/* Bolumler */
.lp-section { padding: 64px 0; }
.lp-section + .lp-section { border-top: 1px solid rgba(41,49,73,0.55); }
.lp-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent2); margin-bottom: 10px; }
.lp-h2 { font-size: clamp(1.55rem, 3.2vw, 2.2rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 10px; }
.lp-sub { color: var(--text2); line-height: 1.6; max-width: 60ch; margin-bottom: 32px; }

.lp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-steps li { position: relative; padding: 24px; background: rgba(18,23,38,0.6); border: 1px solid var(--border); border-radius: 16px; }
.lp-step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 14px; border-radius: 10px;
  background: var(--accent-strong); color: #fff; font-weight: 800; font-size: 0.95rem;
}
.lp-steps h3, .lp-feature h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.lp-steps p, .lp-feature p { font-size: 0.93rem; color: var(--text2); line-height: 1.6; }

.lp-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lp-feature { display: flex; gap: 16px; padding: 24px; background: rgba(18,23,38,0.6); border: 1px solid var(--border); border-radius: 16px; }
.lp-feature-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-bg); color: var(--accent2);
}
.lp-feature-icon svg { width: 22px; height: 22px; }

.lp-unis { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-uni {
  display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px;
  background: rgba(18,23,38,0.6); border: 1px solid var(--border2);
  color: var(--text); font-size: 0.92rem; font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}
.lp-uni:hover { color: var(--text); border-color: var(--accent); background: var(--bg3); }
.lp-uni-all { color: var(--accent2); border-style: dashed; }

.lp-faq { max-width: 820px; }
.lp-faq details { border-bottom: 1px solid var(--border); }
.lp-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 2px; list-style: none; cursor: pointer;
  font-size: 1rem; font-weight: 700; color: var(--text);
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: ''; flex-shrink: 0; width: 9px; height: 9px;
  border-right: 2px solid var(--text2); border-bottom: 2px solid var(--text2);
  transform: translateY(-3px) rotate(45deg); transition: transform var(--transition);
}
.lp-faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.lp-faq details p { padding: 0 2px 20px; color: var(--text2); line-height: 1.65; max-width: 70ch; }

.lp-cta {
  text-align: center; padding: 52px 24px; border-radius: 22px;
  background: radial-gradient(600px 260px at 50% 0%, rgba(124,140,255,0.24), transparent 70%), var(--bg2);
  border: 1px solid var(--border2);
}
.lp-cta .lp-sub { margin: 0 auto 24px; }
.lp-btn-lg { padding: 13px 26px; font-size: 1rem; border-radius: 12px; }

.lp-footer { border-top: 1px solid var(--border); padding: 30px 0 40px; }
.lp-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.lp-footer-links a, .lp-footer-copy { color: var(--text2); font-size: 0.88rem; }
.lp-footer-links a:hover { color: var(--text); }

@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .lp-auth { width: 100%; max-width: 560px; }
}
@media (max-width: 768px) {
  .lp-hero { padding: 32px 0 16px; }
  .lp-section { padding: 44px 0; }
  .lp-sub { margin-bottom: 26px; }
  /* Mobilde adimlar kutusuz, dikey zaman cizgisi */
  .lp-steps { grid-template-columns: 1fr; gap: 0; }
  .lp-steps li { padding: 0 0 26px 54px; background: none; border: 0; border-radius: 0; }
  .lp-steps li:last-child { padding-bottom: 0; }
  .lp-step-no { position: absolute; left: 0; top: 0; margin: 0; }
  .lp-steps li:not(:last-child)::before {
    content: ''; position: absolute; left: 17px; top: 44px; bottom: 8px; width: 2px; background: var(--border);
  }
  .lp-features { grid-template-columns: 1fr; gap: 12px; }
  .lp-feature { padding: 18px; }
}
@media (max-width: 560px) {
  .lp-container { padding: 0 16px; }
  .lp-nav-link { display: none; }
  .lp-title { font-size: 2.1rem; }
  .lp-lead { margin-bottom: 22px; }
  .lp-search .btn { padding: 11px 16px; }
  .lp-auth { padding: 22px 18px; border-radius: 18px; }
  .lp-cta { padding: 40px 18px; }
  .lp-footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Giris/kayit karti ici: sekmeler ve formlar */
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text2);
  transition: all var(--transition);
}
.auth-tab.active {
  background: var(--accent-strong);
  color: #fff;
}
.auth-switch {
  text-align: center;
  color: var(--text2);
  font-size: 0.85rem;
  margin-top: 16px;
}
/* Metin icindeki link yalnizca renkle ayrisiyordu (1.2:1); alt cizgi sart */
.auth-switch a { text-decoration: underline; text-underline-offset: 2px; }

/* ── Forms ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
.form-group select { appearance: none; cursor: pointer; }
.form-hint { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Select search dropdown */
.select-search-wrapper { position: relative; }
.select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow);
}
.select-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text2);
  transition: background var(--transition);
}
.select-dropdown-item:hover { background: var(--bg3); color: var(--text); }

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  box-shadow: 0 8px 16px rgba(21, 36, 55, 0.2);
}
.brand-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  flex: 1;
}
.sidebar-close { color: var(--text3); display: none; font-size: 1rem; }
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent2); font-weight: 600; }
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dept {
  display: block;
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logout-btn { width: 100%; justify-content: center; }

/* ── Topbar ────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
}
.hamburger { color: var(--text2); display: none; }
.topbar-search {
  flex: 1;
  position: relative;
  max-width: 480px;
}
.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}
.topbar-search input:focus { border-color: var(--accent); }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text3);
  pointer-events: none;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-select {
  padding: 7px 12px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

/* ── Main Content ──────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
.page-content {
  padding: 28px;
  max-width: 1100px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.section-sub { margin-top: 32px; }
.section-sub h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

/* ── Stats grid ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border2); }
.stat-icon { font-size: 1.8rem; }
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Notes Grid ────────────────────────────────────── */
.notes-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.note-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
}
.note-card:hover { border-color: var(--border2); transform: translateX(2px); }
.note-pdf-icon {
  width: 42px; height: 48px;
  background: var(--red-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--red);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}
.note-info { flex: 1; min-width: 0; }
.note-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.note-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.note-meta-item {
  font-size: 0.78rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.note-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.badge-year { background: var(--accent-bg); color: var(--accent2); }
.note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.vote-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 8px;
}
.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}
.vote-btn:hover { background: var(--bg2); }
.vote-btn.active-up { color: var(--green); }
.vote-btn.active-down { color: var(--red); }
.vote-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text2);
  min-width: 20px;
  text-align: center;
}
.vote-score.positive { color: var(--green); }
.vote-score.negative { color: var(--red); }

/* ── Tree browser ──────────────────────────────────── */
.tree-container { display: flex; flex-direction: column; gap: 20px; }
.tree-year {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tree-year-header {
  padding: 14px 20px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.tree-year-header:hover { background: var(--border); }
.tree-year-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
}
.tree-year-count {
  font-size: 0.8rem;
  color: var(--text3);
  background: var(--bg2);
  padding: 2px 10px;
  border-radius: 20px;
}
.tree-year-chevron {
  width: 18px; height: 18px;
  color: var(--text3);
  transition: transform 0.2s ease;
}
.tree-year.open .tree-year-chevron { transform: rotate(90deg); }
.tree-courses { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.tree-course {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tree-course-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.tree-course-header:hover { background: var(--bg3); }
.tree-course-name { font-weight: 600; font-size: 0.9rem; flex: 1; }
.tree-course-count { font-size: 0.78rem; color: var(--text3); }
.tree-files { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }

/* ── Upload card ───────────────────────────────────── */
.upload-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
}
.upload-quota {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--yellow-bg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #f8d38b;
  font-size: 0.88rem;
  line-height: 1.45;
}
.upload-quota.limit-reached {
  background: var(--red-bg);
  border-color: rgba(239, 68, 68, 0.55);
  color: #ffb4b4;
}
.drop-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 20px;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.drop-zone.disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}
.drop-icon { font-size: 2.2rem; margin-bottom: 10px; }
.drop-zone p { color: var(--text2); font-size: 0.92rem; }
.drop-sub { color: var(--text3) !important; font-size: 0.82rem !important; margin-top: 4px; }
.drop-limit {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text3);
  background: var(--bg3);
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.file-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.file-preview-icon { font-size: 1.6rem; }
.file-preview-info { flex: 1; min-width: 0; }
.file-preview-info span:first-child {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size-text { font-size: 0.8rem; color: var(--text3); margin-top: 2px; display: block; }
.remove-file-btn { color: var(--text3); font-size: 1.1rem; padding: 4px 8px; border-radius: 4px; }
.remove-file-btn:hover { color: var(--red); background: var(--red-bg); }
.upload-submit-btn { margin-top: 8px; padding: 13px; font-size: 0.95rem; }

/* ── Browse controls ───────────────────────────────── */
.browse-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-select {
  padding: 8px 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--accent); }

/* ── Pagination ────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover:not(:disabled) { background: var(--border2); color: var(--text); }
.page-btn.active { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { font-size: 0.85rem; color: var(--text3); padding: 0 8px; }

/* ── Settings ──────────────────────────────────────── */
.settings-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  max-width: 480px;
}
.settings-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.82rem;
}
.settings-card p { color: var(--text); font-size: 0.92rem; margin-bottom: 14px; }
.lang-options { display: flex; gap: 10px; }
.lang-option {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 2px solid var(--border);
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  text-align: center;
}
.lang-option:hover { border-color: var(--accent); }
.lang-option.active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent2); }

/* ── Empty state ───────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.95rem; margin-bottom: 16px; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
  .sidebar-close { display: block; }
  .main-content { margin-left: 0; }
  .topbar { left: 0; }
  .hamburger { display: flex; }
  .page-content { padding: 20px 16px; }
  .upload-card { padding: 20px 16px; }
  .note-card { flex-wrap: wrap; }
  .note-actions { width: 100%; justify-content: flex-start; margin-top: 8px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 24px 20px; }
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Upload progress ───────────────────────────────── */
.progress-bar-wrap {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease;
  width: 0%;
}

/* Refresh overrides */
body {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(124,140,255,0.16), transparent 26%),
    radial-gradient(circle at 85% 12%, rgba(245,194,107,0.10), transparent 18%),
    linear-gradient(180deg, #0b0f18 0%, #0a0d15 48%, #0c1220 100%);
}
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
  filter: blur(10px);
}
body::before {
  top: 96px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,140,255,0.16) 0%, transparent 68%);
  animation: floatAmbient 18s ease-in-out infinite;
}
body::after {
  left: -80px;
  bottom: 40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,194,107,0.10) 0%, transparent 68%);
  animation: floatAmbient 22s ease-in-out infinite reverse;
}
@keyframes floatAmbient {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}

.sidebar {
  background: linear-gradient(180deg, rgba(20,26,42,0.98) 0%, rgba(14,19,31,0.96) 100%);
  border-right: 1px solid rgba(176,188,255,0.12);
  box-shadow: 16px 0 40px rgba(0,0,0,0.16);
  backdrop-filter: blur(18px);
}
.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(176,188,255,0.10);
}
.brand-mark { box-shadow: 0 12px 28px rgba(90,102,180,0.26); }
.sidebar-nav {
  padding: 18px 14px;
  gap: 8px;
}
.nav-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: rgba(124,140,255,0.08);
  border-color: rgba(176,188,255,0.14);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(124,140,255,0.20), rgba(124,140,255,0.08));
  border-color: rgba(176,188,255,0.22);
  color: #dbe2ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.sidebar-footer {
  padding: 16px 14px 18px;
  border-top: 1px solid rgba(176,188,255,0.10);
}
.user-pill {
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(176,188,255,0.12);
  border-radius: 16px;
}
.user-avatar {
  background: linear-gradient(135deg, var(--accent), #9b78ff);
  box-shadow: 0 10px 24px rgba(124,140,255,0.24);
}

.topbar {
  background: rgba(12,17,29,0.72);
  border-bottom: 1px solid rgba(176,188,255,0.10);
  backdrop-filter: blur(18px);
  padding: 0 28px;
}
.topbar-search { max-width: 560px; }
.topbar-search input {
  height: 46px;
  padding: 11px 16px 11px 42px;
  background: rgba(19,24,39,0.76);
  border-color: rgba(176,188,255,0.14);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.topbar-search input:focus {
  border-color: rgba(176,188,255,0.35);
  box-shadow: 0 0 0 4px rgba(124,140,255,0.12);
}
.search-icon { left: 14px; }
.lang-select {
  padding: 9px 13px;
  background: rgba(19,24,39,0.78);
  border-color: rgba(176,188,255,0.16);
  border-radius: 14px;
  color: var(--text);
}

.page-content {
  padding: 38px 32px 56px;
  max-width: 1200px;
}
.section { position: relative; }
.dashboard-section { margin-bottom: 28px; }
.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 18px;
  padding: 30px;
  margin-bottom: 22px;
  border-radius: 28px;
  border: 1px solid rgba(176,188,255,0.16);
  background:
    radial-gradient(circle at 18% 24%, rgba(124,140,255,0.22), transparent 36%),
    linear-gradient(140deg, rgba(22,28,44,0.98) 0%, rgba(14,20,34,0.96) 100%);
  box-shadow: var(--shadow);
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,194,107,0.16) 0%, transparent 70%);
}
.dashboard-hero-copy,
.dashboard-hero-panel {
  position: relative;
  z-index: 1;
}
.dashboard-hero-copy h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.9px;
  margin-top: 12px;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(124,140,255,0.10);
  border: 1px solid rgba(176,188,255,0.18);
  color: var(--accent2);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-lead {
  margin-top: 12px;
  color: var(--text2);
  font-size: 0.96rem;
  line-height: 1.65;
  max-width: 62ch;
}
.dashboard-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 100%;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(176,188,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--hero-warm-bg);
  border: 1px solid rgba(245,194,107,0.34);
  color: var(--hero-warm);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dashboard-hero-panel p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 28ch;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 22px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  background: linear-gradient(180deg, rgba(22,28,44,0.96) 0%, rgba(18,23,37,0.94) 100%);
  border: 1px solid rgba(176,188,255,0.14);
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176,188,255,0.14), transparent);
}
.stat-card:hover {
  border-color: rgba(176,188,255,0.24);
  transform: translateY(-3px);
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  background: rgba(124,140,255,0.12);
  border: 1px solid rgba(176,188,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.stat-card:nth-child(2) .stat-icon {
  background: rgba(76,201,240,0.12);
  border-color: rgba(76,201,240,0.2);
}
.stat-card:nth-child(3) .stat-icon {
  background: rgba(245,194,107,0.12);
  border-color: rgba(245,194,107,0.24);
}
.stat-card:nth-child(4) .stat-icon {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.24);
}
.stat-label {
  margin-bottom: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
}
.stat-value {
  font-size: clamp(1.08rem, 1.6vw, 1.34rem);
  line-height: 1.35;
  word-break: break-word;
}

.browse-section { margin-top: 10px; }
.browse-shell {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(176,188,255,0.14);
  background: linear-gradient(180deg, rgba(18,23,38,0.92) 0%, rgba(15,20,33,0.96) 100%);
  box-shadow: var(--shadow);
}
.browse-shell::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,140,255,0.12) 0%, transparent 70%);
}
.section-header {
  margin-bottom: 22px;
}
.section-header-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 62ch;
}
.section-header h2 { margin-top: 10px; }
.browse-controls {
  position: relative;
  z-index: 1;
  gap: 12px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(176,188,255,0.12);
}
.filter-select {
  min-width: 155px;
  padding: 11px 15px;
  background: rgba(19,24,39,0.86);
  border-color: rgba(176,188,255,0.14);
  border-radius: 14px;
  color: var(--text);
}

.tree-container { gap: 16px; }
.tree-year {
  border-radius: 22px;
  border: 1px solid rgba(176,188,255,0.12);
  background: linear-gradient(180deg, rgba(22,28,44,0.95) 0%, rgba(17,22,35,0.95) 100%);
  box-shadow: var(--shadow-sm);
}
.tree-year-header {
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(124,140,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
}
.tree-year-header:hover {
  background: linear-gradient(180deg, rgba(124,140,255,0.12) 0%, rgba(255,255,255,0.02) 100%);
}
.tree-year-title { letter-spacing: -0.02em; }
.tree-year-count {
  padding: 4px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(176,188,255,0.12);
  color: var(--text2);
}
.tree-courses {
  padding: 14px;
  gap: 12px;
}
.tree-course {
  border-radius: 18px;
  border-color: rgba(176,188,255,0.10);
  background: rgba(9,13,21,0.52);
}
.tree-course-header { padding: 14px 18px; }
.tree-course-header:hover { background: rgba(124,140,255,0.07); }
.tree-course-count { color: var(--text2); }
.tree-files {
  padding: 10px 14px 14px;
  gap: 10px;
}

.note-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(176,188,255,0.12);
  background: linear-gradient(180deg, rgba(23,31,49,0.98) 0%, rgba(17,23,38,0.96) 100%);
  box-shadow: var(--shadow-sm);
}
.note-card:hover {
  border-color: rgba(176,188,255,0.22);
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(0,0,0,0.22);
}
.note-pdf-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(239,68,68,0.20) 0%, rgba(239,68,68,0.10) 100%);
  border: 1px solid rgba(239,68,68,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.note-title {
  font-size: 1rem;
  margin-bottom: 8px;
}
.note-meta { gap: 8px 10px; }
.note-meta-item {
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(176,188,255,0.10);
  border-radius: 999px;
  color: var(--text2);
}
.note-badge { padding: 6px 10px; }
.note-actions {
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(176,188,255,0.10);
}
.vote-group {
  padding: 6px 9px;
  background: rgba(12,17,29,0.66);
  border-color: rgba(176,188,255,0.10);
}
.vote-btn:hover { background: rgba(124,140,255,0.08); }
.btn-icon {
  width: 38px;
  height: 38px;
  background: rgba(19,24,39,0.82);
  border-color: rgba(176,188,255,0.10);
}
.btn-icon:hover {
  background: rgba(124,140,255,0.12);
  border-color: rgba(176,188,255,0.18);
}

.upload-card,
.settings-card {
  border-radius: 24px;
  border: 1px solid rgba(176,188,255,0.14);
  background: linear-gradient(180deg, rgba(20,26,42,0.96) 0%, rgba(16,21,35,0.96) 100%);
  box-shadow: var(--shadow-sm);
}
.upload-card { max-width: 700px; }
.drop-zone {
  background: rgba(255,255,255,0.02);
  border-color: rgba(176,188,255,0.20);
}
.drop-zone:hover,
.drop-zone.dragover {
  background: rgba(124,140,255,0.10);
  border-color: rgba(176,188,255,0.34);
}
.file-preview {
  background: rgba(255,255,255,0.03);
  border-color: rgba(176,188,255,0.14);
}
.upload-quota { border-radius: 16px; }
.settings-card h3 { color: var(--text3); }
.lang-option {
  border-radius: 16px;
  border-color: rgba(176,188,255,0.12);
}
.lang-option.active { box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); }
.empty-state {
  border: 1px dashed rgba(176,188,255,0.14);
  border-radius: 24px;
  background: rgba(255,255,255,0.02);
}

@media (max-width: 900px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .browse-shell {
    padding: 22px 18px;
  }
  .section-header {
    align-items: flex-start;
  }
  .browse-controls {
    width: 100%;
  }
  .filter-select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 16px;
  }
  .page-content {
    padding: 24px 16px 42px;
  }
  .dashboard-hero,
  .browse-shell {
    border-radius: 22px;
  }
  .note-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero {
    padding: 20px;
  }
  .dashboard-hero-copy h2 {
    font-size: 1.8rem;
  }
  .stat-card,
  .note-card {
    padding: 16px;
  }
  .browse-controls {
    padding: 0;
    border: none;
    background: transparent;
  }
  .filter-select {
    width: 100%;
  }
}

/* ── Department select with optgroups ──────────────── */
#dept-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b91a7' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  max-height: 280px;
}
#dept-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#dept-select optgroup {
  color: var(--accent2);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--bg2);
}
#dept-select option {
  color: var(--text);
  background: var(--bg);
  padding: 6px 10px;
  font-size: 0.88rem;
}
/* Uni search loading state */
#uni-search.loading {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c63ff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select-dropdown-item.no-result {
  color: var(--text3);
  cursor: default;
  font-style: italic;
}

/* ── Uni search dropdown scroll ────────────────────── */
.select-dropdown {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.select-dropdown-item {
  border-bottom: 1px solid var(--border);
}
.select-dropdown-item:last-child {
  border-bottom: none;
}
/* Highlight matched text */
.select-dropdown-item mark {
  background: var(--accent-bg);
  color: var(--accent2);
  border-radius: 2px;
  padding: 0 2px;
}

/* ── Uni search dropdown enhancements ──────────────── */
.select-dropdown-item.sd-active {
  background: var(--accent-bg);
  color: var(--accent2);
}
.select-dropdown-item mark {
  background: var(--accent-bg);
  color: var(--accent2);
  font-weight: 700;
  border-radius: 2px;
  padding: 0 1px;
}
.sd-empty {
  padding: 12px 14px;
  color: var(--text3);
  font-size: 0.85rem;
  font-style: italic;
  cursor: default;
}


/* ── Yasal sayfalar (gizlilik, sartlar, hesap silme) ───────────── */
.legal-body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
}
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
.legal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 20px; border-bottom: 1px solid var(--border);
}
.legal-back { color: var(--text2); text-decoration: none; font-size: 0.92rem; }
.legal-back:hover { color: var(--accent); }
.legal-lang { display: flex; gap: 8px; }
.legal-lang a {
  color: var(--text3); text-decoration: none; font-size: 0.85rem;
  padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid transparent;
}
.legal-lang a.active { color: var(--accent); border-color: var(--border2); background: var(--accent-bg); }
.legal-content { padding-top: 28px; }
.legal-content h1 {
  font-family: var(--font-head); font-size: 1.9rem; line-height: 1.25;
  margin: 0 0 6px; color: var(--text);
}
.legal-content h2 {
  font-family: var(--font-head); font-size: 1.2rem;
  margin: 34px 0 10px; color: var(--text); border-top: 1px solid var(--border); padding-top: 22px;
}
.legal-content h3 { font-size: 1rem; margin: 20px 0 6px; color: var(--accent2); }
.legal-content p { margin: 0 0 14px; color: var(--text2); }
.legal-content ul { margin: 0 0 16px; padding-left: 22px; color: var(--text2); }
.legal-content li { margin-bottom: 7px; }
.legal-content strong { color: var(--text); }
.legal-content a { color: var(--accent); }
.legal-content code {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; font-size: 0.88em; color: var(--accent2);
}
.legal-meta { font-size: 0.86rem; color: var(--text3); }
.legal-footer {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  font-size: 0.86rem; color: var(--text3);
}
.legal-footer a { color: var(--text2); text-decoration: none; }
.legal-footer a:hover { color: var(--accent); }

/* ── Universite vitrin sayfalari (/universiteler, /universite/...) ─ */
.uni-wrap { max-width: 880px; }
.uni-breadcrumb { font-size: 0.84rem; color: var(--text2); margin-bottom: 14px; }
.legal-content .uni-breadcrumb a { color: var(--text2); text-decoration: none; }
.legal-content .uni-breadcrumb a:hover { color: var(--accent); }
.legal-content .uni-meta { color: var(--text2); font-size: 0.9rem; margin: 4px 0 16px; }
.legal-content .uni-lead { font-size: 1.02rem; color: var(--text); }

.legal-content .uni-steps {
  list-style: none; counter-reset: step; padding: 0; margin: 22px 0 8px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.legal-content .uni-steps li {
  counter-increment: step; margin: 0; padding: 14px 16px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
}
.uni-steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-bottom: 8px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent2); font-weight: 700; font-size: 0.85rem;
}
.uni-steps strong { display: block; }
.uni-steps span { display: block; font-size: 0.86rem; line-height: 1.5; }

.legal-content .uni-dept-list {
  list-style: none; padding: 0; margin: 0 0 8px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.legal-content .uni-dept-list li { margin: 0; }
.legal-content a.uni-dept {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
  padding: 11px 14px; line-height: 1.35;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}
.legal-content a.uni-dept:hover { border-color: var(--accent); background: var(--bg3); }
.uni-dept-cta { flex-shrink: 0; font-size: 0.8rem; font-weight: 600; color: var(--accent2); }

.uni-filter input {
  width: 100%; padding: 12px 14px; outline: none;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font); font-size: 0.95rem;
}
.uni-filter input:focus { border-color: var(--accent); }
.uni-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.legal-content .uni-letters a {
  min-width: 32px; padding: 4px 8px; text-align: center; text-decoration: none;
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text2); font-size: 0.85rem; font-weight: 600;
}
.legal-content .uni-letters a:hover { border-color: var(--accent); color: var(--accent); }
.legal-content .uni-letter-group h2 { margin-top: 26px; padding-top: 14px; }
.legal-content .uni-list { list-style: none; padding: 0; columns: 2; column-gap: 28px; }
.legal-content .uni-list li { break-inside: avoid; margin-bottom: 10px; }
.legal-content .uni-list a { color: var(--accent2); text-decoration: none; }
.legal-content .uni-list a:hover { text-decoration: underline; }
.uni-city { display: block; font-size: 0.8rem; color: var(--text2); }
.legal-content .uni-back { margin-top: 26px; }

@media (max-width: 640px) {
  .legal-content .uni-steps,
  .legal-content .uni-dept-list { grid-template-columns: 1fr; }
  .legal-content .uni-list { columns: 1; }
}

.legal-alert {
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 0 20px; background: var(--bg2);
}
.legal-alert ul { margin-top: 8px; }
.legal-alert-warn { border-color: var(--yellow); background: var(--yellow-bg); }
.legal-alert-err  { border-color: var(--red);    background: var(--red-bg); color: var(--text); }
.legal-alert-ok   { border-color: var(--green);  background: var(--green-bg); }

.legal-form {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin: 22px 0;
  display: flex; flex-direction: column; gap: 6px;
}
.legal-form label { font-size: 0.9rem; color: var(--text2); margin-top: 10px; }
.legal-form input[type=text], .legal-form input[type=password] {
  background: var(--bg3); border: 1px solid var(--border2); color: var(--text);
  border-radius: var(--radius-sm); padding: 11px 13px; font-family: var(--font); font-size: 0.95rem;
}
.legal-form input[type=text]:focus, .legal-form input[type=password]:focus {
  outline: none; border-color: var(--accent);
}
.legal-form button { margin-top: 18px; }
.legal-check {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 18px; font-size: 0.9rem; color: var(--text2); line-height: 1.5;
}
.legal-check input { margin-top: 3px; flex-shrink: 0; }

/* ── Sikayet modali ────────────────────────────────────────────── */
.report-reasons { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; text-align: left; }
.report-reason {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg3); transition: var(--transition); color: var(--text2); font-size: 0.9rem;
}
.report-reason:hover { border-color: var(--border2); color: var(--text); }
.report-reason input { margin-top: 2px; flex-shrink: 0; }
.report-reason.selected { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
#report-details {
  width: 100%; background: var(--bg3); border: 1px solid var(--border2); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--font);
  font-size: 0.9rem; resize: vertical; min-height: 72px;
}
#report-details:focus { outline: none; border-color: var(--accent); }

/* ── Ayarlar: tehlikeli bolge ve engellenenler ─────────────────── */
.settings-card.danger-zone { border-color: var(--red); background: var(--red-bg); }
.settings-card.danger-zone h3 { color: var(--red); }
.settings-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.settings-links a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.settings-links a:hover { text-decoration: underline; }
.blocked-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.blocked-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 13px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.9rem;
}
.blocked-item .blocked-name { color: var(--text); font-weight: 500; }
.note-hidden-flag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--yellow-bg); color: var(--yellow);
  border: 1px solid var(--yellow); border-radius: 6px;
  padding: 2px 8px; font-size: 0.72rem; font-weight: 600;
}

.empty-detail {
  font-size: 0.85rem; color: var(--text3);
  max-width: 420px; margin: -4px auto 14px; line-height: 1.5;
}

.report-block-opt {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 14px 0 4px; padding: 11px 13px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.88rem; color: var(--text2); text-align: left; line-height: 1.45;
}
.report-block-opt:hover { border-color: var(--border2); color: var(--text); }
.report-block-opt input { margin-top: 2px; flex-shrink: 0; }

/* Public contact page */
.contact-page { background: radial-gradient(ellipse at 15% 0%, rgba(124,140,255,.14), transparent 55%), var(--bg); }
.contact-shell { width: min(920px, 100%); margin: 0 auto; padding: 48px 24px; }
.contact-back { display: inline-flex; margin-bottom: 24px; color: var(--text2); gap: 8px; }
.contact-card { overflow: hidden; background: var(--bg2); border: 1px solid var(--border2); border-radius: 24px; box-shadow: var(--shadow); padding: 48px; }
.contact-badge { display: inline-block; color: var(--accent2); background: var(--accent-bg); border-radius: 999px; padding: 8px 14px; font-size: .85rem; margin-bottom: 20px; }
.contact-heading h1 { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin-bottom: 16px; }
.contact-heading p { color: var(--text2); line-height: 1.8; max-width: 600px; }
.contact-mailbox { margin: 32px 0; padding: 28px; background: var(--accent-bg); border: 1px solid var(--border2); border-radius: 16px; }
.contact-label { display: block; color: var(--text2); font-size: .85rem; margin-bottom: 10px; }
.contact-address { display: inline-block; font-weight: 700; font-size: clamp(1rem, 3vw, 1.5rem); overflow-wrap: anywhere; line-height: 1.5; }
.contact-mailbox p { color: var(--text2); font-size: .9rem; line-height: 1.6; margin: 12px 0 20px; }
.contact-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.contact-topic-number { color: var(--accent2); font-size: .8rem; }
.contact-topics h2 { font-size: 1rem; line-height: 1.5; margin: 10px 0 8px; }
.contact-topics p, .contact-note { color: var(--text2); font-size: .88rem; line-height: 1.75; }
.contact-note { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 28px; }
.contact-page a:focus-visible { outline: 2px solid var(--accent2); outline-offset: 5px; border-radius: 4px; }
@media (max-width: 640px) {
  .contact-shell { padding: 24px 16px; }
  .contact-card { padding: 28px 20px; border-radius: 18px; }
  .contact-mailbox { padding: 20px 16px; }
  .contact-topics { grid-template-columns: 1fr; gap: 22px; }
  .contact-mailbox .btn { width: 100%; justify-content: center; }
}

.lp-footer-links { flex-wrap: wrap; }
.lp-footer-links a { overflow-wrap: anywhere; }

/* Shared language navigation on public pages. */
.site-language-switch {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  padding: 3px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg2);
}
.site-language-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 32px; padding: 4px 8px; border-radius: 7px;
  color: var(--text2); font-size: 0.82rem; font-weight: 700; text-decoration: none;
}
.site-language-switch a:hover, .site-language-switch a:focus-visible {
  background: var(--accent-bg); color: var(--accent);
}
.site-language-switch a.active { background: var(--accent-bg); color: var(--accent); }
.site-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.legal-header { flex-wrap: wrap; gap: 12px; }
.contact-language { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.share-language { display: flex; justify-content: center; margin-bottom: 18px; }
@media (max-width: 420px) {
  .lp-nav-inner { gap: 8px; height: auto; min-height: 62px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .lp-nav-links { gap: 6px; flex-wrap: wrap; }
  .lp-nav-links .btn { padding: 8px 10px; font-size: 0.8rem; }
  .lp-brand { font-size: 1.05rem; }
}
