:root {
  --ink: #14213d;
  --muted: #667085;
  --line: #dce3ed;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --blue: #155eef;
  --blue-dark: #0b4bc7;
  --navy: #0d1b34;
  --green: #087a55;
  --red: #c43232;
  --amber: #9a6500;
  --shadow: 0 16px 45px rgba(15, 35, 70, .09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--soft); color: var(--ink); }
a { color: inherit; }
button, input { font: inherit; }
button, a.button { -webkit-tap-highlight-color: transparent; }
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner, .public-header { max-width: 1180px; margin: 0 auto; min-height: 68px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; font-weight: 850; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-centered { justify-content: center; }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 42px 24px 80px; }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 30px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 14px; }
h2 { font-size: 1.45rem; letter-spacing: -.02em; margin-bottom: 6px; }
h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.01em; }
.eyebrow { margin-bottom: 8px; color: var(--blue); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-copy { color: var(--muted); max-width: 650px; margin-bottom: 0; font-size: 1.03rem; line-height: 1.65; }
.stats { display: flex; flex: 0 0 auto; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 15px; overflow: hidden; }
.stats div { min-width: 108px; padding: 17px 18px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats strong, .stats span { display: block; }
.stats strong { font-size: 1.25rem; margin-bottom: 4px; }
.stats span { font-size: .76rem; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.upload-panel { padding: 28px; }
.disk-panel { margin-bottom: 25px; padding: 20px 24px; box-shadow: none; }
.disk-heading, .disk-numbers { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.disk-heading h2, .disk-heading p { margin-bottom: 0; }
.disk-heading > strong { color: var(--muted); font-size: .8rem; }
.disk-panel progress { width: 100%; height: 10px; margin: 15px 0 9px; overflow: hidden; border: 0; border-radius: 999px; background: #e7ecf3; color: var(--blue); }
.disk-panel progress::-webkit-progress-bar { background: #e7ecf3; border-radius: 999px; }
.disk-panel progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
.disk-panel progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.disk-numbers { color: var(--muted); font-size: .75rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.limit-note, .optional { color: var(--muted); font-size: .78rem; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.span-two { grid-column: 1 / -1; }
label, .field-label, legend { color: #344054; font-size: .86rem; font-weight: 700; }
input[type="text"], input[type="password"], input[type="number"], input:not([type]) { width: 100%; min-height: 44px; margin-top: 8px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cbd5e1; border-radius: 9px; outline: 0; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,94,239,.13); }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; }
.drop-zone { min-height: 142px; margin-top: 8px; padding: 25px; border: 1.5px dashed #aebdd0; border-radius: 13px; background: #f8faff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--blue); background: #eef4ff; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone small { margin-top: 5px; color: var(--muted); font-weight: 500; }
.drop-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 9px; border-radius: 50%; background: #e5edff; color: var(--blue); font-size: 1.5rem; }
.picker-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 15px 0 8px; }
.picker-actions .button { margin: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 9px 17px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; }
.choice input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.choice input:focus-visible + span { outline: 3px solid rgba(21,94,239,.2); }
.custom-days { display: block; max-width: 180px; margin-top: 12px; }
.check-line { display: flex; align-items: start; gap: 11px; padding-top: 6px; cursor: pointer; }
.check-line input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.check-line span, .check-line strong, .check-line small { display: block; }
.check-line small { color: var(--muted); margin-top: 5px; font-weight: 500; line-height: 1.45; }
.upload-footer { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 26px; }
.progress-wrap { display: flex; align-items: center; gap: 12px; flex: 1; }
.progress-wrap progress { height: 8px; flex: 1; overflow: hidden; border: 0; border-radius: 999px; background: #e7ecf3; color: var(--blue); }
.progress-wrap progress::-webkit-progress-bar { background: #e7ecf3; }
.progress-wrap progress::-webkit-progress-value { background: var(--blue); }
.progress-wrap progress::-moz-progress-bar { background: var(--blue); }
#progress-text { min-width: 100px; color: var(--muted); font-size: .8rem; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 750; font-size: .84rem; cursor: pointer; transition: transform .12s, background .12s, border-color .12s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: #273b5b; background: #fff; border-color: #cbd5e1; }
.button-secondary:hover { border-color: #92a3b8; background: #f8fafc; }
.button-danger { color: var(--red); background: #fff; border-color: #efcaca; }
.button-danger:hover { background: #fff1f1; }
.button-quiet { color: #fff; border-color: rgba(255,255,255,.28); background: transparent; }
.button-wide { width: 100%; min-height: 46px; }
.section-block { margin-top: 45px; }
.share-builder { margin-top: 35px; padding: 28px; }
.library-list { display: grid; gap: 10px; }
.library-file { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.library-select { min-width: 0; display: grid; grid-template-columns: auto 40px minmax(0, 1fr); align-items: center; gap: 13px; cursor: pointer; }
.library-select > input { width: 19px; height: 19px; margin: 0; accent-color: var(--blue); }
.library-info { min-width: 0; }
.library-info strong, .library-info small { display: block; }
.library-info strong { color: var(--ink); overflow-wrap: anywhere; }
.library-info small { margin-top: 5px; color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.4; }
.library-file form { flex: 0 0 auto; }
.share-list { display: grid; gap: 14px; }
.share-card { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 25px; padding: 22px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; }
.share-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.status, .tag { padding: 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.status-active { color: var(--green); background: #e7f7f1; }
.status-paused { color: var(--amber); background: #fff5d9; }
.status-expired { color: #697386; background: #edf0f4; }
.tag { color: #5542a8; background: #f0edff; }
.share-meta, .expiry-line { margin: 9px 0 0; color: var(--muted); font-size: .8rem; }
.share-link { margin: 11px 0 0; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; overflow-wrap: anywhere; }
.file-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.file-chips span { max-width: 220px; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; background: #f1f4f8; color: #4d5c72; font-size: .72rem; }
.file-details { margin-top: 13px; }
.file-details summary { color: #52657f; cursor: pointer; font-size: .76rem; font-weight: 700; }
.file-table { margin-top: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.file-table > div { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: 14px; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .71rem; }
.file-table > div:last-child { border-bottom: 0; }
.file-table > div span:first-child { overflow: hidden; color: #334866; text-overflow: ellipsis; white-space: nowrap; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.share-actions form, .share-actions .button { width: 100%; }
.empty-state { padding: 45px 20px; text-align: center; border: 1px dashed #b8c4d4; border-radius: 14px; color: var(--muted); }
.empty-state strong { color: var(--ink); font-size: 1.05rem; }
.empty-state p { margin: 8px 0 0; }
.settings-panel { margin-top: 35px; padding: 20px 24px; box-shadow: none; }
.settings-panel summary { cursor: pointer; font-weight: 750; }
.password-grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: end; gap: 13px; margin-top: 20px; }
.watermark-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(240px, 1fr); align-items: end; gap: 13px; margin-top: 20px; }
.watermark-form small { align-self: center; color: var(--muted); line-height: 1.45; }
.alert { margin: 0 0 20px; padding: 13px 15px; border-radius: 9px; font-size: .87rem; line-height: 1.45; }
.alert-error { color: #8a2222; background: #fff0f0; border: 1px solid #efc7c7; }
.alert-success { color: #096247; background: #eaf8f2; border: 1px solid #bde4d4; }
.created-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; padding: 21px 24px; color: #fff; background: #113166; border-radius: 14px; box-shadow: var(--shadow); }
.created-banner h2 { margin-bottom: 7px; }
.created-banner .eyebrow { color: #9fc1ff; }
.link-text { margin: 0; color: #d7e5ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; overflow-wrap: anywhere; }
.footer { padding: 25px; color: #8792a5; text-align: center; font-size: .76rem; }
.login-body, .public-body { background: var(--navy); }
.login-shell, .message-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 420px); padding: 38px; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.26); }
.login-heading { margin: 32px 0 24px; text-align: center; }
.login-heading h1 { font-size: 2.1rem; margin-bottom: 10px; }
.login-heading > p:last-child, .fine-print { color: var(--muted); line-height: 1.5; }
.stack-form { display: grid; gap: 17px; }
.fine-print { margin: 17px 0 0; text-align: center; font-size: .72rem; }
.public-header { position: relative; z-index: 2; color: #fff; }
.public-shell { position: relative; z-index: 2; width: min(100%, 900px); min-height: calc(100vh - 150px); margin: 0 auto; padding: 45px 24px; }
.public-card { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.public-card > *:not(.watermark-sheet) { position: relative; z-index: 1; }
.watermark-wall, .watermark-sheet { pointer-events: none; user-select: none; display: grid; grid-template-columns: repeat(8, minmax(135px, 1fr)); align-content: space-around; justify-items: center; gap: 48px 26px; transform: rotate(-18deg); }
.watermark-wall { position: fixed; z-index: 0; inset: -30%; color: #fff; opacity: .09; }
.watermark-sheet { position: absolute; z-index: 0; inset: -35%; color: #173561; opacity: .055; }
.watermark-wall span, .watermark-sheet span { font-size: .82rem; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.unlock-card, .message-card { max-width: 500px; margin: 20px auto; padding: 45px; text-align: center; }
.unlock-card h1, .message-card h1 { font-size: 2.1rem; }
.unlock-card > p:not(.eyebrow), .message-card p { color: var(--muted); line-height: 1.55; }
.unlock-form { display: grid; gap: 18px; margin-top: 25px; text-align: left; }
.large-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 16px; color: var(--blue); background: #eaf0ff; font-weight: 900; font-size: 1.45rem; }
.files-card { padding: 33px; }
.public-title { display: flex; align-items: start; justify-content: space-between; gap: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.public-title h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); margin-bottom: 10px; }
.public-title > div > p:last-child { color: var(--muted); margin-bottom: 0; }
.expiry-badge { flex: 0 0 auto; padding: 7px 10px; border-radius: 7px; color: #365071; background: #eef2f7; font-size: .75rem; font-weight: 750; }
.download-list { display: grid; }
.download-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.file-symbol { display: grid; place-items: center; width: 40px; height: 40px; color: var(--blue); background: #eaf0ff; border-radius: 9px; font-weight: 900; }
.download-info { min-width: 0; }
.download-info strong, .download-info span { display: block; }
.download-info strong { overflow-wrap: anywhere; }
.download-info span { margin-top: 5px; color: var(--muted); font-size: .77rem; }
.zip-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 25px; padding: 18px; border-radius: 11px; background: #f2f5f9; }
.zip-row strong, .zip-row span { display: block; }
.zip-row span { margin-top: 5px; color: var(--muted); font-size: .77rem; line-height: 1.45; }
.public-note { margin: 23px 0 0; color: var(--muted); font-size: .74rem; text-align: center; }
.public-body .footer { position: relative; z-index: 2; color: #8798b5; }

@media (max-width: 900px) {
  .hero-row { align-items: stretch; flex-direction: column; }
  .stats { align-self: stretch; }
  .stats div { flex: 1; min-width: 0; }
  .share-card { grid-template-columns: 1fr; }
  .password-grid, .watermark-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .page-shell { padding: 28px 15px 60px; }
  .topbar-inner, .public-header { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .upload-panel { padding: 20px 16px; }
  .share-builder { padding: 20px 16px; }
  .library-file { align-items: stretch; flex-direction: column; }
  .library-file form, .library-file form .button { width: 100%; }
  .stats { display: grid; grid-template-columns: repeat(2, 1fr); }
  .stats div { padding: 13px 9px; text-align: center; }
  .stats strong { font-size: 1rem; }
  .share-actions { grid-template-columns: 1fr 1fr; }
  .password-grid, .watermark-form { grid-template-columns: 1fr; }
  .created-banner, .public-title, .zip-row { align-items: stretch; flex-direction: column; }
  .files-card { padding: 23px 17px; }
  .download-item { grid-template-columns: 38px minmax(0, 1fr); }
  .download-item .button { grid-column: 1 / -1; }
  .unlock-card, .message-card, .login-card { padding: 30px 22px; }
  .upload-footer { align-items: stretch; flex-direction: column; }
  .disk-heading, .disk-numbers { align-items: flex-start; flex-direction: column; gap: 5px; }
  .file-table > div { grid-template-columns: minmax(100px, 1fr) auto; }
  .file-table time { grid-column: 1 / -1; }
}
