:root {
  color-scheme: light;
  --page: #f2f7f3;
  --surface: #fff;
  --ink: #152c2d;
  --muted: #506360;
  --line: #dee5de;
  --field: #b7c8c0;
  --brand: #006657;
  --brand-hover: #004e43;
  --brand-soft: #e5f3eb;
  --dark: #102f32;
  --dark-hover: #1d4546;
  --focus: #137d6c;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
::selection { background: #d3f1dd; color: #103f35; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1:focus { outline: none; }
h1, h2, h3, p, ol, dl, dd { margin: 0; }
h1, h2, h3, dd, .subtitle { overflow-wrap: anywhere; }
svg { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
.sr-only, .drop-zone input {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: -80px; left: 16px; z-index: 4;
  padding: 12px 16px; background: var(--surface); color: var(--brand);
}
.skip-link:focus { top: 16px; }
.loading-screen { display: grid; min-height: 72vh; place-items: center; color: var(--muted); }
h1 { font-size: 2.25rem; line-height: 1.13; letter-spacing: -.034em; font-weight: 720; }
h2 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.017em; font-weight: 680; }
h3 { font-size: .95rem; line-height: 1.35; font-weight: 680; }
.subtitle { margin-top: 9px; line-height: 1.5; color: var(--muted); }

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.22rem; font-weight: 740; letter-spacing: -.02em; }
.auth-icon, .recipient-icon, .file-icon, .empty-icon {
  display: inline-grid; place-items: center; flex: none;
  color: var(--brand); background: var(--brand-soft);
}
.brand-mark { width: 38px; height: 38px; display: block; flex: none; }
.brand-word { white-space: nowrap; }
.brand-doc { color: var(--brand); }
.sidebar .brand-doc { color: #b8e6b2; }
.public-shell { max-width: 1300px; min-height: 100svh; margin: auto; padding: 0 48px 44px; }
.public-header { min-height: 80px; display: flex; align-items: center; }
.auth-layout {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  min-height: min(650px, calc(100svh - 132px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.auth-content { width: min(100%, 470px); align-self: center; justify-self: center; padding: 52px 42px; }
.auth-icon { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 24px; }
.auth-content h1 { font-size: 2.1rem; }
.auth-content form { margin-top: 28px; }
.auth-content .button.primary { margin-top: 5px; }
.notice { margin: 24px 0 16px; color: var(--muted); line-height: 1.55; }
.auth-poster {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #123a3b; color: #f4fbf6; border-radius: 0 15px 15px 0;
  padding: 58px 48px 34px; min-height: 530px;
}
.poster-content { position: relative; z-index: 1; }
.poster-content h2 { color: #fff; font-weight: 710; font-size: 2.28rem; letter-spacing: -.034em; line-height: 1.12; }
.poster-steps { display: grid; gap: 13px; list-style: none; padding: 0; margin-top: 30px; color: #d0e8dd; font-size: .95rem; }
.poster-steps li { display: flex; gap: 11px; align-items: center; }
.poster-steps svg { color: #a4dbb7; }
.poster-art { height: 212px; width: 235px; align-self: flex-end; position: relative; margin: 18px 0 -4px; }
.art-paper { position: absolute; width: 127px; height: 163px; border-radius: 13px; }
.art-back { background: #449b80; left: 31px; top: 20px; transform: rotate(-16deg); }
.art-front { background: #edf6df; left: 65px; top: 15px; transform: rotate(12deg); padding: 42px 24px 0; box-shadow: 8px 13px 26px #09222464; }
.art-front i { height: 5px; background: #92beaa; border-radius: 3px; display: block; margin-bottom: 12px; }
.art-front i:first-child { width: 47%; background: #096155; height: 7px; margin-bottom: 20px; }
.art-front i:last-child { width: 67%; }
.art-check {
  position: absolute; display: grid; place-items: center; width: 56px; height: 56px; top: 132px; left: 154px;
  border-radius: 50%; background: #e4f4e7; color: #27613d; box-shadow: 0 7px 20px #09222466;
}

.workspace { min-height: 100svh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100svh; padding: 28px 18px 17px;
  display: flex; flex-direction: column; gap: 34px; background: var(--dark); color: #f4fbf6;
}
.sidebar :focus-visible { outline-color: #bde9bb; }
.brand-button {
  all: unset; align-self: flex-start; margin: 0 10px; cursor: pointer; border-radius: 8px;
}
.brand-button:focus-visible { outline: 2px solid #bde9bb; outline-offset: 4px; }
.nav { display: grid; gap: 4px; }
.nav button {
  display: flex; gap: 11px; align-items: center; min-height: 43px; text-align: left;
  padding: 8px 12px; border: 0; border-radius: 8px; background: transparent;
  color: #e4f0e8; font-size: .9rem; font-weight: 600;
}
.nav button:hover, .nav button[aria-current] { background: var(--dark-hover); color: #fff; }
.nav button[aria-current] svg { color: #c7edb9; }
.account { display: flex; align-items: center; gap: 9px; margin-top: auto; border-top: 1px solid #3e6260; padding: 16px 2px 0; }
.avatar {
  display: grid; place-items: center; flex: none; width: 33px; height: 33px; border-radius: 50%;
  background: #dff3dc; color: #12594c; font-size: .76rem; font-weight: 720; letter-spacing: -.02em;
}
.account-name { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .77rem; color: #bed6cd; }
.account-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: .87rem; }
.icon-button {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px;
  color: var(--muted); background: transparent;
}
.icon-button:hover { color: var(--brand); background: var(--brand-soft); }
.signout { color: #d9ede4; }
.signout:hover { color: #fff; background: var(--dark-hover); }

.work-main { padding: 56px 44px; }
.page { max-width: 1120px; margin: 0 auto; }
.page-narrow { max-width: 820px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.page-head > div { min-width: 0; }
.page-head > .button, .page-head > .status { flex: none; }
.surface, .list-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px;
  border: 1px solid transparent; border-radius: 8px; padding: 9px 15px; font-size: .9rem;
  font-weight: 650; line-height: 1.25; text-decoration: none; transition: background-color 150ms, color 150ms, border-color 150ms;
}
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-hover); }
.button.primary:disabled { background: #e4ebe5; color: #536760; }
.button.secondary { color: var(--brand); border-color: var(--field); background: var(--surface); }
.button.secondary:hover { background: var(--brand-soft); border-color: #85b9a5; }
.button.secondary:disabled { color: var(--muted); border-color: var(--line); background: var(--page); }
.button.quiet { color: var(--brand); background: transparent; min-height: 35px; padding: 6px 9px; }
.button.quiet:hover { background: var(--brand-soft); }
.button.quiet:disabled, .icon-button:disabled { opacity: .65; }
.button.back { margin: 0 0 16px -9px; justify-content: flex-start; }

.list-controls { min-height: 66px; padding: 12px 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.head-actions .status { margin-right: 4px; }
.overview {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 13px; overflow: hidden; margin-bottom: 23px;
}
.overview-filter {
  display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 13px 16px;
  text-align: left; min-width: 0; background: var(--surface); color: var(--ink); border: 0;
  box-shadow: inset 0 0 0 1px transparent; transition: background-color 150ms, box-shadow 150ms;
}
.overview-filter:hover { background: #f3f8f1; }
.overview-filter[aria-pressed="true"] { background: #e6f6e9; box-shadow: inset 0 0 0 1px var(--brand); }
.overview-filter:focus-visible { outline-offset: -4px; }
.overview-icon {
  display: grid; place-items: center; flex: none; height: 36px; width: 36px;
  border-radius: 8px; color: var(--brand); background: var(--brand-soft);
}
.overview-filter[data-filter="pending"] .overview-icon { color: #754706; background: #fcf0db; }
.overview-filter[data-filter="received"] .overview-icon { color: #266143; background: #e2f3e8; }
.overview-filter[data-filter="overdue"] .overview-icon { color: #8c3641; background: #fbe8ea; }
.overview-text { display: grid; gap: 3px; min-width: 0; }
.overview-label { font-size: .88rem; line-height: 1.2; font-weight: 630; overflow-wrap: anywhere; }
.overview-text strong { font-size: 1.37rem; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.list-controls h2 { padding-left: 3px; font-size: 1.1rem; }
.search { display: flex; align-items: center; flex: 0 1 250px; gap: 8px; position: relative; color: var(--muted); }
.search svg { position: absolute; left: 11px; pointer-events: none; }
.search input[type="search"] { min-width: 0; padding: 8px 10px 8px 37px; min-height: 39px; font-size: .9rem; }
.list-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 57px; border-top: 1px solid var(--line); padding: 8px 17px 8px 21px; font-size: .86rem; color: var(--muted);
}
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 315px; justify-content: center; padding: 32px 16px; border-top: 1px solid var(--line); }
.empty-icon { width: 44px; height: 44px; border-radius: 11px; }
.empty > .empty-icon { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 16px; }
.empty p { margin-top: 7px; color: var(--muted); line-height: 1.5; }
.empty .button { margin-top: 17px; }
.requests-table { border-collapse: collapse; width: 100%; table-layout: fixed; text-align: left; }
.requests-table th {
  padding: 11px 12px; background: #f3f7f2; border-block: 1px solid var(--line);
  color: var(--muted); font-size: .85rem; font-weight: 650;
}
.requests-table td { padding: 13px 12px; font-size: .9rem; overflow-wrap: anywhere; }
.requests-table th:first-child, .requests-table td:first-child { padding-left: 20px; }
.requests-table th:first-child { width: 37%; }
.requests-table th:nth-child(2) { width: 22%; }
.requests-table th:nth-child(3) { width: 19%; }
.requests-table th:last-child, .requests-table td:last-child { padding-right: 20px; }
.requests-table tr + tr td { border-top: 1px solid var(--line); }
.requests-table tbody tr:hover { background: #f7faf6; }
.mobile-label { display: none; }
.doc-link {
  display: inline-flex; align-items: center; gap: 10px; text-align: left; color: var(--ink);
  background: transparent; border: 0; border-radius: 8px; padding: 0; font-weight: 650; overflow-wrap: anywhere;
}
.doc-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.file-icon { width: 34px; height: 34px; border-radius: 8px; }
.status {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px;
  font-size: .79rem; line-height: 1.15; font-weight: 650; white-space: nowrap;
}
.status-pending { color: #724b16; background: #fcf0db; }
.status-overdue { color: #8c3641; background: #fbe8ea; }
.status-received { color: #266143; background: #e2f3e8; }

.form-stack { display: grid; gap: 17px; }
.form-stack label:not(.drop-zone), .field-row { display: grid; gap: 7px; }
label { font-size: .91rem; font-weight: 650; }
input:not([type="file"]), textarea {
  display: block; background: var(--surface); color: var(--ink); width: 100%; max-width: 100%;
  min-width: 0; min-height: 44px; border: 1px solid var(--field); border-radius: 8px; padding: 9px 11px; font-weight: 450;
}
input::placeholder, textarea::placeholder { color: #596d67; opacity: 1; }
input:focus, textarea:focus { outline-offset: 1px; }
textarea { resize: vertical; min-height: 105px; line-height: 1.5; }
.field-row { grid-template-columns: 1.15fr 1fr; gap: 15px; }
.optional { margin-left: 4px; color: var(--muted); font-size: .8rem; font-weight: 450; }
.field-help { color: var(--muted); font-size: .86rem; line-height: 1.45; }
label + .field-help { margin-top: -8px; }
.form-error { border-radius: 8px; padding: 11px 12px; background: #fbe8ea; color: #812633; line-height: 1.45; }
.work-form { padding: 26px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.detail-section { padding: 24px; margin-bottom: 14px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-heading p { color: var(--muted); line-height: 1.4; margin-top: 4px; overflow-wrap: anywhere; }
.share-control { display: flex; gap: 9px; margin-bottom: 8px; }
.share-control input { flex: 1; background: #f6f9f5; font-size: .89rem; }
.share-control .button { flex: none; }
.invite-action { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 13px; margin-top: 14px; }
.request-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 13px; margin-top: 16px; }
.request-meta dt { color: var(--muted); font-size: .86rem; display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.request-meta dd { line-height: 1.4; }
.instructions { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 16px; }
.instructions p { margin-top: 6px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-card { display: flex; align-items: center; gap: 12px; margin-top: 13px; min-width: 0; }
.file-text { display: grid; flex: 1; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.file-text span { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.file-card .button { flex: none; }

.recipient-shell { max-width: 840px; }
.recipient-main { max-width: 660px; margin: 26px auto 0; }
.recipient-head { display: flex; align-items: center; gap: 16px; margin-bottom: 23px; }
.recipient-head > div { min-width: 0; }
.recipient-head h1 { font-size: 2rem; }
.recipient-icon { width: 58px; height: 58px; border-radius: 13px; }
.success-icon { background: #e2f3e8; color: #266143; }
.drop-zone {
  display: grid; justify-items: center; text-align: center; gap: 6px; position: relative;
  cursor: pointer; padding: 22px 14px; border: 1px dashed #82aa98; border-radius: 10px;
  color: var(--brand-hover); background: #f4faf5; overflow-wrap: anywhere;
}
.drop-zone .empty-icon { margin-bottom: 5px; }
.drop-zone:hover, .drop-zone.dragging, .drop-zone.has-file { background: var(--brand-soft); border-color: var(--brand); }
.drop-zone:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop-zone strong, .drop-zone > span:last-child { min-width: 0; max-width: 100%; }
.drop-zone > span:last-child { color: var(--muted); font-size: .83rem; font-weight: 450; }
.error-screen { display: grid; justify-items: start; gap: 15px; }
.error-screen h1 { font-size: 1.65rem; }
.error-screen p { color: var(--muted); line-height: 1.55; }
.feedback:not(:empty) {
  position: fixed; z-index: 3; bottom: 18px; right: 20px; max-width: calc(100vw - 40px);
  background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 9px; box-shadow: 0 5px 18px #09222433;
}

@media (max-width: 1080px) {
  .workspace { grid-template-columns: 204px minmax(0, 1fr); }
  .work-main { padding: 42px 26px; }
  .list-controls { flex-wrap: wrap; }
  .overview-filter { padding: 12px; gap: 8px; }
  .search { flex-basis: 215px; }
  .requests-table th:first-child { width: 34%; }
  .requests-table th:nth-child(2) { width: 20%; }
  .requests-table th:nth-child(3) { width: 20%; }
}
@media (max-width: 760px) {
  .workspace { display: block; }
  .sidebar {
    position: static; height: auto; min-height: 68px; padding: 11px 18px; display: grid;
    grid-template-columns: auto 1fr; align-items: center; gap: 8px 14px;
  }
  .brand-button { margin: 0; align-self: center; }
  .nav { display: flex; grid-row: 2; grid-column: 1 / -1; }
  .nav button { min-height: 38px; }
  .account { justify-self: end; margin: 0; border: 0; padding: 0; }
  .work-main { padding: 31px 18px; }
  .page-head { margin-bottom: 22px; }
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-filter { min-height: 65px; }
  .public-shell { padding-inline: 22px; }
  .auth-poster { padding: 36px 24px 24px; }
  .poster-content h2 { font-size: 1.94rem; }
  .auth-content { padding: 34px 24px; }
  .auth-content h1 { font-size: 1.85rem; }
}
@media (max-width: 580px) {
  h1 { font-size: 1.82rem; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .head-actions { justify-content: flex-start; }
  .overview { margin-bottom: 18px; }
  .list-controls { flex-direction: column; align-items: stretch; padding: 12px; gap: 9px; }
  .search { flex-basis: auto; }
  .requests-table, .requests-table tbody { display: block; }
  .requests-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .requests-table tr {
    display: grid; grid-template-columns: 1fr auto; align-items: center; grid-template-areas: "doc doc" "person status" "date status";
    gap: 6px 8px; border-top: 1px solid var(--line); padding: 12px;
  }
  .requests-table td, .requests-table td:first-child, .requests-table td:last-child, .requests-table tr + tr td { padding: 0; border: 0; }
  .cell-doc { grid-area: doc; }
  .cell-person { grid-area: person; }
  .cell-date { grid-area: date; color: var(--muted); }
  .cell-status { grid-area: status; }
  .mobile-label { display: inline; }
  .work-form, .detail-section { padding: 17px; }
  .field-row { grid-template-columns: 1fr; }
  .share-control, .file-card { flex-wrap: wrap; }
  .share-control input { flex-basis: 100%; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-content { padding: 29px 22px 33px; }
  .auth-poster { min-height: 0; border-radius: 0 0 13px 13px; }
  .poster-content h2 { font-size: 1.5rem; }
  .poster-steps { margin-top: 19px; }
  .poster-art { display: none; }
  .public-header { min-height: 67px; }
  .recipient-main { margin-top: 16px; }
  .recipient-head h1 { font-size: 1.65rem; }
}
@media (max-width: 350px) {
  .account-name { display: none; }
  .public-shell { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
