:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --paper-deep: #ebe6d9;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #152825;
  --ink-soft: #52645f;
  --line: #d9d7cb;
  --line-strong: #babfb4;
  --forest: #17352f;
  --forest-light: #28584d;
  --mint: #c8e8d8;
  --mint-strong: #8fd0b2;
  --coral: #ef7054;
  --coral-dark: #c84f38;
  --gold: #f1c75b;
  --danger: #b63e33;
  --danger-soft: #f9e5df;
  --shadow-sm: 0 2px 8px rgba(21, 40, 37, 0.08);
  --shadow-md: 0 16px 48px rgba(21, 40, 37, 0.12);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 53, 47, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 53, 47, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--forest);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  position: relative;
  z-index: 10;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(21, 40, 37, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1.5px solid var(--forest);
  border-radius: 13px;
  background: var(--mint);
  box-shadow: 3px 3px 0 var(--forest);
}

.brand-mark svg {
  width: 27px;
  fill: var(--forest);
}

.brand-mark .brand-mark-arrow {
  fill: var(--surface);
}

.brand-name {
  display: block;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.private-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.private-badge__dot {
  width: 8px;
  height: 8px;
  border: 2px solid rgba(40, 88, 77, 0.18);
  border-radius: 999px;
  background: #48a881;
  box-shadow: 0 0 0 3px rgba(72, 168, 129, 0.13);
}

main {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 92px);
  margin: 0 auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--forest-light);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button--primary {
  color: #fff;
  background: var(--forest);
  box-shadow: 3px 3px 0 var(--mint-strong);
}

.button--primary:hover:not(:disabled) {
  background: var(--forest-light);
}

.button--quiet {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.58);
}

.button--quiet:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button--danger {
  color: #fff;
  background: var(--danger);
}

.button--danger:hover:not(:disabled) {
  background: #983229;
}

.button--small {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.8rem;
}

.button--full {
  width: 100%;
}

.button-icon {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.button-arrow {
  width: 18px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.status-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 92px);
  flex-direction: column;
  text-align: center;
}

.status-view h1 {
  margin: 20px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
}

.status-view p {
  max-width: 430px;
  margin-bottom: 22px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.loader {
  width: 29px;
  height: 29px;
  border: 3px solid var(--line);
  border-top-color: var(--coral);
  border-radius: 999px;
  animation: spin 750ms linear infinite;
}

.loader--small {
  width: 19px;
  height: 19px;
  border-width: 2px;
}

.status-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 20px;
}

.status-icon--error {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-icon svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.login-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 92px);
  padding: 48px 16px 64px;
}

.login-card {
  width: min(100%, 400px);
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.login-card__copy {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  height: 52px;
  padding: 0 50px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface-strong);
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.password-field input:hover {
  border-color: #9ca69d;
}

.password-field input:focus {
  border-color: var(--forest-light);
  outline: none;
  box-shadow: 0 0 0 4px rgba(143, 208, 178, 0.35);
}

.password-toggle {
  display: grid;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
  background: var(--paper);
}

.password-toggle svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.form-error {
  min-height: 22px;
  margin: 7px 0 7px;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard {
  padding: 68px 0 76px;
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 42px;
}

.dashboard-heading h1 {
  margin-bottom: 9px;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.dashboard-heading > div:first-child > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.dashboard-stats {
  display: flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow-sm);
}

.stat {
  display: flex;
  min-width: 100px;
  padding: 15px 19px;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat--wide {
  min-width: 140px;
}

.stat__value {
  margin-bottom: 3px;
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.stat__value--date {
  font-size: 0.9rem;
  line-height: 1.45;
}

.stat__label {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.upload-panel,
.files-section {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.upload-panel {
  position: relative;
  margin-bottom: 26px;
  overflow: hidden;
}

.upload-panel::after {
  position: absolute;
  top: -35px;
  right: -31px;
  width: 120px;
  height: 80px;
  border: 14px solid rgba(239, 112, 84, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: rotate(-16deg);
}

.section-heading {
  display: flex;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 23px;
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  letter-spacing: -0.04em;
}

.upload-security-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(40, 88, 77, 0.18);
  border-radius: 999px;
  color: var(--forest-light);
  background: var(--mint);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.upload-security-note svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.drop-zone {
  display: flex;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: center;
  min-height: 176px;
  gap: 20px;
  padding: 30px;
  border: 2px dashed #a8b5aa;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(200, 232, 216, 0.18), rgba(255, 253, 248, 0.7)),
    var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--forest-light);
  background: rgba(200, 232, 216, 0.35);
}

.drop-zone.is-dragging {
  transform: scale(1.005);
}

.drop-zone__icon {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--forest);
  border-radius: 20px;
  color: var(--forest);
  background: var(--mint);
  box-shadow: 4px 4px 0 var(--forest);
}

.drop-zone__icon svg {
  width: 37px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drop-zone p {
  margin-bottom: 5px;
  line-height: 1.45;
}

.drop-zone p:first-child {
  font-size: 1.05rem;
}

.drop-zone p span {
  color: var(--coral-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.drop-zone__help {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.upload-list:not(:empty) {
  display: grid;
  margin-top: 18px;
  gap: 9px;
}

.upload-row {
  display: grid;
  align-items: center;
  padding: 12px 13px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.upload-row__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--forest);
  background: var(--mint);
}

.upload-row__icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.upload-row.is-error .upload-row__icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.upload-row.is-done .upload-row__icon {
  color: var(--forest-light);
  background: var(--mint);
}

.upload-row__details {
  min-width: 0;
}

.upload-row__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
}

.upload-row__name {
  overflow: hidden;
  font-size: 0.81rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-row__status {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.69rem;
}

.upload-row.is-error .upload-row__status {
  color: var(--danger);
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 130ms linear;
}

.progress-bar.is-indeterminate {
  width: 42%;
  animation: indeterminate 1s ease-in-out infinite;
}

.upload-row.is-done .progress-bar {
  width: 100%;
  background: var(--mint-strong);
}

.upload-row.is-error .progress-track {
  background: var(--danger-soft);
}

.upload-row__actions {
  display: flex;
  gap: 5px;
}

.icon-button {
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--paper);
}

.icon-button--danger:hover {
  border-color: #efb0a3;
  color: var(--danger);
  background: var(--danger-soft);
}

.icon-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.section-heading--files {
  margin-bottom: 27px;
}

.files-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.file-card {
  display: flex;
  min-width: 0;
  padding: 20px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.file-card:hover {
  border-color: #b7beb4;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.file-card__top {
  display: grid;
  align-items: start;
  grid-template-columns: 45px minmax(0, 1fr) 35px;
  gap: 12px;
}

.file-type-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 13px;
  color: var(--forest);
  background: var(--mint);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.file-type-icon[data-kind="image"] {
  color: #76412c;
  background: #f8d8ad;
}

.file-type-icon[data-kind="video"],
.file-type-icon[data-kind="audio"] {
  color: #6e3a4c;
  background: #f1c7d4;
}

.file-type-icon[data-kind="archive"] {
  color: #5f5121;
  background: #f6e2a7;
}

.file-type-icon[data-kind="document"] {
  color: #25466a;
  background: #cbdcf0;
}

.file-card__identity {
  min-width: 0;
  padding-top: 3px;
}

.file-card__name {
  margin-bottom: 6px;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card__meta {
  margin-bottom: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-field {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 39px;
  margin: 17px 0 13px;
  padding-left: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.share-field__link {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-field__copy {
  display: grid;
  width: 39px;
  height: 37px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--forest);
  background: transparent;
  cursor: pointer;
}

.share-field__copy:hover {
  background: var(--mint);
}

.share-field__copy svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.file-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-card__download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.file-card__download:hover {
  color: var(--forest-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-card__download svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.file-card__copy-button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid var(--forest);
  border-radius: 9px;
  color: #fff;
  background: var(--forest);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.file-card__copy-button:hover {
  background: var(--forest-light);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  padding: 40px 20px;
  flex-direction: column;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state__art {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 22px;
  color: var(--forest);
  background: var(--mint);
  transform: rotate(-3deg);
}

.empty-state__art svg {
  width: 59px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.empty-state h3 {
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.empty-state p {
  max-width: 380px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.text-button {
  padding: 3px 0;
  border: 0;
  color: var(--coral-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast-region {
  display: flex;
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  align-items: flex-end;
  max-width: min(380px, calc(100% - 32px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid #29463f;
  border-radius: 12px;
  color: #fff;
  background: var(--forest);
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

.toast::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--mint-strong);
  content: "";
}

.toast--error::before {
  background: var(--coral);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.confirm-dialog {
  width: min(430px, calc(100% - 30px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.confirm-dialog::backdrop {
  background: rgba(12, 28, 25, 0.56);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  padding: 30px;
}

.confirm-dialog__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 14px;
  color: var(--danger);
  background: var(--danger-soft);
}

.confirm-dialog__icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.confirm-dialog h2 {
  margin-bottom: 9px;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.confirm-dialog p {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.6;
}

.confirm-dialog p strong {
  color: var(--ink);
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes indeterminate {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(250%); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 920px) {
  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-stats {
    align-self: flex-start;
  }
}

@media (max-width: 700px) {
  .site-header,
  main {
    width: min(100% - 30px, 1180px);
  }

  .site-header {
    min-height: 78px;
  }

  .private-badge {
    display: none;
  }

  .button--small {
    padding: 0 11px;
  }

  .dashboard {
    padding-top: 48px;
  }

  .dashboard-heading {
    margin-bottom: 30px;
  }

  .dashboard-stats {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat--wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .file-grid {
    grid-template-columns: 1fr;
  }

  .upload-panel,
  .files-section {
    border-radius: 22px;
  }
}

@media (max-width: 500px) {
  .site-header,
  main {
    width: min(100% - 22px, 1180px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand-mark svg {
    width: 24px;
  }

  .header-actions .button-icon {
    display: none;
  }

  .login-layout {
    padding: 32px 0 48px;
  }

  .login-card {
    padding: 26px 20px;
  }

  .dashboard-heading h1 {
    font-size: 2.65rem;
  }

  .upload-panel,
  .files-section {
    padding: 22px 16px;
  }

  .upload-security-note {
    display: none;
  }

  .drop-zone {
    min-height: 205px;
    padding: 25px 20px;
    flex-direction: column;
    text-align: center;
  }

  .drop-zone__icon {
    width: 58px;
    height: 58px;
  }

  .upload-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .upload-row__icon {
    width: 34px;
    height: 34px;
  }

  .file-card {
    padding: 17px 15px;
  }

  .file-card__top {
    grid-template-columns: 42px minmax(0, 1fr) 35px;
    gap: 10px;
  }

  .file-type-icon {
    width: 42px;
    height: 42px;
  }

  .confirm-dialog form {
    padding: 24px 20px;
  }

  .confirm-dialog__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
  }
}

@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;
  }
}
