:root {
  color-scheme: light;
  --ink: #1c1b31;
  --muted: #646278;
  --paper: #fff;
  --ground: #f7f7fb;
  --line: #e1e0ea;
  --violet: #4932b8;
  --violet-dark: #36228e;
  --tint: #efebff;
  --danger: #a02b48;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; }
form, h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #8573ee; outline-offset: 3px; }

.shell { width: min(100% - 48px, 1024px); margin-inline: auto; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.035em; font-size: 1.12rem; white-space: nowrap; }
.brand strong { color: var(--violet); font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--violet); }
.brand-mark span { position: relative; width: 19px; height: 13px; background: #f7f5ff; border-radius: 2px; }
.brand-mark span::before { content: ""; position: absolute; width: 8px; height: 5px; left: 0; top: -3px; border-radius: 2px 2px 0 0; background: #f7f5ff; }

h1 { font-size: clamp(1.85rem, 4.4vw, 2.75rem); font-weight: 760; letter-spacing: -.055em; line-height: 1.08; overflow-wrap: anywhere; }
h2 { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 750; letter-spacing: -.035em; margin-bottom: 12px; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.intro { color: var(--muted); margin-top: 12px; overflow-wrap: anywhere; }
.centered { padding-block: clamp(32px, 9vh, 96px); }

.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 460px; max-width: 900px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 22px 60px #211d4710; }
.login-art { min-height: 100%; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(ellipse at 43% 42%, #403275, #1f1939 77%); }
.art-orbit { position: absolute; width: 72%; aspect-ratio: 1; border: 1px solid #c0aff02a; border-radius: 50%; transform: scaleX(1.12) rotate(-28deg); }
.orbit-inner { width: 57%; border-color: #c0aff049; }
.art-folder { position: relative; width: 54%; max-width: 266px; aspect-ratio: 1.42; transform: rotate(-9deg); filter: drop-shadow(0 22px 28px #10092485); }
.art-back, .art-face, .art-paper { position: absolute; border-radius: 12px; }
.art-back { inset: 19% 0 0; background: #7360c8; }
.art-back::before { content: ""; position: absolute; left: 0; top: -12px; width: 39%; height: 26%; border-radius: 10px; background: inherit; }
.art-paper { display: grid; align-content: start; gap: 8%; height: 85%; width: 64%; padding: 15% 12%; left: 20%; top: 1%; background: #e7dfff; transform: rotate(11deg); }
.paper-behind { left: 12%; top: 5%; transform: rotate(-9deg); background: #b9aaf0; }
.art-paper i { width: 90%; height: 4px; border-radius: 3px; background: #a897da; }
.art-paper i:nth-child(2) { width: 72%; }
.art-paper i:nth-child(3) { width: 54%; }
.art-face { inset: 45% 0 0; background: linear-gradient(140deg, #b5a2ff, #8974eb); box-shadow: inset 0 1px 0 #dfd5ff; }
.login-panel { align-self: center; padding: clamp(26px, 5vw, 56px); }
.login-form { display: grid; gap: 8px; margin-top: 26px; }
.login-form label { font-size: .91rem; font-weight: 700; }
.login-form input { width: 100%; min-height: 45px; margin-bottom: 9px; }
.login-button { margin-top: 4px; justify-content: space-between !important; }
.error { background: #fcebf0; color: var(--danger); padding: 10px 12px; border-radius: 8px; margin-bottom: 5px; }

input, select { min-width: 0; border: 1px solid #ccc9dc; border-radius: 8px; padding: 9px 12px; background: var(--paper); color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 8px 16px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:disabled { cursor: default; opacity: .53; }
.primary { background: var(--violet); color: white; }
.primary:hover:not(:disabled) { background: var(--violet-dark); }
.secondary { background: var(--paper); border-color: #d8d5e5; color: var(--ink); }
.secondary:hover:not(:disabled), .quiet:hover:not(:disabled) { background: var(--tint); border-color: #d8d5e5; }
.quiet { background: transparent; color: var(--muted); }
.danger { color: var(--danger); }
.compact { min-height: 36px; padding: 6px 11px; font-size: .85rem; }
.account { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: .9rem; min-width: 0; }
.account > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dashboard { padding-block: 36px 64px; }
.upload-card { padding: clamp(18px, 3.5vw, 34px); border: 1px solid #ded5fc; border-radius: 18px; background: linear-gradient(125deg, #f1edff, #f8f6ff 76%); }
.upload-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 21px; }
.upload-heading h1 { font-size: clamp(1.7rem, 4vw, 2.25rem); }
.upload-heading p { color: var(--muted); margin-top: 5px; }
.upload-symbol { flex: 0 0 auto; width: 51px; height: 51px; display: grid; place-items: center; border-radius: 14px; background: #e3dafe; color: var(--violet); font-size: 1.7rem; line-height: 1; font-weight: 700; }
.drop-zone { display: grid; align-content: center; gap: 3px; text-align: center; min-height: 124px; position: relative; padding: 16px; border: 1px dashed #a091d8; border-radius: 11px; background: #ffffffba; cursor: pointer; overflow-wrap: anywhere; }
.drop-zone:hover, .drop-zone.dragging { background: #eee8ff; border-color: var(--violet); }
.drop-zone:focus-within { outline: 3px solid #8573ee; outline-offset: 2px; }
.drop-zone input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; padding: 0; cursor: pointer; }
.drop-zone input:disabled { cursor: default; }
.drop-text { color: var(--muted); }
.drop-text strong { color: var(--violet); }
.file-limit { color: var(--muted); font-size: .85rem; }
.upload-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.upload-controls label { margin-right: 4px; font-size: .92rem; font-weight: 700; }
.upload-controls select { max-width: 100%; }
.upload-controls .primary { margin-left: auto; }
progress { display: block; margin-top: 14px; width: 100%; accent-color: var(--violet); }
.upload-status { margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.upload-status.problem { color: var(--danger); }

.file-section { margin-top: 32px; }
.count { border-radius: 40px; padding: 2px 9px; font-size: .78rem; color: var(--violet); background: var(--tint); letter-spacing: 0; }
.file-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.file-row + .file-row { margin-top: 8px; }
.file-description p { margin-top: 4px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.file-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.file-mark { display: block; height: 40px; width: 35px; border-radius: 9px; background: var(--tint); position: relative; }
.file-mark::before { content: ""; position: absolute; left: 11px; top: 10px; width: 13px; height: 19px; background: #8772df; border-radius: 2px; clip-path: polygon(0 0, 66% 0, 100% 26%, 100% 100%, 0 100%); }
.file-mark::after { content: ""; position: absolute; left: 14px; top: 19px; height: 1px; width: 7px; background: #fff; box-shadow: 0 4px #fff; }
.empty { padding: 21px 18px; background: var(--paper); color: var(--muted); border: 1px dashed #d5d2e5; border-radius: 12px; }

.small-card { max-width: 650px; margin-inline: auto; padding: clamp(23px, 4.8vw, 50px); background: var(--paper); border: 1px solid var(--line); border-radius: 17px; }
.small-card .file-mark { margin-bottom: 13px; }
.small-card p + p { margin-top: 15px; }
.small-card > .button, .copy-box, .back-link { margin-top: 21px; }
.copy-box { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-box input { flex: 1 1 250px; }
.copy-status { flex-basis: 100%; color: var(--muted); font-size: .87rem; }
.back-link { display: inline-block; color: var(--violet); text-underline-offset: 3px; font-weight: 650; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.sharing-card { max-width: 810px; }
.sharing-card .back-link { margin: 0 0 20px; }
.sharing-card h1 { font-size: clamp(1.65rem, 4.2vw, 2.45rem); }
.sharing-section { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.sharing-section > p { color: var(--muted); }
.sharing-form { margin-top: 12px; }
.sharing-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.sharing-fields label { display: grid; gap: 5px; min-width: 0; font-size: .9rem; font-weight: 700; }
.sharing-fields label:first-child { flex: 1 1 220px; }
.sharing-fields label :is(input, select) { min-height: 43px; font-weight: 400; }
.access-list { margin: 13px 0 0; padding: 0; list-style: none; }
.access-list li { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); }
.access-list strong { overflow-wrap: anywhere; }
.access-list .copy-box { flex-basis: 100%; margin-top: 0; }
.access-list .copy-box input { padding-block: 6px; font-size: .86rem; }
.link-info { display: grid; gap: 2px; }
.link-info span, .access-note { font-size: .86rem; color: var(--muted); }
.access-note { margin-top: 12px; }

@media (max-width: 740px) {
  .login-layout { grid-template-columns: 1fr; max-width: 480px; }
  .login-art { min-height: 157px; }
  .art-orbit { width: 205px; }
  .orbit-inner { width: 165px; }
  .art-folder { width: 120px; }
  .art-paper { gap: 7%; }
  .art-paper i { height: 2px; }
  .file-row { grid-template-columns: 35px minmax(0, 1fr); gap: 9px 12px; }
  .file-actions { grid-column: 2; }
}

@media (max-width: 470px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 62px; gap: 9px; }
  .account { gap: 6px; font-size: .81rem; }
  .brand { gap: 7px; font-size: 1rem; }
  .brand-mark { width: 31px; height: 31px; }
  .dashboard { padding-top: 18px; }
  .upload-heading { gap: 10px; }
  .upload-symbol { width: 42px; height: 42px; border-radius: 10px; }
  .upload-controls .primary { margin-left: 0; }
  .file-actions { grid-column: 1 / -1; }
}
