:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  color: #1d1d1f;
  background: #f5f5f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --fill: #f2f2f7;
  --fill-hover: #e9e9ee;
  --label: #1d1d1f;
  --secondary-label: #6e6e73;
  --tertiary-label: #8e8e93;
  --line: rgba(60, 60, 67, 0.16);
  --line-strong: rgba(60, 60, 67, 0.28);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: #e8f3ff;
  --success: #248a3d;
  --success-soft: #eaf7ed;
  --danger: #d70015;
  --danger-hover: #e31b2c;
  --danger-soft: #fff0f1;
  --focus: rgba(0, 113, 227, 0.24);
  --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 12px 36px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 24px 64px rgba(0, 0, 0, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; background: var(--background); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { letter-spacing: 0; }
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 252, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--label);
  text-decoration: none;
  font-size: 17px;
  font-weight: 650;
  line-height: 1;
}
.brand img { width: 30px; height: 30px; object-fit: contain; }
.security-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--secondary-label);
  font-size: 12px;
  font-weight: 560;
}
.security-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.13);
}

.account-menu { position: relative; display: flex; align-items: center; }
.menu-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.1);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] { background: rgba(118, 118, 128, 0.18); }
.menu-toggle:active { transform: scale(0.94); }
.menu-toggle > span {
  display: block;
  width: 17px;
  height: 1.5px;
  border-radius: 999px;
  background: #3a3a3c;
  transition: transform 180ms var(--ease), opacity 140ms ease;
}
.menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.account-dropdown {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: 0;
  width: min(318px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(250, 250, 252, 0.88);
  box-shadow: var(--shadow-medium);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  animation: menu-in 180ms var(--ease);
  transform-origin: top right;
}
.account-identity { min-width: 0; padding: 10px 12px 12px; }
.account-identity small,
.account-identity strong { display: block; }
.account-identity small { margin-bottom: 4px; color: var(--secondary-label); font-size: 11px; }
.account-identity strong {
  overflow: hidden;
  color: var(--label);
  font-size: 13px;
  font-weight: 590;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-item {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--label);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}
.menu-item:hover { background: rgba(118, 118, 128, 0.11); }
.menu-item > span:last-child,
.menu-item strong,
.menu-item small { display: block; min-width: 0; }
.menu-item strong { font-size: 13px; font-weight: 590; }
.menu-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--secondary-label);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-item-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
}
.folder-icon { position: relative; }
.folder-icon::before {
  content: "";
  width: 17px;
  height: 12px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
}
.folder-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 7px;
  width: 8px;
  height: 4px;
  border: 1.6px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
}
.menu-divider { height: 1px; margin: 6px 4px; background: var(--line); }
.danger-menu-item { color: var(--danger); }
.danger-menu-item .menu-item-icon { background: var(--danger-soft); color: var(--danger); }
.danger-menu-item:hover { background: var(--danger-soft); }

.app-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}
.workspace { width: 100%; animation: view-in 260ms var(--ease); }
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 24px;
}
.page-heading h1 {
  margin: 0 0 7px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 700;
}
.page-heading p { margin: 0; color: var(--secondary-label); font-size: 15px; line-height: 1.45; }
.retention-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.1);
  color: var(--secondary-label);
  font-size: 12px;
  font-weight: 590;
  white-space: nowrap;
}

.panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.login-workspace { display: grid; place-items: center; min-height: calc(100vh - 180px); }
.login-panel { width: min(430px, 100%); padding: 36px; }
.login-panel > img {
  display: block;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  object-fit: contain;
}
.login-heading h1 { margin: 0 0 7px; font-size: 27px; line-height: 1.2; font-weight: 700; }
.login-heading p { margin: 0; color: var(--secondary-label); line-height: 1.45; }
.login-panel form { margin-top: 28px; }
.login-panel form > label {
  display: block;
  margin: 18px 0 7px;
  color: var(--label);
  font-size: 13px;
  font-weight: 590;
}
.login-panel form > label:first-child { margin-top: 0; }
.login-panel form > input,
.share-link-row input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  outline: 0;
  background: var(--fill);
  color: var(--label);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.login-panel form > input:hover,
.share-link-row input:hover { background: #ededf2; }
.login-panel form > input:focus,
.share-link-row input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px var(--focus);
}
.login-error,
.delivery-error {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
}
.login-session-note { margin: 18px 0 0; color: var(--secondary-label); text-align: center; font-size: 12px; }

.drop-zone {
  width: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 28px;
  border: 1.5px dashed rgba(0, 113, 227, 0.38);
  border-radius: 16px;
  background: rgba(0, 113, 227, 0.035);
  color: var(--label);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease);
}
.drop-zone:hover,
.drop-zone.dragging { border-color: var(--blue); background: rgba(0, 113, 227, 0.07); }
.drop-zone:active { transform: scale(0.995); }
.drop-zone strong { font-size: 18px; font-weight: 650; }
.drop-zone span:last-child { color: var(--secondary-label); font-size: 13px; }
.upload-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 16px rgba(0, 113, 227, 0.24);
  font-size: 27px;
  line-height: 1;
}

.file-section { margin-top: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading strong { font-size: 15px; font-weight: 650; }
.text-button {
  padding: 7px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--blue);
  font-weight: 590;
  cursor: pointer;
}
.text-button:hover { background: var(--blue-soft); }
.file-list { display: grid; gap: 1px; overflow: hidden; border-radius: 14px; background: var(--line); }
.file-row {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 0;
  border-radius: 0;
  background: var(--surface-strong);
}
.file-type {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}
.file-copy { min-width: 0; }
.file-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 590; }
.file-copy span { display: block; margin-top: 3px; color: var(--secondary-label); font-size: 12px; }
.remove-file,
.download-file {
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  background: var(--fill);
  color: var(--label);
  text-decoration: none;
  font-size: 13px;
  font-weight: 590;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.remove-file:hover { background: var(--danger-soft); color: var(--danger); }
.download-file:hover { background: var(--blue-soft); color: var(--blue); }

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: 28px;
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}
.switch-label { display: flex; align-items: center; gap: 13px; cursor: pointer; }
.switch-label input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 50px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e1e1e6;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: background 180ms ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
  transition: transform 220ms var(--ease);
}
.switch-label input:checked + .switch { background: #34c759; }
.switch-label input:checked + .switch::after { transform: translateX(20px); }
.switch-label input:focus-visible + .switch { box-shadow: 0 0 0 4px var(--focus); }
.switch-label strong,
.switch-label small { display: block; }
.switch-label strong { font-size: 15px; font-weight: 590; }
.switch-label small { margin-top: 3px; color: var(--secondary-label); line-height: 1.35; }
.password-field label,
.unlock-panel label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 590; }

.input-action,
.search-input {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--fill);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.input-action:hover,
.search-input:hover { background: #ededf2; }
.input-action:focus-within,
.search-input:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px var(--focus);
}
.input-action input,
.search-input input {
  min-width: 0;
  flex: 1;
  height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--label);
}
.input-action button {
  align-self: stretch;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 590;
  cursor: pointer;
}
.search-input { min-height: 46px; }
.search-input span { padding-left: 13px; color: var(--secondary-label); font-size: 19px; }
.search-input input { padding-left: 9px; }

.form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 20px; margin-top: 28px; }
.form-error { margin: 0 auto 0 0; color: var(--danger); font-size: 14px; line-height: 1.4; }
.primary-button,
.secondary-button,
.danger-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 590;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
}
.primary-button { background: var(--blue); color: #fff; }
.primary-button:hover:not(:disabled) { background: var(--blue-hover); }
.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.danger-button:active:not(:disabled) { transform: scale(0.98); }
.primary-button:disabled { opacity: 0.42; cursor: not-allowed; }
.primary-button.compact { min-height: 42px; white-space: nowrap; }
.primary-button.full { width: 100%; margin-top: 20px; }
.secondary-button { border-color: var(--line); background: rgba(255, 255, 255, 0.72); color: var(--label); }
.secondary-button:hover:not(:disabled) { border-color: var(--line-strong); background: #fff; }
.text-link { color: var(--blue); font-weight: 590; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.progress-area { margin-top: 24px; }
.progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--secondary-label); font-size: 13px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #e5e5ea; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width 220ms var(--ease); }

.success-panel { margin-top: 22px; text-align: center; }
.success-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 25px;
  font-weight: 650;
}
.success-panel h2 { margin: 0 0 7px; font-size: 24px; }
.success-panel > p { margin: 0 0 22px; color: var(--secondary-label); }
.share-link-row { display: flex; gap: 10px; max-width: 760px; margin: 0 auto; }
.share-link-row input { min-width: 0; flex: 1; height: 44px; color: var(--secondary-label); }
.success-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }

.delivery-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.delivery-main { min-width: 0; }
.delivery-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.delivery-heading h2 { margin: 4px 0 5px; font-size: 24px; font-weight: 680; }
.delivery-heading p { margin: 0; color: var(--secondary-label); }
.step-label { color: var(--success); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.field-label { display: block; margin-bottom: 7px; color: var(--label); font-size: 13px; font-weight: 590; }
.field-hint { margin: 7px 0 0; color: var(--secondary-label); font-size: 12px; }
.contact-status,
.archive-status {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 20px;
  border-radius: 13px;
  background: var(--fill);
  color: var(--secondary-label);
  text-align: center;
}
.contact-status.error-state,
.archive-error { flex-direction: column; color: var(--danger); }
.spinner.small { width: 22px; height: 22px; margin: 0; border-width: 2px; }
.contact-results { display: grid; gap: 8px; max-height: 338px; overflow: auto; margin-top: 16px; padding: 1px 3px 1px 1px; }
.contact-option {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--fill);
  color: var(--label);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.contact-option:hover { background: #eaeaef; }
.contact-option.selected { border-color: var(--blue); background: var(--blue-soft); }
.contact-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d8d8dd;
  color: #3a3a3c;
  font-size: 13px;
  font-weight: 700;
}
.contact-option.selected .contact-avatar { background: var(--blue); color: #fff; }
.contact-copy { min-width: 0; }
.contact-copy strong,
.contact-copy span { display: block; }
.contact-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 590; }
.contact-copy span { margin-top: 3px; color: var(--secondary-label); font-size: 12px; }
.contact-check,
.department-check {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1.5px solid #aeaeb2;
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
}
.contact-option.selected .contact-check,
.department-option.selected .department-check { border-color: var(--blue); background: var(--blue); color: #fff; }
.delivery-error { margin-bottom: 0; }
.delivery-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.delivery-summary { position: sticky; top: 78px; padding: 22px; }
.summary-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 22px;
}
.delivery-summary h3 { margin: 15px 0 6px; font-size: 17px; }
.delivery-summary > p { margin: 0; color: var(--secondary-label); font-size: 13px; line-height: 1.45; }
.delivery-summary dl { margin: 20px 0 0; }
.delivery-summary dl div { padding: 12px 0; border-top: 1px solid var(--line); }
.delivery-summary dt { color: var(--secondary-label); font-size: 12px; }
.delivery-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--label); font-size: 13px; font-weight: 590; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: backdrop-in 180ms ease;
}
.modal-card {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(250, 250, 252, 0.94);
  box-shadow: var(--shadow-large);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  animation: sheet-in 240ms var(--ease);
}
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.modal-heading h2 { margin: 5px 0 6px; font-size: 23px; line-height: 1.2; }
.modal-heading p { margin: 0; color: var(--secondary-label); line-height: 1.45; }
.modal-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.13);
  color: var(--secondary-label);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}
.modal-close:hover { background: rgba(118, 118, 128, 0.22); color: var(--label); }
.department-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 20px 0; }
.department-option {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--fill);
  color: var(--label);
  text-align: left;
  font-weight: 590;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.department-option:hover { background: #eaeaef; }
.department-option.selected { border-color: var(--blue); background: var(--blue-soft); }
.department-check { flex: 0 0 auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }

.archive-heading { align-items: center; }
.archive-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.archive-panel { padding: 0; overflow: hidden; }
.archive-breadcrumbs {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.archive-breadcrumbs button {
  padding: 6px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--blue);
  font-weight: 590;
  cursor: pointer;
}
.archive-breadcrumbs button:hover { background: var(--blue-soft); }
.archive-breadcrumbs button[aria-current="page"] { background: transparent; color: var(--label); cursor: default; }
.breadcrumb-separator { color: #aeaeb2; font-size: 19px; }
.archive-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: rgba(242, 242, 247, 0.58); }
.archive-search-input { flex: 1; background: rgba(255, 255, 255, 0.78); }
.archive-status { min-height: 190px; margin: 0; border-radius: 0; background: transparent; }
.archive-items { display: grid; gap: 0; }
.archive-folder-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}
.archive-folder-row.without-menu { grid-template-columns: minmax(0, 1fr); }
.archive-folder-row:last-child { border-bottom: 0; }
.archive-folder {
  width: 100%;
  min-width: 0;
  min-height: 74px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  border: 0;
  background: transparent;
  color: var(--label);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}
.archive-folder:hover { background: rgba(118, 118, 128, 0.075); }
.archive-folder-icon {
  position: relative;
  width: 41px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #64a9f3;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.archive-folder-icon::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 3px;
  width: 19px;
  height: 8px;
  border: 0;
  border-radius: 5px 5px 0 0;
  background: #64a9f3;
}
.archive-folder-copy { min-width: 0; }
.archive-folder-copy strong,
.archive-folder-copy small { display: block; }
.archive-folder-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 590; }
.archive-folder-copy small { margin-top: 4px; color: var(--secondary-label); font-size: 12px; }
.archive-folder-arrow { color: #aeaeb2; font-size: 22px; text-align: right; }
.archive-folder-actions { position: relative; display: grid; place-items: center; }
.archive-folder-menu-button {
  width: 36px;
  height: 36px;
  padding: 0 0 7px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--secondary-label);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.archive-folder-menu-button:hover,
.archive-folder-menu-button[aria-expanded="true"] { background: rgba(118, 118, 128, 0.13); color: var(--label); }
.archive-folder-menu {
  position: absolute;
  z-index: 8;
  top: 54px;
  right: 12px;
  width: 220px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 13px;
  background: rgba(250, 250, 252, 0.94);
  box-shadow: var(--shadow-medium);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  animation: menu-in 150ms var(--ease);
}
.archive-folder-menu.open-upward { top: auto; bottom: 54px; }
.archive-folder-menu-item { width: 100%; padding: 10px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--label); text-align: left; font-weight: 590; cursor: pointer; }
.archive-folder-menu-item:hover { background: var(--fill); }
.archive-folder-menu-divider { height: 1px; margin: 5px 6px; background: var(--line); }
.archive-folder-delete { color: var(--danger); }
.archive-folder-delete:hover { background: var(--danger-soft); }
.edit-folder-modal-card { width: min(500px, 100%); }
.edit-folder-field {
  display: grid;
  gap: 8px;
  padding: 22px 0 18px;
}
.edit-folder-field label {
  color: var(--label);
  font-size: 13px;
  font-weight: 590;
}
.add-folder-files-modal-card { width: min(620px, 100%); }
.archive-add-drop-zone {
  width: 100%;
  min-height: 142px;
  display: grid;
  place-items: center;
  gap: 5px;
  margin-top: 20px;
  padding: 22px;
  border: 1px dashed rgba(0, 113, 227, 0.38);
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--label);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.archive-add-drop-zone:hover,
.archive-add-drop-zone.dragging { border-color: var(--blue); background: rgba(0, 113, 227, 0.13); transform: scale(1.005); }
.archive-add-drop-zone span:last-child { color: var(--secondary-label); font-size: 12px; }
.archive-add-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 21px; line-height: 1; }
.archive-add-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; }
.archive-add-heading p { margin: 0; color: var(--secondary-label); font-size: 13px; }
.archive-add-empty { margin: 0; padding: 16px; border-radius: 13px; background: var(--fill); color: var(--secondary-label); text-align: center; font-size: 13px; }
.archive-add-file-list { max-height: 230px; overflow-y: auto; }
.archive-add-error { margin-top: 12px; }
.delete-folder-modal-card { width: min(500px, 100%); }
.danger-label { color: var(--danger); }
.delete-folder-warning { margin: 20px 0; color: var(--secondary-label); line-height: 1.55; }
.danger-button { background: var(--danger); color: #fff; }
.danger-button:hover { background: var(--danger-hover); }
.danger-button:disabled { opacity: 0.5; cursor: wait; }
.archive-items > .file-row { min-height: 72px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 18px; background: rgba(255, 255, 255, 0.74); }
.archive-items > .file-row:last-child { border-bottom: 0; }

.receive-workspace { max-width: 920px; margin: 28px auto 0; }
.status-panel,
.unlock-panel { max-width: 510px; margin: 0 auto; padding: 42px 34px; text-align: center; }
.status-panel h1,
.unlock-panel h1 { margin: 13px 0 8px; font-size: 27px; line-height: 1.2; }
.status-panel p,
.unlock-panel > p { margin: 0; color: var(--secondary-label); line-height: 1.5; }
.spinner {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid #d1d1d6;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.error-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 23px;
  font-weight: 700;
}
.unlock-panel img { width: 56px; height: 56px; object-fit: contain; }
.unlock-panel form { margin-top: 24px; text-align: left; }
.unlock-panel .form-error { margin-top: 10px; }
.download-panel { padding: 18px; }
.download-list .file-row { min-height: 68px; }
.expiry-note { display: flex; justify-content: space-between; gap: 16px; padding: 18px 4px 2px; margin-top: 14px; border-top: 1px solid var(--line); color: var(--secondary-label); font-size: 13px; }
.expiry-note strong { color: var(--label); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.9);
  color: #fff;
  box-shadow: var(--shadow-medium);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 560;
  text-align: center;
  animation: toast-in 220ms var(--ease);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96) translateY(-3px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes sheet-in { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px) scale(0.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

@media (max-width: 720px) {
  .app-header { height: 54px; padding: 0 14px; }
  .brand { font-size: 16px; }
  .brand img { width: 28px; height: 28px; }
  .security-label { display: none; }
  .app-shell { width: min(100% - 24px, 1120px); padding: 30px 0 52px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { font-size: 14px; }
  .panel { padding: 20px; border-radius: 18px; }
  .login-workspace { min-height: calc(100vh - 120px); }
  .login-panel { padding: 26px 22px; }
  .drop-zone { min-height: 200px; padding: 22px 16px; }
  .drop-zone strong { font-size: 17px; }
  .settings-row { grid-template-columns: 1fr; gap: 20px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .primary-button { width: 100%; }
  .share-link-row { flex-direction: column; }
  .success-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  #download-all { width: 100%; }
  .file-row { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 9px 10px; }
  .remove-file,
  .download-file { padding: 7px 9px; }
  .delivery-layout { grid-template-columns: 1fr; }
  .delivery-heading { flex-direction: column; }
  .delivery-heading .secondary-button { width: 100%; }
  .delivery-summary { position: static; grid-row: 1; }
  .delivery-actions { flex-direction: column-reverse; }
  .delivery-actions button { width: 100%; }
  .modal-backdrop { align-items: end; padding: 10px; }
  .modal-card { width: 100%; max-height: calc(100vh - 20px); padding: 20px; border-radius: 22px; }
  .department-options { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
  .archive-heading-actions { width: 100%; }
  .archive-heading-actions button { flex: 1; }
  .archive-toolbar { align-items: stretch; flex-direction: column; }
  .archive-toolbar .secondary-button { width: 100%; }
  .archive-breadcrumbs { padding-inline: 14px; }
  .archive-folder-row { grid-template-columns: minmax(0, 1fr) 50px; }
  .archive-folder { grid-template-columns: 40px minmax(0, 1fr) 20px; padding-inline: 14px; }
  .archive-folder-menu { right: 8px; }
  .archive-folder-icon { width: 38px; height: 30px; }
  .archive-items > .file-row { padding-inline: 12px; }
  .receive-workspace { margin-top: 8px; }
  .status-panel,
  .unlock-panel { padding: 34px 22px; }
  .expiry-note { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
