/* ═══════════════════════════════════════════════════════════════
   Webtymize Academy Portal — Premium Design System
   Brand Colors: Webtymize Academy - Mavi #1da0e0 + Koyu #18181c / #18181b
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Ink / Text */
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --soft: #94a3b8;
  --faint: #cbd5e1;

  /* Surfaces */
  --panel: #ffffff;
  --surface: #f8fafc;
  --surface-strong: #f1f5f9;
  --surface-dim: #e2e8f0;
  --line: #e2e8f0;
  --line-soft: rgba(226, 232, 240, 0.6);

  /* Primary – Academy Koyu (Brand) */
  --primary: #18181b;
  --primary-light: #2a2a31;
  --primary-dark: #18181c;
  --primary-soft: #ececef;
  --primary-softer: #f5f5f6;
  --primary-glow: rgba(24, 24, 27, 0.12);

  /* Accent – Academy Mavi (Brand) */
  --accent: #1da0e0;
  --accent-strong: #1688c0;
  --accent-dark: #116f9e;
  --accent-light: #4cb6ea;
  --accent-soft: #e7f5fc;
  --accent-softer: #f3fafe;
  --accent-glow: rgba(29, 160, 224, 0.15);
  --accent-glow-strong: rgba(29, 160, 224, 0.25);

  /* Status */
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-glow: rgba(220, 38, 38, 0.12);
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --success: #16a34a;
  --success-soft: #f0fdf4;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
  --shadow-primary: 0 4px 14px rgba(24, 24, 27, 0.25);
  --shadow-accent: 0 4px 14px rgba(29, 160, 224, 0.3);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-full: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }

h1 {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--accent);
}

/* ── Ambient Background ──────────────────────────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 340px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(24, 24, 27, 0.06), transparent),
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(29, 160, 224, 0.04), transparent),
    linear-gradient(180deg, var(--surface), transparent);
  pointer-events: none;
  z-index: -1;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(100%) scale(0.9); }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes progressPulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow-strong); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.animate-in {
  /*
   * Keep the initial keyframe during the delay, but release transform after
   * the animation. A retained translateY(0) creates a containing block and
   * offsets fixed dropdowns from their trigger.
   */
  animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.animate-in-delay-1 { animation-delay: 0.06s; }
.animate-in-delay-2 { animation-delay: 0.12s; }
.animate-in-delay-3 { animation-delay: 0.18s; }
.animate-in-delay-4 { animation-delay: 0.24s; }
.animate-in-delay-5 { animation-delay: 0.30s; }

/* ── Brand ───────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-spring);
}

/* Yazısız, yalnızca ikon gösteren marka bloğu (panel header) */
.brand.brand-icon-only {
  justify-content: center;
}

.brand-icon-only .brand-logo {
  width: 44px;
  height: 44px;
}

.brand:hover .brand-logo {
  transform: scale(1.06) rotate(-2deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text .brand-main {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 0.01em;
}

.brand-text .brand-sub {
  font-weight: 700;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Header (Glassmorphism) ──────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(20px, 4vw, 52px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  animation: slideInDown 0.4s var(--ease-out);
}

.topline {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topline h1 {
  font-size: 20px;
  font-weight: 700;
  padding-left: 20px;
  border-left: 2px solid var(--line);
  color: var(--ink-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.avatar.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 17px;
}

.avatar svg,
.welcome-avatar svg {
  width: 62%;
  height: 62%;
}

/* ── Layout ──────────────────────────────────────────────────── */
main {
  width: min(1200px, calc(100vw - 40px));
  margin: 32px auto 60px;
}

.page-shell {
  display: grid;
  gap: 24px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
}

/* Üstte ince renk şeridi */
.stat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
}

.stat:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-glow);
  transform: translateY(-3px);
}

.stat:hover::after {
  opacity: 1;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon.navy {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.orange {
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.stat-body {
  display: grid;
  gap: 2px;
}

.stat-body span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.stat-body strong {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ── Cards / Sections ────────────────────────────────────────── */
.card,
.section,
.table-wrap,
.upload-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
}

.card:hover,
.section:hover {
  box-shadow: var(--shadow-md);
}

.section {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.section-head {
  display: grid;
  gap: 5px;
}

.section-head p {
  font-size: 13.5px;
}

/* ── Forms ────────────────────────────────────────────────────── */
form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.span-2 {
  grid-column: span 2;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, background var(--duration-fast) ease;
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:hover,
select:hover {
  border-color: var(--soft);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #fff;
}

/* Password wrapper */
.input-group {
  position: relative;
}

.input-group input {
  padding-right: 44px;
}

.input-group .toggle-password {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0;
  min-height: unset;
}

.input-group .toggle-password:hover {
  color: var(--muted);
  background: var(--surface);
}

.input-group .toggle-password svg {
  width: 18px;
  height: 18px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  position: relative;
  overflow: hidden;
}

button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0px);
  box-shadow: none;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Orange CTA variant */
button.cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

button.cta:hover {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-dark));
  box-shadow: var(--shadow-accent);
}

button.secondary {
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--ink-secondary);
  box-shadow: var(--shadow-xs);
}

button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-softer);
  box-shadow: var(--shadow-sm);
}

button.danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
}

button.danger:hover {
  box-shadow: 0 4px 14px var(--danger-glow);
}

button.ghost {
  background: transparent;
  color: var(--muted);
  min-height: 36px;
  padding: 0 12px;
}

button.ghost:hover {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: none;
}

button.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Hoş geldiniz maili durum butonu */
button.welcome-btn {
  background: var(--panel);
  border: 1.5px solid;
  box-shadow: var(--shadow-xs);
}

button.welcome-btn.unsent {
  border-color: var(--danger);
  color: var(--danger);
}

button.welcome-btn.unsent:hover {
  background: var(--danger-soft);
  box-shadow: 0 4px 14px var(--danger-glow);
}

button.welcome-btn.sent {
  border-color: var(--success);
  color: var(--success);
}

button.welcome-btn.sent:hover {
  background: var(--success-soft);
}

button.icon-btn {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Spinner inside button */
button .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.badge.active {
  background: var(--success-soft);
  color: var(--success);
}

.badge.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease infinite;
}

.badge.passive {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.passive::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  opacity: 0.5;
}

/* ── Table ───────────────────────────────────────────────────── */
.table-wrap {
  overflow: hidden;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.students-table {
  min-width: 1100px;
}

.students-table th:nth-child(1),
.students-table td:nth-child(1) {
  width: 25%;
  min-width: 250px;
}

.students-table th:nth-child(2),
.students-table td:nth-child(2) {
  width: 25%;
  min-width: 240px;
}

.students-table th:nth-child(3),
.students-table td:nth-child(3) {
  width: 100px;
  text-align: center;
}

.students-table th:nth-child(4),
.students-table td:nth-child(4) {
  width: auto;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: middle;
}

th {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

tbody tr {
  transition: background var(--duration-fast) ease;
}

tbody tr:hover {
  background: var(--surface);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  min-width: 0;
}

.student-name strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  text-align: left;
}

.student-name .link-name {
  display: block;
  width: auto;
  text-align: left;
  white-space: nowrap;
  background: none !important;
  border: none;
  padding: 0;
  margin: 0;
  min-height: auto !important;
  font-size: 14px;
  font-weight: 650;
  color: var(--primary);
  cursor: pointer;
  box-shadow: none !important;
  line-height: 1.6;
  overflow: visible !important;
}

.student-name .link-name:hover {
  color: var(--accent);
  text-decoration: underline;
  background: none;
  transform: none;
  box-shadow: none;
}

.student-name span {
  display: block;
  text-align: left;
  color: var(--soft);
  font-size: 12.5px;
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.program-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  line-height: 1.4;
  display: block;
}

.status-col {
  text-align: center;
}

.status-col .badge {
  margin: 0 auto;
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.actions button {
  flex-shrink: 0;
  height: 32px;
  min-height: 32px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ── Action Dropdown ─────────────────────────────────────────── */
.action-dropdown {
  position: relative;
  display: inline-flex;
}

.action-dropdown-menu {
  display: none;
  position: fixed;
  z-index: 999;
  min-width: 210px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0;
  padding: 4px;
}

.action-dropdown.open .action-dropdown-menu {
  display: block;
}

.action-dropdown-menu li button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none !important;
  border: none;
  color: var(--ink) !important;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: none !important;
  min-height: auto !important;
  text-align: left;
  justify-content: flex-start;
}

.action-dropdown-menu li button:hover {
  background: var(--surface) !important;
  transform: none;
}

.action-dropdown-menu li button.document-uploaded {
  border: 1.5px solid var(--success) !important;
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.action-dropdown-menu li button.document-uploaded:hover {
  background: color-mix(in srgb, var(--success) 14%, transparent) !important;
}

.action-dropdown-menu li button.danger-item {
  color: var(--danger) !important;
}

.action-dropdown-menu li button.danger-item:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent) !important;
}

.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}

.actions button.icon-only {
  padding: 0;
  width: 32px;
}

.empty-state {
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--faint);
}

/* ── Login Page ──────────────────────────────────────────────── */
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px);
  background:
    radial-gradient(circle at 18% 22%, rgba(29, 160, 224, 0.18), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(42, 42, 49, 0.55), transparent 50%),
    linear-gradient(155deg, #0f0f12 0%, #18181c 38%, #27272c 68%, #1688c0 165%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Dekoratif nokta-grid dokusu */
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(135deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 70%);
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  top: -25%;
  right: -18%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 160, 224, 0.22), transparent 68%);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 26px) scale(1.08); }
}

.login-brand .brand {
  color: #fff;
  margin-bottom: 40px;
}

.login-brand .brand-text .brand-main {
  color: #fff;
}

.login-brand .brand-text .brand-sub {
  color: rgba(255, 255, 255, 0.7);
}

.login-brand .brand-logo-login {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-wordmark {
  max-width: 260px;
  max-height: 64px;
  object-fit: contain;
}

.brand-fallback {
  align-items: center;
  gap: 10px;
}

/* Giriş ekranı logosu — ortalı, büyük, beyaz kart içinde */
.login-logo-wrap {
  align-self: center;
  margin-bottom: 36px;
}

.login-logo {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.support-frame-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 2600px;
}

.support-frame {
  display: block;
  width: min(100%, 480px);
  min-height: 2600px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.login-brand h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
}

.login-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.7;
  max-width: 420px;
  position: relative;
}

.login-features {
  display: grid;
  gap: 14px;
  margin-top: 40px;
  position: relative;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--duration-normal) ease, transform var(--duration-normal) var(--ease-spring), border-color var(--duration-normal) ease;
}

.login-feature:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(29, 160, 224, 0.4);
  transform: translateX(5px);
}

.login-feature-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(29, 160, 224, 0.2);
  flex-shrink: 0;
}

.login-feature-icon svg {
  width: 18px;
  height: 18px;
  color: #8fd3f4;
}

.login-feature span {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.login-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(32px, 5vw, 64px);
  background: var(--panel);
}

.login-panel {
  width: min(420px, 100%);
  animation: fadeInUp 0.6s var(--ease-out);
}

.login-panel .brand {
  margin-bottom: 32px;
  display: none;
}

.login-panel h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.login-panel > p {
  margin-bottom: 28px;
  font-size: 15px;
}

.login-panel button[type="submit"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.login-panel button[type="submit"]:hover {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-dark));
  box-shadow: var(--shadow-accent);
}

.login-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--soft);
  font-size: 12.5px;
}

/* ── Toast Notification ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  max-width: 440px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  animation: toastIn 0.35s var(--ease-out);
}

.toast.leaving {
  animation: toastOut 0.25s ease forwards;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-icon svg {
  width: 16px;
  height: 16px;
}

.toast.success .toast-icon {
  background: var(--success-soft);
  color: var(--success);
}

.toast.error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast.info .toast-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 650;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  width: 28px;
  min-height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  animation: overlayIn 0.2s ease;
  overflow-y: auto;
}

.modal-overlay > .modal {
  margin: auto;
}

.modal-overlay.closing {
  animation: overlayIn 0.15s ease reverse forwards;
}

.modal {
  width: min(520px, 100%);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  animation: scaleIn 0.3s var(--ease-out);
  overflow: hidden;
}

.modal-overlay.closing .modal {
  animation: scaleIn 0.15s ease reverse forwards;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 18px;
  color: var(--primary);
}

.modal-body {
  padding: 24px;
}

.student-profile-modal {
  max-height: min(72vh, 720px);
  overflow: auto;
}

.profile-tabs {
  position: sticky;
  top: -24px;
  z-index: 2;
  display: flex;
  gap: 6px;
  margin: -8px -8px 20px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.profile-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.profile-tab.active {
  border-color: var(--primary-soft);
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.profile-panel {
  display: none;
}

.profile-panel.active {
  display: block;
}

.activity-loading {
  display: grid;
  place-items: center;
  min-height: 180px;
}

.activity-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.activity-summary > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.activity-summary strong {
  display: block;
  color: var(--primary);
  font-size: 20px;
  line-height: 1.2;
}

.activity-summary span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.activity-list,
.activity-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.activity-main {
  min-width: 0;
}

.activity-main strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.35;
}

.activity-main span,
.activity-meta small,
.activity-event small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.activity-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  max-width: 280px;
  text-align: right;
}

.activity-meta.wide {
  max-width: 360px;
}

.activity-heading {
  margin: 22px 0 10px;
  color: var(--primary);
}

.activity-event {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.activity-event span {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.activity-event.muted {
  border-left-color: var(--line);
  color: var(--muted);
}

.activity-progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--surface-strong);
}

.activity-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.empty-state.compact {
  padding: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.pdf-modal-overlay .modal {
  max-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.pdf-modal-body {
  min-height: 0;
}

/* ── PDF Canvas Viewer ───────────────────────────────────────── */
.pdf-canvas-viewer {
  height: min(74vh, calc(100vh - 190px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #eef2f7;
}

.pdf-canvas-loading,
.pdf-canvas-error {
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.pdf-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.pdf-canvas-toolbar button {
  min-width: 86px;
}

.pdf-canvas-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 18px 24px;
  overflow: hidden;
}

.pdf-canvas-page {
  width: fit-content;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.pdf-canvas-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px), (max-height: 560px) {
  .modal-overlay.pdf-modal-overlay {
    padding: 8px;
  }

  .pdf-modal-overlay .modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .pdf-modal-overlay .modal-header {
    min-height: 0;
    padding: 10px 12px;
    gap: 8px;
  }

  .pdf-modal-overlay .modal-header h2 {
    max-width: calc(100vw - 72px) !important;
    font-size: 13px !important;
  }

  .pdf-modal-overlay .ghost.icon-btn {
    width: 34px;
    height: 34px;
  }

  .pdf-canvas-viewer {
    height: calc(100dvh - 96px);
  }

  .pdf-canvas-toolbar {
    gap: 8px;
    padding: 8px;
  }

  .pdf-canvas-toolbar button {
    min-width: 74px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .pdf-canvas-stage {
    padding: 8px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .pdf-modal-overlay .modal-header {
    padding: 8px 12px;
  }

  .pdf-canvas-viewer {
    height: calc(100dvh - 82px);
  }

  .pdf-canvas-toolbar {
    padding: 6px 8px;
  }

  .pdf-canvas-stage {
    padding: 6px;
  }
}

/* ── Achievement Viewer ─────────────────────────────────────── */
.achievement-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76vh;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  background: var(--surface);
}

.achievement-viewer img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
}

.achievement-viewer-document {
  padding: 0;
  height: 76vh;
  background: #525659;
}

.achievement-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 76vh;
}

/* ── Confirm Dialog ──────────────────────────────────────────── */
.confirm-body {
  text-align: center;
  padding: 8px 0;
}

.confirm-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.confirm-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon svg {
  width: 28px;
  height: 28px;
}

.confirm-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-body p {
  font-size: 14px;
  max-width: 360px;
  margin: 0 auto;
}

/* ── Password Reveal Box ─────────────────────────────────────── */
.password-reveal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-softer);
  border: 1px dashed var(--accent);
  margin-top: 4px;
}

.password-reveal code {
  flex: 1;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.03em;
}

.password-reveal .copy-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* ── File List (Student Panel) ───────────────────────────────── */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  color: inherit;
}

.file-card:hover {
  border-color: var(--primary-glow);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.file-icon.pdf {
  background: #fef2f2;
  color: #dc2626;
}

.file-icon.video {
  background: #f3e8ff;
  color: #9333ea;
}

.file-icon.image {
  background: #dbeafe;
  color: #2563eb;
}

.file-icon.zip {
  background: #fef9c3;
  color: #ca8a04;
}

.file-icon.doc {
  background: #dbeafe;
  color: #2563eb;
}

.file-icon.default {
  background: var(--surface-strong);
  color: var(--muted);
}

.file-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.file-info strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info span {
  font-size: 12px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.file-action {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-decoration: none;
}

/* ── Upload Area ─────────────────────────────────────────────── */
.upload-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  padding: 32px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--duration-normal) ease;
  text-align: center;
}

.drop-zone:hover {
  border-color: var(--accent);
  background: var(--accent-softer);
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-softer);
  box-shadow: inset 0 0 0 3px var(--accent-glow);
  transform: scale(1.01);
}

.drop-zone.has-file {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-softer);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  min-height: unset;
  border: none;
  padding: 0;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
  transition: all var(--duration-normal) ease;
}

.drop-zone:hover .drop-icon {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.drop-icon svg {
  width: 24px;
  height: 24px;
}

.drop-text strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 4px;
}

.drop-text span {
  color: var(--soft);
  font-size: 13px;
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
}

.selected-file svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Progress Bar */
.progress-wrap {
  display: none;
}

.progress-wrap.visible {
  display: grid;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-strong);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.3s ease;
  animation: progressPulse 1.5s ease infinite;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Upload success */
.upload-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: var(--success);
  font-weight: 600;
  font-size: 14px;
  animation: fadeInUp 0.4s var(--ease-out);
}

.upload-success svg {
  width: 22px;
  height: 22px;
  animation: checkPop 0.4s var(--ease-spring);
  flex-shrink: 0;
}

/* ── Notice (legacy fallback) ────────────────────────────────── */
.notice {
  display: none;
  min-height: 24px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--primary-softer);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

.notice:not(:empty) {
  display: block;
}

.notice.error {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ── Welcome Banner ──────────────────────────────────────────── */
.welcome-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0f0f12 0%, #18181b 50%, #2a2a31 80%, #1da0e0 160%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(120deg, #000 0%, transparent 65%);
  -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 65%);
  pointer-events: none;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -5%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 160, 224, 0.2), transparent 70%);
  pointer-events: none;
}

.welcome-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
}

.welcome-info {
  flex: 1;
  position: relative;
}

.welcome-info h1 {
  font-size: clamp(20px, 2.5vw, 28px);
  margin-bottom: 5px;
  color: #fff;
}

.welcome-info p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  flex-shrink: 0;
}

.welcome-badge svg {
  color: #86efac;
}

/* Destek kartı kolonu doldurmasın; içeriği kadar yüksek olsun (alttaki boşluk gitsin) */
#supportSection {
  flex: 0 0 auto !important;
}
/* Destek Merkezi butonları: yan yana, BİREBİR EŞİT genişlik (grid 1fr 1fr), 44px.
   Yalnızca buton kabını hedefler (section-head'e dokunmaz). Dar ekranda tek sütun. */
#supportSection .support-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}
#supportSection .support-actions a { display: block; }
#supportSection .support-actions .cta,
#supportSection .support-actions .secondary {
  width: 100% !important;
  min-height: 44px;
  white-space: nowrap;
}
/* İkincil butonun çerçevesi biraz daha belirgin — mavinin yanında dengeli dursun */
#supportSection .support-actions .secondary {
  border-color: #cbd5e1;
}
@media (max-width: 560px) {
  #supportSection .support-actions { grid-template-columns: 1fr; }
}

/* ── Student Panel Layout ─────────────────────────────────────── */
.student-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: stretch; /* iki sütun eşit yükseklikte olsun */
}

.student-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sütundaki son kart kalan boşluğu doldurur → sağ ve sol sütunun alt çizgisi denk olur.
   İçerik üste sabitlenir; fazla boşluk metinlerin arasına değil kartın altına gider. */
.student-sidebar > :last-child {
  flex: 1 1 auto;
  align-content: start;
}

.materials-section {
  margin-bottom: 4px;
}

/* ── Drive Info Note ─────────────────────────────────────────── */
.drive-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--primary-softer);
  border: 1px solid var(--primary-soft);
  color: var(--primary);
  font-size: 12.5px;
  line-height: 1.5;
}

.drive-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 40px 32px;
    min-height: auto;
  }

  .login-brand h1 {
    font-size: 28px;
  }

  .login-features {
    display: none;
  }

  .login-panel .brand {
    display: inline-flex;
  }
}

@media (max-width: 860px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topline {
    flex-direction: column;
    gap: 8px;
  }

  .topline h1 {
    border-left: none;
    padding-left: 0;
  }

  .stats,
  .grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .table-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .files-grid {
    grid-template-columns: 1fr;
  }

  .student-profile-modal {
    max-height: calc(100dvh - 132px);
  }

  .profile-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .profile-tab {
    flex: 0 0 auto;
  }

  .activity-row {
    grid-template-columns: 1fr;
  }

  .activity-meta {
    justify-items: start;
    max-width: none;
    text-align: left;
  }

  .welcome-banner {
    flex-wrap: wrap;
    gap: 14px;
  }

  .welcome-badge {
    order: 3;
  }

  .student-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  main {
    margin: 20px auto 40px;
    width: calc(100vw - 24px);
  }

  .section {
    padding: 18px;
  }

  .stat {
    padding: 16px;
  }

  .stat-body strong {
    font-size: 26px;
  }

  .modal {
    border-radius: var(--radius-lg);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile-tabs {
    top: -18px;
    margin-left: -4px;
    margin-right: -4px;
  }

  .activity-summary {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Paket seviyeleri, erişim ayarları ve kilit bildirimleri
   ═══════════════════════════════════════════════════════════════ */

/* ── Paket rozetleri (açık zeminde: admin) ─────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 26px;
  padding: 0 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.tier-badge svg { flex-shrink: 0; }
.tier-standard { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.tier-plus     { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tier-pro      { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tier-standard svg { color: #94a3b8; }
.tier-plus svg     { color: #3b82f6; }
.tier-pro svg      { color: #f59e0b; }

/* ── Öğrenci paneli: rozet satırı (koyu gradient banner üzerinde) ─ */
.package-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.package-row .tier-badge {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  backdrop-filter: blur(6px);
}
.package-row .tier-standard svg { color: #e2e8f0; }
.package-row .tier-plus svg     { color: #93c5fd; }
.package-row .tier-pro svg      { color: #fcd34d; }
.package-row .upgrade-btn { min-height: 34px; }

/* ── Admin: hızlı paket seçimi (tablo dropdown) ────────────────── */
.package-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-width: 118px;
  min-height: 38px;
  padding: 0 34px 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: #ffffff;
  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='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-secondary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.package-select:hover { border-color: var(--soft); }
.package-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.package-select.tier-plus { color: #1d4ed8; border-color: #bfdbfe; background-color: #eff6ff; }
.package-select.tier-pro  { color: #b45309; border-color: #fde68a; background-color: #fffbeb; }
/* Küçük varyant (tablo hücresi ve modal program listesi) */
.package-select-sm {
  min-width: 104px;
  min-height: 32px;
  padding: 0 30px 0 10px;
  font-size: 12px;
  background-position: right 9px center;
  background-size: 13px;
}
.package-select:disabled { opacity: 0.5; cursor: not-allowed; }
.package-col { padding-right: 12px; vertical-align: top; }

/* Öğrenci tablosu "Paket" hücresi: program + paket satırları */
.package-cell-list { display: flex; flex-direction: column; gap: 6px; }
.package-cell-row { display: flex; align-items: center; gap: 8px; }
.package-cell-prog {
  font-size: 11.5px;
  color: var(--ink-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal: program seçimi + program başına paket dropdown'ı */
.program-pick-list {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
}
.program-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.program-pick-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  min-width: 0;
}
.program-pick-label input[type="checkbox"] { width: auto; min-height: auto; margin: 0; flex-shrink: 0; }
.program-pick-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Global select{width:100%} kuralını ez — sabit, derli toplu genişlik */
.program-pick-row .package-select { width: auto; flex: 0 0 132px; }
.package-cell-row .package-select { width: auto; }

/* ── Admin: erişim ayarları (program bazlı) ────────────────────── */
.access-programs { display: grid; gap: 16px; }
.access-program-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface);
}
.access-program-name {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  font-size: 14.5px;
}
.access-program-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ── Admin: erişim ayarları ────────────────────────────────────── */
.access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.access-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.access-field input[type="datetime-local"] { min-height: 40px; }
@media (max-width: 720px) {
  .access-grid { grid-template-columns: 1fr; }
}

/* ── Öğrenci: üst kilit bildirimi ──────────────────────────────── */
.lock-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--warning);
}
.lock-banner-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff7e6;
  color: var(--warning);
}
.lock-banner-body { flex: 1; min-width: 0; }
.lock-banner-body strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.lock-banner-body p { color: var(--ink-secondary); font-size: 13.5px; margin: 0; line-height: 1.5; }
.lock-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 640px) {
  .lock-banner { flex-direction: column; align-items: flex-start; }
}

/* ── Öğrenci: alan içi kilit kartı ─────────────────────────────── */
.area-lock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.area-lock-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--warning-soft);
  color: var(--warning);
}
.area-lock-card p {
  color: var(--ink-secondary);
  font-size: 14px;
  max-width: 420px;
  margin: 0;
  line-height: 1.55;
}
.area-lock-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── Program detayı + İçerik Merkezi (yönetici) ── */
.program-name-link { display: inline; width: auto; background: none !important; border: none !important; border-radius: 0 !important; padding: 0 !important; margin: 0; min-height: auto !important; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; box-shadow: none !important; transform: none !important; outline-offset: 2px; }
.program-name-link:hover, .program-name-link:focus-visible { color: var(--accent); text-decoration: underline; background: none !important; box-shadow: none !important; transform: none !important; }
.program-detail-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.program-detail-info > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; min-width: 0; }
.program-detail-info span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.program-detail-info strong, .program-detail-info code { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.program-content-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.program-content-head h3 { margin: 0 0 4px; font-size: 16px; color: var(--ink); }
.program-content-head p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.program-content-head .cta { flex-shrink: 0; }
.program-content-progress { margin-bottom: 12px; }
.program-content-progress-text { font-size: 12.5px; color: var(--ink-secondary); margin-bottom: 6px; overflow-wrap: anywhere; }
.program-content-progress-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.program-content-progress-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.program-content-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); max-height: 340px; overflow-y: auto; }
.program-content-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.program-content-list li:last-child { border-bottom: 0; }
.program-content-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.program-content-name strong { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.program-content-name span { font-size: 12px; color: var(--muted); }
.program-content-open { flex-shrink: 0; text-decoration: none; display: inline-flex; align-items: center; }
.program-content-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.program-content-remove { min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.program-content-list li.program-content-empty { justify-content: center; color: var(--muted); font-size: 13px; padding: 22px 14px; }
@media (max-width: 640px) {
  .program-detail-info { grid-template-columns: 1fr; }
  .program-content-head { flex-direction: column; }
}
