/* ===================================================
   JÜRI PORTALI — Ana Stil Dosyası
   Tema: Koyu / Altın vurgular
   =================================================== */

:root {
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface-2:   #21262d;
  --border:      #30363d;
  --text:        #e6edf3;
  --text-muted:  #7d8590;
  --accent:      #e6a817;
  --accent-glow: rgba(230,168,23,.18);
  --blue:        #58a6ff;
  --green:       #3fb950;
  --red:         #f85149;
  --orange:      #d29922;
  --sidebar-w:   260px;
  --topbar-h:    56px;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

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

/* ── LOGIN ─────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(230,168,23,.12) 0%, transparent 70%), var(--bg);
}

.login-wrap { width: 100%; max-width: 420px; padding: 24px; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: var(--shadow), 0 0 60px rgba(230,168,23,.05);
}

.login-logo { text-align: center; margin-bottom: 32px; }
.trophy-icon { font-size: 48px; margin-bottom: 12px; }
.login-logo h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.login-logo p  { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.login-badge {
  display: inline-block; margin-top: 12px;
  background: var(--accent-glow); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 20px;
  padding: 3px 14px; font-size: 12px; font-weight: 600;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 13px; font-weight: 500; color: var(--text-muted); }

.field-group input,
.sinif-input,
.not-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field-group input:focus,
.sinif-input:focus,
.not-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-login {
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 4px;
}
.btn-login:hover { background: #f0bd3a; }
.btn-login:active { transform: scale(.98); }

/* ── ALERT ─────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.alert-error { background: rgba(248,81,73,.15); border: 1px solid var(--red); color: var(--red); }

/* ── LAYOUT ─────────────────────────────────────────── */
body:not(.login-page) {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}
.logo-trophy { font-size: 28px; }
.logo-title { font-weight: 700; font-size: 14px; color: var(--accent); }
.logo-sub   { font-size: 11px; color: var(--text-muted); }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section-label {
  padding: 12px 18px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--text-muted);
  font-size: 13px;
  border-radius: 0;
  transition: background .15s, color .15s;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-glow); color: var(--accent); font-weight: 600; }

.nav-icon { font-size: 15px; flex-shrink: 0; }
.nav-text { flex: 1; font-size: 12px; line-height: 1.3; }
.nav-badge {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.nav-school { padding-left: 22px; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--accent);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); }

.btn-logout {
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.btn-logout:hover { color: var(--red); background: rgba(248,81,73,.1); }

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: rgba(22,27,34,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); text-decoration: none; }
.bc-sep { color: var(--border); }
.bc-current { color: var(--text); font-weight: 600; }

.topbar-user { font-size: 13px; color: var(--text-muted); }

/* ── CONTENT ─────────────────────────────────────────── */
.content { padding: 24px; flex: 1; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h2 { font-size: 22px; font-weight: 700; }
.page-header p  { color: var(--text-muted); margin-top: 2px; }

.section-title { font-size: 14px; font-weight: 600; color: var(--text-muted); margin: 28px 0 14px; text-transform: uppercase; letter-spacing: .06em; }

/* ── STAT CARDS ─────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-icon { font-size: 24px; margin-bottom: 8px; }
.stat-val  { font-size: 32px; font-weight: 700; color: var(--text); }
.stat-lbl  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── SCHOOL GRID ─────────────────────────────────────── */
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; }

.school-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: block;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
  color: var(--text);
}
.school-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3), 0 0 0 1px var(--accent-glow);
  text-decoration: none;
  color: var(--text);
}
.school-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.school-icon { font-size: 22px; }
.school-count { font-size: 12px; color: var(--text-muted); background: var(--surface-2); padding: 2px 10px; border-radius: 12px; }
.school-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; line-height: 1.4; }

.progress-wrap { display: flex; flex-direction: column; gap: 5px; }
.progress-bar { height: 5px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.progress-txt { font-size: 11px; color: var(--text-muted); }

/* ── STUDENT TABLE ─────────────────────────────────── */
.student-table-wrap { overflow-x: auto; }

.student-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.student-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}

.student-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--surface-2);
}

.student-row {
  cursor: pointer;
  transition: background .15s;
}
.student-row:hover { background: var(--surface-2); }
.student-row.reviewed { background: rgba(63,185,80,.04); }

.td-num { color: var(--text-muted); width: 36px; }
.td-name { font-weight: 500; display: flex; align-items: center; gap: 8px; }

.reviewed-dot { color: var(--green); font-size: 15px; line-height: 1; }
.pending-dot  { color: var(--border); font-size: 15px; line-height: 1; }

.doc-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.doc-ok      { background: rgba(63,185,80,.15);  color: var(--green); }
.doc-partial { background: rgba(210,153,34,.15);  color: var(--orange); }
.doc-missing { background: rgba(248,81,73,.15);   color: var(--red); }

.star-display { color: var(--accent); font-size: 12px; letter-spacing: .5px; }
.score-num    { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

.btn-view {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all .2s;
  text-decoration: none;
}
.btn-view:hover { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── STUDENT DETAIL ─────────────────────────────────── */
.student-content {
  display: flex;
  gap: 0;
  padding: 0 !important;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

.student-panel {
  width: 310px;
  min-width: 310px;
  overflow-y: auto;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.viewer-panel {
  flex: 1;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.student-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.student-avatar {
  width: 44px; height: 44px;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: var(--accent);
  flex-shrink: 0;
}
.student-info-card h3 { font-size: 14px; font-weight: 700; }
.student-info-card p  { font-size: 12px; }

.info-field { display: flex; flex-direction: column; gap: 5px; }
.info-field label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.sinif-input { padding: 8px 10px; font-size: 13px; }

/* Doc list */
.doc-list { display: flex; flex-direction: column; gap: 6px; }
.doc-list-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }

.doc-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
}
.doc-available {
  background: var(--surface-2);
  color: var(--text);
}
.doc-available:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}
.doc-active {
  background: var(--accent-glow) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 600;
}
.doc-missing {
  background: rgba(248,81,73,.05);
  border-color: rgba(248,81,73,.3);
  color: var(--text-muted);
  cursor: not-allowed;
}
.doc-status { font-size: 14px; }

/* Rating */
.rating-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rating-title { font-size: 13px; font-weight: 600; }

.star-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.star-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--border);
  cursor: pointer;
  padding: 2px;
  transition: color .1s, transform .1s;
  line-height: 1;
}
.star-btn:hover { transform: scale(1.2); }
.star-btn.star-on { color: var(--accent); }

.puan-display { font-size: 13px; color: var(--text-muted); }
.puan-display strong { color: var(--accent); font-size: 16px; }

.not-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.not-input { resize: vertical; min-height: 80px; font-size: 13px; padding: 8px 10px; }

.btn-save {
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-save:hover { background: #f0bd3a; }

.save-msg { font-size: 12px; min-height: 18px; transition: all .3s; }
.save-ok  { color: var(--green); }
.save-err { color: var(--red); }

/* Admin notes */
.admin-notes { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.admin-note-item { padding-bottom: 10px; border-bottom: 1px solid var(--surface-2); }
.admin-note-item:last-child { border-bottom: none; padding-bottom: 0; }
.admin-note-item strong { font-size: 13px; }

/* Nav buttons */
.nav-btns { display: flex; gap: 8px; }
.btn-nav {
  flex: 1;
  display: block;
  text-align: center;
  padding: 9px 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all .2s;
  text-decoration: none;
}
.btn-nav:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); text-decoration: none; }
.btn-nav-next { text-align: right; }

/* File viewer */
.file-iframe { width: 100%; height: 100%; border: none; display: block; }

.img-viewer {
  max-width: 100%; max-height: 100%;
  overflow: auto;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.file-img {
  max-width: 100%;
  max-height: calc(100vh - var(--topbar-h) - 32px);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: max-width .3s, max-height .3s;
}
.file-img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.viewer-placeholder, .viewer-empty {
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 32px;
}
.viewer-placeholder p { font-size: 15px; }

.btn-dl {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #0d1117;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: background .2s;
}
.btn-dl:hover { background: #f0bd3a; text-decoration: none; }

/* ── UTILS ─────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 12px; }
.mt-4       { margin-top: 16px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2,1fr); }
  .student-content { flex-direction: column; height: auto; }
  .student-panel { width: 100%; min-width: 0; border-right: none; border-bottom: 1px solid var(--border); }
  .viewer-panel { height: 60vh; }
}
