/* ---------- Hesap ve Ayarlar ---------- */
.settings { flex: 1; min-height: 0; display: flex; background: var(--bg); }
.st-nav {
  width: 250px; flex: none; background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}
.st-nav button {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: none; border-radius: 9px;
  background: none; color: var(--muted); font-weight: 600; cursor: pointer; text-align: left;
}
.st-nav button:hover { background: var(--hover); color: var(--text); }
.st-nav button.on { background: var(--accent-soft); color: var(--accent-2); }
:root[data-theme="dark"] .st-nav button.on { color: var(--accent); }
.st-main { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 28px 40px; }
.st-main > * { max-width: 760px; }
.st-title { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-style: italic; font-size: 40px; line-height: 1; margin: 0 0 16px; letter-spacing: .01em; }

.st-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.st-card-h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.st-card-h b { font-size: 14.5px; }
.st-card-h span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.st-card.danger { border-color: var(--danger-line); }
.st-card.danger .st-card-h b { color: var(--danger); }

.st-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.st-card-h + .st-row, .st-card > .st-row:first-child { border-top: none; }
.st-row-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-row-l b { font-weight: 600; font-size: 13.5px; }
.st-row-l small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.st-row-c { flex: none; display: flex; align-items: center; justify-content: flex-end; max-width: 60%; }
.st-row-c .row { justify-content: flex-end; }
.st-row-c .row.wrap { flex-wrap: wrap; }
.st-row-c .field { min-width: 0; }
.st-row-c input.field:not([type=number]) { width: 220px; }
.st-row-c input[type=number].field { width: 110px; }
.st-val { font-weight: 600; font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.st-val.ok { color: var(--ok); } .st-val.err { color: var(--danger); } .st-val.muted { color: var(--muted); font-weight: 500; }
.st-code { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 2px; }
.st-scope { font-size: 10.5px; font-weight: 700; border-radius: 10px; padding: 2px 7px; white-space: nowrap; flex: none; }
.st-scope.dev { background: var(--track); color: var(--muted); }
.st-scope.all { background: var(--accent-soft); color: var(--accent-2); }
:root[data-theme="dark"] .st-scope.all { color: var(--accent); }

/* anahtar (toggle) */
.switch { position: relative; width: 42px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.off { opacity: .45; cursor: default; }

/* bölümlü seçici */
.seg { display: inline-flex; background: var(--track); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: none; border-radius: 7px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }

/* eşitleme durumu */
.st-sync { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.st-sync b { display: block; font-size: 13.5px; }
.st-sync small { color: var(--muted); font-size: 12px; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 4px; background: var(--muted-2); }
.sync-dot.ok { background: var(--ok); }
.sync-dot.pending { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.sync-dot.offline { background: var(--muted); }
.sync-dot.err { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

/* profil başlığı */
.st-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.st-profile-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-profile-t b { font-size: 18px; }
.st-profile-t > span { color: var(--muted); overflow-wrap: anywhere; }
.st-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge { font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 8px; background: var(--track); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.st-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; object-fit: cover;
}
.st-avatar.big { width: 58px; height: 58px; font-size: 22px; }
.st-notice { margin: 0 0 14px; }

/* giriş / kayıt */
.st-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; background: linear-gradient(135deg, var(--accent-soft), var(--panel)); border: 1px solid var(--accent-line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.st-hero h2 { margin: 0 0 6px; font-size: 20px; }
.st-hero p { margin: 0; color: var(--text-2); line-height: 1.5; }
.st-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.st-benefits li { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.st-benefits li .ic { color: var(--accent); }
.st-auth { max-width: 460px; }
.st-auth > .seg { width: 100%; margin-bottom: 14px; }
.st-auth > .seg button { flex: 1; justify-content: center; }
.st-form { display: flex; flex-direction: column; gap: 12px; }
.st-form .field { height: 40px; width: 100%; }
.st-pw { position: relative; display: flex; }
.st-pw .field { padding-right: 38px; width: 100%; }
.st-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: none; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.st-eye:hover { background: var(--hover); }
.st-link { border: none; background: none; color: var(--accent-2); font-weight: 600; cursor: pointer; padding: 0; align-self: center; }
:root[data-theme="dark"] .st-link { color: var(--accent); }
.st-err { display: none; background: var(--danger-soft); color: var(--danger-text); border: 1px solid var(--danger-line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.st-err.show { display: block; }
.st-meter { height: 5px; border-radius: 3px; background: var(--track); margin-top: 6px; position: relative; }
.st-meter i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .2s; }
.st-meter span { position: absolute; right: 0; top: 7px; font-size: 11px; color: var(--muted); }
.st-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.st-or::before, .st-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.st-google { gap: 10px; font-weight: 600; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* listeler */
.st-list { display: flex; flex-direction: column; }
.st-li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.st-li:first-child { border-top: none; }
.st-li-t { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 120px; }
.st-li > span:nth-child(2) { flex: 1; min-width: 0; }
.st-bullets { margin: 0; padding-left: 18px; line-height: 1.55; color: var(--text-2); }
.st-bullets li { margin: 4px 0; }
.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.st-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.st-stat b { display: block; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 26px; line-height: 1; }
.st-stat span { font-size: 11.5px; color: var(--muted); }
.st-about { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.st-about img { width: 56px; height: 56px; }
.st-about b { display: block; font-size: 18px; }
.st-about span { color: var(--muted); font-size: 12.5px; }
.st-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.st-keys div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
kbd { font-family: inherit; font-size: 11.5px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

/* üst çubuktaki hesap düğmesi */
.account-btn { position: relative; width: 36px; height: 36px; padding: 0; border: none; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.account-btn .st-avatar { width: 34px; height: 34px; }
.account-btn .st-avatar.guest { background: var(--track); color: var(--muted); }
.account-btn .sync-dot { position: absolute; right: -1px; bottom: -1px; margin: 0; border: 2px solid var(--panel); width: 12px; height: 12px; }
.account-btn:hover .st-avatar { box-shadow: 0 0 0 3px var(--accent-soft); }

/* kilit ekranı */
.lock-screen { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock-box { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 300px; max-width: 100%; }
.lock-box.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock-logo { width: 64px; height: 64px; margin-bottom: 4px; }
.lock-title { font-weight: 700; font-size: 17px; }
.lock-sub { color: var(--muted); font-size: 13px; }
.lock-dots { display: flex; gap: 12px; margin: 10px 0 2px; }
.lock-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); }
.lock-dots span.on { background: var(--accent); border-color: var(--accent); }
.lock-msg { min-height: 18px; font-size: 12.5px; color: var(--danger); text-align: center; }
.lock-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; margin-top: 6px; }
.lock-key { height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 24px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lock-key:active { background: var(--hover); }
.lock-key.ghost { border: none; background: none; font-size: 13px; color: var(--muted); }

/* Ayarlar: masaüstünde sağ üstteki hesap düğmesinden, telefonda alt çubuktan açılır */
.modes .nav-settings { display: none; }
.account-btn.active .st-avatar { box-shadow: 0 0 0 3px var(--accent); }

/* hayat mottosu (planlayıcı) */
.ps-motto { font-style: italic; color: var(--muted); margin: -2px 0 6px; font-size: 13.5px; }

@media (max-width: 900px) {
  .settings { flex-direction: column; overflow: hidden; }
  .st-nav { width: auto; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 8px; gap: 4px; scrollbar-width: none; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-nav button { flex: none; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; white-space: nowrap; }
  .st-nav button.on { border-color: var(--accent-line); }
  .st-main { padding: 14px 12px 28px; }
  .st-title { font-size: 32px; margin-bottom: 12px; }
  .st-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .st-row-c { max-width: none; justify-content: flex-start; }
  .st-row-c .row { justify-content: flex-start; flex-wrap: wrap; }
  .st-row-c input.field:not([type=number]) { width: 100%; flex: 1; }
  .st-val { text-align: left; }
  .st-hero { grid-template-columns: 1fr; }
  .st-stats { grid-template-columns: repeat(2, 1fr); }
  .st-keys { grid-template-columns: 1fr; }
  .st-li { flex-wrap: wrap; }
  .account-btn.desktop-only { display: none; }
  .modes .nav-settings { display: flex; order: 9; }
}

/* Ayarlar → Kategoriler */
.st-cats { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.st-cat { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.st-cat .field { flex: 1; min-width: 120px; height: 30px; font-weight: 600; }
.st-cat-u { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.st-cat.add { margin-top: 10px; border-style: dashed; }
.st-cat.add .field { font-weight: 400; }
@media (max-width: 900px) { .st-cat { flex-wrap: wrap; } .st-cat-u { order: 5; max-width: none; flex-basis: 100%; } }
