/* === PORTAL TASARIM SİSTEMİ (PORTAL.CSS) === */

:root {
  --primary-navy: #0d1a2e;
  --accent-gold: #f0c040;
  --accent-gold-light: #f5d47a;
  --bg-cream: #f7f5f1;
  --bg-white: #ffffff;
  --bg-gray: #f8fafc;
  
  --text-dark: #0f1c2e;
  --text-muted: #4a5568;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: rgba(13, 26, 46, 0.08);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 8px 24px rgba(13,26,46,0.05);
  --shadow-lg: 0 20px 40px rgba(13,26,46,0.08);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sıfırlamalar */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-navy);
  font-weight: 700;
}

/* Yükleniyor Göstergesi */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === GİRİŞ (LOGIN) EKRANI === */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(circle at 10% 20%, rgba(13,26,46,0.03) 0%, rgba(247,245,241,1) 90%);
}
.login-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-navy);
  color: var(--accent-gold);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.login-header {
  text-align: center;
  margin-bottom: 32px;
}
.login-header h2 { font-size: 24px; margin-bottom: 8px; }
.login-header p { color: var(--text-muted); font-size: 14px; }

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-gray);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(240, 192, 64, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary-navy);
  color: var(--bg-white);
}
.btn-primary:hover {
  background: #1e3a5f;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-cream);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--border-color);
}
.btn-danger {
  background: #fee2e2;
  color: #ef4444;
}
.btn-danger:hover {
  background: #fca5a5;
}
.btn-full { width: 100%; }

.login-error {
  background: #fee2e2;
  color: #ef4444;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  font-weight: 500;
  text-align: center;
}

/* === DASHBOARD LAYOUT === */
.dashboard-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--primary-navy);
  color: var(--bg-white);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
.sidebar-logo .logo-icon {
  background: rgba(255,255,255,0.1);
  color: var(--accent-gold);
}
.sidebar-logo .logo-title {
  color: var(--bg-white);
  font-size: 18px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,0.08);
  color: var(--bg-white);
}
.nav-item.active {
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-left: 13px;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}
.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.user-profile-summary .avatar {
  width: 36px;
  height: 36px;
  background: var(--accent-gold);
  color: var(--primary-navy);
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-info {
  display: flex;
  flex-direction: column;
}
.profile-info strong { font-size: 13px; color: var(--bg-white); }
.profile-info span { font-size: 11px; color: var(--text-light); }

/* Main Content Area */
.main-content {
  padding: 40px 48px;
  background: var(--bg-gray);
  overflow-y: auto;
  max-height: 100vh;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.header-row h1 { font-size: 28px; }
.header-actions { display: flex; gap: 12px; }

/* Grid Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-header h3 { font-size: 18px; font-family: 'Space Grotesk', sans-serif; }

/* Stat Summary Grid */
.stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stat-info { display: flex; flex-direction: column; }
.stat-info span { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-info strong { font-size: 20px; font-family: 'Outfit', sans-serif; color: var(--primary-navy); }

/* --- ÖĞRENCİ SEÇİCİ VE LİSTESİ --- */
.student-selector-bar {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.student-select-label { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.student-select-dropdown {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  background: var(--bg-gray);
  cursor: pointer;
  min-width: 220px;
}

.student-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.student-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.student-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}
.student-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.student-card-header .avatar {
  width: 44px;
  height: 44px;
  background: var(--primary-navy);
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.student-card-header h3 { font-size: 16px; }
.student-card-header p { font-size: 12px; color: var(--text-muted); }
.student-card-detail {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}
.student-card-detail span { display: flex; justify-content: space-between; }
.student-card-detail strong { color: var(--primary-navy); }

/* --- GÖREV LİSTESİ (TASK LIST) --- */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.task-item:hover { border-color: var(--text-light); }
.task-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
}
.task-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}
.task-text {
  font-size: 13px;
  color: var(--text-dark);
}
.task-item.completed { opacity: 0.65; }
.task-item.completed .task-text { text-decoration: line-through; }
.task-delete-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.4;
  transition: var(--transition);
}
.task-delete-btn:hover { opacity: 1; color: #ef4444; }

/* Empty state info */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 14px;
}

/* --- GRAFİKLER VE BAR ELEMANLARI --- */
.chart-container-portal {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  height: 220px;
  align-items: end;
}
.y-axis-portal {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100% - 24px);
  font-size: 11px;
  color: var(--text-light);
  text-align: right;
  padding-bottom: 4px;
}
.bars-wrap-portal {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 100%;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}
.bar-item-portal {
  position: relative;
  width: 50px;
  height: 100%;
}
.bar-fill-portal {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  background: rgba(13, 26, 46, 0.1);
  border-radius: 6px 6px 0 0;
  transition: var(--transition);
  cursor: pointer;
}
.bar-item-portal:hover .bar-fill-portal {
  background: rgba(13, 26, 46, 0.25);
}
.bar-item-portal.highlighted .bar-fill-portal {
  background: linear-gradient(0deg, var(--accent-gold), var(--accent-gold-light));
}
.bar-fill-portal::after {
  content: attr(data-net);
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--primary-navy);
  color: var(--bg-white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  white-space: nowrap;
  z-index: 10;
}
.bar-item-portal:hover .bar-fill-portal::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.bar-label-portal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 16px;
  font-weight: 500;
}

/* --- LOG VE RAPOR AKIŞI --- */
.log-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.log-card-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-gray);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.log-icon { font-size: 18px; }
.log-body { display: flex; flex-direction: column; gap: 4px; }
.log-body p { font-size: 13px; color: var(--text-dark); line-height: 1.4; }
.log-body span { font-size: 11px; color: var(--text-light); }
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
  text-transform: uppercase;
}
.badge-success { background: rgba(39,201,63,0.1); color: #27c93f; }
.badge-info { background: rgba(0,122,255,0.1); color: #007aff; }
.badge-warning { background: rgba(255,189,46,0.1); color: #b57c00; }

/* --- MODAL DIALOG --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13,26,46,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: var(--transition);
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
}
.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 20px; }
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}
.modal-close-btn:hover { color: var(--text-dark); }
.modal-body {
  padding: 32px;
}
.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-gray);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Target points indicators */
.target-card-portal {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #1a2f4c 100%);
  color: var(--bg-white);
}
.target-card-portal h3, .target-card-portal h4 { color: var(--bg-white); }
.target-progress-portal { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.target-progress-portal .progress-bar-wrap { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.target-progress-portal .progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light)); border-radius: 4px; }
.target-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-light); }

/* Veli Bilgisi Listesi (Koç İçin) */
.student-veli-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.student-veli-info span { display: flex; gap: 8px; }

/* Mobile Header Bar & Backdrop */
.mobile-header-bar {
  display: none;
  background: rgba(13, 26, 46, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--bg-white);
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 998;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle-btn {
  background: none;
  border: none;
  color: var(--bg-white);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-toggle-btn:active {
  transform: scale(0.9);
}

.mobile-logo-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--bg-white);
  letter-spacing: 0.5px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(13, 26, 46, 0.6);
  z-index: 999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.open {
  display: block;
}

.sidebar-mobile-header {
  display: none !important;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(13, 26, 46, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid rgba(240, 192, 64, 0.25);
  justify-content: space-around;
  align-items: center;
  z-index: 998;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 32px rgba(13, 26, 46, 0.25);
  box-sizing: border-box;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
  height: 100%;
  padding-top: 6px;
  text-decoration: none;
  opacity: 0.75;
}

.bottom-nav-item .nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item:hover,
.bottom-nav-item:active,
.bottom-nav-item.active {
  color: var(--accent-gold-light);
  opacity: 1;
}

.bottom-nav-item.active .nav-icon {
  transform: translateY(-4px) scale(1.15);
  text-shadow: 0 0 10px rgba(240, 192, 64, 0.4);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .mobile-header-bar {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }
  
  .sidebar-mobile-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 8px 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
  }

  .dashboard-container {
    grid-template-columns: 1fr;
    padding-top: 60px; /* Space for fixed mobile top bar */
    padding-bottom: 80px; /* Space for fixed mobile bottom nav bar */
  }

  .sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -280px; /* Hidden off-screen */
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 32px rgba(13, 26, 46, 0.3);
    overflow-y: auto;
    background: var(--primary-navy);
  }

  .sidebar.open {
    left: 0; /* Slide in! */
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .main-content {
    padding: 20px 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .col-8, .col-6, .col-4 {
    grid-column: span 12;
  }

  /* Make all table structures responsive */
  .derspresso-content table,
  .dashboard-grid table,
  .main-content table,
  .students-table,
  .blog-admin-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* Enable smooth scrolling on iOS for all horizontally scrollable elements */
[style*="overflow-x:auto"], [style*="overflow-x: auto"] {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .stat-summary-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { padding: 18px; border-radius: var(--radius-md); }
  .header-row h1 { font-size: 22px; }
  .stat-card { padding: 16px; }
  .header-actions { width: 100%; flex-direction: column; gap: 10px; }
  .header-actions .btn { width: 100%; }
}
@media (max-width: 480px) {
  .stat-summary-grid { grid-template-columns: 1fr; }
  .header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* === BLOG YÖNETİMİ EK PANEL STİLLERİ === */
.blog-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}
.blog-admin-table th, .blog-admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.blog-admin-table th {
  background: var(--bg-gray);
  color: var(--text-dark);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}
.blog-admin-table tr:hover {
  background: rgba(13,26,46,0.01);
}
.blog-cat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--primary-navy);
  color: var(--bg-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}
.blog-media-preview-mini {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg-cream);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.blog-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.blog-form-grid .col-full {
  grid-column: span 2;
}


/* === MESAJLAŞMA PANELİ STİLLERİ === */
.messaging-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-height: 580px;
  overflow: hidden;
}
.convo-list {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-gray);
}
.convo-list-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.convo-list-header h4 { font-size: 15px; color: var(--primary-navy); }
.convo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}
.convo-item:hover { background: rgba(13,26,46,0.03); }
.convo-item.active { background: rgba(240,192,64,0.08); border-left: 3px solid var(--accent-gold); }
.convo-avatar {
  width: 44px; height: 44px;
  background: var(--primary-navy); color: var(--accent-gold);
  font-weight: 700; font-size: 14px; font-family: 'Space Grotesk', sans-serif;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.convo-info { flex: 1; min-width: 0; }
.convo-info strong { font-size: 14px; color: var(--primary-navy); display: block; }
.convo-info p { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.unread-badge { background: var(--accent-gold); color: var(--primary-navy); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.unread-dot { width: 20px; height: 20px; background: var(--accent-gold); color: var(--primary-navy); font-size: 10px; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.chat-panel { display: flex; flex-direction: column; background: var(--bg-white); }
.chat-header { display: flex; align-items: center; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--border-color); }
.chat-avatar { width: 44px; height: 44px; background: linear-gradient(135deg, var(--primary-navy), #1e3a5f); color: var(--accent-gold); font-weight: 700; font-size: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.chat-header strong { font-size: 15px; color: var(--primary-navy); display: block; }
.chat-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.chat-messages { flex: 1; padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 400px; background: var(--bg-gray); }
.chat-bubble-wrap { display: flex; align-items: flex-end; gap: 8px; }
.chat-bubble-wrap.sent { flex-direction: row-reverse; }
.chat-bubble { max-width: 72%; padding: 12px 16px; border-radius: 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.chat-bubble-wrap.sent .chat-bubble { background: var(--primary-navy); color: var(--bg-white); border-bottom-right-radius: 4px; }
.chat-bubble-wrap.received .chat-bubble { background: var(--bg-white); color: var(--text-dark); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.chat-bubble p { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }
.chat-time { font-size: 10px; opacity: 0.6; display: block; text-align: right; }

.chat-input-row { display: flex; gap: 12px; padding: 20px 28px; border-top: 1px solid var(--border-color); background: var(--bg-white); align-items: flex-end; }
.chat-input { flex: 1; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 12px; font-size: 14px; resize: none; font-family: 'Inter', sans-serif; transition: var(--transition); background: var(--bg-gray); }
.chat-input:focus { outline: none; border-color: var(--accent-gold); background: var(--bg-white); box-shadow: 0 0 0 3px rgba(240,192,64,0.12); }
.chat-send-btn { padding: 12px 20px; border-radius: 12px; flex-shrink: 0; }
.chat-empty { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 200px; color: var(--text-light); font-size: 15px; }

@media (max-width: 768px) {
  .messaging-layout { grid-template-columns: 1fr; }
  .convo-list { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 200px; overflow-y: auto; }
}

/* === SORU BANKASI VE GELİŞİM KARTLARI EK STİLLERİ === */

/* Quiz List & Grid */
.quiz-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.quiz-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}
.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}
.quiz-card-header {
  margin-bottom: 16px;
}
.quiz-subject-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: rgba(13,26,46,0.06);
  color: var(--primary-navy);
  display: inline-block;
  margin-bottom: 10px;
}
.quiz-card-header h3 {
  font-size: 16px;
  color: var(--primary-navy);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.4;
}
.quiz-card-stats {
  display: flex;
  gap: 16px;
  margin: 12px 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Quiz Test View */
.quiz-taking-container {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}
.quiz-question-card {
  background: var(--bg-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 24px;
}
.quiz-question-card.correct-answer {
  border-left: 5px solid #27c93f;
  background: rgba(39, 201, 63, 0.03);
}
.quiz-question-card.incorrect-answer {
  border-left: 5px solid #ff5b5b;
  background: rgba(255, 91, 91, 0.03);
}
.quiz-question-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 16px;
  white-space: pre-wrap;
}
.quiz-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quiz-option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  user-select: none;
}
.quiz-option-label:hover {
  background: rgba(240, 192, 64, 0.04);
  border-color: var(--accent-gold);
}
.quiz-option-input {
  display: none;
}
.quiz-option-input:checked + .quiz-option-label {
  background: rgba(240, 192, 64, 0.08);
  border-color: var(--accent-gold);
  font-weight: 600;
}
.quiz-option-label.correct {
  background: rgba(39, 201, 63, 0.1) !important;
  border-color: #27c93f !important;
  color: #1e8029 !important;
  font-weight: 600;
}
.quiz-option-label.incorrect {
  background: rgba(255, 91, 91, 0.1) !important;
  border-color: #ff5b5b !important;
  color: #b52b2b !important;
  font-weight: 600;
}

/* Learning Cards 3D Flip */
.learning-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.learning-card-container {
  perspective: 1000px;
  height: 360px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.learning-card-container:hover {
  transform: translateY(-8px);
}
.learning-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}
.learning-card-container.flipped .learning-card-inner {
  transform: rotateY(180deg);
}
.learning-card-front, .learning-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.learning-card-front {
  color: var(--bg-white);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.learning-card-front h3 {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--bg-white);
  line-height: 1.3;
}
.learning-card-front .card-cat {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  align-self: flex-start;
}
.learning-card-front .card-icon {
  font-size: 40px;
  margin: 16px 0;
  opacity: 0.9;
}
.learning-card-front .card-footer-tip {
  font-size: 12px;
  opacity: 0.8;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 12px;
}

.learning-card-back {
  background: var(--bg-white);
  color: var(--text-dark);
  transform: rotateY(180deg);
  text-align: left;
  border: 2px solid var(--border-color);
}
.learning-card-back h4 {
  font-size: 16px;
  color: var(--primary-navy);
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 8px;
}
.learning-card-back p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dark);
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 12px;
}
.learning-card-action-box {
  background: var(--bg-gray);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 16px;
}
.learning-card-back .btn {
  width: 100%;
}


/* === DOKÜMAN KÜTÜPHANESİ STİLLERİ === */
.documents-grid-portal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.document-card-portal {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}
.document-card-portal:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}
.doc-card-body {
  display: flex;
  gap: 16px;
}
.doc-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--bg-cream);
  color: var(--primary-navy);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.doc-info-wrap {
  flex: 1;
  min-width: 0;
}
.doc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.3;
  margin-bottom: 6px;
  font-family: 'Outfit', sans-serif;
}
.doc-description {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.doc-actions-wrap {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* YKS Soru Dağılımları Ekranı Stilleri */
.table-row-hover:hover {
  background-color: rgba(240, 192, 64, 0.05) !important;
}

@media (min-width: 992px) {
  .stats-grid-layout {
    grid-template-columns: 45fr 55fr !important;
  }
}

/* AI Success Prediction Card */
.ai-prediction-card {
  background: linear-gradient(135deg, #0d1a2e 0%, #15294a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 12px 32px rgba(13, 26, 46, 0.15);
  border: 1px solid rgba(240, 192, 64, 0.2);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.ai-prediction-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.05) 0%, transparent 70%);
  pointer-events: none;
}
.ai-prediction-card h2, .ai-prediction-card h3, .ai-prediction-card h4 {
  color: #ffffff;
}
.ai-prediction-badge {
  background: rgba(240, 192, 64, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(240, 192, 64, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-prediction-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 768px) {
  .ai-prediction-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.ai-prediction-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ai-prediction-right {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
}
.ai-prediction-rank-label {
  font-size: 14px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ai-prediction-rank-value {
  font-size: 36px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--accent-gold-light);
  margin: 8px 0;
  text-shadow: 0 2px 10px rgba(240, 192, 64, 0.2);
}
.ai-prediction-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.ai-prediction-metric-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.ai-prediction-metric-item span {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.ai-prediction-metric-item strong {
  font-size: 14px;
  color: #ffffff;
}
.ai-prediction-advice-box {
  border-left: 3px solid var(--accent-gold);
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* === AI DERS ANLATICISI & SORU ÇÖZÜCÜ EK PREMIUM STİLLERİ === */
.ai-progress-bar {
  animation: pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px rgba(240, 192, 64, 0.4); }
  100% { box-shadow: 0 0 15px rgba(240, 192, 64, 0.8); }
}

/* Uploader & Scanner */
.upload-dropzone:hover {
  border-color: var(--accent-gold) !important;
  background: rgba(240, 192, 64, 0.03) !important;
}

.scanning-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
  box-shadow: 0 0 12px 3px rgba(34, 197, 94, 0.8);
  animation: scan-move 1.8s ease-in-out infinite;
  z-index: 10;
}

@keyframes scan-move {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Camera Simulator */
.camera-grid-line {
  pointer-events: none;
}

#camera-modal .modal-content {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
}

#camera-question-paper::-webkit-scrollbar {
  width: 4px;
}
#camera-question-paper::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
}

#camera-shutter-btn:not([disabled]) {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  animation: shutter-pulse 1.5s infinite;
}

#camera-shutter-btn:not([disabled]):hover {
  background: #dc2626 !important;
  transform: translateY(-2px);
}

@keyframes shutter-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Shutter flash animation trigger */
@keyframes flash-animation {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 0; }
}

.flash-active {
  animation: flash-animation 0.15s ease-out;
}

/* Watermark styles for curriculum subject explanations */
.watermarked-content {
  position: relative;
}
.watermarked-content::before {
  content: "enginkurhan.com";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 54px;
  font-weight: 800;
  color: rgba(196, 154, 60, 0.04) !important; /* very subtle gold watermark */
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  z-index: 10;
}
.watermarked-content::after {
  content: "enginkurhan.com";
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 54px;
  font-weight: 800;
  color: rgba(196, 154, 60, 0.04) !important; /* second subtle gold watermark */
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  z-index: 10;
}

/* Derspresso Content Styling Overrides */
.derspresso-content {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  position: relative;
  z-index: 2;
}

.derspresso-content h1 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-navy);
  font-size: 24px;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(240, 192, 64, 0.15);
  padding-bottom: 12px;
}

.derspresso-content h2 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-navy);
  font-size: 20px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 14px;
}

.derspresso-content h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--primary-navy);
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
}

.derspresso-content p {
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 14.5px;
}

.derspresso-content a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.derspresso-content a:hover {
  text-decoration: underline;
  color: #c49a3c;
}

.derspresso-content ul, 
.derspresso-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.derspresso-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.derspresso-content table {
  width: 100% !important;
  margin: 24px 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
}

.derspresso-content th {
  background: var(--primary-navy) !important;
  color: #fff !important;
  font-weight: 600 !important;
  text-align: left !important;
  padding: 12px 16px !important;
  font-size: 13.5px !important;
  border: none !important;
}

.derspresso-content td {
  padding: 12px 16px !important;
  font-size: 13.5px !important;
  color: var(--text-dark) !important;
  border-bottom: 1px solid var(--border-color) !important;
  background: transparent !important;
}

.derspresso-content tr:last-child td {
  border-bottom: none !important;
}

.derspresso-content tr:nth-child(even) td {
  background: rgba(13, 26, 46, 0.01) !important;
}

.derspresso-content .katex-display {
  padding: 12px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

