/* UniOku Portal - Ana CSS v5.1 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── Değişkenler ── */
:root {
  --primary:      #ffa629;
  --primary-dark: #e8941e;
  --primary-light:#ffb84d;
  --primary-bg:   #fff8f0;
  --white:        #ffffff;
  --bg:           #f5f6fa;
  --text:         #1a1a2e;
  --text-muted:   #6b7280;
  --text-light:   #9ca3af;
  --border:       rgba(0,0,0,0.08);
  --radius:       14px;
  --radius-sm:    9px;
  --radius-lg:    20px;
  --shadow:       0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.12);
  --sidebar-w:    256px;
  --topbar-h:     60px;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --info:         #3b82f6;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(255,166,41,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ═══════════════════════════════════
   ANA LAYOUT  (masaüstü)
═══════════════════════════════════ */
.layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 2px 0 16px rgba(0,0,0,0.05);
}

.sidebar-logo {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-logo img { height: 30px; }

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 10px 22px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: var(--primary-bg); color: var(--primary); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 3px 12px rgba(255,166,41,.3);
}
.nav-icon { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 17px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item.active .badge { background: rgba(255,255,255,.3); }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
}
.sidebar-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px;
  flex-shrink: 0; overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 12.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 11px; color: var(--primary); font-weight: 500; }

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  flex-shrink: 0;
  width: 100%;
}
.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* menu-toggle masaüstünde gizli, mobilde de kullanmıyoruz */
.menu-toggle { display: none; }

/* ── Page content ── */
.page-content {
  flex: 1;
  padding: 24px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ── İkon butonu ── */
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 17px;
  transition: all .18s;
  position: relative;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-light); }
.icon-btn .dot {
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  position: absolute;
  top: 5px; right: 5px;
  border: 2px solid #fff;
}

/* ═══════════════════════════════════
   KARTLAR & ORTAK BİLEŞENLER
═══════════════════════════════════ */

.glass {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,166,41,0.12);
  box-shadow: 0 6px 24px rgba(255,166,41,0.07), 0 2px 8px rgba(0,0,0,0.05);
  border-radius: var(--radius);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ── İstatistik kartları ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; color: #fff;
  flex-shrink: 0;
}
.stat-icon.green  { background: linear-gradient(135deg,#22c55e,#16a34a); }
.stat-icon.blue   { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.stat-icon.purple { background: linear-gradient(135deg,#8b5cf6,#7c3aed); }
.stat-icon.red    { background: linear-gradient(135deg,#ef4444,#dc2626); }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }

/* ── Butonlar ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .18s;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 3px 12px rgba(255,166,41,.3);
}
.btn-primary:hover { box-shadow: 0 5px 18px rgba(255,166,41,.45); transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-light); }
.btn-danger  { background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; }
.btn-success { background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; }
.btn-sm  { padding: 6px 12px; font-size: 12.5px; }
.btn-lg  { padding: 12px 24px; font-size: 14.5px; }
.btn-icon { padding: 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.w-100 { width: 100%; justify-content: center; }

/* ── Formlar ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label span { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,166,41,.12);
}
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { min-height: 90px; resize: vertical; }
select.form-control { cursor: pointer; background-image: none; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.input-group { position: relative; }
.input-group .form-control { padding-left: 38px; }
.input-group .input-icon {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 15px;
  pointer-events: none;
}
.input-group.right .form-control { padding-left: 13px; padding-right: 40px; }
.input-group.right .input-icon { left: auto; right: 11px; cursor: pointer; pointer-events: all; }

/* ── Tablo ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead tr { background: var(--bg); }
thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--primary-bg); }
tbody td { padding: 13px 14px; color: var(--text); vertical-align: middle; }

/* ── Badge / Pill ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-primary { background: #fff3e0; color: var(--primary); }
.badge-success { background: #f0fdf4; color: #16a34a; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-danger  { background: #fef2f2; color: #dc2626; }
.badge-info    { background: #eff6ff; color: #2563eb; }
.badge-gray    { background: #f3f4f6; color: #6b7280; }

/* ── Alert ── */
.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
}
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
  animation: modalIn .22s ease;
}
.modal-lg { max-width: 700px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 20px 22px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 800; }
.modal-close {
  background: var(--bg); border: none;
  width: 30px; height: 30px; border-radius: 7px;
  cursor: pointer; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all .15s;
}
.modal-close:hover { background: #fee2e2; color: var(--danger); }
.modal-body { padding: 18px 22px; }
.modal-footer {
  padding: 14px 22px 18px;
  display: flex; justify-content: flex-end; gap: 9px;
  border-top: 1px solid var(--border);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

/* ── Steps ── */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  overflow-x: auto;
}
.step {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 12px 6px;
  position: relative;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.step::before {
  content: '';
  position: absolute; top: 20px; left: 0; right: 0;
  height: 2px; background: var(--border); z-index: 0;
}
.step:first-child::before { left: 50%; }
.step:last-child::before  { right: 50%; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; z-index: 1; position: relative;
}
.step.done   .step-circle { background: var(--success); border-color: var(--success); color: #fff; }
.step.active .step-circle {
  background: var(--primary); border-color: var(--primary);
  color: #fff; box-shadow: 0 0 0 4px rgba(255,166,41,.2);
}
.step.active { color: var(--primary); }

/* ── File drop ── */
.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; cursor: pointer;
  transition: all .18s; background: var(--bg);
}
.file-drop:hover, .file-drop.dragover {
  border-color: var(--primary); background: var(--primary-bg);
}
.file-drop-icon { font-size: 32px; margin-bottom: 8px; }

/* ── Bildirim dropdown ── */
.notif-dropdown {
  position: absolute; top: 50px; right: 0;
  width: 320px; max-height: 420px; overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 400;
  display: none;
}
.notif-dropdown.show { display: block; animation: dropIn .18s ease; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.notif-header h3 { font-size: 13px; font-weight: 700; }
.notif-item {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
  display: flex; gap: 10px; align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--primary-bg); }
.notif-item.unread { background: #fff8f0; }
.notif-item-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.notif-item-title { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.notif-item-msg   { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.notif-item-time  { font-size: 10.5px; color: var(--text-light); margin-top: 3px; }

/* ── Sidebar overlay (sadece mobilde aktif) ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 250;
}
.sidebar-overlay.active { display: block; }

/* ═══════════════════════════════════
   MOBİL ALT BAR
   Blur YOK — tam opak beyaz
═══════════════════════════════════ */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #ede9e0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.09);
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 500;
}

.bar-btn {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: none; border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--text-muted);
  text-decoration: none;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.bar-btn:active { transform: scale(.9); }
.bar-btn.active { color: var(--primary); background: var(--primary-bg); }
.bar-btn.danger { color: var(--danger); }
.bar-btn.wa     { color: #25d366; }
.bar-btn.support{ color: var(--primary); }
.bar-btn.unioku img { height: 19px; }

/* Merkez menü butonu */
.bar-menu-btn {
  width: 48px; height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; color: #fff;
  box-shadow: 0 4px 14px rgba(255,166,41,.4);
  transition: transform .22s ease, box-shadow .22s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.bar-menu-btn.open {
  transform: rotate(45deg);
  box-shadow: 0 5px 18px rgba(255,166,41,.55);
}

/* Mobil menü overlay — Blur YOK */
.mobile-menu-overlay {
  position: fixed; inset: 0;
  z-index: 490;
  background: rgba(0,0,0,0.45);
  display: none; opacity: 0;
  transition: opacity .22s;
}
.mobile-menu-overlay.show { display: block; opacity: 1; }

/* Mobil menü popup — Blur YOK, tam beyaz */
.mobile-menu-popup {
  position: fixed;
  bottom: 76px;
  left: 12px; right: 12px;
  z-index: 495;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #ffe0b2;
  box-shadow: 0 6px 28px rgba(0,0,0,.16);
  padding: 8px;
  display: none;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.4,.64,1);
}
.mobile-menu-popup.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mobile-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.mobile-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 11px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--text);
  font-size: 12.5px; font-weight: 600;
  background: #f5f6fa;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-item:active { opacity: .8; transform: scale(.97); }
.mobile-nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.mobile-nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.mobile-nav-label {
  flex: 1;
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════════════════════════════
   AUTH SAYFASI
═══════════════════════════════════ */
.auth-bg {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(150deg, #fff8f0 0%, #ffffff 55%, #fff3e0 100%);
  position: relative; overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: absolute; top: -180px; right: -180px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,166,41,.1) 0%, transparent 70%);
  pointer-events: none;
}
.auth-bg::after {
  content: '';
  position: absolute; bottom: -180px; left: -180px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,166,41,.07) 0%, transparent 70%);
  pointer-events: none;
}
.auth-card {
  background: #ffffff;
  border: 1px solid rgba(255,166,41,.12);
  box-shadow: 0 12px 40px rgba(255,166,41,.08), 0 3px 14px rgba(0,0,0,.07);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 440px;
  padding: 36px;
  position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { height: 40px; }
.auth-title {
  font-size: 22px; font-weight: 800;
  color: var(--text); text-align: center; margin-bottom: 5px;
}
.auth-subtitle {
  font-size: 13.5px; color: var(--text-muted);
  text-align: center; margin-bottom: 24px;
}
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0;
}
.auth-divider span { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ═══════════════════════════════════
   RESPONSİVE
═══════════════════════════════════ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.14);
  }

  /* Mobilde sidebar yok, main-content tam ekran */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .menu-toggle { display: none !important; }
  .mobile-bar  { display: flex; }

  .topbar {
    padding: 0 14px;
    height: 54px;
  }
  .topbar-title { font-size: 15px; }

  .page-content {
    padding: 14px 12px 82px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card  { padding: 13px; }
  .stat-icon  { width: 40px; height: 40px; font-size: 17px; border-radius: 11px; }
  .stat-value { font-size: 20px; }
  .card { padding: 13px; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }

  .auth-card { padding: 22px 16px; border-radius: 14px; }
  .auth-title { font-size: 18px; }
  .auth-logo img { height: 32px; }

  .card { padding: 11px; border-radius: 12px; }

  .btn-lg { padding: 11px 18px; font-size: 14px; }

  /* Modal alttan açılır */
  .modal {
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    max-width: 100%;
  }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-body   { padding: 14px 16px; }
  .modal-header { padding: 16px 16px 10px; }
  .modal-footer { padding: 10px 16px 18px; }

  .hide-mobile { display: none !important; }

  .topbar-title {
    max-width: 140px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .page-content { padding: 12px 10px 78px; }
}

/* ═══════════════════════════════════
   YARDIMCI SINIFLAR
═══════════════════════════════════ */
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-8   { margin-bottom: 8px; }
.mb-14  { margin-bottom: 14px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: 12.5px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.hidden { display: none !important; }

/* Durum renkleri */
.status-open       { color: var(--info); }
.status-in_progress{ color: var(--warning); }
.status-resolved   { color: var(--success); }
.status-closed     { color: var(--text-muted); }
.status-pending    { color: var(--warning); }
.status-active     { color: var(--success); }
.status-suspended  { color: var(--danger); }
.status-rejected   { color: var(--danger); }

/* ── Dashboard two-col layout ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0,280px);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr !important;
  }
  /* İki kolonlu tüm gridler tek kolona döner */
  [style*="repeat(auto-fit,minmax(320px"] ,
  [style*="repeat(auto-fit,minmax(280px"] ,
  [style*="repeat(auto-fit,minmax(260px"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
}

/* === VegaSmart fix: modal/menu centering & responsive stability === */
html, body { width: 100%; max-width: 100%; }
.layout, .main-content, .page-content { max-width: 100%; }

.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  overflow-y: auto;
}
.modal-backdrop.show { display: flex !important; }
.modal {
  position: relative !important;
  margin: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform-origin: center center;
  width: min(100%, 500px);
}
.modal.modal-lg { width: min(100%, 760px); max-width: 760px; }

.mobile-menu-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
}
.mobile-menu-popup {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  width: min(560px, calc(100vw - 24px)) !important;
  max-height: min(70dvh, 560px);
  overflow-y: auto;
  transform: translate(-50%, 14px) scale(.97) !important;
}
.mobile-menu-popup.show { transform: translate(-50%, 0) scale(1) !important; }

@media (max-width: 1024px) {
  .layout { display: block; }
  .main-content { margin-left: 0 !important; width: 100% !important; }
}

@media (max-width: 480px) {
  .modal-backdrop {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  .modal, .modal.modal-lg {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0;
  }
  .mobile-menu-popup {
    width: calc(100vw - 20px) !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .mobile-menu-grid { grid-template-columns: 1fr; }
}

/* === VegaSmart final layout fix: sağa kaçan içerik / bozuk topbar düzeltmesi === */
body { overflow-x: hidden !important; }
.layout { width: 100% !important; max-width: 100vw !important; overflow-x: hidden !important; }
.main-content {
  flex: 1 1 auto !important;
  max-width: calc(100vw - var(--sidebar-w)) !important;
  overflow-x: hidden !important;
}
.page-content {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
.page-content > * {
  max-width: 100% !important;
}
.topbar {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: space-between !important;
}
.topbar-title { display: block !important; margin: 0 !important; }
.topbar-actions { margin-left: auto !important; display: flex !important; }

/* Inline gridlerde min genişlik taşmasını engeller */
[style*="grid-template-columns:repeat(auto-fit,minmax(340px"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important;
}
[style*="grid-template-columns:repeat(auto-fit,minmax(320px"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
}
[style*="grid-template-columns:repeat(auto-fit,minmax(280px"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
}
.card, .glass, .table-responsive { max-width: 100% !important; }

@media (max-width: 1024px) {
  .main-content { max-width: 100vw !important; margin-left: 0 !important; width: 100% !important; }
  .topbar { position: sticky !important; left: 0 !important; right: 0 !important; }
}
@media (max-width: 640px) {
  .page-content { padding-left: 10px !important; padding-right: 10px !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}
