/* =============================================
   MEZUN PORTAL — KURUMSAL TEMA (Bootstrap 5)
   ============================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@700&display=swap');

/* ---- CSS Değişkenleri ---- */
:root {
  --primary:        #1a3a6b;
  --primary-dark:   #122952;
  --primary-light:  #2a5298;
  --accent:         #c8a84b;
  --accent-light:   #e0c068;
  --success:        #198754;
  --danger:         #dc3545;
  --warning:        #ffc107;
  --body-bg:        #f4f6fb;
  --card-bg:        #ffffff;
  --sidebar-bg:     #1a3a6b;
  --sidebar-text:   rgba(255,255,255,.85);
  --sidebar-hover:  rgba(255,255,255,.12);
  --border:         #dde3f0;
  --text:           #1e2a3a;
  --text-muted:     #6b7a99;
  --font-main:      'Inter', sans-serif;
  --font-heading:   'Merriweather', serif;
  --radius:         .75rem;
  --shadow-sm:      0 2px 8px rgba(26,58,107,.08);
  --shadow:         0 4px 20px rgba(26,58,107,.12);
  --shadow-lg:      0 8px 40px rgba(26,58,107,.18);
  --sidebar-w:      260px;
  --topbar-h:       64px;
}

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

body {
  font-family: var(--font-main);
  background: var(--body-bg);
  color: var(--text);
  font-size: .9375rem;
  line-height: 1.6;
  min-height: 100vh;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); color: var(--primary); }

a { color: var(--primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* ---- Auth Sayfaları (Login / Register / Verify) ---- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0a1e40 100%);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(200,168,75,.08);
  top: -200px; right: -200px;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -150px; left: -100px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-logo .logo-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
  box-shadow: 0 4px 16px rgba(26,58,107,.3);
}

.auth-logo .logo-icon i { font-size: 2rem; color: #fff; }
.auth-logo h4 { font-size: 1.1rem; color: var(--primary); margin: 0; }
.auth-logo p  { color: var(--text-muted); font-size: .85rem; margin: 0; }

/* Adım göstergesi (register) */
.step-indicator { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.step-indicator .step {
  flex: 1; height: 4px; border-radius: 4px;
  background: #dde3f0; transition: background .3s;
}
.step-indicator .step.active  { background: var(--primary-light); }
.step-indicator .step.done    { background: var(--success); }

/* OTP Girişi */
.otp-inputs { display: flex; gap: .5rem; justify-content: center; }
.otp-inputs input {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 1.5rem; font-weight: 700;
  border: 2px solid var(--border);
  border-radius: .5rem;
  transition: border-color .2s, box-shadow .2s;
}
.otp-inputs input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,.15);
  outline: none;
}

/* ---- Sidebar Düzeni ---- */
.portal-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,.15);
  transition: transform .3s ease;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none;
}

.sidebar-brand .brand-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand .brand-icon i { font-size: 1.3rem; color: var(--primary-dark); }
.sidebar-brand .brand-name  { color: #fff; font-size: .95rem; font-weight: 600; line-height: 1.3; }
.sidebar-brand .brand-sub   { color: rgba(255,255,255,.55); font-size: .72rem; }

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }

.sidebar-section-title {
  padding: .5rem 1.5rem .25rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  font-family: var(--font-main);
}

.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.5rem;
  color: var(--sidebar-text);
  font-size: .875rem;
  font-family: var(--font-main);
  font-weight: 500;
  border-radius: 0;
  transition: background .2s, color .2s;
  position: relative;
}

.sidebar-nav a:hover { background: var(--sidebar-hover); color: #fff; }

.sidebar-nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

.sidebar-nav a i { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-nav .badge-count { margin-left: auto; font-size: .7rem; }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar-user { display: flex; align-items: center; gap: .75rem; }
.sidebar-user .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary-dark); font-size: .9rem;
  flex-shrink: 0; overflow: hidden;
}
.sidebar-user .avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user .user-name  { color: #fff; font-size: .85rem; font-weight: 600; }
.sidebar-user .user-role  { color: rgba(255,255,255,.5); font-size: .72rem; }

/* ---- Ana İçerik Alanı ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--primary); font-family: var(--font-heading); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

.page-body { padding: 1.75rem; flex: 1; }

/* ---- Kartlar ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-body { padding: 1.25rem; }

/* İstatistik Kartı */
.stat-card {
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card .icon {
  width: 52px; height: 52px;
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: .75rem;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { color: var(--text-muted); font-size: .85rem; }
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; bottom: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(0,0,0,.04);
}

/* Duyuru / Etkinlik Kartları */
.item-card {
  border-left: 4px solid var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.item-card:hover { border-left-color: var(--accent); box-shadow: var(--shadow); }
.item-card.event  { border-left-color: #0d6efd; }
.item-card.activity { border-left-color: var(--success); }

.item-card .item-title { font-size: .95rem; font-weight: 600; color: var(--primary); margin: 0 0 .25rem; }
.item-card .item-date  { font-size: .78rem; color: var(--text-muted); }
.item-card .item-body  { font-size: .875rem; color: #444; margin-top: .4rem; }

/* ---- Form Stilleri ---- */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: .5rem;
  padding: .55rem .85rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,82,152,.15);
  outline: none;
}
.form-label { font-weight: 500; font-size: .875rem; color: var(--text); margin-bottom: .35rem; }

/* ---- Butonlar ---- */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,58,107,.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary-dark);
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.btn-accent:hover { background: var(--accent-light); transform: translateY(-1px); }

.btn-outline-primary {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  transition: all .2s;
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ---- Tablo ---- */
.table th {
  background: #f0f3fa;
  color: var(--primary);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--border);
}
.table td { vertical-align: middle; font-size: .875rem; }
.table tbody tr:hover { background: #f8faff; }

/* ---- Rozet ---- */
.badge { font-size: .72rem; font-weight: 600; border-radius: .35rem; padding: .3em .65em; }

/* ---- QR Kart ---- */
.qr-card-wrapper {
  max-width: 380px;
  margin: 0 auto;
}

.qr-card {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 1.25rem;
  padding: 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.qr-card::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 60px solid rgba(255,255,255,.05);
  top: -100px; right: -80px;
}

.qr-card::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 40px solid rgba(200,168,75,.1);
  bottom: -60px; left: -40px;
}

.qr-card .card-header-row {
  display: flex; align-items: center; gap: .75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  margin-bottom: 1.25rem;
}

.qr-card .uni-logo-box {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
}

.qr-card .uni-logo-box i { color: var(--primary-dark); font-size: 1.4rem; }
.qr-card .uni-name { font-size: .8rem; opacity: .8; }
.qr-card .card-title { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin: 0; }

.qr-card .member-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 .2rem; font-family: var(--font-heading); }
.qr-card .member-info { font-size: .82rem; opacity: .8; }

.qr-card .qr-box {
  background: #fff;
  border-radius: .75rem;
  padding: .75rem;
  display: inline-block;
  margin: 1.25rem 0;
}

.qr-card .qr-id {
  font-family: 'Courier New', monospace;
  font-size: .75rem;
  letter-spacing: .1em;
  opacity: .6;
  text-align: center;
}

/* Yazdırma stili */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; }
  .no-print { display: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
  }
  .sidebar-overlay.open { display: block; }
}

@media (max-width: 575.98px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .page-body { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* ---- Yardımcı Sınıflar ---- */
.text-primary-custom { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.border-primary-custom { border-color: var(--primary) !important; }
.rounded-custom { border-radius: var(--radius) !important; }
.shadow-custom { box-shadow: var(--shadow) !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
