/* BrewOn admin sayfaları — paylaşılan tema.
   2026-09-01: Sol sabit kenar menü + tam genişlik içerik düzenine geçirildi — kullanıcı
   isteği, StudentOn (C:\Projects\Seyhan, app/koc/layout.tsx + components/YanMenu.tsx) ve
   NexusOn/InsightOn admin panelleri referans alındı (bkz. proje belleği). Sidebar markup'ı
   admin-nav.js'ten geliyor, her sayfa kendi <header class="topnav"> kopyasını taşımıyor.
   Tüm admin.html/kasiyerler.html/fatura-aktarim.html/masalar.html/yazicilar.html/
   gecici-nebim-test-verisi.html buradan tek noktadan besleniyor — JS'teki class adları
   (.msg/.ok/.error/.ayarli/.ayarliDegil/.durum-N/.pasif vb.) hiç değişmedi, sadece görünüm. */

:root {
  --bg:      #0d0f14;
  --surface: #161921;
  --surface2:#1d212b;
  --border:  #252932;
  --accent:  #0098ff;  /* BrewOn marka mavisi — logo/site ile tutarlı (önceden #00d4ff cyan, marka rengiyle uyuşmuyordu) */
  --accent-soft: rgba(0, 152, 255, 0.14); /* seçili/aktif menü öğesi zemini — StudentOn'daki --accent-soft deseni */
  --on-accent: #ffffff;
  --accent2: #ff6b35;
  --green:   #00e676;
  --yellow:  #ffd740;
  --red:     #ff4444;
  --text:    #e8eaf0;
  --muted:   #8993a8;  /* önceden --text ile birebir aynıydı (#e8eaf0) — ikincil metin/etiket/açıklama
                           ana metinden ayırt edilemiyordu, sayfanın "anlaşılır değil" hissinin ana
                           sebeplerinden biri buydu. Artık gerçek bir ikincil ton. */
  --radius:  10px;
  --font:    'Montserrat', 'Segoe UI', Arial, sans-serif;
}

/* ------------------------------------------------------- seçilebilir temalar ---
   StudentOn'daki (C:\Projects\Seyhan, app/globals.css + components/TemaSecici.tsx)
   8 temalı yapı birebir taşındı — değişken adları farklı olduğu için eşleme:
     panel -> surface, panel-2 -> surface2, success/danger/warning -> green/yellow/red.
   Uygulama html[data-theme] üzerinden (bkz. brewon-tema.js), varsayılan/işaretsiz
   durum yukarıdaki :root bloğu (BrewOn marka mavisi koyu tema) — bu yüzden "night"
   burada tekrar tanımlanmıyor, sadece diğer 7 alternatif eklendi. */
html[data-theme="cream"] {
  --bg: #f6f0e8; --surface: #ffffff; --surface2: #efe7da; --border: #e2d5c3;
  --accent: #b5502f; --accent-soft: #f0dece; --on-accent: #fff8f0;
  --text: #2b2420; --muted: #857a6c;
  --green: #4c8b6b; --yellow: #c08a2e; --red: #c1443b;
}
html[data-theme="teal"] {
  --bg: #f5f7f6; --surface: #ffffff; --surface2: #eef2f0; --border: #dde3e0;
  --accent: #0f766e; --accent-soft: #dceee7; --on-accent: #ffffff;
  --text: #1c2624; --muted: #5f6e6a;
  --green: #2e9b5e; --yellow: #c98a1d; --red: #d64545;
}
html[data-theme="orman"] {
  --bg: #14231e; --surface: #1b2f27; --surface2: #21382e; --border: #2c4a3d;
  --accent: #34d399; --accent-soft: #1e4a3b; --on-accent: #0b2b21;
  --text: #e6f2ec; --muted: #8fafa0;
  --green: #4ade80; --yellow: #e8b93b; --red: #ef5468;
}
html[data-theme="gunbatimi"] {
  --bg: #fff7ed; --surface: #ffffff; --surface2: #fceedd; --border: #f3ddbf;
  --accent: #d97706; --accent-soft: #fde1bd; --on-accent: #fff7ed;
  --text: #4a2e12; --muted: #9a7350;
  --green: #4c8b6b; --yellow: #b45309; --red: #c1443b;
}
html[data-theme="lavanta"] {
  --bg: #18122b; --surface: #201a37; --surface2: #282041; --border: #362b54;
  --accent: #8b5cf6; --accent-soft: #2e2350; --on-accent: #f5f3ff;
  --text: #ede9f7; --muted: #a79bc4;
  --green: #34d399; --yellow: #fbbf24; --red: #f87171;
}
html[data-theme="gulkurusu"] {
  --bg: #fbf7f5; --surface: #ffffff; --surface2: #f5eae8; --border: #ead9d7;
  --accent: #b85d64; --accent-soft: #f0d9da; --on-accent: #fbf3f3;
  --text: #3d2a2c; --muted: #8c7274;
  --green: #4c8b6b; --yellow: #c08a2e; --red: #c1443b;
}
html[data-theme="kiraz"] {
  --bg: #1a1618; --surface: #221c1f; --surface2: #2a2226; --border: #392e32;
  --accent: #e63946; --accent-soft: #3b1c24; --on-accent: #fff0f2;
  --text: #f3e9eb; --muted: #b49ca1;
  --green: #34d399; --yellow: #fbbf24; --red: #ff4d6d;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

/* ---------------------------------------------------------- kabuk (shell) ---
   Sol sabit menü + sağda tam genişlik içerik. Önceden body max-width:960px ile
   ortalanmış tek dar sütundu ("sayfayı tam kullanma" — kullanıcı geri bildirimi,
   2026-09-01) — artık ekranın tamamı kullanılıyor, içerik sadece çok geniş
   ekranlarda okunabilirlik için 1280px'te sınırlanıyor (satırlar aşırı uzamasın). */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }

.admin-sidebar {
  flex: 0 0 224px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.admin-sidebar-head { padding: 18px 16px; border-bottom: 1px solid var(--border); }
.admin-sidebar-head img { height: 24px; display: block; }
.admin-sidebar-nav { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
  text-decoration: none; transition: color .15s, background .15s;
}
.admin-nav-item .admin-nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.admin-nav-item:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.admin-nav-item.active { color: var(--accent); background: var(--accent-soft); }
.admin-nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-sidebar-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.admin-sidebar-foot button {
  width: 100%; margin: 0; background: transparent; border: 1px solid var(--border); color: var(--muted);
  text-transform: none; font-weight: 600; letter-spacing: 0;
}
.admin-sidebar-foot button:hover { color: var(--red); border-color: var(--red); opacity: 1; }

/* ---------------------------------------------------------- tema seçici ---
   StudentOn'daki TemaSecici.tsx'in aynısı: çapraz bölünmüş yuvarlak (zemin/vurgu
   renk önizlemesi) + tıklanınca açılan liste. Sidebar altına, "Çıkış Yap"ın üstüne
   konur. Sayfa geçişinde açık kalmasın diye dropdown her zaman kapalı başlar. */
.tema-secici { position: relative; }
.tema-secici-btn {
  width: 100%; margin: 0; display: flex; align-items: center; gap: 9px;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 8px 10px; text-transform: none; font-weight: 600; letter-spacing: 0; font-size: 12.5px;
}
.tema-secici-btn:hover { color: var(--text); border-color: var(--muted); opacity: 1; }
.tema-yuvarlagi {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(127,127,127,.35);
}
.tema-secici-btn .tema-yuvarlagi { margin: 0; }
.tema-secici-btn span.etiket { flex: 1; text-align: left; }
.tema-dropdown {
  position: fixed; z-index: 300; width: 208px; max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35); padding: 6px;
}
.tema-secenek {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 0;
  padding: 8px 9px; border: none; border-radius: 7px; background: transparent;
  color: var(--text); font-family: var(--font); font-size: 12.5px; font-weight: 600;
  text-transform: none; letter-spacing: 0; cursor: pointer; transition: background .1s;
}
.tema-secenek:hover { background: var(--surface2); opacity: 1; }
.tema-secenek.secili { background: var(--accent-soft); color: var(--accent); }
.tema-secenek span.etiket { flex: 1; text-align: left; }
.tema-secenek .onay { font-size: 12px; }

/* Mobil: sidebar üst çubuğa katlanır, hamburger ile açılan bir çekmece olur. */
.admin-topbar { display: none; }
@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface);
  }
  .admin-topbar img { height: 22px; }
  .admin-topbar button {
    margin: 0; padding: 6px 10px; background: transparent; border: 1px solid var(--border);
    color: var(--text); font-size: 16px; border-radius: 7px;
  }
  .admin-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 200; height: 100vh; width: 224px;
    transform: translateX(-100%); transition: transform .15s;
  }
  .admin-sidebar.acik { transform: translateX(0); }
  /* Gerçek, tıklanabilir bir arka plan katmanı — box-shadow ile "sahte" bir karartma
     denenmişti ama box-shadow tıklama alanı OLUŞTURMAZ, altındaki içerik tıklanır kalır
     ve çekmece "dışarı tıkla, kapat" hiç çalışmazdı. Ayrı bir eleman şart. */
  .admin-sidebar-backdrop {
    display: none; position: fixed; inset: 0; z-index: 199; background: rgba(0,0,0,.55);
  }
  .admin-sidebar-backdrop.acik { display: block; }
}

.admin-main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.admin-main > .admin-inner { max-width: 1280px; }

h1 {
  font-size: 21px; font-weight: 700; color: var(--text);
  margin: 0 0 6px;
}

h2 {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin: 0 0 4px;
}

/* Bir bölümün başlığının hemen altına konan, o bölümün ne işe yaradığını/ne olacağını
   açıklayan tek satırlık metin — NexusOn/InsightOn admin panellerindeki desenle tutarlı. */
.section-desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0 0 16px; }
.section-desc strong { color: var(--text); }

p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 20px; }
p strong { color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 20px;
}

label { display: block; margin-top: 12px; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
label:first-child { margin-top: 0; }
label input[type="checkbox"] { margin-right: 8px; accent-color: var(--accent); }

input, select {
  width: 100%; box-sizing: border-box; padding: 9px 11px; margin-top: 2px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); font-family: var(--font); font-size: 13.5px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder { color: var(--muted); }

button {
  margin-top: 14px; padding: 9px 18px; cursor: pointer; border: none; border-radius: 7px;
  background: var(--accent); color: var(--bg); font-family: var(--font);
  font-size: 12.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  transition: opacity .15s;
}
button:hover { opacity: .85; }
button.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
button.btn-ghost:hover { color: var(--text); border-color: var(--muted); opacity: 1; }

td button, .satirMsg + button { margin-top: 0; padding: 5px 10px; font-size: 11px; }

table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
th {
  text-align: left; padding: 8px 8px; color: var(--muted); font-size: 11px;
  font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
tr.pasif td { color: var(--muted); }

fieldset { border: 1px solid var(--border); border-radius: 8px; margin-top: 16px; padding: 14px 16px; }
legend {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); padding: 0 8px;
}

.alanGrubu { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.msg { font-size: 12.5px; margin-top: 10px; }
.msg.error, .ayarliDegil { color: var(--red); }
.msg.ok, .ayarli { color: var(--green); }
.satirMsg { font-size: 11.5px; margin-top: 4px; }

.terminalBilgi { font-size: 12px; color: var(--muted); margin-top: 6px; }
.toplam { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.hata { color: var(--red); font-size: 12px; max-width: 320px; }

.durum { padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; letter-spacing: .3px; display: inline-block; }
.durum-0 { background: rgba(255, 215, 64, 0.15); color: var(--yellow); }
.durum-1 { background: rgba(0, 230, 118, 0.15);  color: var(--green); }
.durum-2 { background: rgba(255, 68, 68, 0.15);  color: var(--red); }

.uyari {
  background: rgba(255, 215, 64, 0.06); border: 1px solid rgba(255, 215, 64, 0.3);
  border-left: 4px solid var(--yellow); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 20px; font-size: 13.5px; line-height: 1.6; color: var(--text);
}
.uyari strong { color: var(--yellow); }
