@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/inter-cyrillic-opsz-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/inter-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  color: #16191e;
  background: #f2f2f4;
  --surface: #fff;
  --surface-alt: #f7f8fa;
  --border: #dce0e6;
  --border-control: #cbd2dc;
  --muted: #535c6b;
  --blue: #245fba;
  --blue-hover: #194d9e;
  --blue-soft: #edf4ff;
  --focus: #3b7de0;
  --danger: #a32235;
  --danger-soft: #fff1f2;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; line-height: 1.5; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(28px, 3vw, 36px); font-weight: 670; letter-spacing: -.035em; }
h2 { font-size: 17px; font-weight: 640; letter-spacing: -.015em; }
h3 { font-size: 15px; font-weight: 640; }
a { color: var(--blue); }
button, input, select { font: inherit; }
label { color: #303743; font-size: 14px; font-weight: 600; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner, .workspace, .public-page { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.header-inner { display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 4px; }
.brand img { display: block; width: 143px; height: auto; }
.workspace, .public-page { display: grid; gap: 16px; margin-top: 35px; margin-bottom: 44px; }
.workspace > h1, .public-page > h1 { margin-bottom: 3px; }
.public-page { max-width: 590px; margin-top: clamp(40px, 8vw, 86px); }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.public-panel { padding: 24px; }
.file-name { overflow-wrap: anywhere; }

button, .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .button:hover { background: var(--blue-hover); }
button:disabled { opacity: .65; cursor: default; }
button, .button, input, select, .brand { touch-action: manipulation; }
:where(button, a, input, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.quiet { border-color: var(--border-control); background: var(--surface); color: var(--blue); }
.quiet:hover { border-color: #b8c8e0; background: var(--blue-soft); }
.quiet.danger { border-color: #e1c7cd; color: var(--danger); }
.quiet.danger:hover { border-color: #ccabb3; background: var(--danger-soft); }
.actions { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-actions .quiet { min-height: 34px; padding-inline: 11px; }
form { margin: 0; }

#upload { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: 12px; }
#clear-resume { grid-column: 2 / -1; justify-self: start; }
input[type='file'], input[type='text'], input[type='number'], select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--border-control);
  border-radius: 7px;
  background: var(--surface);
  color: #262d39;
}

input[type='file'] { width: 100%; padding: 3px 8px 3px 3px; background: var(--surface-alt); font-size: 14px; }
input::file-selector-button { margin-right: 9px; padding: 6px 11px; border: 0; border-radius: 5px; background: #e7edf6; color: #263952; font: inherit; font-weight: 560; cursor: pointer; }
input::file-selector-button:hover { background: #dce8f9; }
input[type='text'], input[type='number'], select { padding: 7px 10px; }

.list-state, .subtle { color: var(--muted); font-size: 14px; }
.pending-panel h2 { margin-bottom: 8px; }
#pending-items, #share-active { margin: 0; padding: 0; list-style: none; }
#pending-items:not(:empty) { margin-top: 13px; }
#pending-items li, #share-active li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-block: 9px; border-top: 1px solid var(--border); }
#pending-items li:last-child, #share-active li:last-child { padding-bottom: 0; }
#pending-items li span, #share-active li span { min-width: min(100%, 10rem); flex: 1; overflow-wrap: anywhere; }
.status-message:not(:empty) { margin-top: 12px; padding: 8px 11px; border-radius: 6px; background: var(--blue-soft); color: #244573; font-size: 14px; overflow-wrap: anywhere; }
.notice-error { margin-bottom: 16px; padding: 10px 12px; border: 1px solid #f0ccd2; border-radius: 7px; background: var(--danger-soft); color: #8b2533; }
progress { display: block; width: 100%; height: 8px; margin-top: 9px; accent-color: var(--blue); }
.upload-progress-info { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
#upload-speed { white-space: nowrap; }

.files-panel { padding: 0; }
.files-panel > .list-state, #more { margin: 16px 20px; }
.table-scroll { overflow: hidden; border-radius: inherit; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th { background: var(--surface-alt); color: #455065; font-size: 13px; font-weight: 650; }
td:first-child { width: 100%; min-width: 12ch; font-weight: 530; overflow-wrap: anywhere; }
td:nth-child(2), td:nth-child(3) { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
td:last-child { white-space: nowrap; }
td.file-row-actions > * + * { margin-left: 7px; }
td:last-child :is(button, .button) { min-height: 34px; padding-inline: 10px; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }

#share-dialog { width: min(100% - 32px, 540px); max-height: calc(100dvh - 32px); padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; box-shadow: 0 24px 64px #151c303d; }
#share-dialog::backdrop { background: #17223975; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-heading h2 { font-size: 21px; }
#share-name { margin: 5px 0 16px; overflow-wrap: anywhere; }
.share-guest { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--border); }
.share-mode p { margin-top: 5px; }
#share-internal { margin-top: 9px; }
.share-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.select-control { display: grid; gap: 4px; }
#share-ttl { width: 100%; }
#share-active:not(:empty) { margin-top: 12px; }
#share-active li span { min-width: 0; flex: 1 0 9rem; }
.share-link-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.share-link-actions .quiet { min-height: 34px; padding-inline: 10px; font-size: 13px; }
.share-legacy-note, .share-copy-fallback { flex-basis: 100%; width: 100%; }
.share-copy-fallback { margin-top: 5px; }
.share-copy-fallback input { width: 100%; }

@media (max-width: 760px) {
  .header-inner, .workspace, .public-page { width: calc(100% - 32px); }
  .header-inner { min-height: 60px; }
  .brand img { width: 120px; }
  .workspace, .public-page { margin-top: 25px; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 12px; padding: 14px 16px; }
  tbody tr + tr { border-top: 1px solid var(--border); }
  tbody td { display: block; min-width: 0; padding: 0 !important; border: 0; }
  tbody td:first-child, tbody td:last-child { grid-column: 1 / -1; min-width: 0; white-space: normal; }
  tbody td:last-child { margin-top: 3px; }
  tbody td:nth-child(2), tbody td:nth-child(3) { white-space: normal; }
  tbody td:nth-child(2)::before, tbody td:nth-child(3)::before { display: block; color: var(--muted); font-size: 11px; }
  tbody td:nth-child(2)::before { content: 'Размер'; }
  tbody td:nth-child(3)::before { content: 'Изменён'; }
  tbody td.file-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  tbody td.file-row-actions > * + * { margin-left: 0; }
}

@media (max-width: 480px) {
  .brand img { width: 110px; }
  .header-inner { gap: 10px; }
  .account-actions { justify-content: end; gap: 5px; }
  .account-actions .quiet { padding-inline: 6px; font-size: 12px; }
  .panel:not(.files-panel), #share-dialog { padding: 15px; }
  #upload { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #upload :is(button[type='submit'], #clear-resume) { grid-column: 1; justify-self: start; }
  #pending-items li span { flex-basis: 100%; }
}
