:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#e6ebf3;background:#0d1320}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,.file-button{cursor:pointer;border:0;border-radius:10px;background:#5687ff;color:white;padding:10px 15px;font-weight:650}button:hover,.file-button:hover{filter:brightness(1.12)}button.secondary,button.ghost{background:#25334d;color:#dfe8fa}.login-screen{min-height:100vh;display:grid;place-items:center;padding:18px}.login-card{background:#171f30;border:1px solid #2b3851;padding:35px;border-radius:22px;max-width:420px;width:100%;text-align:center}.login-card .logo{font-size:50px}.login-card form{display:grid;gap:12px;margin-top:24px}input,select{background:#101a2b;border:1px solid #33425b;color:white;border-radius:9px;padding:12px;min-width:0;width:100%}input:focus,select:focus{outline:2px solid #5687ff}#application{display:flex;min-height:100vh}aside{width:245px;padding:25px 15px;background:#121b2a;border-right:1px solid #29364e;display:flex;flex-direction:column;gap:35px}.brand{font-size:23px;font-weight:800;padding:0 12px}.brand small{display:block;margin-left:40px;font-size:10px;letter-spacing:4px;color:#7fa5f6}nav{display:grid;gap:6px}nav button{background:transparent;color:#adbbd4;text-align:left}nav button.active{background:#293d65;color:white}.sidebar-foot{font-size:12px;color:#8190aa;margin-top:auto;padding:10px}main{flex:1;padding:35px;min-width:0;max-width:1600px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}h1{font-size:28px;margin:0 0 6px}h2{font-size:19px;margin:0 0 18px}header p,.muted,.login-card p{color:#92a1bb;font-size:14px}header p{margin:0}article{background:#182336;border:1px solid #2a3b53;border-radius:16px;padding:22px;margin-bottom:18px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.stats article{display:grid;gap:14px}.stats span{color:#a8b6ce;font-size:13px}.stats strong{font-size:27px}.meter{height:13px;background:#2c3850;border-radius:12px;overflow:hidden}.meter>div{height:100%;background:linear-gradient(90deg,#4778f4,#3ac4c1);width:0}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px}.toolbar h2{margin:0}.actions{display:flex;gap:8px;flex-wrap:wrap}.file-button{display:inline-flex;align-items:center} .file-table{margin-top:18px}.file-row{padding:13px 8px;border-top:1px solid #2a3b53;display:flex;align-items:center;justify-content:space-between;gap:8px}.file-name{cursor:pointer;background:transparent;color:#e6ebf3;text-align:left;overflow-wrap:anywhere;max-width:75%}.right-actions{display:flex;align-items:center;gap:10px}.right-actions button{padding:6px 10px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:12px}.form-grid label{display:grid;gap:8px;font-size:13px;color:#aab8d0}.form-grid button{min-height:44px}.error,#message{color:#ff9e9e;margin-top:10px;white-space:pre-wrap}#message:not(:empty){background:#38262d;padding:12px;border-radius:10px;margin:10px 0 18px}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#0f1726;padding:20px;border-radius:12px;max-height:65vh;overflow:auto;font-size:12px}code{color:#9ebeff}.disk-row{padding:10px 0;border-top:1px solid #2a3b53}.pill{color:#83d6bb}.share-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #2a3b53;gap:12px}@media(max-width:950px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}main{padding:22px}}@media(max-width:650px){#application{display:block}aside{width:100%;padding:12px;gap:10px}.brand small,.sidebar-foot{display:none}nav{display:flex;overflow-x:auto}nav button{white-space:nowrap;font-size:12px;padding:9px}main{padding:14px}header h1{font-size:22px}.stats{gap:8px}.stats article{padding:15px}.stats strong{font-size:21px}.toolbar{align-items:start;flex-direction:column}.file-name{max-width:55%}}

[hidden]{display:none!important}
.user-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-bottom:1px solid #2a3b53}.user-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.user-actions input{max-width:220px}#account{margin-top:5px;font-size:12px}.user-row strong{margin-right:6px}@media(max-width:800px){.user-row{align-items:start;flex-direction:column}.user-actions input{max-width:100%}}

#loginOtpRow{font-size:13px;color:#b7c5df;text-align:left;display:grid;gap:6px}

/* FoxNAS 2.2 - destructive folder deletion requires admin re-authentication. */
button.danger {background:#ad2441;color:#fff}
button:disabled {opacity:.55;cursor:progress}
.danger-dialog {background:#182336;color:#e6ebf3;border:1px solid #604054;border-radius:18px;padding:24px;max-width:min(94vw,520px);width:100%;box-shadow:0 20px 60px #0009}
.danger-dialog::backdrop {background:rgba(3,8,18,.82)}
.danger-dialog form,.danger-dialog label {display:grid;gap:12px}
.danger-dialog label {font-size:13px;color:#d1ddf3}
.danger-dialog .warning {color:#ffb2bd;line-height:1.55}
.danger-dialog .delete-target {overflow-wrap:anywhere;font-weight:700;background:#101a2b;padding:12px;border-radius:9px}
.dialog-actions {display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:12px}
#deleteOtpRow[hidden] {display:none!important}

/* FoxNAS v2.2: authenticated gallery + preview, including mobile screens. */
.gallery-header {display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:24px 0 12px}
.gallery-header h3 {font-size:17px;margin:0}
.photo-gallery {display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin:0 0 20px}
.photo-tile {background:#101a2b;color:#dfe8fa;padding:7px;border:1px solid #33425b;display:flex;flex-direction:column;gap:6px;min-width:0;min-height:150px;overflow:hidden}
.photo-tile img {width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:7px;background:#24344d}
.photo-tile span {display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:11px;max-width:100%}
.image-dialog {background:#182336;color:#e6ebf3;border:1px solid #33425b;border-radius:16px;max-width:min(96vw,1080px);width:100%;max-height:95vh;padding:18px;text-align:center;box-shadow:0 20px 60px #0009}
.image-dialog::backdrop {background:rgba(3,8,18,.85)}
.image-dialog-head {display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}
.image-dialog-head h2 {overflow-wrap:anywhere;margin:0;font-size:17px}
.image-dialog img {display:block;max-width:100%;width:auto;max-height:73vh;height:auto;object-fit:contain;margin:12px auto;border-radius:8px}
.image-dialog img[hidden] {display:none!important}
.image-dialog #previewStatus {min-height:1.2em}
.image-dialog .file-button {margin-top:5px;text-decoration:none}
@media (max-width:650px) {.photo-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.photo-tile{min-height:115px;padding:5px}.file-row{flex-wrap:wrap}.right-actions{margin-left:auto}.image-dialog{padding:10px}.image-dialog img{max-height:65vh}}

/* FoxNAS 2.3: account password form shared by users and admins. */
#myPasswordForm {margin-top:16px}
#myPasswordForm button {align-self:end}
#myPasswordOtpRow[hidden] {display:none!important}
#myPasswordError:empty {display:none}

.stats-table{display:grid;gap:12px;margin-top:18px}.stats-entry{padding:16px;border:1px solid #31425d;border-radius:12px;display:grid;gap:8px;overflow-wrap:anywhere}.stats-entry strong{font-size:18px}

/* FoxNAS 2.5: authenticated text/audio player and mobile-friendly ZIP action. */
.media-dialog{background:#182336;color:#e6ebf3;border:1px solid #33425b;border-radius:16px;width:min(94vw,780px);max-height:92vh;box-shadow:0 20px 60px #0009;padding:20px}
.media-dialog::backdrop{background:rgba(3,8,18,.84)}
.media-dialog-head{display:flex;justify-content:space-between;gap:10px;align-items:center}
.media-dialog-head h2{margin:0;font-size:18px;overflow-wrap:anywhere}
.media-dialog audio{width:100%;margin:20px 0;display:block}
.media-dialog .file-button{display:inline-block;margin-top:12px}
.text-content{white-space:pre-wrap;overflow-wrap:anywhere;max-height:58vh;overflow:auto;background:#101a2b;color:#e5efff;border:1px solid #31425d;border-radius:10px;padding:14px;text-align:left;font-size:13px}
.right-actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:650px){.media-dialog{padding:12px}.file-name{max-width:100%}.right-actions{width:100%}}

/* FoxNAS 2.8: mobile-friendly three-choice upload conflict */
.upload-conflict-dialog{background:#182336;color:#e6ebf3;border:1px solid #33425b;border-radius:16px;width:min(94vw,590px);max-height:90vh;overflow:auto;padding:22px;box-shadow:0 20px 60px #0009}
.upload-conflict-dialog::backdrop{background:rgba(3,8,18,.82)}
.upload-conflict-dialog h2{margin-top:0}
.upload-conflict-dialog strong{overflow-wrap:anywhere}
.upload-conflict-dialog label{display:block;margin-bottom:7px}
.upload-conflict-dialog input{width:100%;box-sizing:border-box}
.upload-conflict-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}
.upload-conflict-actions button{flex:1 1 145px}
@media(max-width:650px){.upload-conflict-dialog{padding:16px}.upload-conflict-actions button{flex-basis:100%}}

/* FoxNAS 2.9: safe rename dialog, responsive for mobile. */
.rename-dialog{background:#182336;color:#e6ebf3;border:1px solid #33425b;border-radius:16px;width:min(94vw,520px);max-height:90vh;padding:22px;box-shadow:0 20px 60px #0009}
.rename-dialog::backdrop{background:rgba(3,8,18,.82)}
.rename-dialog form{display:grid;gap:12px}
.rename-dialog .muted{overflow-wrap:anywhere;margin:0}
.rename-dialog label{font-size:13px;color:#d1ddf3}
@media(max-width:650px){.rename-dialog{padding:16px}.rename-dialog .dialog-actions>*{flex:1}}

/* FoxNAS 3.0 - inline mobile-friendly video player. */
.video-dialog{width:min(96vw,1020px)}
.video-dialog video{display:block;width:100%;max-height:65vh;background:#000;border-radius:10px;margin:12px 0;object-fit:contain}
@media(max-width:650px){.video-dialog{padding:10px}.video-dialog video{max-height:55vh}}
