/* ================================================
   MTSK DEKONT SİSTEMİ — Responsive CSS
   Mobil-first, Türkçe destekli, tüm ekran boyutları
   ================================================ */

/* ---- Design Tokens ---- */
:root {
  --primary:       #0f172a;
  --primary-light: #1e293b;
  --accent:        #f59e0b;
  --accent-hover:  #d97706;
  --accent-light:  #fef3c7;
  --green:         #10b981;
  --green-light:   #d1fae5;
  --red:           #ef4444;
  --red-light:     #fee2e2;
  --blue:          #3b82f6;
  --blue-light:    #dbeafe;
  --purple:        #8b5cf6;
  --purple-light:  #ede9fe;
  --cyan:          #06b6d4;
  --cyan-light:    #cffafe;
  --gray-50:       #f8fafc;
  --gray-100:      #f1f5f9;
  --gray-200:      #e2e8f0;
  --gray-300:      #cbd5e1;
  --gray-400:      #94a3b8;
  --gray-500:      #64748b;
  --gray-600:      #475569;
  --gray-700:      #334155;
  --gray-800:      #1e293b;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04);
  --radius:     12px;
  --radius-sm:  8px;

  /* Mobil boşluk değişkenleri */
  --page-px:    16px;
  --page-py:    20px;
  --card-p:     20px;
  --header-h:   56px;
}

/* ---- Sıfırlama & Temel ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%);
  color: var(--gray-700);
  min-height: 100vh;
  min-height: 100dvh; /* dinamik viewport yüksekliği (iOS Safari) */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Türkçe karakter desteği */
:lang(tr) { quotes: '\201C' '\201D'; }

/* ================================================
   HEADER — Tam ekran uyumlu
   ================================================ */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, #1a2840 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-px);
  height: var(--header-h);
  gap: 10px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.logo-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.logo-img {
  height: 34px;
  width: auto;
  max-width: 130px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-sub {
  font-size: 10px;
  color: var(--gray-400);
  font-weight: 400;
  white-space: nowrap;
}

/* Nav */
.nav-links { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

.nav-links a {
  color: var(--gray-400);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.nav-links a:hover   { color: white; background: rgba(255,255,255,.08); }
.nav-links a.active  { color: var(--accent); background: rgba(245,158,11,.10); }
.nav-links .logout   { color: var(--red) !important; background: rgba(239,68,68,.10) !important; margin-left: 6px; }
.nav-links .logout:hover { background: rgba(239,68,68,.20) !important; }

/* Kullanıcı rozeti */
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 0;
}

.user-badge .name { color: var(--accent); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.user-badge .logout-link { color: var(--gray-400); cursor: pointer; margin-left: 2px; font-size: 11px; text-decoration: underline; white-space: nowrap; }
.user-badge .logout-link:hover { color: white; }

/* ================================================
   ANA İÇERİK
   ================================================ */
.main {
  max-width: 100%;
  margin: 0 auto;
  padding: var(--page-py) var(--page-px);
}

.hidden { display: none !important; }

/* ================================================
   ALERT
   ================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 10px;
  animation: slideDown .3s ease;
  line-height: 1.4;
}

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

.alert-success { background: var(--green-light); color: #065f46; border-left: 4px solid var(--green); }
.alert-error   { background: var(--red-light);   color: #991b1b; border-left: 4px solid var(--red);   }

/* ================================================
   ADMİN BİLDİRİM PANELİ
   ================================================ */
.admin-panel {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 999;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 14px 18px;
  border-left: 4px solid var(--purple);
  display: none;
  animation: slideDown .3s ease;
}

.admin-panel.show { display: block; }

.admin-panel-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--gray-400);
  font-size: 18px;
  padding: 4px;
}

.admin-panel-close:hover { color: var(--gray-600); }

.admin-panel-title {
  font-weight: 700;
  color: var(--purple);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.admin-panel-content { font-size: 12px; color: var(--gray-600); line-height: 1.5; }

/* ================================================
   KARTLAR
   ================================================ */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 1px solid var(--gray-200);
  transition: box-shadow .3s, border-color .3s;
}

.card:hover { box-shadow: var(--shadow-lg); border-color: var(--gray-300); }

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.card-title i { color: var(--accent); font-size: 15px; }

/* ================================================
   FORM ELEMANLARı
   ================================================ */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 11px;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-control,
.add-row input,
.setting-row input,
.login-card input,
.edit-field input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: all .2s;
  background: var(--gray-50);
  color: var(--gray-700);
  /* iOS'da zoom'u önle */
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px; /* dokunma hedefi */
}

.form-control:focus,
.add-row input:focus,
.setting-row input:focus,
.login-card input:focus,
.edit-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
  background: white;
}

.form-control::placeholder,
.add-row input::placeholder,
.setting-row input::placeholder,
.login-card input::placeholder { color: var(--gray-400); }

/* ================================================
   BUTONLAR
   ================================================ */
.btn-submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--primary);
  transition: all .3s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: var(--shadow-md);
  min-height: 52px;
  touch-action: manipulation;
}

.btn-submit:hover    { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-submit:active   { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn {
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  touch-action: manipulation;
}

.btn-accent { background: var(--accent);           color: var(--primary); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-green  { background: var(--green);            color: white; }
.btn-green:hover  { background: #059669; }
.btn-blue   { background: var(--blue);             color: white; }
.btn-blue:hover   { background: #2563eb; }
.btn-amber  { background: var(--accent);           color: var(--primary); }
.btn-amber:hover  { background: var(--accent-hover); }
.btn-red    { background: var(--red-light);        color: var(--red); }
.btn-red:hover    { background: var(--red); color: white; }
.btn-outline { background: white; border: 1.5px solid var(--gray-200); color: var(--gray-600); }
.btn-outline:hover { border-color: var(--gray-300); background: var(--gray-50); }

/* Küçük butonlar */
.btn-sm {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  touch-action: manipulation;
}

.btn-sm-blue { background: var(--blue-light); color: var(--blue); }
.btn-sm-blue:hover { background: var(--blue); color: white; }
.btn-sm-red  { background: var(--red-light);  color: var(--red);  }
.btn-sm-red:hover  { background: var(--red); color: white; }

/* İkon sadece buton */
.btn-icon {
  width: 42px;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}

/* ================================================
   KURSİYER GRID
   ================================================ */
.kurs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kurs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-50);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  transition: all .25s;
}

.kurs-item:hover        { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kurs-item:focus-within { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

.kurs-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.kurs-icon.moto   { background: #fef3c7; color: #b45309; }
.kurs-icon.oto    { background: #dbeafe; color: #1d4ed8; }
.kurs-icon.bus    { background: #d1fae5; color: #047857; }
.kurs-icon.kamyon { background: #ede9fe; color: #6d28d9; }

.kurs-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kurs-input {
  width: 60px;
  min-width: 60px;
  padding: 7px;
  text-align: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: white;
  transition: all .2s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 40px;
  touch-action: manipulation;
}

.kurs-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(245,158,11,.15); }

/* ================================================
   TOPLAM BAR
   ================================================ */
.toplam-bar {
  margin-top: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-sm);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  gap: 12px;
}

.toplam-bar .label { font-size: 11px; font-weight: 500; opacity: .9; }
.toplam-bar .value { font-size: 18px; font-weight: 800; color: #fbbf24; }

/* ================================================
   2 KOLONLU SATIR
   ================================================ */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ================================================
   DOSYA YÜKLEMESİ
   ================================================ */
.file-drop {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  background: var(--gray-50);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.file-drop:hover, .file-drop:focus { border-color: var(--accent); background: var(--accent-light); outline: none; }
.file-drop.has-file { border-color: var(--green); background: var(--green-light); border-style: solid; }
.file-drop input        { display: none; }
.file-drop-icon         { font-size: 22px; color: var(--gray-400); margin-bottom: 6px; }
.file-drop.has-file .file-drop-icon { color: var(--green); }
.file-drop-text         { font-size: 12px; color: var(--gray-500); font-weight: 500; }
.file-drop-hint         { font-size: 11px; color: var(--gray-400); margin-top: 3px; }
.file-drop-name         { font-size: 11px; color: var(--green); font-weight: 600; margin-top: 5px; display: none; word-break: break-all; }
.file-drop.has-file .file-drop-name { display: block; }

/* ================================================
   PDF ÖNİZLEME
   ================================================ */
.preview-card { margin-top: 14px; }

.preview-meta,
.preview-modal-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 12px;
  line-height: 1.4;
}

.pdf-preview-shell {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

.pdf-preview-shell canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: white;
}

.preview-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.preview-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ================================================
   İSTATİSTİK KARTLARI (Panel)
   ================================================ */
.stats-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-card-center      { text-align: center; display: block; }
.stat-card-center .stat-icon { margin: 0 auto 10px; }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-icon.i1 { background: var(--accent-light);  color: var(--accent-hover); }
.stat-icon.i2 { background: var(--blue-light);     color: var(--blue); }
.stat-icon.i3 { background: var(--green-light);    color: var(--green); }
.stat-icon.i4 { background: #ede9fe;               color: #7c3aed; }

.stat-num   { font-size: 22px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 10px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ================================================
   TABLO
   ================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { 
  width: 100%; 
  border-collapse: collapse;
  table-layout: auto;
}

th {
  padding: 10px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

td {
  padding: 10px 8px;
  font-size: 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
}}

tr:hover td { background: var(--gray-50); }

.tag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tag-amber  { background: var(--accent-light); color: #92400e; }
.tag-green  { background: var(--green-light);  color: #065f46; }
.tag-blue   { background: var(--blue-light);   color: #1e40af; }
.tag-gray   { background: var(--gray-100);     color: var(--gray-500); }
.td-bold    { font-weight: 700; color: var(--primary); }
.td-link    { color: var(--blue); text-decoration: none; cursor: pointer; font-size: 12px; }
.td-link:hover { text-decoration: underline; }
.td-mono    { font-family: 'Courier New', monospace; }

/* ================================================
   GİRİŞ EKRANI
   ================================================ */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.login-icon {
  width: 68px;
  height: 68px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.login-logo-img { width: 100%; height: 100%; object-fit: contain; }
.login-card h2   { color: var(--primary); margin-bottom: 8px; font-size: 20px; font-weight: 800; }
.login-card .sub { color: var(--gray-500); font-size: 13px; margin-bottom: 24px; line-height: 1.5; }
.login-error     { color: var(--red); font-size: 13px; font-weight: 500; margin-bottom: 10px; display: none; }

.login-card input { margin-bottom: 12px; }

.login-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .3s;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: var(--shadow-md);
  min-height: 50px;
  margin-top: 4px;
  touch-action: manipulation;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ================================================
   MODALLER
   ================================================ */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.50);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  padding: 16px;
}

.modal-bg.show { display: flex; }

.modal-box {
  background: white;
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.modal-icon {
  width: 52px;
  height: 52px;
  background: var(--red-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
  color: var(--red);
}

.edit-modal .modal-box     { text-align: left; max-width: 420px; }
.edit-modal .modal-icon    { background: var(--blue-light); color: var(--blue); }
.preview-modal .modal-box  { text-align: left; max-width: min(760px, calc(100vw - 32px)); }
.preview-modal .modal-icon { background: var(--accent-light); color: var(--accent-hover); }
.preview-modal-shell       { max-height: 65vh; overflow: auto; -webkit-overflow-scrolling: touch; }

.modal-box h3   { color: var(--primary); margin-bottom: 6px; font-size: 17px; }
.modal-box p    { font-size: 13px; color: var(--gray-500); margin-bottom: 20px; line-height: 1.5; }
.modal-actions  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-outline-modal { background: white; border: 1.5px solid var(--gray-200); color: var(--gray-600); padding: 10px 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; min-height: 44px; touch-action: manipulation; }
.btn-red-modal     { background: var(--red); color: white; border: none; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; min-height: 44px; touch-action: manipulation; display: inline-flex; align-items: center; gap: 6px; }
.btn-outline-modal:hover { background: var(--gray-50); }
.btn-red-modal:hover     { background: #dc2626; }

/* ================================================
   ÇEŞITLI
   ================================================ */
.tab-panel  { display: none !important; }
.tab-panel.active  { display: block !important; }
.tab-content  { display: none; }
.tab-content.active  { display: block; }
.actions-bar { display: flex; gap: 10px; flex-wrap: wrap; }

.add-row     { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.setting-row { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.setting-row .field { flex: 1; min-width: 200px; max-width: 300px; }
.setting-row label  { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.edit-field  { margin-bottom: 14px; }
.edit-field label { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }


/* ================================================
   RESPONSIVE — Tablet (≤ 900px)
   ================================================ */
@media (max-width: 900px) {
  :root { --card-p: 20px; --page-px: 20px; }
  .stats-grid, .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { gap: 8px; }
}

/* ================================================
   RESPONSIVE — Tablet küçük / Büyük telefon (≤ 768px)
   ================================================ */
@media (max-width: 768px) {
  :root {
    --header-h: 52px;
    --card-p: 18px;
    --page-px: 14px;
    --page-py: 14px;
  }

  .logo-text { font-size: 13px; }
  .logo-sub  { display: none; }

  /* Nav etiketlerini gizle, sadece ikon göster */
  .nav-links a span { display: none; }
  .nav-links a { padding: 7px 10px; }

  /* Kullanıcı adı kısa tut */
  .user-badge .name { max-width: 70px; }

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

  /* Tablo mobil scroll */
  .table-wrap { border-radius: var(--radius-sm); }
  th { padding: 10px 8px; font-size: 10px; }
  td { padding: 10px 8px; font-size: 12px; }

  /* Modal tam genişlik */
  .modal-box { padding: 24px 20px; }
}

/* ================================================
   RESPONSIVE — Telefon (≤ 600px)
   ================================================ */
@media (max-width: 600px) {
  :root {
    --header-h: 50px;
    --card-p: 16px;
    --page-px: 12px;
    --page-py: 12px;
  }

  /* Kurs grid tek kolon */
  .kurs-grid { grid-template-columns: 1fr; gap: 8px; }
  .kurs-item { padding: 10px 12px; }

  /* Tarih + No alanları alt alta */
  .row-2 { grid-template-columns: 1fr; gap: 12px; }

  /* Toplam bar dikey */
  .toplam-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 12px 16px;
  }
  .toplam-bar .value { font-size: 22px; }

  /* Önizleme meta dikey */
  .preview-meta,
  .preview-modal-meta { flex-direction: column; gap: 4px; }

  /* Önizleme toolbar dikey */
  .preview-toolbar       { flex-direction: column; align-items: stretch; gap: 8px; }
  .preview-toolbar-group { justify-content: center; flex-wrap: nowrap; }
  .preview-toolbar-group .btn,
  .preview-toolbar-group .preview-chip { flex: 1; justify-content: center; min-height: 42px; }
  .preview-actions { justify-content: stretch; }
  .preview-actions .btn  { width: 100%; justify-content: center; min-height: 44px; }

  /* Büyük önizleme modal shell */
  .preview-modal-shell { max-height: 55vh; }

  /* Stat grid 2 kolon küçük boyut */
  .stats-grid, .summary-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card  { padding: 14px 12px; gap: 10px; }
  .stat-icon  { width: 38px; height: 38px; font-size: 16px; }
  .stat-num   { font-size: 18px; }

  /* İstatistik tablo: bazı sütunları gizle küçük ekranda */
  table th:nth-child(8),
  table td:nth-child(8) { display: none; } /* Cihaz ID panel tablosundan gizle */

  /* Alert tam genişlik */
  .alert { font-size: 12px; padding: 10px 14px; }

  /* Aksiyonlar butonları tam genişlik */
  .actions-bar { flex-direction: column; }
  .actions-bar .btn { width: 100%; justify-content: center; }

  /* Modal aksiyon butonları tam genişlik */
  .modal-actions { flex-direction: column; }
  .btn-outline-modal,
  .btn-red-modal { width: 100%; justify-content: center; }

  /* Giriş kartı */
  .login-card { padding: 32px 20px; border-radius: 14px; }
  .login-icon { width: 58px; height: 58px; margin-bottom: 14px; }
  .login-card h2 { font-size: 18px; }
}

/* ================================================
   RESPONSIVE — Küçük telefon (≤ 400px)
   ================================================ */
@media (max-width: 400px) {
  :root {
    --page-px: 10px;
    --card-p: 14px;
  }

  /* Logo metni çok dar ekranda kısalt */
  .logo-text { font-size: 12px; letter-spacing: 0; }

  /* Butonlar */
  .btn-sm { padding: 5px 9px; font-size: 11px; }

  /* Kurs input daha dar */
  .kurs-input { width: 52px; min-width: 52px; font-size: 13px; }

  /* Toplam tutar */
  .toplam-bar .value { font-size: 20px; }

  /* Header: logo kısmı çok dar ekranda sadece ikon göster */
  .logo-text { display: none; }
}

/* ================================================
   PERFORMANS & ERİŞİLEBİLİRLİK
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Dokunma cihazı hover efektlerini kaldır */
@media (hover: none) {
  .card:hover,
  .kurs-item:hover,
  .btn-submit:hover { transform: none; box-shadow: var(--shadow); }
}

/* Geniş ekran maxi */
@media (min-width: 1200px) {
  :root { --page-px: 32px; --card-p: 28px; }
  .main { max-width: 900px; }
}

