/* Temiz Sınıf — gösterişli admin teması */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --tk-primary: #0ea5e9;
  --tk-primary-dark: #0284c7;
  --tk-accent: #22c55e;
  --tk-accent-glow: rgba(34, 197, 94, 0.45);
  --tk-ink: #0f172a;
  --tk-muted: #64748b;
  --tk-surface: rgba(255, 255, 255, 0.92);
  --tk-radius: 16px;
  --tk-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --tk-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.app-shell {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(14, 165, 233, 0.12), transparent 50%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(34, 197, 94, 0.1), transparent 45%),
    linear-gradient(165deg, #e8eef5 0%, #f1f5f9 40%, #e2e8f0 100%);
}

/* —— Sidebar —— */
.app-sidebar {
  background:
    linear-gradient(175deg, #1a3352 0%, #0c1f38 55%, #081828 100%);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
}

.app-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.5), transparent 40%, rgba(14, 165, 233, 0.3));
  pointer-events: none;
}

.app-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4ade80, #16a34a 50%, #0d9488);
  box-shadow: 0 4px 16px var(--tk-accent-glow);
}

.app-nav-item.is-active {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.06));
  color: #bbf7d0;
  box-shadow: inset 3px 0 0 var(--tk-accent);
  border-left: none;
  padding-left: 0.8rem;
}

.app-nav-item:hover {
  transform: translateX(2px);
}

/* —— Üst çubuk —— */
.app-topbar {
  background: var(--tk-surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  min-height: 62px;
}

.app-topbar-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--tk-ink), #334155);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-app-menu {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.btn-app-menu:hover {
  background: linear-gradient(145deg, #fff, #e2e8f0);
  transform: scale(1.02);
}

/* —— Sayfa kartları —— */
.panel-card {
  border: 0;
  border-radius: var(--tk-radius);
  background: var(--tk-surface);
  backdrop-filter: blur(8px);
  box-shadow: var(--tk-shadow);
  overflow: hidden;
}

.panel-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e8eef4;
  background: linear-gradient(180deg, #fafcff, #fff);
}

.panel-card__head h2,
.page-toolbar h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tk-ink);
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 0;
  border-radius: var(--tk-radius);
  background: var(--tk-surface);
  box-shadow: var(--tk-shadow);
}

.app-page {
  padding: 1.25rem 1.5rem 2rem;
}

@media (min-width: 992px) {
  .app-page {
    padding: 1.5rem 2rem 2.5rem;
  }
}

/* —— Tablo —— */
.table-premium {
  margin: 0;
  --bs-table-hover-bg: rgba(14, 165, 233, 0.06);
}

.table-premium thead {
  background: linear-gradient(180deg, #f1f5f9, #e8eef4);
}

.table-premium thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
  padding: 0.85rem 1rem;
}

.table-premium tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-color: #f1f5f9;
}

.table-premium tbody tr {
  transition: background 0.15s, transform 0.15s;
}

.table-premium tbody tr:hover {
  background: rgba(14, 165, 233, 0.04);
}

.badge-glow {
  padding: 0.35em 0.75em;
  font-weight: 600;
  border-radius: 999px;
  font-size: 0.72rem;
}

.badge-glow--ok {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.35);
}

.badge-glow--muted {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #fff;
}

/* —— Butonlar —— */
.btn-glow {
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, var(--tk-accent), #16a34a);
  color: #fff;
  box-shadow: 0 4px 14px var(--tk-accent-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-glow:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--tk-accent-glow);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: all 0.15s;
}

.btn-icon--edit:hover {
  border-color: var(--tk-primary);
  color: var(--tk-primary);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.btn-icon--danger:hover {
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* —— Ana panel istatistik —— */
.page-hero {
  border-radius: var(--tk-radius);
  padding: 1.75rem 2rem;
  color: #fff;
  background:
    linear-gradient(125deg, #0f766e 0%, #16a34a 45%, #0ea5e9 100%);
  box-shadow: var(--tk-shadow-lg);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.page-hero h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.page-hero p {
  opacity: 0.92;
  margin-bottom: 0;
  max-width: 36rem;
}

.page-hero--footer {
  margin-bottom: 0.5rem;
}

.stat-card {
  border: 0;
  border-radius: var(--tk-radius);
  padding: 1.25rem 1.15rem;
  color: #fff;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--tk-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tk-shadow-lg);
}

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-card__label {
  font-size: 0.8rem;
  opacity: 0.9;
  font-weight: 600;
  margin-top: 0.25rem;
}

.stat-card--blue { background: linear-gradient(145deg, #0ea5e9, #0369a1); }
.stat-card--green { background: linear-gradient(145deg, #22c55e, #15803d); }
.stat-card--violet { background: linear-gradient(145deg, #8b5cf6, #6d28d9); }
.stat-card--amber { background: linear-gradient(145deg, #f59e0b, #d97706); }

/* —— SweetAlert modal —— */
.swal2-crud-web {
  border-radius: 20px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2) !important;
}

.swal2-crud-web .swal2-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  padding: 1rem 1.25rem !important;
  margin: 0 !important;
  width: 100%;
  background: linear-gradient(90deg, #0f2744, #1e3a5f);
  color: #fff !important;
}

.swal2-crud-web .swal2-html-container {
  margin: 0 !important;
  padding: 1.15rem 1.25rem 1.25rem !important;
}

.swal2-crud-web .crud-modal-body {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem 1.1rem !important;
  border: 1px solid #e2e8f0;
}

.swal2-crud-web .crud-form .form-control,
.swal2-crud-web .crud-form .form-select {
  border-radius: 10px;
  border-color: #cbd5e1;
}

.swal2-crud-web .crud-form .form-control:focus {
  border-color: var(--tk-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.swal2-crud-web .btn-primary {
  background: linear-gradient(135deg, var(--tk-primary), var(--tk-primary-dark));
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
}

/* —— Auth —— */
.auth-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.auth-body {
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.2), transparent 40%),
    linear-gradient(145deg, #0f2744, #1e3a5f 50%, #0c4a6e);
}

.auth-title {
  background: linear-gradient(90deg, #0f766e, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chart-card canvas {
  max-height: 220px;
}

.class-score-board {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.class-score-row {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) 1fr;
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 768px) {
  .class-score-row {
    grid-template-columns: minmax(7rem, 10rem) 1fr;
  }
}

.class-score-row__label {
  font-size: 0.85rem;
  line-height: 1.2;
}

.class-score-row__bar {
  height: 1.35rem;
  border-radius: 999px;
  background: #e8eef4;
  overflow: hidden;
}

.class-score-row__bar .progress-bar {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35rem;
  border-radius: 999px;
  min-width: 2.25rem;
}

.score-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.score-pick__btn {
  min-width: 3.5rem;
  border-radius: 10px !important;
  text-align: center;
}

.score-pick .btn-check:checked + .score-pick__btn {
  background: linear-gradient(135deg, var(--tk-primary), var(--tk-primary-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.puanlama-skala-legend {
  background: linear-gradient(90deg, #eff6ff, #f0fdf4);
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.score-criterion {
  border: 1px solid #e8eef4;
  transition: box-shadow 0.2s;
}

.score-criterion:hover {
  box-shadow: var(--tk-shadow);
}

/* —— Liste filtre / sıralama —— */
.list-filter-panel {
  padding: 1rem 1.15rem 1.1rem;
  border-bottom: 1px solid #e8eef4;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdf4 45%, #eff6ff 100%);
  border-radius: var(--tk-radius) var(--tk-radius) 0 0;
}

.list-filter-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.list-filter-panel__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--tk-ink);
}

.list-filter-panel__hint {
  font-size: 0.75rem;
  color: var(--tk-muted);
}

.list-filter-columns:not([hidden]) {
  padding-top: 0.25rem;
  border-top: 1px dashed #cbd5e1;
}

.list-filter-search .form-control {
  border-radius: 0 10px 10px 0;
}

.list-filter-search .input-group-text {
  border-radius: 10px 0 0 10px;
  background: #fff;
}

.list-th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.list-th-sortable .list-th-label {
  margin-right: 0.35rem;
}

.list-th-sortable .list-sort-icon {
  font-size: 0.75rem;
  opacity: 0.35;
  vertical-align: middle;
}

.list-th-sortable:hover {
  background: rgba(14, 165, 233, 0.08);
}

.list-th-sortable.is-sorted-asc .list-sort-icon,
.list-th-sortable.is-sorted-desc .list-sort-icon {
  opacity: 1;
  color: var(--tk-primary);
}

.list-data-card .table-responsive {
  padding: 0 0.25rem 0.5rem;
}

/* Select2 */
.select2-container--bootstrap-5 .select2-selection {
  border-radius: 10px;
  min-height: calc(1.5em + 0.5rem + 2px);
}

.list-filter-panel .select2-container--bootstrap-5 .select2-selection--single {
  font-size: 0.875rem;
}

.swal2-container .select2-container {
  z-index: 9999;
}
