/* ==========================================================================
   pwpanel — tasarım sistemi
   Katı CSP altında çalışır (satır içi stil yok; dinamik değerler JS'te CSSOM ile).
   Light + dark tema: prefers-color-scheme + [data-theme] override.
   ========================================================================== */

:root {
  /* renk — nötr zemin + indigo/mor aksan */
  --bg:        #f6f7fb;
  --bg-elev:   #ffffff;
  --panel:     #ffffff;
  --panel-2:   #f1f2f8;
  --panel-3:   #e9ebf3;
  --line:      #e2e4ee;
  --line-2:    #d3d6e4;
  --text:      #1a1d29;
  --text-2:    #5b6072;
  --text-3:    #898fa3;
  --accent:    #5b5bd6;
  --accent-2:  #4a4ac2;
  --accent-soft:#ebebfb;
  --danger:    #d94860;
  --danger-soft:#fdecef;
  --ok:        #1a9e6a;
  --ok-soft:   #e5f5ee;
  --warn:      #d98a1a;
  --shadow-sm: 0 1px 2px rgba(20,22,40,.06), 0 1px 3px rgba(20,22,40,.08);
  --shadow-md: 0 4px 12px rgba(20,22,40,.08), 0 2px 6px rgba(20,22,40,.06);
  --shadow-lg: 0 12px 32px rgba(20,22,40,.16);
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --sidebar-w: 244px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

:root[data-theme="dark"], html.dark {
  --bg:        #0d0f18;
  --bg-elev:   #151826;
  --panel:     #151826;
  --panel-2:   #1c2032;
  --panel-3:   #242942;
  --line:      #262b41;
  --line-2:    #333a58;
  --text:      #e8eaf3;
  --text-2:    #a6abc4;
  --text-3:    #757b96;
  --accent:    #7d7dff;
  --accent-2:  #9090ff;
  --accent-soft:#20213e;
  --danger:    #ff6b81;
  --danger-soft:#2a1720;
  --ok:        #43d391;
  --ok-soft:   #12271e;
  --warn:      #efb055;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 18px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#0d0f18; --bg-elev:#151826; --panel:#151826; --panel-2:#1c2032;
    --panel-3:#242942; --line:#262b41; --line-2:#333a58; --text:#e8eaf3;
    --text-2:#a6abc4; --text-3:#757b96; --accent:#7d7dff; --accent-2:#9090ff;
    --accent-soft:#20213e; --danger:#ff6b81; --danger-soft:#2a1720; --ok:#43d391;
    --ok-soft:#12271e; --warn:#efb055;
    --shadow-sm:0 1px 2px rgba(0,0,0,.3); --shadow-md:0 6px 18px rgba(0,0,0,.4);
    --shadow-lg:0 16px 40px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

/* ---- scrollbar ---- */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }

/* ==========================================================================
   Butonlar
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  border: 1px solid transparent; white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--line-2); background: var(--panel-3); }
.btn-subtle { background: transparent; color: var(--text-2); }
.btn-subtle:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 18px; font-size: 15px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); display: inline-grid;
  place-items: center; color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
/* Varsayılan ikon boyutu — daha özgül kurallar (.btn svg, .nav-item svg …) bunu ezer.
   Boyutsuz SVG'nin dev render olmasına karşı güvenlik ağı. */
.ico { width: 18px; height: 18px; flex: none; }

/* ==========================================================================
   Form alanları
   ========================================================================== */
.field { margin-bottom: 15px; }
.field > label, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 62px; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .input { flex: 1; }

/* güç ölçer */
.strength { margin-top: 8px; }
.strength-track { height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.strength-bar { height: 100%; width: 0; border-radius: 6px; transition: width .3s, background .3s; }
.strength-label { font-size: 12px; margin-top: 5px; color: var(--text-2); }
/* Kayıt formundaki küçük üreteç seçenekleri — katlanır, sade, formu domine etmez */
.gen-mini { margin-top: 8px; }
.gen-mini > summary { font-size: 12px; color: var(--text-3); cursor: pointer; list-style: none; user-select: none; width: max-content; }
.gen-mini > summary::-webkit-details-marker { display: none; }
.gen-mini > summary::before { content: "⚙ "; }
.gen-mini > summary:hover { color: var(--text-2); }
.gen-mini-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.gen-mini-row .gen-len { display: inline-flex; align-items: center; gap: 6px; }
.gen-mini-row .gen-len .select { width: auto; padding: 4px 8px; font-size: 12.5px; }
.gen-mini-row .gen-chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.gen-mini-row .gen-chk input { accent-color: var(--accent); }

/* ==========================================================================
   Kimlik doğrulama ekranı (login / register / unlock)
   ========================================================================== */
#auth-view {
  min-height: 100%; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1100px 600px at 15% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, var(--accent-soft), transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
/* Marka turuncu gradyanı — tek yerden yönetilir. */
:root { --brand-grad: linear-gradient(145deg, #FDB528 0%, #F97316 55%, #EA580C 100%); }
.auth-brand .logo {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 6px 16px rgba(234, 88, 12, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.auth-brand .logo svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(120, 40, 0, .25)); }
.auth-brand h1 { font-size: 19px; }
.auth-brand p { margin: 0; font-size: 12.5px; color: var(--text-3); }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel-2); border-radius: 10px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--text-2); transition: .15s; }
.auth-tab.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-msg { min-height: 18px; font-size: 13px; margin: 2px 0 10px; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok { color: var(--ok); }
.auth-msg.info { color: var(--text-2); }
.auth-hint { font-size: 12px; color: var(--text-3); margin-top: 16px; text-align: center; }
.unlock-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel-2); border-radius: var(--radius-sm); margin-bottom: 16px; }
#unlock-switch { margin-top: 8px; }

/* iki adımlı doğrulama */
.code-input { font-family: var(--mono); font-size: 24px; letter-spacing: .32em; text-align: center; padding: 12px; }
.code-hint { margin: 8px 0 0; line-height: 1.5; }

/* QR kod (matris DOM ile çizilir; harici kütüphane yok) */
.qr-box { display: flex; justify-content: center; padding: 18px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 14px; overflow: auto; }
/* Modül kenarları keskin kalmalı; yumuşatma QR'ı okunamaz yapar. */
.qr-box canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.secret-key { font-family: var(--mono); font-size: 13px; word-break: break-all; background: var(--panel-2); padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.codes-grid span { font-family: var(--mono); font-size: 14px; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; }
.warn-box { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--text); padding: 12px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.55; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 20px; background: var(--panel-2); color: var(--text-3); }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--panel-2); color: var(--text-3); }

/* oturum / denetim listeleri */
.rowlist { display: flex; flex-direction: column; gap: 8px; }
.rowitem { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); font-size: 13.5px; }
.rowitem .grow { flex: 1; min-width: 0; }
.rowitem .sub { color: var(--text-3); font-size: 12px; }
/* Hiyerarşik müşteri satırı: çok satırlı içerik + sarmalayan aksiyonlar */
.rowitem.cust { align-items: flex-start; }
.rowitem.cust .avatar { margin-top: 1px; }
.rowitem .trow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rowitem .ctitle { font-weight: 600; word-break: break-word; }
.rowacts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 100%; }
.rowitem .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--danger); }

/* yardımcı sınıflar (CSP satır içi stile izin vermediği için) */
.sprite { position: absolute; width: 0; height: 0; }
.muted-sm { font-size: 12px; color: var(--text-3); }
.label-hint { color: var(--text-3); font-weight: 400; }
.modal-card.modal-sm { max-width: 400px; }

/* ==========================================================================
   Uygulama kabuğu
   ========================================================================== */
#app-view { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100%; }

.sidebar {
  background: var(--bg-elev); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-head { padding: 18px 18px 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-head .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 3px 8px rgba(234, 88, 12, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.sidebar-head .logo svg { width: 20px; height: 20px; }
.sidebar-head b { font-size: 16px; letter-spacing: -.01em; }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: var(--text-2); font-weight: 550; font-size: 14px; transition: background .13s, color .13s;
  text-align: left; width: 100%;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 600; }
.nav-item.active .count { color: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 12px; }
.nav-title { padding: 10px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.tag-list { padding: 2px 10px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.tag-item { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; }
.tag-item:hover { background: var(--panel-2); color: var(--text); }
.tag-item.active { background: var(--accent-soft); color: var(--accent); }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
/* Kenar çubuğu ağacı: servis (filtre) yaprakları alt müşterinin altında girintili görünür. */
.tag-item.svc-leaf { font-size: 12.5px; color: var(--text-3); }
.tag-item.svc-leaf:hover { color: var(--text-2); }
.tag-item.svc-leaf.active { color: var(--accent); }
.svc-mark { color: var(--text-3); margin-right: 2px; }
/* Uzun etiketler sayacı ezmesin: metin kısalır (…), nokta/sayaç sabit kalır. */
.tag-item > span:not(.tag-dot):not(.count):not(.svc-mark) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tag-item .count { flex: none; }
/* Müşteriler sayfasındaki servis filtre çipleri. */
.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px; flex: none;
}
.sidebar-foot .who { min-width: 0; }
.sidebar-foot .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .who span { font-size: 11.5px; color: var(--text-3); }
.sidebar-foot .acts { margin-left: auto; display: flex; gap: 2px; }
/* Alt kimlik alanı: tıklanınca profil sayfası açılır */
.foot-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border: 0;
           background: transparent; border-radius: 10px; cursor: pointer; color: var(--text); text-align: left; }
.foot-id:hover { background: var(--panel-2); }
/* Profil sayfası başlığı */
.profile-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.profile-hero .prof-ava { width: 56px; height: 56px; font-size: 20px; }
.profile-hero h2 { font-size: 20px; }

/* içerik: liste + detay */
.main { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--bg-elev);
}
.search-wrap { position: relative; flex: 1; max-width: 460px; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.search-wrap .input { padding-left: 34px; background: var(--panel-2); border-color: transparent; }
.search-wrap .input:focus { background: var(--bg-elev); border-color: var(--accent); }
.topbar .spacer { flex: 1; }

.content { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; min-height: 0; }
.list-pane { border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.list-head h2 { font-size: 15px; }
.list-filter { width: auto; max-width: 160px; padding: 6px 10px; font-size: 13px; }
.list-head .sub { font-size: 12px; color: var(--text-3); }
.list { padding: 4px 10px 20px; display: flex; flex-direction: column; gap: 3px; }

.entry {
  display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: 10px;
  cursor: pointer; transition: background .12s; border: 1px solid transparent;
}
.entry:hover { background: var(--panel-2); }
.entry.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.entry .ava { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.entry .info { min-width: 0; flex: 1; }
.entry .info b { font-size: 14px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .info span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.entry .star { color: var(--warn); width: 15px; height: 15px; flex: none; }

/* ---- Ana sayfa (giriş sonrası karşılama) ---- */
.home { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 28px; align-items: start;
        max-width: 1100px; margin: 0 auto; padding: 48px 34px; }
.home-main { min-width: 0; }
.home-hero { margin-bottom: 22px; }
.home-title { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.home-lead { color: var(--text-3); font-size: 14px; margin-top: 6px; }
.home-search { display: flex; align-items: center; gap: 10px; padding: 4px 14px;
               background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
               box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.home-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.home-search svg { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.home-search .input { border: 0; background: transparent; box-shadow: none; padding: 12px 0; font-size: 16px; }
.home-search .input:focus { border: 0; box-shadow: none; }
.home-results { margin-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.home-side { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.home-side-title { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
                   color: var(--text-3); padding: 2px 6px 10px; }
.home-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
             padding: 9px 10px; border-radius: 10px; background: transparent; border: 1px solid transparent;
             cursor: pointer; color: var(--text); }
.home-item:hover { background: var(--panel-2); border-color: var(--line); }
.home-item .ava { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
                  color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.home-item .grow { min-width: 0; flex: 1; }
.home-item .grow b { font-size: 13.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-item .home-sub { font-size: 12px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-item .star { color: var(--warn); width: 14px; height: 14px; flex: none; }
.home-empty { color: var(--text-3); font-size: 13px; padding: 10px 8px; }
/* Pano: istatistik + işlemler + parola sağlığı */
.home-dash { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; text-align: left;
             background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--text); }
.stat-tile:hover:not(:disabled) { border-color: var(--accent); }
.stat-tile:disabled { cursor: default; }
.stat-num { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.stat-label { font-size: 12px; color: var(--text-3); }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-health { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.health-metric { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius-sm);
                 border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; text-align: left; color: var(--text); }
.health-metric:hover { border-color: var(--line-2); }
.health-metric.bad { background: var(--danger-soft, rgba(220,60,60,.10)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.health-metric.bad .health-num { color: var(--danger); }
.health-metric.ok .health-num { color: var(--ok); }
.health-num { font-size: 20px; font-weight: 700; }
.health-label { font-size: 12px; color: var(--text-3); }
.health-ok { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ok); font-size: 13px; }
.health-ok svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .home-stats { grid-template-columns: repeat(2, 1fr); } }
.home-item .home-info-ic { width: 15px; height: 15px; color: var(--text-3); flex: none; opacity: 0; transition: opacity .12s; }
.home-item:hover .home-info-ic { opacity: 1; }
/* Görüntüleme detayı modalı */
.recinfo-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.recinfo-hero .ava { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.recinfo-hero b { font-size: 15px; font-weight: 600; display: block; }
.recinfo-type { font-size: 12.5px; color: var(--text-3); }
.recinfo-rows { display: flex; flex-direction: column; gap: 1px; }
.recinfo-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.recinfo-k { color: var(--text-3); flex: none; }
.recinfo-v { color: var(--text); text-align: right; word-break: break-word; }
/* Paylaşılan kayıt erişim geçmişi */
.access-log { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.access-log > summary { font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; list-style: none; width: max-content; }
.access-log > summary::-webkit-details-marker { display: none; }
.access-log > summary::before { content: "▸ "; color: var(--text-3); }
.access-log[open] > summary::before { content: "▾ "; }
.access-body { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.access-row { display: flex; align-items: baseline; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.access-act { color: var(--text-2); }
.access-meta { margin-left: auto; font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; gap: 20px; padding: 26px 18px; }
}

/* detay paneli */
.detail-pane { overflow-y: auto; min-height: 0; padding: 0; position: relative; }
.detail-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--text-3); padding: 40px; }
.detail-empty svg { width: 46px; height: 46px; margin-bottom: 14px; opacity: .5; }
.detail { padding: 26px 30px; max-width: 640px; }
.detail-hero { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.detail-hero .ava { width: 54px; height: 54px; border-radius: 14px; font-size: 21px; }
.detail-hero h2 { font-size: 21px; }
.detail-hero .sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.detail-actions { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }

.dfield { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; background: var(--bg-elev); }
.dfield .k { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 5px; }
.dfield .v-row { display: flex; align-items: center; gap: 8px; }
.dfield .v { flex: 1; min-width: 0; font-size: 14.5px; word-break: break-word; }
.dfield .v.mono { font-family: var(--mono); font-size: 13.5px; letter-spacing: .02em; }
.dfield .v.secret { letter-spacing: .12em; }
.dfield .v.muted { color: var(--text-3); }
.meta-row { display: flex; gap: 18px; font-size: 12px; color: var(--text-3); margin-top: 18px; }

/* rozet / etiket */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); }
button.chip { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
button.chip:hover { border-color: var(--accent); color: var(--accent); }

/* boş liste durumu */
.empty-state { text-align: center; color: var(--text-3); padding: 48px 20px; }
.empty-state svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 12px; }

/* ==========================================================================
   Üreteç & Ayarlar panelleri (detail-pane içinde)
   ========================================================================== */
.panel-page { padding: 26px 30px; max-width: 680px; }
.panel-page.wide { max-width: 960px; }
.panel-page h2 { font-size: 20px; margin-bottom: 4px; }
.panel-page .lead { color: var(--text-3); font-size: 13.5px; margin-bottom: 24px; }
.gen-output {
  display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: var(--bg-elev); margin-bottom: 18px;
}
.gen-output .val { flex: 1; font-family: var(--mono); font-size: 17px; word-break: break-all; }
.gen-controls { display: grid; gap: 16px; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row .num { width: 42px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.toggle-row + .toggle-row { margin-top: 8px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--panel-3); border-radius: 20px; transition: .2s; }
.switch .track::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(18px); }

.ext-dl { display: flex; flex-wrap: wrap; gap: 8px; }
.legal { max-width: 720px; margin: 0 auto; padding: 48px 22px 80px; }
.legal-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.legal-brand .logo {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-grad); color: #fff; flex: none;
}
.legal-brand .logo svg { width: 24px; height: 24px; }
.legal-brand strong { display: block; font-size: 16px; }
.legal h1 { font-size: 26px; margin-bottom: 8px; }
.legal .updated { color: var(--text-3); font-size: 13px; margin: 0 0 24px; }
.legal h2 { font-size: 17px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.legal ul { padding-left: 1.2em; }
.settings-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; background: var(--bg-elev); }
.settings-section h3 { font-size: 15px; margin-bottom: 3px; }
.settings-section .desc { font-size: 12.5px; color: var(--text-3); margin-bottom: 16px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* ==========================================================================
   Modal & Drawer
   ========================================================================== */
.overlay { position: fixed; inset: 0; background: rgba(10,12,22,.5); backdrop-filter: blur(2px); z-index: 40; opacity: 0; animation: fade .15s forwards; }
@keyframes fade { to { opacity: 1; } }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; }
.modal-card {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 24px; animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { font-size: 18px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal-msg { min-height: 16px; font-size: 13px; color: var(--danger); }
.confirm-text { color: var(--text-2); font-size: 14px; line-height: 1.55; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
  display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  font-size: 13.5px; animation: slidein .2s ease-out;
}
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast .ic { width: 20px; height: 20px; flex: none; }
.toast.ok .ic { color: var(--ok); }
.toast.err .ic { color: var(--danger); }
.toast.info .ic { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */
.menu-btn { display: none; }
@media (max-width: 900px) {
  #app-view { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 45; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .content { grid-template-columns: 1fr; }
  .list-pane { border-right: none; }
  .detail-pane { position: fixed; inset: 0; z-index: 30; background: var(--bg); transform: translateX(100%); transition: transform .2s; }
  .detail-pane.open { transform: none; }
}
@media (max-width: 520px) {
  .auth-card { padding: 24px; }
  .detail, .panel-page { padding: 20px 18px; }
}
