/* ============================================================
 * Mahzen v2 — styles.css  (tasarım sistemi, açık/koyu)
 * ============================================================ */
:root {
  --bg: #f4f5fb; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #f7f8fc;
  --text: #1a1d29; --text-2: #5a6072; --muted: #868ca0; --border: #e6e8f0; --border-2: #eef0f6;
  --primary: #6366f1; --primary-2: #4f46e5; --primary-soft: #ecedfe;
  --danger: #ef4444; --danger-soft: #fdecec; --warn: #f59e0b; --good: #10b981; --good-soft: #e7f7f0;
  --shadow: 0 1px 3px rgba(20,22,40,.06), 0 8px 24px rgba(20,22,40,.06);
  --shadow-lg: 0 12px 48px rgba(20,22,40,.16);
  --r: 12px; --r-sm: 9px; --r-lg: 18px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --s1: #ef4444; --s2: #f59e0b; --s3: #10b981; --s4: #059669;
}
:root[data-theme="dark"] {
  --bg: #0d0f16; --bg-2: #12141d; --panel: #171a24; --panel-2: #1c2030;
  --text: #e8eaf2; --text-2: #a4abc0; --muted: #6c7388; --border: #262a38; --border-2: #20242f;
  --primary: #7c7ff5; --primary-2: #6366f1; --primary-soft: #23253a;
  --danger: #f87171; --danger-soft: #2a1c22; --warn: #fbbf24; --good: #34d399; --good-soft: #17271f;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 16px 56px rgba(0,0,0,.55);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
code { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; }
::selection { background: var(--primary-soft); }
.link { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s; font-family: inherit; white-space: nowrap; }
.btn:hover { background: var(--panel-2); border-color: var(--muted); }
.btn:disabled { opacity: .6; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn-lg { padding: 13px 20px; font-size: 15px; width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--danger); border-color: var(--border); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: none; background: transparent; color: var(--text-2); cursor: pointer; transition: .15s; padding: 0; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.sm { width: 30px; height: 30px; } .icon-btn.sm svg { width: 16px; height: 16px; }
.icon-btn.on { color: var(--warn); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Form ---------- */
.inp, .search-inp { width: 100%; padding: 11px 13px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: 14.5px; font-family: inherit; transition: .15s; }
.inp:focus, .search-inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.inp { resize: vertical; min-height: 68px; }
select.inp { cursor: pointer; }
.inp.sm { padding: 6px 9px; font-size: 13px; width: auto; }
.field, .stack > * { }
.stack { display: flex; flex-direction: column; gap: 14px; }
.fl { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; }
.field .fl { margin-bottom: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-inline { display: flex; gap: 8px; } .row-inline .inp { flex: 1; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-inline > .btn { white-space: nowrap; }

/* ---------- Kimlik ekranları ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 18px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow); }
.auth-title { margin: 0 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { margin: 0 0 22px; font-size: 14px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; }
.auth-foot { font-size: 12px; text-align: center; max-width: 360px; }
.unlock-ava { width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; margin: 0 auto 16px; }
.warn-box { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); border-radius: var(--r-sm); padding: 11px 13px; font-size: 13px; }
.info-box { background: var(--primary-soft); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13.5px; }

/* meter */
.meter { height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.meter.sm { height: 5px; }
.meter-fill { height: 100%; width: 0; border-radius: 6px; transition: .3s; background: var(--muted); }
.meter-fill.s1 { background: var(--s1); } .meter-fill.s2 { background: var(--s2); } .meter-fill.s3 { background: var(--s3); } .meter-fill.s4 { background: var(--s4); }
.meter-lbl { font-size: 12px; }

/* ---------- Uygulama düzeni ---------- */
.app { display: grid; grid-template-columns: 272px 1fr; height: 100vh; overflow: hidden; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; height: 100vh; }
.side-head { display: flex; align-items: center; gap: 9px; padding: 16px 18px; border-bottom: 1px solid var(--border-2); }
.side-close { display: none; margin-left: auto; }
.side-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm); border: none; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; width: 100%; transition: .12s; font-family: inherit; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-ico { display: inline-flex; flex-shrink: 0; } .nav-ico svg { width: 19px; height: 19px; }
.nav-ico.sm svg { width: 14px; height: 14px; opacity: .6; }
.nav-lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel-2); padding: 1px 7px; border-radius: 10px; }
.nav-item.active .nav-badge { background: #fff3; color: inherit; }
.nav-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; margin: 0 5px; }
.nav-cog { display: none; margin-left: auto; opacity: .5; } .nav-cog svg { width: 15px; height: 15px; }
.nav-item.vault:hover .nav-cog { display: inline-flex; }
.nav-item.add { color: var(--muted); }

.side-foot { border-top: 1px solid var(--border-2); padding: 8px; position: relative; }
.acct { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); border: none; background: transparent; cursor: pointer; font-family: inherit; color: var(--text); }
.acct:hover { background: var(--panel-2); }
.acct-info { flex: 1; text-align: left; overflow: hidden; } .acct-info b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acct-info small { font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.popover { position: absolute; bottom: 62px; left: 8px; right: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: none; background: transparent; border-radius: var(--r-sm); cursor: pointer; font-family: inherit; font-size: 14px; color: var(--text); }
.pop-item:hover { background: var(--panel-2); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.menu-btn { display: none; }
.search { flex: 1; position: relative; max-width: 560px; }
.search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; } .search-ico svg { width: 18px; height: 18px; }
.search-inp { padding-left: 40px; background: var(--panel-2); border-color: transparent; }
.add-btn span { display: inline; }
.content { flex: 1; overflow-y: auto; }

/* ---------- Liste + detay ---------- */
.split { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; height: 100%; }
.list-col { border-right: 1px solid var(--border); overflow-y: auto; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 20px 10px; position: sticky; top: 0; background: var(--bg-2); z-index: 2; }
.list-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.count { font-size: 13px; }
.item-list { padding: 0 10px 20px; display: flex; flex-direction: column; gap: 2px; }
.modal-list { max-height: 50vh; overflow-y: auto; }
.item-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); border: none; background: transparent; cursor: pointer; text-align: left; width: 100%; transition: .12s; font-family: inherit; color: var(--text); }
.item-row:hover { background: var(--panel-2); }
.item-row.active { background: var(--primary-soft); }
.item-row.static { cursor: default; }
.row-ico { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--panel-2); color: var(--text-2); font-weight: 700; overflow: hidden; }
.row-ico svg { width: 20px; height: 20px; }
.row-ico.fav { object-fit: cover; background: #fff; }
.row-ico.letter { color: #fff; }
.row-ico.lg { width: 52px; height: 52px; border-radius: 13px; } .row-ico.lg svg { width: 26px; height: 26px; }
.row-ico.login, .row-ico.note, .row-ico.card, .row-ico.identity { color: var(--primary); background: var(--primary-soft); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-fav { color: var(--warn); } .row-fav svg { width: 15px; height: 15px; fill: var(--warn); }
.vbadge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.cbadge { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 7px; white-space: nowrap; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--border); max-width: 90px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Sıralama seçici (liste başlığı) ---------- */
.sort-sel { width: auto; margin-left: auto; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; height: auto; }
.list-head { gap: 10px; }
.list-head .count { margin-right: auto; }

/* ---------- Sürükle-bırak (kayıt → kasa) ---------- */
.item-row[draggable="true"] { -webkit-user-drag: element; }
.item-row.dragging { opacity: .45; }
body.mz-dragging .nav-item.vault { outline: 1.5px dashed var(--border); outline-offset: -1.5px; }
.nav-item.vault.drop-ok { background: var(--primary-soft); outline: 1.5px dashed var(--primary); outline-offset: -1.5px; }
.nav-item.cat .nav-ico.sm svg { width: 14px; height: 14px; }

/* ---------- Kategori yönetimi sayfası ---------- */
.cat-row { gap: 8px; flex-wrap: wrap; }
.cat-row .row-main { min-width: 140px; }
.cat-row .btn.sm { flex: 0 0 auto; }

.detail-col { overflow-y: auto; }
.detail-empty, .detail-empty.muted { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.de-ico svg, .empty-ico svg { width: 54px; height: 54px; opacity: .35; }
.detail { padding: 28px 30px; max-width: 640px; }
.detail-top { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.dt-titles { flex: 1; min-width: 0; } .dt-titles h2 { margin: 0 0 2px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.detail-fields { display: flex; flex-direction: column; gap: 4px; }
.dfield { padding: 11px 0; border-bottom: 1px solid var(--border-2); }
.df-label { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.df-row { display: flex; align-items: center; gap: 10px; }
.fv { flex: 1; font-size: 15px; word-break: break-word; min-width: 0; }
.fv.secret, .fv.totp { font-family: 'SF Mono', ui-monospace, monospace; letter-spacing: .04em; }
.fv.totp { font-size: 19px; color: var(--primary); font-weight: 600; }
.fv.multi { white-space: pre-wrap; }
.df-actions { display: flex; gap: 2px; flex-shrink: 0; }
.df-strength { margin-top: 8px; }
.totp-ring { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 30px; text-align: center; }
.totp-ring.warn { color: var(--danger); }
.detail-meta { margin-top: 16px; font-size: 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.empty { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h3 { margin: 6px 0 0; }

/* ---------- Sayfalar ---------- */
.page { padding: 26px 30px; max-width: 1000px; margin: 0 auto; }
.page.narrow { max-width: 620px; }
.page h2 { margin: 0 0 18px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.card .btn { margin: 4px 8px 4px 0; }
.sub-sec { padding: 8px 0; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-2); }

/* ---------- Güvenlik panosu ---------- */
.health { display: flex; align-items: center; gap: 20px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 18px; }
.health h3 { margin: 0 0 3px; }
.health-ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--border) 0); position: relative; }
.health-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--panel); }
.health-ring span { position: relative; font-size: 21px; font-weight: 800; }
.sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.sec-card { border: 1px solid var(--border); border-radius: var(--r); padding: 18px; background: var(--panel); text-align: left; cursor: pointer; transition: .15s; font-family: inherit; }
.sec-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.sec-num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.sec-lbl { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.sec-card.bad .sec-num { color: var(--danger); } .sec-card.warn .sec-num { color: var(--warn); } .sec-card.good .sec-num { color: var(--good); }
.hibp-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; }
.leak-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.leak-count { color: var(--danger); font-weight: 700; font-size: 13px; white-space: nowrap; }
.leak-item { font-weight: 600; }

/* ---------- Üretici ---------- */
.gen { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.gen-out { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; }
.gen-text { flex: 1; font-size: 18px; word-break: break-all; font-weight: 600; }
.seg { display: inline-flex; background: var(--panel-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg-btn { padding: 8px 16px; border: none; background: transparent; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.seg-btn.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.range { width: 100%; accent-color: var(--primary); }
.range-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.chk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; user-select: none; }
.chk input { width: 17px; height: 17px; accent-color: var(--primary); }

/* ---------- Tablolar ---------- */
.tbl { display: flex; flex-direction: column; }
.tr { display: grid; grid-template-columns: 2fr 1fr 1.4fr auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border-2); }
.tr:last-child { border-bottom: none; }
.td.user { display: flex; align-items: center; gap: 10px; } .td.user b { font-size: 14px; display: block; } .td.user small { display: block; }
.td.actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--panel-2); color: var(--text-2); display: inline-block; }
.tag.owner { background: var(--primary-soft); color: var(--primary); }
.tag.admin { background: #f59e0b22; color: #b45309; }
.tag.pro { background: var(--primary-soft); color: var(--primary); }
.tag.enterprise { background: #8b5cf622; color: #7c3aed; }
.invite-code { font-size: 14px; font-weight: 700; letter-spacing: .05em; background: var(--panel-2); padding: 4px 9px; border-radius: 6px; }
.member-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; border-bottom: 1px solid var(--border-2); }
.member-row:last-child { border-bottom: none; }
.hist-row, .leak-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Plan ---------- */
.plan-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; }
.plan-badge { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .05em; color: var(--primary); background: var(--primary-soft); padding: 5px 12px; border-radius: 8px; margin-bottom: 16px; }
.usage { display: flex; flex-direction: column; gap: 14px; }
.usage-row { display: flex; flex-direction: column; gap: 6px; }
.upgrade { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-radius: var(--r-lg); padding: 26px; text-align: center; }
.upgrade h3 { margin: 0 0 6px; font-size: 20px; } .upgrade p { opacity: .9; margin: 0 0 16px; }
.upgrade .price { font-size: 15px; margin-bottom: 18px; } .upgrade .price b { font-size: 30px; }
.upgrade .btn { background: #fff; color: var(--primary); border: none; } .upgrade .info-box { background: #ffffff22; }
.plan-banner { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--warn); color: #3a2a00; font-size: 13.5px; font-weight: 600; }
.plan-banner .btn { background: #0002; border: none; color: inherit; }
.code-box, .code-box code { }
.code-box { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-radius: var(--r); padding: 14px 18px; }
.code-box code { flex: 1; font-size: 22px; font-weight: 800; letter-spacing: .1em; }

/* ---------- swatches ---------- */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel); }

/* ---------- pw field ---------- */
.pw-field { display: flex; gap: 4px; align-items: center; } .pw-field .inp { flex: 1; }
.ed-body { max-height: 58vh; overflow-y: auto; padding-right: 4px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,12,20,.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; opacity: 0; transition: .18s; }
.modal-back.show { opacity: 1; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateY(12px) scale(.98); transition: .18s; overflow: hidden; }
.modal-back.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border-2); }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--text); color: var(--bg-2); padding: 11px 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: var(--good); color: #fff; }
.toast-ico { font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
  .side-close, .menu-btn { display: inline-flex; }
  .split { grid-template-columns: 1fr; }
  .detail-col { display: none; }
  .split.show-detail .list-col { display: none; }
  .split.show-detail .detail-col { display: block; }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .add-btn span { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .tr { grid-template-columns: 1fr auto; }
}
@media (max-width: 480px) {
  .detail, .page { padding: 18px 16px; }
  .chk-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Demo modu şeridi
   ============================================================ */
#demo-ribbon {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 9000; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px 10px 16px; border-radius: 999px;
  background: rgba(20, 18, 34, .92); color: #eceaf6;
  border: 1px solid rgba(129, 140, 248, .35);
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .6);
  backdrop-filter: blur(10px); font-size: 13.5px; line-height: 1.35;
}
#demo-ribbon b { color: #fff; }
#demo-ribbon .dr-dot { width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
#demo-ribbon span { min-width: 0; }
#demo-ribbon .dr-btn { flex: none; white-space: nowrap; font-weight: 650;
  background: #6366f1; color: #fff; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; transition: background .15s; }
#demo-ribbon .dr-btn:hover { background: #5457e6; }
@media (max-width: 640px) {
  #demo-ribbon { flex-wrap: wrap; justify-content: center; text-align: center;
    border-radius: 16px; bottom: 10px; padding: 12px 14px; }
  #demo-ribbon .dr-btn { width: 100%; text-align: center; }
}
