*{box-sizing:border-box}body{margin:0;background:#0b1020;color:#e8edf7;font:14px system-ui,-apple-system,Segoe UI,sans-serif;display:grid;grid-template-columns:240px 1fr;min-height:100vh}aside{background:#0e1528;border-right:1px solid #24304a;padding:24px 14px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{font-size:20px;padding:8px 10px 28px}.brand span{display:block;font-size:10px;color:#7e8ba6;margin:4px 0 0 27px;text-transform:uppercase;letter-spacing:.12em}nav{display:grid;gap:7px}nav a,.logout{color:#aeb9ce;text-decoration:none;padding:12px 14px;border-radius:10px}nav a:hover,nav a.active{background:#19243c;color:#fff}.logout{margin-top:auto}main{padding:34px;max-width:1500px;width:100%}header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}h1{font-size:30px;margin:0 0 4px}h2{font-size:18px}h3{margin:8px 0}.muted,small{color:#8390aa}.search input{width:min(430px,40vw)}input,select,textarea,button{font:inherit}input,select,textarea{background:#101a30;color:#edf2fb;border:1px solid #2a3857;border-radius:9px;padding:11px 12px;outline:none}textarea{min-height:76px;resize:vertical}button,.mini{border:0;border-radius:9px;padding:9px 12px;background:#24324f;color:#eaf0fb;cursor:pointer}.primary{background:#6d5dfc;color:white;font-weight:700}.danger{background:#40202a;color:#ffb5c1}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}.stats>div,.panel,.card,.fileList>div{background:#111a2e;border:1px solid #24304a;border-radius:14px}.stats>div{padding:20px}.stats b{font-size:28px;display:block}.stats span{color:#8f9bb2}.panel{padding:20px;margin:0 0 20px}.gridForm{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.gridForm textarea{grid-column:1/-1}.gridForm>.primary{justify-self:start}.secretField{display:flex;gap:7px}.secretField input{min-width:0;flex:1}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}.card{padding:17px}.cardTop{display:flex;align-items:center;gap:8px}.cardTop h3{flex:1}.pill{font-size:10px;text-transform:uppercase;background:#202c49;padding:5px 7px;border-radius:999px}.star{background:none;font-size:21px;padding:0}.secretLine{display:flex;gap:6px}.secretLine input{min-width:0;flex:1}.notes{white-space:pre-wrap;color:#b6c0d4}.actions{display:flex;gap:8px;align-items:flex-start;margin-top:12px;flex-wrap:wrap}.actions form{margin:0}.edit{display:grid;gap:7px;margin-top:8px}.fileList{display:grid;gap:8px}.fileList>div{display:flex;gap:12px;align-items:center;padding:12px 14px}.fileList b{flex:1}.fileList a{color:#a99fff}.upload{display:flex;gap:10px;align-items:center}.audit>div{display:grid;grid-template-columns:1fr 180px 140px;padding:10px;border-bottom:1px solid #26324c}.loginBody{display:grid;place-items:center;min-height:100vh}.loginCard{width:min(430px,92vw);background:#111a2e;border:1px solid #293653;border-radius:20px;padding:34px;box-shadow:0 20px 70px #0008}.loginCard form{display:grid;gap:10px}.loginCard .primary{margin-top:8px;padding:12px}.vaultMark{font-size:35px;color:#8b7cff}.alert{background:#48212c;color:#ffc2cb;padding:10px;border-radius:9px;margin:12px 0}.wide{width:min(600px,92vw)}code{display:block;background:#09101f;padding:12px;border-radius:8px;word-break:break-all}.empty{color:#7e8ba6;padding:30px}.sectionHead{display:flex;align-items:center;justify-content:space-between}@media(max-width:850px){body{display:block}aside{height:auto;position:static;padding:12px}aside .brand{padding:5px 8px 12px}nav{display:flex;overflow:auto}.logout{display:none}main{padding:18px}header{display:block}.search input{width:100%;margin-top:14px}.stats{grid-template-columns:1fr 1fr 1fr}.gridForm{grid-template-columns:1fr}.gridForm textarea{grid-column:auto}.cards{grid-template-columns:1fr}.fileList>div{flex-wrap:wrap}.audit>div{grid-template-columns:1fr}.upload{align-items:stretch;flex-direction:column}}@media(max-width:520px){.stats{grid-template-columns:1fr}.secretLine{flex-wrap:wrap}h1{font-size:25px}}

/* ==================== V4.1 LOGIN / LAYOUT ALIGNMENT FIX ==================== */
body.loginBody{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  grid-template-columns:none !important;
  width:100% !important;
  min-width:0 !important;
  min-height:100vh !important;
  padding:24px !important;
  overflow-x:hidden !important;
}
body.loginBody main.loginCard{
  display:block !important;
  width:min(460px,100%) !important;
  max-width:460px !important;
  margin:0 auto !important;
  padding:34px !important;
}
body.loginBody .loginCard form{width:100% !important}
body.loginBody .loginCard input,
body.loginBody .loginCard button{width:100% !important;min-width:0 !important}
body.loginBody .loginCard h1,
body.loginBody .loginCard p,
body.loginBody .loginCard small{max-width:100% !important}
@media(max-width:520px){
 body.loginBody{padding:14px !important}
 body.loginBody main.loginCard{padding:24px 20px !important;border-radius:16px !important}
}


/* ==================== V4.3 DARK / LIGHT THEME ==================== */
.themeToggle{position:fixed;right:18px;top:16px;z-index:9999;width:44px;height:44px;border:1px solid #2a3857;border-radius:12px;background:#111a2e;color:#edf2fb;display:grid;place-items:center;padding:0;font-size:20px;box-shadow:0 8px 30px #0004;cursor:pointer}
.themeToggle:hover{transform:translateY(-1px)}
html[data-theme="light"] body{background:#f3f6fb;color:#182033}
html[data-theme="light"] aside{background:#fff;border-right-color:#dce3ee}
html[data-theme="light"] .brand{color:#182033}
html[data-theme="light"] .brand span,html[data-theme="light"] .muted,html[data-theme="light"] small,html[data-theme="light"] .stats span{color:#69758a}
html[data-theme="light"] nav a,html[data-theme="light"] .logout{color:#4d5b70}
html[data-theme="light"] nav a:hover,html[data-theme="light"] nav a.active{background:#edf1f8;color:#111827}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#fff;color:#182033;border-color:#cfd8e6}
html[data-theme="light"] button,html[data-theme="light"] .mini{background:#e7ecf4;color:#263247}
html[data-theme="light"] .primary{background:#5b4df5;color:#fff}
html[data-theme="light"] .danger{background:#fde8ec;color:#a32940}
html[data-theme="light"] .stats>div,html[data-theme="light"] .panel,html[data-theme="light"] .card,html[data-theme="light"] .fileList>div,html[data-theme="light"] .loginCard{background:#fff;border-color:#dce3ee;box-shadow:0 12px 35px #20304a12}
html[data-theme="light"] .pill{background:#edf1f8;color:#48566d}
html[data-theme="light"] .notes{color:#4f5d73}
html[data-theme="light"] .fileList a{color:#5546d9}
html[data-theme="light"] .audit>div{border-bottom-color:#e2e8f0}
html[data-theme="light"] code{background:#eef2f7;color:#273247}
html[data-theme="light"] .alert{background:#fff0f2;color:#a32940}
html[data-theme="light"] .empty{color:#738096}
html[data-theme="light"] .themeToggle{background:#fff;color:#263247;border-color:#d7dfeb;box-shadow:0 8px 28px #20304a18}
@media(max-width:850px){.themeToggle{right:12px;top:10px;width:40px;height:40px}body:not(.loginBody) .brand{padding-right:52px}}

/* V4.4 - 2FA per account */
.totpBox{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;margin:12px 0;padding:10px 12px;border:1px solid var(--line,#26344d);border-radius:12px;background:rgba(30,136,229,.08)}
.totpBox>span{font-size:11px;font-weight:800;letter-spacing:.08em}.totpCode{font-size:20px;letter-spacing:.12em;font-variant-numeric:tabular-nums}.totpTime{opacity:.7}.totpEdit{display:grid;gap:7px;font-size:12px}
@media(max-width:700px){.totpBox{grid-template-columns:auto 1fr}.totpBox .totpTime,.totpBox .totpCopy{justify-self:start}}
