:root{
  --vx-bg:#0f172a; --vx-surface:#1e293b; --vx-surface-2:#243348; --vx-border:#334155;
  --vx-text:#e2e8f0; --vx-muted:#94a3b8; --vx-primary:#38bdf8; --vx-accent:#0ea5e9;
}
html{font-size:14px;position:relative;min-height:100%}
@media (min-width:768px){html{font-size:16px}}
body{
  margin-bottom:60px;color:var(--vx-text);
  background:radial-gradient(1100px 560px at 85% -12%,rgba(56,189,248,.10),transparent 60%),var(--vx-bg);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
a{color:var(--vx-primary);text-decoration:none}
a:hover{color:#7dd3fc;text-decoration:underline}
.navbar-brand,.navbar-brand:hover,.vx-brand,.vx-brand:hover{text-decoration:none}
.btn,.btn:hover,.btn:focus{text-decoration:none}
.btn:focus,.btn:active:focus,.btn-link.nav-link:focus,.form-control:focus,.form-check-input:focus{box-shadow:0 0 0 .15rem rgba(56,189,248,.35)}

.vx-nav{background:rgba(15,23,42,.9)!important;backdrop-filter:blur(10px);border-bottom:1px solid var(--vx-border)}
.vx-brand{display:inline-flex;align-items:center;gap:.55rem;font-weight:700;letter-spacing:.2px}
.vx-brand img{width:30px;height:30px}
.vx-brand-text{color:var(--vx-text)}
.vx-nav .nav-link{color:var(--vx-muted)!important}
.vx-nav .nav-link:hover{color:var(--vx-text)!important;text-decoration:none}

.btn-vx{background:var(--vx-accent);border:none;color:#04223a;font-weight:600}
.btn-vx:hover,.btn-vx:focus{color:#04223a;filter:brightness(1.08)}
.btn-outline-vx{border:1px solid var(--vx-border);color:var(--vx-text);background:transparent}
.btn-outline-vx:hover{border-color:var(--vx-primary);color:var(--vx-text);background:rgba(56,189,248,.08)}

.card,.vx-card{background:var(--vx-surface);border:1px solid var(--vx-border);border-radius:12px;color:var(--vx-text)}

.form-control,.form-select{background:var(--vx-surface-2);border:1px solid var(--vx-border);color:var(--vx-text)}
.form-control:focus,.form-select:focus{background:var(--vx-surface-2);border-color:var(--vx-primary);color:var(--vx-text)}
.form-control::placeholder{color:#7185a1}

.vx-hero{text-align:center;padding:4.5rem 1rem 2.5rem}
.vx-hero h1{font-size:clamp(2.2rem,5vw,3.6rem);font-weight:800;line-height:1.08;margin-bottom:1rem}
.vx-grad-text{color:var(--vx-primary)}
.vx-hero p.lead{color:var(--vx-muted);max-width:620px;margin:0 auto 2rem;font-size:1.15rem}
.vx-cta{display:flex;gap:.9rem;justify-content:center;flex-wrap:wrap}
.vx-cta .btn{padding:.7rem 1.6rem;border-radius:10px}

.vx-features{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.2rem;margin:3.5rem auto 0;max-width:980px}
.vx-feature{padding:1.6rem}
.vx-feature .vx-ic{width:46px;height:46px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:rgba(56,189,248,.14);margin-bottom:1rem}
.vx-feature .vx-ic svg{width:24px;height:24px}
.vx-feature h3{font-size:1.15rem;font-weight:700;margin-bottom:.4rem}
.vx-feature p{color:var(--vx-muted);margin:0;font-size:.95rem}

/* Legal / prose pages (Privacy) */
.vx-legal{max-width:820px;margin:2.5rem auto 1rem;line-height:1.7}
.vx-legal h1{font-weight:800;margin-bottom:.3rem}
.vx-legal .vx-legal-updated{color:var(--vx-muted);font-size:.9rem;margin-bottom:1.6rem}
.vx-legal h2{font-size:1.2rem;font-weight:700;margin:1.7rem 0 .5rem;color:var(--vx-text)}
.vx-legal p{color:var(--vx-muted);margin:0 0 .8rem}
.vx-legal ul{color:var(--vx-muted);margin:0 0 .9rem;padding-left:1.2rem}
.vx-legal li{margin-bottom:.35rem}

.footer{position:absolute;bottom:0;width:100%;height:60px;line-height:60px;background:rgba(15,23,42,.7);border-top:1px solid var(--vx-border)!important;color:var(--vx-muted)!important}
.footer a{color:var(--vx-muted)}
.footer a:hover{color:var(--vx-primary)}

/* Login/Register (FileList-style centered card) */
.vx-login-wrap{min-height:calc(100vh - 210px);display:flex;align-items:center;justify-content:center;padding:1.5rem 0}
.vx-login-card{width:100%;max-width:720px;background:var(--vx-surface);border:1px solid var(--vx-border);border-radius:16px;box-shadow:0 30px 80px rgba(0,0,0,.45);display:flex;gap:26px;padding:34px 32px}
.vx-login-left{flex:0 0 42%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border-right:1px solid var(--vx-border);padding-right:24px;text-align:center}
.vx-login-left img{width:104px;height:104px}
.vx-login-left .vx-ln{font-weight:800;font-size:1.35rem}
.vx-login-left .vx-lt{color:var(--vx-muted);font-size:.85rem;line-height:1.4}
.vx-login-right{flex:1;display:flex;flex-direction:column;justify-content:center}
.vx-login-right h1{font-size:1.3rem;margin:0 0 1rem;font-weight:700}
.vx-field{position:relative;margin-bottom:.7rem}
.vx-field .vx-ic{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;opacity:.7;pointer-events:none;display:flex;align-items:center;justify-content:center}
.vx-field .vx-ic svg{width:18px;height:18px;display:block}
.vx-login-card input.form-control{padding-left:40px;background:#eef1f7;color:#0b1020;border:1px solid var(--vx-border)}
.vx-login-card input.form-control:focus{background:#ffffff;border-color:var(--vx-primary)}
.vx-login-card input.form-control::placeholder{color:#8a93a6}
.vx-login-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:.6rem}
.vx-login-actions .vx-links{display:flex;gap:14px;font-size:.85rem}
.vx-login-actions .vx-links a{color:var(--vx-muted)}
.vx-login-actions .vx-links a:hover{color:var(--vx-text)}
@media(max-width:600px){.vx-login-card{flex-direction:column}.vx-login-left{border-right:none;border-bottom:1px solid var(--vx-border);padding-right:0;padding-bottom:20px}}

/* Minimal auth layout (login / register standalone chrome) */
.vx-auth-body{margin-bottom:0;min-height:100vh;display:flex;flex-direction:column}
.vx-topbar{padding:20px 24px}
.vx-topbar .vx-brand{display:inline-flex;align-items:center;gap:.55rem;font-weight:700;letter-spacing:.2px}
.vx-topbar .vx-brand img{width:28px;height:28px}
.vx-auth-main{flex:1;display:flex;align-items:center;justify-content:center;padding:24px}
.vx-auth-main .vx-login-wrap{min-height:auto;padding:0;width:100%}
.vx-auth-footer{border-top:1px solid var(--vx-border);color:var(--vx-muted);text-align:center;padding:22px;font-size:.9rem}

/* validation message placement under fields */
.vx-login-right span.text-danger{display:block;font-size:.78rem;line-height:1.25;margin:-.25rem 0 .6rem;color:#f87171}
.vx-login-right span.text-danger:empty{display:none;margin:0}
/* VoxusDrive auth hint + busy spinner (shared) */
.vx-note{display:flex;gap:.55rem;align-items:flex-start;margin-top:1rem;padding:.7rem .8rem;border:1px solid rgba(148,163,184,.25);background:rgba(148,163,184,.08);border-radius:10px;color:#94a3b8;font-size:.82rem;line-height:1.4}
.vx-note svg{flex:0 0 auto;width:16px;height:16px;margin-top:1px;stroke:#38bdf8;fill:none}
.vx-note strong{color:#cbd5e1;font-weight:600}
.vx-note.vx-note-busy{border-color:rgba(56,189,248,.5);background:rgba(56,189,248,.12);color:#cbd5e1}
.vx-spin{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:vxspin .8s linear infinite;vertical-align:-2px;margin-right:.45rem}
@keyframes vxspin{to{transform:rotate(360deg)}}
button.btn-vx[disabled]{opacity:.75;cursor:progress}

/* ===== VoxusDrive â€” My Drive (Step K) ===== */
.vx-drive{display:grid;grid-template-columns:230px 1fr;gap:1.4rem;align-items:start}
.vx-side{background:#1e293b;border:1px solid #334155;border-radius:14px;padding:.7rem;position:sticky;top:1rem}
.vx-side-link{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.55rem .7rem;border-radius:10px;color:#94a3b8;text-decoration:none;font-weight:600;font-size:.92rem}
.vx-side-link:hover{background:rgba(56,189,248,.06);color:#e2e8f0}
.vx-side-link.active{background:rgba(56,189,248,.12);color:#e2e8f0}
.vx-side-link .cnt{font-size:.75rem;color:#94a3b8;background:#243348;border-radius:99px;padding:.05rem .5rem}
.vx-side-sep{height:1px;background:#334155;margin:.6rem .2rem}
.vx-storage{padding:.5rem .7rem}
.vx-storage .lbl{font-size:.8rem;color:#94a3b8;display:flex;justify-content:space-between;margin-bottom:.4rem}
.vx-meter{height:8px;border-radius:99px;background:#243348;overflow:hidden}
.vx-meter > span{display:block;height:100%;background:linear-gradient(90deg,#38bdf8,#0ea5e9)}
.vx-drive-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem;flex-wrap:wrap}
.vx-drive-head h1{margin:0;font-size:1.5rem;font-weight:800}
.vx-drop{border:1.5px dashed #334155;border-radius:14px;padding:1.1rem;text-align:center;color:#94a3b8;cursor:pointer;margin-bottom:1.2rem;transition:.15s}
.vx-drop:hover,.vx-drop.drag{border-color:#38bdf8;background:rgba(56,189,248,.06);color:#e2e8f0}
.vx-drop-sub{font-size:.8rem;color:#94a3b8;margin-top:.2rem}
.vx-link{color:#38bdf8;text-decoration:underline}
.vx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem}
.vx-tile{position:relative;border:1px solid #334155;border-radius:12px;overflow:hidden;aspect-ratio:1/1;background:#243348;cursor:pointer;display:block;padding:0}
.vx-tile img,.vx-tile video{width:100%;height:100%;object-fit:cover;display:block}
.vx-tile .vx-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(2,10,20,.15)}
.vx-tile .vx-play:after{content:"";border-left:18px solid #fff;border-top:11px solid transparent;border-bottom:11px solid transparent;margin-left:4px;filter:drop-shadow(0 1px 3px rgba(0,0,0,.6))}
.vx-badge{position:absolute;left:.5rem;top:.5rem;font-size:.66rem;font-weight:700;letter-spacing:.4px;background:rgba(2,10,20,.65);color:#e2e8f0;padding:.1rem .45rem;border-radius:6px}
.vx-tile .nm{position:absolute;left:0;right:0;bottom:0;padding:.5rem .6rem;font-size:.76rem;color:#e2e8f0;background:linear-gradient(0deg,rgba(2,10,20,.85),transparent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.vx-empty{border:1px solid #334155;border-radius:14px;padding:2.4rem;text-align:center;color:#94a3b8;grid-column:1/-1}
.vx-flash{background:rgba(56,189,248,.1);border:1px solid rgba(56,189,248,.35);color:#e2e8f0;border-radius:10px;padding:.6rem .9rem;margin-bottom:1rem;font-size:.9rem}
.vx-modal{position:fixed;inset:0;z-index:1050;background:rgba(2,8,18,.82);display:flex;align-items:center;justify-content:center;padding:1.2rem}
.vx-modal-card{background:#1e293b;border:1px solid #334155;border-radius:16px;max-width:1000px;width:100%;max-height:92vh;display:flex;flex-direction:column;overflow:hidden}
.vx-modal-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 1rem;border-bottom:1px solid #334155}
.vx-modal-head .ttl{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vx-stage{display:flex;align-items:center;justify-content:center;background:#0b1220;min-height:220px;max-height:70vh;overflow:hidden}
.vx-view{max-width:100%;max-height:70vh;display:block;object-fit:contain}
.vx-modal-foot{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;padding:.7rem 1rem;border-top:1px solid #334155}
.vx-modal-foot form{margin:0}
.vx-danger{color:#fca5a5;border-color:#7f1d1d}
.vx-danger:hover{background:#7f1d1d;color:#fff}
.vx-iconbtn{background:transparent;border:0;color:#94a3b8;font-size:1.5rem;line-height:1;cursor:pointer;padding:.1rem .5rem;border-radius:8px}
.vx-iconbtn:hover{background:#243348;color:#e2e8f0}
.vx-busy{position:fixed;inset:0;z-index:1100;background:rgba(2,8,18,.72);display:flex;align-items:center;justify-content:center}
.vx-busy-card{background:#1e293b;border:1px solid #334155;border-radius:12px;padding:1rem 1.3rem;color:#e2e8f0;display:flex;align-items:center;gap:.7rem}
@media(max-width:760px){.vx-drive{grid-template-columns:1fr}.vx-side{position:static}}

/* ================= VoxusDrive responsive optimizations v1 ================= */
/* Tablets: give the gallery a bit more room next to the sidebar */
@media (min-width:761px) and (max-width:992px){
  .vx-drive{grid-template-columns:200px 1fr;gap:1rem}
}
/* Phones/small tablets: sidebar becomes a compact horizontal bar */
@media (max-width:760px){
  .vx-side{position:static;display:flex;flex-flow:row wrap;align-items:center;gap:.5rem;padding:.5rem}
  .vx-side-link{flex:1 1 auto;justify-content:center;gap:.35rem;min-height:44px;padding:.5rem .6rem;font-size:.9rem}
  .vx-side-sep{display:none}
  .vx-storage{flex:1 1 100%;order:5;padding:.35rem .5rem}
}
/* Phones: denser gallery, tighter hero, full-width upload, full-screen viewer */
@media (max-width:560px){
  .vx-hero{padding:2.5rem 1rem 1.5rem}
  .vx-features{margin-top:2.2rem}
  .vx-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.6rem}
  .vx-drive-head form{width:100%}
  .vx-drive-head .btn-vx{width:100%}
  .vx-modal{padding:0}
  .vx-modal-card{max-width:none;width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0}
  .vx-stage{flex:1 1 auto;min-height:0;max-height:none}
  .vx-view{max-height:100%;max-width:100%}
  .vx-modal-foot{flex-wrap:wrap}
  .vx-modal-foot .btn{flex:1 1 auto;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .vx-modal-foot form{flex:1 1 auto;margin:0}
  .vx-modal-foot form .btn{width:100%}
}
/* Dynamic viewport height on mobile (URL-bar friendly) */
.vx-auth-body{min-height:100dvh}
/* Very small phones: guarantee a 2-up gallery */
@media (max-width:380px){
  .vx-grid{grid-template-columns:1fr 1fr}
}
/* Touch devices: comfortable >=44px tap targets */
@media (pointer:coarse){
  .btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .vx-side-link{min-height:44px}
  .vx-iconbtn{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
}
/* =============== end VoxusDrive responsive optimizations v1 =============== */

/* vxc confirm pages */
.vxc-right{align-items:flex-start;text-align:left}
.vxc-head{display:flex;align-items:center;gap:.6rem;margin:0 0 .15rem}
.vxc-head h1{margin:0}
.vxc-badge{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(56,189,248,.14);color:#38bdf8;flex:0 0 auto}
.vxc-badge svg{width:20px;height:20px}
.vxc-text{color:#9aa4b2;margin:.5rem 0 1.15rem;font-size:.95rem;line-height:1.55}
.vxc-btn{align-self:flex-start}

/* === VoxusDrive UI polish v2 === */
.vx-nav .navbar-collapse{gap:1.2rem}
.vx-nav .navbar-nav{gap:1.2rem}
.vx-nav .navbar-nav .nav-link{font-size:1rem;padding-left:0;padding-right:0}
.vx-nav a[title="Manage"]{color:var(--vx-text)!important;font-weight:600}
/* Identity / Account Manage pages -> match VoxusDrive dark theme (were bright Bootstrap blue) */
.btn-primary{background:var(--vx-accent);border-color:var(--vx-accent);color:#04223a;font-weight:600}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active{background:var(--vx-accent)!important;border-color:var(--vx-accent)!important;color:#04223a!important;filter:brightness(1.08)}
.nav-pills .nav-link{color:var(--vx-muted)}
.nav-pills .nav-link:hover{color:var(--vx-text)}
.nav-pills .nav-link.active,.nav-pills .show>.nav-link{background:var(--vx-accent);color:#04223a}
.form-control:disabled,.form-control[readonly]{background:var(--vx-surface);color:var(--vx-muted);border:1px solid var(--vx-border);opacity:1}
/* VoxusDrive Manage pages v1 */
.vx-manage{margin-top:1.25rem}
.vx-manage-title{color:var(--vx-text)}
.vx-manage-head{color:var(--vx-text);margin-bottom:1rem}
.vx-managenav .nav-link{border-radius:8px;margin-bottom:.25rem}
.vx-manage .form-control{background:var(--vx-surface-2);border:1px solid var(--vx-border);color:var(--vx-text)}
.vx-manage .form-control:focus{background:var(--vx-surface-2);color:var(--vx-text);border-color:var(--vx-accent);box-shadow:0 0 0 .15rem rgba(14,165,233,.25)}
.vx-manage .form-label{color:var(--vx-muted)}
.vx-manage hr{border-color:var(--vx-border)}
/* VoxusDrive Manage pages v2 - smaller inputs + buttons */
#email-form,#change-password-form{max-width:520px}
.vx-manage .form-floating>.form-control{height:calc(3.15rem + 2px);min-height:calc(3.15rem + 2px)}
.vx-manage .form-floating>.form-control:focus,.vx-manage .form-floating>.form-control:not(:placeholder-shown){padding-top:1.4rem;padding-bottom:.35rem}
.vx-manage .form-floating>label{padding-top:.9rem;padding-bottom:.9rem}
.vx-manage form .btn-lg{padding:.45rem 1.1rem;font-size:1rem;border-radius:8px}
.vx-manage form .w-100{width:auto!important;min-width:210px;display:inline-block}