:root {
  --ink: #15202b;
  --muted: #5b6b7c;
  --line: #d7dee7;
  --surface: #f3f6f9;
  --panel: #ffffff;
  --accent: #0b6e4f;
  --accent-2: #083d30;
  --sidebar: #102a43;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Candara", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: var(--surface);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 10% 20%, rgba(11, 110, 79, 0.18), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(16, 42, 67, 0.16), transparent 35%),
    linear-gradient(160deg, #eef3f7, #dfe8f0 55%, #cfdce8);
}

.auth-shell { width: min(440px, calc(100% - 2rem)); }

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(16, 42, 67, 0.16);
}

.auth-brand { display: flex; gap: 1rem; align-items: center; }
.auth-mark, .brand-mark {
  width: 3rem; height: 3rem; border-radius: 0.9rem;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700;
}

.divider {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: center;
  color: var(--muted); font-size: .85rem;
}
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.app-sidebar {
  background: linear-gradient(180deg, var(--sidebar), #0b1c2c);
  color: #fff; padding: 1.25rem 1rem;
}
.sidebar-brand { display: flex; gap: .85rem; align-items: center; margin-bottom: 1.5rem; padding: .5rem; }
.sidebar-brand small { display: block; opacity: .7; }
.sidebar-nav { display: flex; flex-direction: column; gap: .25rem; }
.sidebar-nav .nav-link {
  color: rgba(255,255,255,.85); border-radius: .7rem; padding: .7rem .85rem;
  display: flex; gap: .65rem; align-items: center; text-decoration: none;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-section {
  margin: 1rem 0 .35rem; padding: 0 .85rem;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .55;
}
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem; background: var(--panel); border-bottom: 1px solid var(--line);
}
.app-content { padding: 1.5rem; }
.stat-tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem;
}
.stat-label { display: block; color: var(--muted); font-size: .85rem; }
.stat-value { font-size: 2rem; color: var(--accent-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: sticky; top: 0; z-index: 10; }
}

/* Kategori ağacı */
.tree-panel { max-height: calc(100vh - 180px); overflow: auto; }
.tree-root, .tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tree-children { margin-left: 1.15rem; border-left: 1px dashed var(--line); padding-left: .65rem; }
.tree-node { margin: .2rem 0; }
.tree-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .55rem;
  border-radius: .55rem;
  transition: background .15s ease;
}
.tree-row:hover { background: #eef5f1; }
.tree-toggle { width: 1.25rem; color: var(--accent-2); text-decoration: none; }
.tree-toggle-spacer { width: 1.25rem; display: inline-block; }
.tree-code { font-family: Consolas, "Courier New", monospace; font-weight: 600; }
.tree-title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .95rem;
}
.tree-node.is-soru > .tree-row .tree-title { color: #0b4f8a; }
.tree-node.is-kategori > .tree-row .tree-title { font-weight: 600; }
.tree-node.is-tamam > .tree-row { background: #f1faf4; }
.tree-search .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(11,110,79,.15); }
.tree-node.tree-match > .tree-row { background: #e8f5ef; outline: 1px solid rgba(11,110,79,.25); }
.tree-title.tree-hit { font-weight: 700; }
.tree-node.tree-ancestor > .tree-row { opacity: 1; }
.score-badge { font-variant-numeric: tabular-nums; }
.score-board {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(16, 42, 67, 0.06);
}
.score-board-title {
  text-align: center;
  font-weight: 700;
  color: #b45309;
  margin-bottom: .85rem;
  font-size: 1.05rem;
}
.score-pillar {
  border: 1px solid #dbe4ee;
  border-radius: .55rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.score-pillar-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem .85rem;
  background: #0d6efd;
  color: #fff;
}
.score-pillar-code { font-size: .75rem; opacity: .85; }
.score-pillar-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.score-pillar-total {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 1.1rem;
  font-weight: 700;
}
.score-pillar-total .sep { opacity: .6; margin: 0 .15rem; }
.score-pillar-total .max { opacity: .9; }
.score-pillar-bar { height: .4rem; border-radius: 0; background: #cfe2ff; }
.score-pillar-list {
  list-style: none;
  margin: 0;
  padding: .35rem .75rem .5rem;
  flex: 1;
}
.score-pillar-list li {
  padding: .4rem 0;
  border-bottom: 1px dashed #e8eef4;
}
.score-pillar-list li:last-child { border-bottom: 0; }
.score-pillar-list .row-label {
  font-size: .8rem;
  line-height: 1.25;
  min-width: 0;
}
.score-pillar-list .row-score {
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.score-pillar-foot {
  padding: .55rem .85rem;
  background: #f8fafc;
  border-top: 1px solid #e8eef4;
  font-size: .85rem;
}
.score-board-grand {
  margin-top: .85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  background: #0f172a;
  color: #fff;
  border-radius: .5rem;
  font-size: 1rem;
}

/* Admin liste paneli (kullanıcı yönetimi vb.) */
.admin-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 42, 67, 0.06);
}
.admin-panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  background: #0d6efd;
  color: #fff;
}
.admin-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.admin-panel-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.1rem;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.admin-panel .table thead th {
  font-size: .82rem;
  text-transform: none;
  white-space: nowrap;
  background: #f1f5f9;
  border-bottom-width: 1px;
}
.admin-panel .table-sort {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.admin-panel .table-sort:hover { color: #0d6efd; }
.user-actions-cell { min-width: 22rem; }
.user-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
  justify-content: flex-end;
}
.user-actions .btn {
  padding: .25rem .5rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: .35rem;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: .8rem;
}
.user-actions .btn i { font-size: .95rem; line-height: 1; }
.btn-teal {
  background-color: #20c997;
  border-color: #20c997;
  color: #fff;
}
.btn-teal:hover {
  background-color: #1aa179;
  border-color: #1aa179;
  color: #fff;
}
@media print {
  .app-sidebar, .app-topbar, .admin-panel-toolbar, .user-actions, .admin-panel-header .btn { display: none !important; }
}

.dashboard-chart-card { min-height: 360px; }
.dashboard-chart-wrap { position: relative; height: 300px; width: 100%; }
.dashboard-chart-wrap-sm { height: 220px; }
