:root{
  --blue:#005b9f;
  --blue-dark:#004a82;
  --light:#f0f7fb;
  --orange:#f39200;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --danger:#b91c1c;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:#f9fafb}
body{display:flex;min-height:100vh;flex-direction:column}
button,input{font:inherit}
button,a{transition:.18s ease}
.topbar{height:80px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1400px)/2));box-shadow:0 1px 4px rgba(0,0,0,.04);position:sticky;top:0;z-index:10}
.brand{font-weight:800;color:var(--blue);letter-spacing:.05em}
main{flex:1}
footer{background:#fff;border-top:1px solid var(--line);padding:24px max(24px,calc((100vw - 1400px)/2));display:flex;justify-content:space-between;gap:18px;color:var(--muted);font-size:14px;flex-wrap:wrap}
footer nav{display:flex;gap:24px}
footer a{color:var(--muted);text-decoration:none;font-weight:600}
footer a:hover{color:var(--blue)}
.hidden{display:none!important}
.center-card,.auth-wrap{min-height:calc(100vh - 160px);display:flex;align-items:center;justify-content:center;padding:48px 20px}
.auth-wrap{background:var(--light)}
.auth-card{width:min(100%,440px);background:#fff;border:1px solid #eef0f2;border-radius:20px;padding:40px;box-shadow:0 20px 50px rgba(0,55,90,.12);text-align:center}
.lock{width:64px;height:64px;background:var(--light);border-radius:50%;display:grid;place-items:center;font-size:28px;margin:0 auto 22px}
.auth-card h1{margin:0 0 8px;font-size:30px}
.auth-card p{margin:0 0 28px;color:var(--muted)}
.auth-card form{text-align:left}
label{display:block;font-size:14px;font-weight:700;margin-bottom:7px}
input[type=password]{width:100%;padding:13px 14px;border:1px solid #d1d5db;border-radius:10px;outline:none;margin-bottom:16px}
input[type=password]:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(0,91,159,.12)}
.primary,.ghost,.small{border:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-weight:800}
.primary{background:var(--blue);color:white;border-radius:999px;padding:12px 26px;box-shadow:0 6px 16px rgba(0,91,159,.18)}
.primary:hover{background:var(--blue-dark)}
.primary:disabled{opacity:.5;cursor:not-allowed}
.full{width:100%}
.ghost{background:transparent;color:var(--blue);padding:10px 16px;border-radius:999px}
.ghost:hover{background:var(--light)}
.app{width:min(1200px,100%);margin:auto;padding:40px 20px 60px}
.intro{text-align:center;max-width:760px;margin:0 auto 34px}
.intro h1{font-size:32px;margin:0 0 12px}
.intro p{color:var(--muted);line-height:1.6}
.upload-shell{background:var(--light);border-radius:20px;padding:14px;margin-bottom:42px}
.drop-zone{background:#fff;border:2px dashed rgba(0,91,159,.3);border-radius:15px;padding:42px;text-align:center;cursor:pointer}
.drop-zone.dragging{border-color:var(--orange);box-shadow:0 8px 24px rgba(243,146,0,.15);transform:scale(1.005)}
.upload-icon{width:76px;height:76px;margin:0 auto 18px;border-radius:50%;background:var(--light);display:grid;place-items:center;color:var(--blue);font-size:38px;font-weight:700}
.drop-zone h2{color:var(--blue);font-size:21px;margin:0 0 8px}
.drop-zone p{color:var(--muted);margin:0 0 24px}
.spinner{width:40px;height:40px;border:4px solid #dbeafe;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 14px}
@keyframes spin{to{transform:rotate(360deg)}}
.error{background:#fef2f2;border:1px solid #fecaca;color:var(--danger);padding:12px 14px;border-radius:10px;margin-top:14px;font-size:14px;font-weight:650}
.error.inline{margin:20px}
.files-card{background:#fff;border:1px solid #eef0f2;border-radius:20px;overflow:hidden;box-shadow:0 4px 18px rgba(0,0,0,.035)}
.files-head{padding:22px 28px;border-bottom:1px solid #eef0f2;display:flex;align-items:center;justify-content:space-between;gap:16px}
.files-head h2{font-size:20px;margin:0}
.pill{background:var(--light);color:var(--blue);font-size:14px;font-weight:800;padding:5px 11px;border-radius:999px}
.empty{text-align:center;padding:56px 20px;color:var(--muted)}
.empty h3{color:var(--text);margin:10px 0 6px}
.empty p{margin:0}
.empty-icon{font-size:40px;opacity:.55}
.file-row{padding:22px 28px;border-bottom:1px solid #f1f3f5;display:flex;justify-content:space-between;align-items:center;gap:22px}
.file-row:last-child{border-bottom:0}
.file-info{display:flex;align-items:center;gap:14px;min-width:240px;flex:1}
.file-icon{width:48px;height:48px;flex:0 0 auto;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;background:#fff}
.file-meta{min-width:0}
.file-meta strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px;margin-bottom:5px}
.file-meta span{font-size:13px;color:var(--muted)}
.file-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.link-box{display:flex;align-items:center;gap:8px;border:1px solid var(--line);padding:6px;border-radius:9px;max-width:430px}
.link-box code{font-size:11px;color:var(--muted);display:block;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}
.small{padding:8px 11px;border-radius:7px;font-size:12px;background:#fff;color:var(--blue);border:1px solid var(--line)}
.small:hover{background:var(--light)}
.download-btn{background:var(--light);border-color:transparent}
.danger{color:#dc2626}
.danger:hover{background:#fef2f2}
@media(max-width:860px){
  .file-row{align-items:flex-start;flex-direction:column}
  .file-actions{width:100%;justify-content:flex-start}
  .link-box{width:100%;max-width:none}
  .link-box code{max-width:none;flex:1}
}
@media(max-width:560px){
  .topbar{height:68px;padding:0 16px}
  .brand{font-size:14px}
  .auth-card{padding:28px 22px}
  .app{padding:30px 14px 45px}
  .drop-zone{padding:30px 16px}
  .files-head,.file-row{padding-left:18px;padding-right:18px}
  footer{padding:22px 16px}
}
