/* ============================================================
   OKÜ-HESABIM  —  Ana Stil Dosyası
   Bootstrap 5.3 üzerine özel tasarım katmanı
   ============================================================ */

/* ── Değişkenler ──────────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --topbar-h: 62px;
  --primary:   #4361ee;
  --primary-d: #3452d4;
  --secondary: #7c3aed;
  --success:   #10b981;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --info:      #06b6d4;
  --dark:      #1e293b;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-500:  #64748b;
  --gray-700:  #334155;
  --gray-900:  #0f172a;
  --radius:    12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.15);
  --transition:.22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: .9375rem;
  background: var(--gray-100);
  color: var(--gray-700);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(175deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform var(--transition);
  overflow: hidden;
}

/* Marka */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
}
.sidebar-brand-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
  flex-shrink: 0;
}
.sidebar-brand-text span {
  display: block; color: #fff;
  font-weight: 700; font-size: 1.05rem; line-height: 1;
}
.sidebar-brand-text small {
  color: rgba(255,255,255,.45); font-size: .72rem; letter-spacing: .04em;
}

/* Kullanıcı */
.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-user-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: rgba(255,255,255,.5);
  overflow: hidden; flex-shrink: 0;
}
.sidebar-user-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.sidebar-user-name {
  color: #fff; font-size: .88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-badge { margin-top: 3px; }
.badge.bg-gradient-blue   { background: linear-gradient(90deg,#4361ee,#06b6d4); color:#fff; }
.badge.bg-gradient-green  { background: linear-gradient(90deg,#10b981,#34d399); color:#fff; }
.badge.bg-gradient-purple { background: linear-gradient(90deg,#7c3aed,#4361ee); color:#fff; }

/* Nav */
.sidebar-divider { height:1px; background: rgba(255,255,255,.06); margin: 6px 0; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.sidebar-nav::-webkit-scrollbar { width: 0; }

.sidebar-nav-label {
  font-size: .66rem; letter-spacing: .1em;
  color: rgba(255,255,255,.3); font-weight: 700;
  padding: 6px 10px 4px; text-transform: uppercase;
}
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem; font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav-item i { width: 20px; text-align: center; font-size: .95rem; }
.sidebar-nav-item:hover,
.sidebar-nav-item.active {
  background: rgba(255,255,255,.1); color: #fff;
}
.sidebar-nav-item.active { background: var(--primary); color:#fff; }
.sidebar-nav-item.text-danger-soft { color: rgba(248,113,113,.75); }
.sidebar-nav-item.text-danger-soft:hover { background: rgba(239,68,68,.15); color: #f87171; }

.sidebar-footer {
  padding: 14px 20px;
  font-size: .72rem; color: rgba(255,255,255,.3);
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Overlay (mobil) */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1039;
}
.sidebar-overlay.show { display: block; }

/* ════════════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
  transition: margin var(--transition);
}
.topbar {
  position: sticky; top: 0; z-index: 1030;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.topbar-toggle {
  display: none; border: none; background: none;
  font-size: 1.2rem; color: var(--gray-500); cursor: pointer;
  padding: 8px; border-radius: 8px;
  transition: background var(--transition);
}
.topbar-toggle:hover { background: var(--gray-100); }
.topbar-title {
  font-size: 1rem; font-weight: 600; color: var(--dark);
  flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--gray-200); background: #fff;
  border-radius: 10px; padding: 5px 12px 5px 6px;
  font-size: .875rem; color: var(--dark); cursor: pointer;
  transition: all var(--transition);
}
.topbar-user-btn:hover { border-color: var(--primary); background: var(--gray-50); }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.topbar-avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem;
}

/* ════════════════════════════════════════════════════════════
   ANA İÇERİK & FOOTER
════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  padding: 28px 28px 10px;
}
.main-footer {
  display: flex; align-items: center;
  padding: 14px 28px;
  font-size: .8rem; color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  background: #fff;
}

/* ════════════════════════════════════════════════════════════
   KART BİLEŞENLERİ
════════════════════════════════════════════════════════════ */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  background: transparent; display: flex; align-items: center; gap: 10px;
}
.card-header-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
}
.card-header-title { font-size: .9rem; font-weight: 600; color: var(--dark); }
.card-header-sub   { font-size: .78rem; color: var(--gray-500); }

/* Renkli kart kenarlığı */
.card.border-primary { border-left: 3px solid var(--primary) !important; }
.card.border-success { border-left: 3px solid var(--success) !important; }
.card.border-warning { border-left: 3px solid var(--warning) !important; }
.card.border-info    { border-left: 3px solid var(--info)    !important; }

/* Özet stat kartları */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.stat-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.stat-card-body { flex: 1; min-width: 0; }
.stat-card-label { font-size: .75rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-card-value { font-size: 1.35rem; font-weight: 700; color: var(--dark); line-height: 1.2; }
.stat-card-desc  { font-size: .78rem; color: var(--gray-500); }

/* ════════════════════════════════════════════════════════════
   TABLO
════════════════════════════════════════════════════════════ */
.info-table { width: 100%; }
.info-table tbody tr { border-bottom: 1px solid var(--gray-100); }
.info-table tbody tr:last-child { border-bottom: none; }
.info-table td:first-child {
  width: 40%; font-size: .82rem; font-weight: 600;
  color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 16px 9px 0;
}
.info-table td:last-child {
  font-size: .9rem; color: var(--dark); padding: 9px 0;
}

/* ════════════════════════════════════════════════════════════
   BUTONLAR
════════════════════════════════════════════════════════════ */
.btn {
  border-radius: 9px; font-weight: 500;
  padding: .42rem 1.1rem; font-size: .875rem;
  transition: all var(--transition);
}
.btn-primary   { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
.btn-success   { background: var(--success); border-color: var(--success); }
.btn-success:hover { filter: brightness(.92); }
.btn-warning   { background: var(--warning); border-color: var(--warning); color:#fff; }
.btn-warning:hover { filter: brightness(.92); color:#fff; }
.btn-danger    { background: var(--danger);  border-color: var(--danger);  }
.btn-info      { background: var(--info);    border-color: var(--info);    color:#fff; }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
}

/* Eylem buton grubu (dashboard) */
.action-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: .875rem;
  text-decoration: none; transition: all var(--transition);
  border: none; cursor: pointer;
}
.action-btn-create {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; box-shadow: 0 4px 15px rgba(67,97,238,.35);
}
.action-btn-create:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(67,97,238,.45); color:#fff; }
.action-btn-reset {
  background: linear-gradient(135deg, var(--warning), #f97316);
  color: #fff; box-shadow: 0 4px 15px rgba(245,158,11,.35);
}
.action-btn-reset:hover  { transform: translateY(-2px); color:#fff; }
.action-btn-change {
  background: linear-gradient(135deg, var(--info), #0891b2);
  color: #fff; box-shadow: 0 4px 15px rgba(6,182,212,.35);
}
.action-btn-change:hover { transform: translateY(-2px); color:#fff; }

/* ════════════════════════════════════════════════════════════
   FORM ELEMANLARI
════════════════════════════════════════════════════════════ */
.form-control, .form-select {
  border-radius: 9px; border: 1.5px solid var(--gray-200);
  padding: .55rem .9rem; font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,.15);
}
.form-label {
  font-size: .83rem; font-weight: 600; color: var(--gray-700);
  margin-bottom: .4rem;
}
.input-group .form-control { border-radius: 0 9px 9px 0 !important; }
.input-group-text {
  border-radius: 9px 0 0 9px !important;
  background: var(--gray-100); border: 1.5px solid var(--gray-200);
  border-right: none; color: var(--gray-500); font-size: .9rem;
}

/* Şifre güç çubuğu */
.pwd-strength-bar {
  height: 4px; border-radius: 2px;
  background: var(--gray-200); overflow: hidden; margin-top: 6px;
}
.pwd-strength-fill { height: 100%; border-radius: 2px; transition: all .3s; }

/* ════════════════════════════════════════════════════════════
   GİRİŞ SAYFASI
════════════════════════════════════════════════════════════ */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e293b 0%, #1a1040 50%, #0f172a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  position: relative; overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(67,97,238,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(124,58,237,.15) 0%, transparent 60%);
  pointer-events: none;
}
.login-card {
  width: 100%; max-width: 440px;
  background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden; position: relative; z-index: 1;
}
.login-card-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 30px 32px 28px;
  text-align: center;
}
.login-card-header .logo-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  /*background: rgba(255,255,255,.2); border-radius: 16px;*/
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff;
}
.login-card-header h4 {
  color: #fff; font-weight: 700; font-size: 1.2rem; margin: 0 0 4px;
}
.login-card-header p {
  color: rgba(255,255,255,.75); font-size: .84rem; margin: 0;
}
.login-card-body {
  padding: 28px 32px 30px;
}

/* CAPTCHA */
.captcha-box {
  display: flex; align-items: center; gap: 10px;
}
.captcha-box img {
  height: 90px; border-radius: 8px; border: 1.5px solid var(--gray-200);
  cursor: pointer; flex-shrink: 0;
}
.captcha-refresh {
  background: none; border: 1.5px solid var(--gray-200);
  border-radius: 8px; color: var(--gray-500);
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.captcha-refresh:hover { border-color: var(--primary); color: var(--primary); background: rgba(67,97,238,.05); }

/* ════════════════════════════════════════════════════════════
   DOĞRULAMA KODU GİRİŞİ
════════════════════════════════════════════════════════════ */
.otp-inputs {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.otp-input {
  width: 52px; height: 62px;
  border: 2px solid var(--gray-200); border-radius: 10px;
  text-align: center; font-size: 1.5rem; font-weight: 700;
  color: var(--dark); background: var(--gray-50);
  outline: none; transition: all var(--transition);
}
.otp-input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(67,97,238,.15);
}
.otp-input.filled { border-color: var(--success); background: #f0fdf4; }

/* ════════════════════════════════════════════════════════════
   PROFIL FOTOĞRAFI YÜKLEME
════════════════════════════════════════════════════════════ */
.photo-upload-zone {
  border: 2px dashed var(--gray-200); border-radius: 12px;
  padding: 20px; text-align: center;
  cursor: pointer; transition: all var(--transition);
  background: var(--gray-50);
}
.photo-upload-zone:hover { border-color: var(--primary); background: rgba(67,97,238,.03); }
.photo-upload-zone.drag-over { border-color: var(--primary); background: rgba(67,97,238,.06); }
.photo-preview-ring {
  width: 100px; height: 100px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gray-200); margin: 0 auto 10px;
  display: block; overflow: hidden;
}

/* ════════════════════════════════════════════════════════════
   BADGES / ETIKETLER
════════════════════════════════════════════════════════════ */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.role-badge-staff   { background: rgba(67,97,238,.1);  color: var(--primary); }
.role-badge-student { background: rgba(16,185,129,.1); color: var(--success); }

/* ════════════════════════════════════════════════════════════
   UYARI BANERLARI
════════════════════════════════════════════════════════════ */
.info-banner {
  background: rgba(6,182,212,.08);
  border: 1px solid rgba(6,182,212,.2);
  border-left: 3px solid var(--info);
  border-radius: 10px; padding: 12px 16px;
  font-size: .85rem; color: var(--dark);
  display: flex; align-items: flex-start; gap: 10px;
}
.info-banner i { color: var(--info); margin-top: 1px; flex-shrink: 0; }
.warn-banner {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.2);
  border-left: 3px solid var(--warning);
  border-radius: 10px; padding: 12px 16px;
  font-size: .85rem; color: var(--dark);
  display: flex; align-items: flex-start; gap: 10px;
}
.warn-banner i { color: var(--warning); margin-top: 1px; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   BÖLÜM BAŞLIKLARI
════════════════════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.section-header-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.section-title { font-size: .95rem; font-weight: 700; color: var(--dark); }
.section-subtitle { font-size: .78rem; color: var(--gray-500); }

/* ════════════════════════════════════════════════════════════
   HATA BİLDİRİM EDITÖRÜ
════════════════════════════════════════════════════════════ */
.rich-editor {
  min-height: 140px; border: 1.5px solid var(--gray-200);
  border-radius: 9px; padding: 12px;
  outline: none; transition: border-color var(--transition);
  cursor: text; font-size: .9rem;
}
.rich-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,97,238,.12); }
.rich-editor:empty::before { content: attr(placeholder); color: var(--gray-500); pointer-events: none; }
.rich-editor img { max-width: 100%; border-radius: 6px; margin: 4px 0; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .main-content { padding: 20px 16px; }
  .login-card-body { padding: 24px 22px; }
  .otp-input { width: 44px; height: 54px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .otp-input { width: 38px; height: 48px; font-size: 1rem; }
}

/* ════════════════════════════════════════════════════════════
   YARDIMCI
════════════════════════════════════════════════════════════ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-info    { color: var(--info)    !important; }
.text-muted   { color: var(--gray-500)!important; }

.bg-primary-soft { background: rgba(67,97,238,.1); }
.bg-success-soft { background: rgba(16,185,129,.1); }
.bg-warning-soft { background: rgba(245,158,11,.1); }
.bg-danger-soft  { background: rgba(239,68,68,.1);  }
.bg-info-soft    { background: rgba(6,182,212,.1);  }

.rounded-xl { border-radius: 12px !important; }
.rounded-2xl{ border-radius: 16px !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* Spinner */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Print */
@media print {
  .sidebar, .topbar, .main-footer, .btn, .action-btn { display: none !important; }
  .main-wrapper { margin: 0 !important; }
  .main-content { padding: 0 !important; }
}
