
:root{
  --bg: #0b1220;
  --fg: #e5e7eb;
  --muted: #94a3b8;
  --card: #101828;
  --accent: #60a5fa;
  --border: #1f2937;
  --chip: #0ea5e9;
  --promo1: #8b5cf6;
  --promo2: #06b6d4;
}
html[data-theme="light"]{
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --card: #f8fafc;
  --accent: #2563eb;
  --border: #e5e7eb;
  --chip: #0891b2;
  --promo1: #a78bfa;
  --promo2: #22d3ee;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:900px;margin:0 auto;padding:16px}
.header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;position:sticky;top:0;background:var(--bg);z-index:10;border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:20px}
.brand .logo{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,var(--accent),#22c55e)}
.header .icons{display:flex;align-items:center;gap:10px}
.icon-btn{width:36px;height:36px;border-radius:12px;border:1px solid var(--border);background:var(--card);display:grid;place-items:center;color:var(--fg);cursor:pointer}
.search{padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:var(--card);color:var(--fg);width:100%}
.search::placeholder{color:var(--muted)}
.search-wrap{padding:12px 16px;border-bottom:1px solid var(--border);background:var(--bg);position:sticky;top:64px;z-index:9}
.section-label{position:sticky;top:122px;background:var(--bg);padding:4px 16px;color:var(--muted);font-weight:700}
.list{padding:0 8px 80px}
.item{display:flex;align-items:center;gap:12px;padding:12px 8px;border-bottom:1px solid var(--border)}
.badge{width:40px;height:40px;border-radius:12px;background:rgba(99,102,241,.15);display:grid;place-items:center}
.badge .dot{width:16px;height:16px;border-radius:6px;background:var(--chip)}
.title{font-weight:700}
.sub{color:var(--muted);font-size:14px}
.kebab{margin-left:auto}
.kebab .dot{width:4px;height:4px;background:var(--muted);border-radius:2px;display:block;margin:2px 0}
.bottom-nav{position:fixed;left:0;right:0;bottom:0;background:var(--card);border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(4,1fr);padding:6px 8px}
.nav-btn{display:flex;flex-direction:column;align-items:center;gap:4px;color:var(--fg);text-decoration:none;padding:6px 4px;border-radius:10px}
.nav-btn.active{background:rgba(99,102,241,.12)}
.btn{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:#fff;border:none;border-radius:10px;padding:10px 14px;font-weight:600;cursor:pointer}
.btn.secondary{background:transparent;color:var(--fg);border:1px solid var(--border)}
.notice{padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--card);margin:12px 0}

/* Pills */
.pills{display:flex;gap:8px;flex-wrap:wrap;padding:8px 0 0 0}
.pill{border:1px solid var(--border);background:var(--card);padding:6px 10px;border-radius:999px;font-weight:600}
.pill .x{margin-left:8px;opacity:.7}

/* Bottom sheet */
.sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:saturate(120%) blur(2px);display:none;z-index:50}
.sheet{position:absolute;left:0;right:0;bottom:0;background:var(--bg);border-top-left-radius:16px;border-top-right-radius:16px;box-shadow:0 -8px 24px rgba(0,0,0,.35)}
.sheet header{padding:16px 16px 8px;font-weight:800;border-bottom:1px solid var(--border)}
.sheet .list-add{list-style:none;margin:0;padding:8px 0}
.sheet .list-add li{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer}
.sheet .list-add li:hover{background:var(--card)}
.sheet .icon-24{width:24px;height:24px;display:grid;place-items:center;border-radius:6px;background:var(--card);border:1px solid var(--border)}
.sheet .label{font-weight:600}
.sheet .close-row{padding:8px 16px;border-top:1px solid var(--border);display:flex;justify-content:flex-end}

/* Browse grid */
.banner{margin:16px;border-radius:16px;padding:16px;color:#fff;background:linear-gradient(90deg,var(--promo1),var(--promo2));box-shadow:0 10px 24px rgba(0,0,0,.2)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:16px}
.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:16px;display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--fg)}
.card .icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#d9f99d;color:#000;font-weight:800}
.card .title{font-weight:800}
.card:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(0,0,0,.12)}
.grid .card .muted{color:var(--muted);font-size:14px}


/* --- Add Password form styles --- */
.form-card{background:var(--card);border:1px solid var(--border);border-radius:20px;padding:16px;margin:12px 0}
.form-title{font-weight:800;margin:0 0 6px}
label{display:block;font-weight:700;margin:12px 0 6px}
input[type="text"],input[type="email"],input[type="password"],textarea,select{width:100%;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--bg);color:var(--fg)}
textarea{min-height:110px;resize:vertical}
.input-with-eye{position:relative}
.input-with-eye input{padding-right:44px}
.eye{position:absolute;right:10px;top:50%;transform:translateY(-50%);cursor:pointer;font-size:18px}
.gen-btn{width:100%;margin-top:10px;background:transparent;color:var(--fg);border:1px solid var(--border);border-radius:14px;padding:10px 12px}
.add-row{display:flex;align-items:center;gap:10px;margin-top:10px}
.add-row button{border:1px dashed var(--border);background:transparent;color:var(--fg);border-radius:12px;padding:8px 10px}
.kv{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:8px}
.small-muted{color:var(--muted);font-size:12px}
.notice.error{border:1px solid #ef4444;background:rgba(239,68,68,.12)}


/* Add Password: sticky top bar with ✓ */
.form-topbar{position:sticky;top:64px;z-index:20;display:flex;align-items:center;justify-content:space-between;background:var(--bg);border-bottom:1px solid var(--border);padding:10px 8px;margin:0 0 8px}
.form-topbar-title{font-weight:800}
/* small icon-btn reuse */
.icon-btn{width:36px;height:36px;border-radius:12px;border:1px solid var(--border);background:var(--card);display:grid;place-items:center;color:var(--fg);cursor:pointer}
/* delete small icon on dynamic rows */
.add-row .del{border:1px solid var(--border);background:transparent;border-radius:10px;padding:6px 8px;cursor:pointer}

/* register/account minor */
.success{border:1px solid #16a34a;background:rgba(22,163,74,.12);padding:10px;border-radius:10px;margin:8px 0}


/* Register page: buttons row and secondary button */
.actions-row{display:flex;gap:10px;align-items:center;margin-top:12px}
.btn.secondary{background:transparent;color:var(--fg);border:1px solid var(--border)}
