/* Keep the workspace width stable when overlays lock page scrolling. */
html { scrollbar-gutter: stable; }

/* Choose a stable public shell before deferred scripts and API data arrive. */
html[data-session-pending] .guest-only {
  display: none !important;
}
html[data-session-pending] .auth-only[hidden] {
  display: revert !important;
}
.localized-site {
  --shadow: 0 6px 20px rgba(32, 28, 73, 0.08);
}
.localized-site.dark {
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* Temporarily hide web signup entry points; keep registration code for later. */
a[href$="sign-up"],
.auth-switch:has(a[href$="sign-up"]),
#signUpForm button[type="submit"] {
  display: none !important;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
h2 {
  letter-spacing: -0.025em;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  /* backdrop-filter: blur(18px); */
}
.navigation-hidden .site-header {
  position: absolute;
  width: 100%;
  background: transparent;
  border-bottom: 0;
}
.header-inner {
  width: min(1280px, calc(100% - 48px));
  height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 34px;
}
.navigation-hidden .header-inner {
  width: calc(100% - 64px);
  margin-inline: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.header-logo {
  display: block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 12px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #268cff, var(--accent));
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.26);
}
.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.main-nav {
  margin: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.main-nav a {
  position: relative;
  padding: 10px 15px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
  background: var(--violet-soft);
}
.nav-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--violet);
  border-radius: 9px;
  font-size: 10px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 9px 5px 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: 15px;
}
@media (min-width: 1201px) {
  .user-button[href$="account"] #headerUserLabel {
    display: inline-block;
    inline-size: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
  }
}
.user-button:hover {
  background: var(--violet-soft);
  color: var(--ink);
}
.user-button[href$="sign-in"] {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
  white-space: nowrap;
}
.user-button[href$="sign-in"] #headerAvatar {
  display: none;
}
.user-button[href$="sign-in"] #headerUserLabel {
  display: inline;
}
.user-button[href$="sign-in"]:hover {
  background: var(--accent);
  color: #fff;
}
.user-button[href$="sign-in"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 0;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}
.button {
  min-height: 45px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s,
    background 0.18s,
    box-shadow 0.18s;
}
.button:hover {
  transform: translateY(-1px);
}
.button-primary {
  color: #fff;
  background: var(--button-fill);
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.14);
}
.button-primary:hover {
  background: var(--button-hover);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.18);
}
.button-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.button-secondary {
  background: var(--surface);
  border-color: var(--border);
}
.button-ghost {
  background: transparent;
  color: var(--accent-text);
}
.button-danger {
  color: #fff;
  background: var(--red);
}
.button-compact {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 13px;
}
.button-large {
  min-height: 54px;
  padding: 0 26px;
}
.button-block {
  width: 100%;
}
.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  font-size: 23px;
  cursor: pointer;
}
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, #147bf5, #6caaf7);
  border-radius: 50%;
  font-weight: 800;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-small {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.avatar-large {
  width: 58px;
  height: 58px;
}
.avatar-xl {
  width: 78px;
  height: 78px;
  font-size: 24px;
}
.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(33, 31, 64, 0.025);
}

/* Home */
.home-hero {
  position: relative;
  min-height: 690px;
  padding: 90px 0 110px;
  overflow: hidden;
  background: linear-gradient(160deg, #faf9ff 0%, #f4f1ff 60%, #eef8ff 100%);
}
.dark .home-hero {
  background: linear-gradient(155deg, #101725 0%, #121b2b 58%, #10253a 100%);
}
.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.7;
}
.ambient-one {
  width: 500px;
  height: 500px;
  top: -230px;
  left: -180px;
  background: #d9eaff;
}
.ambient-two {
  width: 450px;
  height: 450px;
  right: -180px;
  bottom: -250px;
  background: #c9ecff;
}
.dark .ambient-one {
  background: #26558f;
  opacity: 0.35;
}
.dark .ambient-two {
  background: #1f6f9f;
  opacity: 0.32;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 70px;
  z-index: 1;
}
.hero-copy h1 {
  max-width: 680px;
}
.hero-grid > * {
  min-width: 0;
}
.hero-lead {
  max-width: 570px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 19px;
}
.hero-actions {
  display: flex;
  gap: 12px;
}
.hero-note {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}
.hero-note span {
  color: var(--mint);
  font-weight: 900;
}
.cloud-visual {
  position: relative;
  width: 470px;
  max-width: 100%;
  height: 470px;
  margin: auto;
}
.visual-orbit {
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
}
.orbit-two {
  inset: 85px;
  border-style: dashed;
}
.visual-main {
  position: absolute;
  inset: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(150deg, #2690ff, #315de9);
  border: 8px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  box-shadow: 0 35px 80px rgba(var(--accent-rgb), 0.3);
}
.visual-cloud {
  font-size: 52px;
  line-height: 1;
}
.visual-main strong {
  margin-top: 8px;
  font-size: 30px;
}
.visual-main small {
  opacity: 0.8;
}
.visual-card {
  position: absolute;
  width: 154px;
  padding: 15px;
  display: grid;
  grid-template-columns: 40px 1fr;
  color: #172033;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.visual-card span {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 11px;
}
.visual-card b {
  font-size: 13px;
}
.visual-card small {
  color: #667085;
  font-size: 10px;
}
.visual-photo {
  top: 58px;
  left: 0;
  transform: rotate(-4deg);
}
.visual-doc {
  right: -8px;
  bottom: 68px;
  transform: rotate(3deg);
}
.visual-check {
  position: absolute;
  right: 46px;
  top: 70px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--mint);
  border: 7px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-sizing: content-box;
}
.feature-strip {
  padding: 90px 0;
  background: var(--surface);
}
.section-heading.centered {
  max-width: 650px;
  margin: 0 auto 46px;
  text-align: center;
}
.section-heading h2 {
  font-size: clamp(30px, 4vw, 44px);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-grid article {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
}
.feature-grid h3 {
  margin: 20px 0 8px;
  font-size: 19px;
}
.feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.feature-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 23px;
  font-weight: 800;
}
.lilac {
  color: var(--accent-text);
  background: var(--violet-soft);
}
.mint {
  color: #168466;
  background: #ddf7ef;
}
.peach {
  color: #bf674d;
  background: #fff0e9;
}

/* App pages */
.app-page {
  min-height: calc(100vh - 76px);
  padding: 58px 0 100px;
}
/* .dashboard-wrap, .account-container { max-width: 1120px; } */
.dashboard-heading,
.page-heading,
.section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.dashboard-heading {
  align-items: center;
  margin-bottom: 34px;
}
.dashboard-heading h1,
.page-heading h1 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3vw, 36px);
}
.dashboard-heading p:not(.eyebrow),
.page-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}
.profile-preview {
  min-width: 230px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  cursor: pointer;
}
.profile-preview span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.profile-preview small {
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 22px;
}
.gradient-card {
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, #147bf5 0%, #1f79ed 58%, #315de9 100%);
  border-radius: 26px;
  box-shadow: 0 24px 50px rgba(var(--accent-rgb), 0.23);
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.card-label {
  margin-bottom: 8px;
  opacity: 0.75;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.storage-card h2 {
  margin: 0;
  font-size: 36px;
}
.storage-card p {
  margin-bottom: 0;
  opacity: 0.76;
}
.storage-ring {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 9px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  font-weight: 800;
}
.storage-bar,
.meter {
  height: 8px;
  margin: 24px 0 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  overflow: hidden;
}
.storage-bar span,
.meter span {
  width: 0;
  height: 100%;
  display: block;
  background: #fff;
  border-radius: inherit;
  transition: width 0.5s ease;
}
.storage-foot {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.storage-foot a {
  font-weight: 800;
}
.quick-upload {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.quick-upload h2 {
  margin: 20px 0 5px;
  font-size: 21px;
}
.quick-upload p {
  margin-bottom: auto;
  color: var(--muted);
  font-size: 14px;
}
.quick-upload .button {
  margin-top: 18px;
}
.section-row {
  margin: 52px 0 18px;
}
.section-row h2 {
  margin: 0;
  font-size: 26px;
}
.section-row a {
  color: var(--accent-text);
  font-weight: 800;
  font-size: 14px;
}
.page-heading {
  margin-bottom: 30px;
  align-items: flex-start;
}
.page-heading > .button {
  flex-shrink: 0;
  align-self: flex-start;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.category-grid.compact {
  grid-template-columns: repeat(6, 1fr);
}
.category-card {
  min-height: 142px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.38);
  box-shadow: 0 18px 42px rgba(var(--accent-rgb), 0.1);
}
.category-icon,
.file-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 14px;
  font-size: 21px;
}
.file-type-pdf {
  color: #c0392e;
  background: #ffdad5;
}
.file-type-word {
  color: #2f4bae;
  background: #dde2ff;
}
.file-type-sheet {
  color: #12764a;
  background: #c8f2da;
}
.file-type-slides {
  color: #af551c;
  background: #ffddc2;
}
.file-type-archive {
  color: #8a5300;
  background: #ffddb0;
}
.file-type-code {
  color: #6750a4;
  background: #eaddff;
}
.file-icon.file-type-pdf,
.file-icon.file-type-word {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.file-icon.file-type-code {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.category-card b {
  margin-top: auto;
  font-size: 16px;
}
.category-card small {
  color: var(--muted);
}
.category-grid.compact .category-card {
  min-height: 130px;
  padding: 17px;
}
.file-table {
  overflow: hidden;
}
.file-row {
  min-height: 78px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) 130px 100px auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.file-row:last-child {
  border-bottom: 0;
}
.file-row .file-icon {
  position: relative;
  overflow: hidden;
}
.file-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: var(--surface);
  opacity: 0;
}
.file-icon.thumbnail-loaded .file-thumbnail {
  opacity: 1;
}
.file-row:hover {
  background: color-mix(in srgb, var(--violet-soft) 34%, transparent);
}
.file-row[data-selected="true"] {
  background: var(--accent-soft);
}
.selection-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink);
}
.selection-notice[hidden] {
  display: none;
}
.selection-notice span {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.file-row input {
  accent-color: var(--violet);
}
.file-main {
  min-width: 0;
}
.file-main {
  padding: 0;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.file-main b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-main small,
.file-cell {
  color: var(--muted);
  font-size: 12px;
}
.file-action {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
}
.file-action:hover {
  background: var(--violet-soft);
}
.skeleton-list {
  padding: 5px 18px;
}
.skeleton-list span {
  height: 52px;
  margin: 12px 0;
  display: block;
  background: linear-gradient(
    90deg,
    var(--canvas),
    var(--border),
    var(--canvas)
  );
  background-size: 200%;
  border-radius: 12px;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.empty-state {
  padding: 70px 24px;
  text-align: center;
}
.empty-state .gate-art {
  font-size: 45px;
}
.empty-state p {
  color: var(--muted);
}
.guest-gate {
  padding: 52px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.guest-gate .gate-art {
  width: 78px;
  height: 78px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 25px;
  font-size: 34px;
}
.guest-gate h2 {
  margin-bottom: 8px;
  font-size: 28px;
}
.guest-gate p {
  max-width: 440px;
  margin: 0 auto 25px;
  color: var(--muted);
}
.guest-gate > div {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.library-toolbar {
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}
.search-box {
  min-width: 0;
  flex: 1;
  height: 50px;
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
}
.search-box input {
  min-width: 0;
  width: 100%;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
}
.sort-button {
  flex-shrink: 0;
  height: 50px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  cursor: pointer;
  font-weight: 500;
}
.list-heading {
  margin: 10px 0 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.list-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}
.list-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.list-heading {
  flex-wrap: wrap;
}
.list-heading-copy {
  min-width: 0;
  flex: 1;
}
.file-selection-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.file-selection-actions > span {
  min-width: 80px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.file-selection-buttons {
  display: flex;
  gap: 8px;
}
.file-selection-buttons .clear-selection {
  min-width: 36px;
  padding-inline: 10px;
  font-size: 20px;
}
.file-selection-buttons button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
@media (max-width: 640px) {
  .file-selection-actions {
    flex-basis: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  .file-selection-buttons {
    gap: 6px;
  }
  .file-selection-buttons .button {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }
}
.selection-bar {
  margin-bottom: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--violet-soft);
  border-radius: 15px;
}

/* Transfers */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.stat-card {
  padding: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
}
.stat-card.active {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}
.stat-card .status-dot {
  grid-row: 1/3;
}
.stat-card b {
  font-size: 26px;
  line-height: 1;
}
.stat-card small {
  color: var(--muted);
}
.status-dot {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 50%;
}
.violet {
  background: var(--violet);
}
.green {
  background: var(--mint);
}
.red {
  background: var(--red);
}
.transfer-sections {
  margin-top: 32px;
}
.transfer-group {
  margin-bottom: 28px;
}
.transfer-group h2 {
  font-size: 19px;
}
.transfer-card {
  margin-bottom: 10px;
  padding: 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.transfer-main b {
  display: block;
}
.transfer-main small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.progress-track {
  height: 6px;
  margin-top: 9px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-track span {
  height: 100%;
  display: block;
  background: var(--violet);
}
.transfer-badge {
  padding: 5px 9px;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

/* Account */
.guest-banner {
  margin-bottom: 22px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}
.guest-banner > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.guest-banner h2,
.guest-banner p {
  margin: 0;
}
.guest-banner p {
  color: var(--muted);
  font-size: 14px;
}
.profile-card {
  width: 100%;
  margin-bottom: 22px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 17px;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.profile-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.profile-card b {
  font-size: 21px;
}
.profile-card small {
  color: var(--muted);
}
.profile-edit {
  color: var(--accent-text);
  font-weight: 800;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.settings-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}
.settings-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.settings-title h2,
.settings-title p {
  margin: 0;
}
.settings-title h2 {
  font-size: 18px;
}
.settings-title p {
  color: var(--muted);
  font-size: 13px;
}
.settings-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 13px;
  font-weight: 900;
}
.meter-block {
  margin-top: 19px;
}
.meter-block > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.meter-block .meter {
  margin: 8px 0;
  background: var(--border);
}
.meter-block .meter span {
  background: var(--violet);
}
.meter-block .mint-meter span {
  background: var(--mint);
}
.meter-block small {
  color: var(--muted);
}
.settings-row {
  width: 100%;
  min-height: 51px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.settings-row b {
  color: var(--muted);
  font-size: 20px;
}
.preferences-card,
.about-card {
  margin-top: 22px;
}
.setting-control {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 1px solid var(--border);
}
.setting-control label {
  display: flex;
  flex-direction: column;
}
.setting-control label small {
  color: var(--muted);
}
.setting-control select {
  padding: 9px 32px 9px 12px;
  color: inherit;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.danger-zone {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.text-danger {
  padding: 10px;
  color: var(--red);
  background: transparent;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

/* Authentication */
.auth-page {
  min-height: 100vh;
  background: var(--surface);
}
.auth-brand {
  position: absolute;
  top: 19px;
  left: 32px;
  z-index: 3;
}
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}
.auth-aside {
  min-height: 720px;
  padding: 100px 50px 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: linear-gradient(145deg, #0f6fdd 0%, #147bf5 58%, #315de9 100%);
  overflow: hidden;
}
.auth-art {
  position: relative;
  width: 430px;
  height: 430px;
  margin: 0 auto auto;
}
.auth-cloud {
  position: absolute;
  inset: 115px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 94px;
  backdrop-filter: blur(10px);
}
.auth-orbit {
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}
.orbit-b {
  inset: 78px;
  border-style: dashed;
}
.floating-file {
  position: absolute;
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 20px 40px rgba(33, 27, 90, 0.25);
  font-size: 23px;
}
.file-a {
  top: 50px;
  left: 28px;
  transform: rotate(-8deg);
}
.file-b {
  top: 80px;
  right: 18px;
  transform: rotate(7deg);
}
.file-c {
  bottom: 44px;
  left: 58px;
}
.auth-aside blockquote {
  max-width: 520px;
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
}
.auth-aside > p {
  margin: 0;
  opacity: 0.75;
}
.auth-form-wrap {
  padding: 110px 45px 60px;
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(100%, 440px);
}
.auth-card h1 {
  margin-bottom: 8px;
  font-size: 38px;
}
.auth-intro {
  margin-bottom: 28px;
  color: var(--muted);
}
.field {
  margin-bottom: 17px;
  display: block;
}
.field > span:first-child {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
}
.field > span a {
  color: var(--accent-text);
}
.field input {
  width: 100%;
  height: 51px;
  padding: 0 15px;
  color: inherit;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.field input:focus {
  border-color: var(--violet);
  background: var(--surface);
}
.field input.invalid {
  border-color: var(--red);
}
.field-error {
  min-height: 17px;
  display: block;
  color: var(--red);
  font-size: 11px;
}
.field-hint {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 62px;
}
.password-field button {
  position: absolute;
  right: 9px;
  top: 8px;
  height: 35px;
  color: var(--accent-text);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.form-alert {
  margin-bottom: 17px;
  padding: 12px 14px;
  color: #9b3442;
  background: #fff0f2;
  border: 1px solid #ffd5db;
  border-radius: 12px;
  font-size: 13px;
}
#signInForm .form-alert,
#loginStatus:not(:empty) {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  overflow-wrap: anywhere;
}
#loginStatus:empty {
  display: none;
}
#signInForm .form-alert[data-state="error"],
#loginStatus[data-state="error"] {
  border-inline-start-color: var(--red);
  background: rgba(217, 78, 93, 0.09);
  color: var(--ink);
}
#signInForm .form-alert[data-state="success"],
#loginStatus[data-state="success"] {
  border-inline-start-color: var(--mint);
  background: rgba(46, 191, 145, 0.09);
}
.terms {
  margin: 14px 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.auth-switch a {
  color: var(--accent-text);
  font-weight: 800;
}
.mail-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 21px;
  font-size: 28px;
}
.otp-input {
  text-align: center;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.42em;
}
.resend-button,
.link-button {
  width: 100%;
  margin-top: 14px;
  color: var(--accent-text);
  background: transparent;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}
.link-button {
  color: var(--muted);
}
.stepper {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
}
.stepper span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.stepper span.active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
}
.stepper i {
  height: 2px;
  flex: 1;
  background: var(--border);
}

/* Drawer and dialogs */
.drawer-backdrop,
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 18, 35, 0.46);
  backdrop-filter: blur(3px);
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(480px, 100%);
  padding: 26px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: -12px 0 36px rgba(24, 20, 56, 0.12);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.28s ease,
    visibility 0s linear 0.28s;
}
.drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.drawer-header > div {
  min-width: 0;
  flex: 1;
}
.drawer-header > button {
  flex-shrink: 0;
  align-self: flex-start;
}
.drawer-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.drawer .button {
  font-weight: 500;
}
.drawer-body {
  min-height: 0;
  padding-top: 25px;
  overflow-y: auto;
}
.drawer-form .field {
  margin-bottom: 16px;
}
.drawer-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}
/* File inspection keeps the library usable on wide screens. */
.drawer.file-inspector {
  width: min(var(--inspector-width, 420px), 100%);
  padding: 20px;
}
.file-inspector .drawer-header {
  flex-shrink: 0;
}
.file-inspector .drawer-header h2 {
  white-space: normal;
  overflow-wrap: anywhere;
  max-height: 3.9em;
  overflow: auto;
}
.file-inspector .drawer-body {
  flex: 1;
  padding-top: 18px;
  padding-bottom: 18px;
}
.drawer-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.drawer-footer .button {
  flex: 1;
  min-width: 0;
}
.inspector-resize {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}
.inspector-resize:hover,
.inspector-resize:focus-visible {
  background: var(--accent-soft);
  outline: 2px solid var(--accent-text);
  outline-offset: -2px;
}
.file-context-menu {
  position: fixed;
  z-index: 95;
  width: min(240px, calc(100vw - 16px));
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.file-context-menu button {
  display: block;
  width: 100%;
  text-align: start;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.file-context-menu button:hover,
.file-context-menu button:focus-visible {
  background: var(--accent-soft);
}
.file-context-menu .menu-danger {
  color: var(--red);
  border-top: 1px solid var(--border);
}
.file-context-menu button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#dialogBackdrop {
  z-index: 98;
}
#appDialog {
  z-index: 100;
}
#appDialog.preview-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
}
.preview-dialog h2 {
  padding-inline-end: 40px;
  font-size: 18px;
}
.large-preview {
  display: grid;
  place-items: center;
  background: var(--canvas);
  border-radius: 12px;
  margin-top: 16px;
}
.large-preview img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 200px);
  object-fit: contain;
}
@media (min-width: 1100px) {
  .inspector-docked #mainContent,
  .inspector-docked .site-footer {
    margin-inline-end: var(--inspector-width, 420px);
  }
  .inspector-docked .file-inspector {
    top: 76px;
    border-inline-start: 1px solid var(--border);
    box-shadow: none;
  }
  .inspector-docked .file-row {
    grid-template-columns: auto auto minmax(0, 1fr) 80px auto;
    gap: 10px;
  }
  .inspector-docked .file-row .file-cell:nth-of-type(3) {
    display: none;
  }
  .inspector-docked .file-selection-actions {
    flex-basis: 100%;
    justify-content: space-between;
  }
  .inspector-docked :is(.toast-region, .transfer-stack) {
    right: auto;
    inset-inline-end: calc(var(--inspector-width, 420px) + 16px);
    max-width: calc(100vw - var(--inspector-width, 420px) - 40px);
  }
}
@media (max-width: 1099px) {
  .drawer.file-inspector {
    width: min(480px, 100%);
  }
}
@media (max-width: 540px) {
  .drawer.file-inspector {
    width: 100%;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
.profile-picture-editor {
  margin-bottom: 26px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.profile-picture-editor .avatar {
  width: 88px;
  height: 88px;
  box-shadow: 0 0 0 4px var(--surface);
}
.profile-picture-editor > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.profile-picture-editor label {
  margin: 0;
}
.profile-picture-editor small {
  max-width: 100%;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}
.profile-picture-editor small.error {
  color: var(--red);
  white-space: normal;
}
.file-preview {
  min-height: 170px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.file-preview.image-preview {
  padding: 12px;
  gap: 8px;
  text-align: center;
}
.preview-image-frame {
  width: 100%;
  min-width: 0;
}
.preview-image-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(32dvh, 280px);
  object-fit: contain;
  border-radius: 10px;
}
.preview-message,
.preview-note {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.preview-message {
  font-size: 14px;
}
.preview-message:empty {
  display: none;
}
.preview-note {
  font-size: 12px;
}
.file-preview .category-icon {
  width: 76px;
  height: 76px;
  border-radius: 23px;
  font-size: 34px;
}
.file-preview .file-type-pdf,
.file-preview .file-type-word {
  font-size: 18px;
  font-weight: 900;
}
.file-preview .file-type-code {
  font-size: 22px;
  font-weight: 900;
}
.details-list {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}
.details-list > div {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.details-list dt {
  color: var(--muted);
}
.details-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 30px;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transform: translate(-50%, -46%) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease-out;
}
.dialog.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.dialog-close {
  position: absolute;
  top: 15px;
  right: 15px;
}
.dialog h2 {
  margin: 0 45px 8px 0;
  font-size: 26px;
}
.dialog p {
  color: var(--muted);
}
.dialog .dialog-file-name {
  padding: 12px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.dialog-actions {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.upload-drop {
  padding: 40px 20px;
  text-align: center;
  border: 2px dashed #c9c5e9;
  border-radius: 20px;
  cursor: pointer;
}
.upload-drop span {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 19px;
  font-size: 28px;
}
.upload-options {
  display: grid;
  gap: 10px;
}
.upload-option {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 15px;
  cursor: pointer;
}
.customer-navigation-notice {
  margin: 12px auto;
  padding: 12px 16px;
  max-width: 1180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.customer-navigating .site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 35%;
  height: 3px;
  background: var(--accent);
  animation: upload-pending 1s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .customer-navigating .site-header::after {
    animation: none;
    width: 100%;
  }
}
.localized-site {
  --activity-edge: 24px;
  --activity-bottom: max(20px, env(safe-area-inset-bottom));
}
.transfer-stack {
  /* Float against the viewport, independently of footer or page layout. */
  position: fixed;
  inset-inline-end: var(--activity-edge, 24px);
  bottom: var(--activity-bottom, 20px);
  width: min(390px, calc(100vw - 32px));
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(560px, 60dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.transfer-stack > * { flex-shrink: 0; min-width: 0; }
.transfer-stack:not(:has(.download-queue, #uploadPanel:not([hidden]))),
.download-region:empty, .toast-region:empty { display: none; }
.download-region { display: grid; gap: 12px; }
.transfer-panel {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(12, 24, 48, 0.06);
  overflow: hidden;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.upload-panel[hidden], .upload-panel [hidden] { display: none !important; }
.upload-panel-heading {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 12px 12px 16px; background: var(--canvas);
}
.upload-panel-heading > div { flex: 1; min-width: 0; }
.upload-panel-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.upload-panel-heading p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.upload-panel-heading button {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  color: var(--ink); background: transparent; font-size: 22px; cursor: pointer;
}
.upload-panel button:hover { background: var(--canvas); }
.upload-panel button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.upload-panel-list { max-height: min(330px, 50dvh); overflow-y: auto; overscroll-behavior: contain; }
.upload-panel-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.upload-panel-icon { display: grid; place-items: center; color: var(--accent-text); background: var(--accent-soft); flex: 0 0 32px; height: 32px; border-radius: 9px; }
.upload-panel-icon svg { width: 18px; height: 18px; }
.upload-panel-file { flex: 1; min-width: 0; }
.upload-panel-file b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 500; }
.upload-panel-file small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.upload-panel-row.is-error small, .upload-panel-row.is-error .upload-panel-icon { color: var(--red); }
.upload-panel-row.is-complete .upload-panel-icon { color: var(--mint); background: rgba(46, 191, 145, 0.1); }
.upload-panel-row.is-error .upload-panel-icon { background: rgba(217, 78, 93, 0.1); }
html:not(.dark) body:not(.dark) .upload-panel-row.is-complete .upload-panel-icon { color: #16815e; }
.upload-panel-action { flex-shrink: 0; border: 0; background: transparent; color: var(--accent-text); border-radius: 6px; min-height: 36px; padding: 6px; font-size: 12px; cursor: pointer; }
.upload-panel-action:disabled { opacity: 0.5; cursor: default; }
.upload-progress { margin-top: 8px; height: 4px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.upload-progress span {
  display: block; width: 100%; height: 100%; background: var(--accent); border-radius: inherit;
  transform-origin: left; transform: scaleX(var(--progress, 1));
  animation: transfer-progress-fill 180ms linear;
}
[dir="rtl"] .upload-progress span { transform-origin: right; }
.upload-progress.is-indeterminate span {
  width: 35%; transform: none;
  animation: upload-pending 1.4s ease-in-out infinite alternate;
}
@keyframes transfer-progress-fill {
  from { transform: var(--previous-progress, scaleX(var(--progress, 1))); }
  to { transform: scaleX(var(--progress, 1)); }
}
@keyframes upload-pending { from { transform: translateX(0); } to { transform: translateX(185%); } }
[dir="rtl"] .upload-progress.is-indeterminate span { animation-name: upload-pending-rtl; }
@keyframes upload-pending-rtl { from { transform: translateX(0); } to { transform: translateX(-185%); } }
@media (max-width: 640px) {
  .localized-site {
    --activity-edge: 16px;
    --activity-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .upload-progress span { transition: none; animation: none !important; }
}

/* Activity motion stays within the stable floating panel, not each re-rendered row. */
.transfer-panel {
  animation: transfer-panel-enter 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.upload-panel-heading h2,
.download-queue-heading strong {
  position: relative;
  padding-inline-start: 18px;
}
.upload-panel-heading h2::before,
.download-queue-heading strong::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.transfer-panel[data-activity="active"] :is(.upload-panel-heading h2, .download-queue-heading strong)::before {
  background: var(--accent);
  animation: transfer-activity 1.4s ease-in-out infinite;
}
.transfer-panel[data-activity="completed"] :is(.upload-panel-heading h2, .download-queue-heading strong)::before {
  background: var(--mint);
}
.transfer-panel[data-activity="requested"] .download-queue-heading strong::before {
  background: var(--accent);
}
.transfer-panel[data-activity="failed"] :is(.upload-panel-heading h2, .download-queue-heading strong)::before {
  background: var(--red);
}
.download-queue[data-finished] .download-progress-text,
.upload-panel[data-activity="completed"] .upload-panel-heading p {
  animation: transfer-result 220ms ease-out;
}
.download-current-progress::-webkit-progress-value,
.transfer-progress::-webkit-progress-value {
  transition: width 180ms linear;
}
.download-current-progress::-moz-progress-bar,
.transfer-progress::-moz-progress-bar {
  transition: width 180ms linear;
}
@keyframes transfer-panel-enter {
  from { opacity: 0.65; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes transfer-activity {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes transfer-result {
  from { opacity: 0.65; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .transfer-panel,
  .transfer-panel[data-activity] :is(.upload-panel-heading h2, .download-queue-heading strong)::before,
  .download-queue[data-finished] .download-progress-text,
  .upload-panel[data-activity="completed"] .upload-panel-heading p {
    animation: none;
  }
  .download-current-progress::-webkit-progress-value,
  .transfer-progress::-webkit-progress-value {
    transition: none;
  }
  .download-current-progress::-moz-progress-bar,
  .transfer-progress::-moz-progress-bar {
    transition: none;
  }
}

.toast-region {
  position: fixed;
  inset-inline-end: var(--activity-edge, 24px);
  width: min(390px, calc(100vw - 32px));
  bottom: calc(var(--activity-bottom, 20px) + var(--transfer-stack-offset, 0px));
  z-index: 120;
  display: grid;
  gap: 9px;
  max-height: max(80px, calc(100dvh - var(--transfer-stack-offset, 0px) - 100px));
  overflow-y: auto;
}
.toast {
  max-width: 380px;
  padding: 13px 16px;
  color: #fff;
  background: #282637;
  border-radius: 13px;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in 0.25s ease;
  overflow-wrap: anywhere;
}
.toast.error {
  background: #a43e4b;
}
.download-queue { padding: 12px 16px; }
.download-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.download-queue-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Move only the arrow; its tray stays still. */
.transfer-icon-active .transfer-icon-arrow {
  animation: transfer-arrow 1.6s ease-in-out infinite;
  animation-delay: var(--transfer-icon-delay, 0ms);
}
.transfer-icon-upload { --transfer-icon-travel: -2.5px; }
.transfer-icon-download { --transfer-icon-travel: 2.5px; }
@keyframes transfer-arrow {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(var(--transfer-icon-travel)); }
}
.download-motion-icon {
  display: inline-flex;
  flex: 0 0 20px;
  color: var(--accent-text);
}
.download-motion-icon .ui-icon { width: 20px; height: 20px; }
.download-queue-heading:has(.download-motion-icon) strong {
  flex: 1;
  padding-inline-start: 0;
}
.download-queue-heading:has(.download-motion-icon) strong::before { display: none; }
@media (prefers-reduced-motion: reduce) {
  .transfer-icon-active .transfer-icon-arrow { animation: none; }
}

.download-queue-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}
.download-queue-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.download-queue-cancel {
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 36px;
  padding: 6px 10px;
  background: transparent;
  color: var(--accent-text);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.download-queue-cancel:hover { background: var(--accent-soft); }
.download-queue > .download-queue-cancel { margin-inline-end: 8px; margin-top: 4px; }
.download-queue-cancel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.download-queue p { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.download-queue-files {
  max-height: min(240px, 35vh);
  overflow-y: auto;
  padding-left: 22px;
  margin: 0;
}
.download-queue-files li {
  padding: 6px 0;
}
.download-queue-files span {
  display: block;
  overflow-wrap: anywhere;
}
.download-queue-files small {
  display: block;
  color: var(--muted);
}
.download-current-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.download-current-progress {
  display: block;
  width: 100%;
  height: 6px;
  margin: 7px 0 4px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  accent-color: var(--accent);
  background: var(--accent-soft);
}
.download-current-progress::-webkit-progress-bar {
  background: var(--accent-soft);
  border-radius: 8px;
}
.download-current-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 8px;
}
.download-current-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 8px;
}
.download-current-status {
  display: block;
  color: var(--muted);
}
.download-active-file + .download-active-file:not([hidden]) {
  margin-top: 8px;
  padding-top: 2px;
  border-top: 1px solid var(--accent-soft);
}
.download-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.download-batch-files {
  padding-left: 22px;
}
.download-batch-files li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.download-batch-files small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.download-batch-error {
  color: var(--red);
  font-size: 13px;
}
@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Player */
.player-page {
  min-height: 100vh;
  color: #fff;
  background: #101018;
}
.screen-player .site-header {
  display: none;
}
.player-topbar {
  height: 80px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #181720;
}
.player-topbar #playerBack {
  color: #80baff;
}
.player-topbar #playerBack:focus-visible {
  outline: 2px solid #80baff;
  outline-offset: 3px;
}
.player-topbar > div {
  display: flex;
  flex-direction: column;
}
.player-topbar small {
  color: #8e8b9b;
}
.player-stage {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
}
.player-loading,
.player-error {
  text-align: center;
}
.loader {
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  display: block;
  border: 4px solid #293244;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#videoPlayer {
  width: min(1100px, 100%);
  max-height: calc(100vh - 80px);
  background: #000;
}
.audio-player {
  width: min(500px, calc(100% - 40px));
  text-align: center;
}
.album-art {
  width: 260px;
  height: 260px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, #48a2ff, #234fc8);
  border-radius: 34px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  font-size: 90px;
}
.audio-player h1 {
  font-size: 30px;
}
.audio-player audio {
  width: 100%;
}
.player-error > span {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 900;
}

/* Consistent icon sizing and a more balanced dashboard, using the existing palette. */
.ui-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}
.category-icon,
.file-icon,
.feature-icon,
.settings-icon,
.storage-ring {
  flex-shrink: 0;
  line-height: 1;
}
.category-icon .ui-icon {
  width: 23px;
  height: 23px;
}
.gate-art .ui-icon {
  width: 36px;
  height: 36px;
}
.feature-icon .ui-icon {
  width: 25px;
  height: 25px;
}
.settings-icon img {
  display: block;
  object-fit: contain;
}
.dark .feature-icon.mint {
  color: #72dfc1;
  background: #123c34;
}
.dark .feature-icon.peach {
  color: #ffb29b;
  background: #442d29;
}
.button > span:has(.ui-icon),
.search-box > span,
.sort-button > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-box .ui-icon,
.sort-button .ui-icon {
  width: 20px;
  height: 20px;
}
.profile-preview {
  padding: 14px 16px;
  gap: 14px;
}
.profile-preview > span:nth-child(2),
.profile-card > span:nth-child(2) {
  min-width: 0;
  gap: 3px;
}
.profile-preview b,
.profile-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-preview > span:last-child {
  display: grid;
  place-items: center;
  margin-left: 8px;
}
.profile-preview .ui-icon {
  width: 18px;
  height: 18px;
}
.dashboard-grid {
  align-items: stretch;
}
.storage-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
}
.storage-card .card-top {
  align-items: center;
}
.storage-card .storage-bar {
  margin-top: 30px;
}
.storage-foot {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.category-card {
  gap: 6px;
}
.category-card .category-icon {
  margin-bottom: 10px;
}
.category-card b {
  line-height: 1.3;
}
.category-card small {
  line-height: 1.4;
}
.category-grid.compact .category-card {
  min-height: 150px;
  padding: 20px;
}
.file-action {
  display: grid;
  place-items: center;
  line-height: 1;
  color: inherit;
}
.file-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
}
.section-row > a {
  flex-shrink: 0;
}
.load-error {
  grid-column: 1 / -1;
  width: 100%;
  padding: 32px 20px;
}

/* Preserve each data region's footprint while requests are in flight. */
.data-loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}
.data-loading > * {
  visibility: hidden;
}
.data-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    var(--canvas) 20%,
    var(--border) 45%,
    var(--canvas) 70%
  );
  background-size: 240% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
#headerUserLabel.data-loading,
#homeName.data-loading {
  display: inline-block;
  min-width: 4ch;
  border-radius: 6px;
  vertical-align: bottom;
}
.storage-card.data-loading::after,
#homeProfileButton.data-loading::after,
#accountProfileButton.data-loading::after,
.settings-card.data-loading::after {
  inset: 20px;
  border-radius: 10px;
  mask-image:
    linear-gradient(#000 0 0), linear-gradient(#000 0 0),
    linear-gradient(#000 0 0);
  mask-position:
    0 0,
    0 45%,
    0 100%;
  mask-size:
    38% 22%,
    70% 18%,
    100% 12%;
  mask-repeat: no-repeat;
}
.category-grid.data-loading {
  overflow: visible;
}
.category-grid.data-loading::after {
  display: none;
}
.category-grid.data-loading > * {
  visibility: visible;
}
.category-grid.data-loading > * > * {
  visibility: hidden;
}
.category-grid.data-loading > * {
  position: relative;
}
.category-grid.data-loading > *::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 8px;
  background: linear-gradient(
    100deg,
    var(--canvas),
    var(--border),
    var(--canvas)
  );
  background-size: 240% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  mask-image:
    linear-gradient(#000 0 0), linear-gradient(#000 0 0),
    linear-gradient(#000 0 0);
  mask-position:
    0 0,
    0 72%,
    0 100%;
  mask-size:
    46px 46px,
    80% 14px,
    55% 10px;
  mask-repeat: no-repeat;
}
.file-table.data-loading {
  min-height: 234px;
}
.file-table.data-loading::after {
  inset: 16px;
  mask-image: repeating-linear-gradient(
    to bottom,
    #000 0 48px,
    transparent 48px 72px
  );
}
/* Keep labels and structure readable; only unknown data gets a placeholder. */
:is(.storage-card, .type-filters, .file-table).data-loading > * {
  visibility: visible;
}
:is(.storage-card, .type-filters, .file-table).data-loading::after {
  display: none;
}
:is(.storage-card, .type-filters).data-loading {
  pointer-events: auto;
}
.type-filters [data-filter-count] {
  display: inline-grid;
  font-variant-numeric: tabular-nums;
}
.type-filters [data-filter-count] > span {
  grid-area: 1 / 1;
}
.type-filters .filter-count-reserve {
  visibility: hidden;
}
.file-skeleton {
  width: 100%;
}
.skeleton-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.skeleton-file-row:last-child {
  border-bottom: 0;
}
#homeRecent .skeleton-file-row {
  min-height: 72px;
}
.skeleton-file-icon,
.skeleton-file-copy i,
.skeleton-file-action {
  display: block;
  background: var(--border);
  border-radius: 6px;
  animation: placeholder-pulse 1.8s ease-in-out infinite;
}
.skeleton-file-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
}
.files-page .skeleton-file-row::before {
  box-sizing: border-box;
  content: "";
  flex: 0 0 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.files-page .skeleton-file-icon {
  width: 46px;
  height: 46px;
}
.skeleton-file-copy {
  flex: 1;
  min-width: 0;
}
.skeleton-file-copy i {
  width: min(60%, 340px);
  height: 12px;
  margin-bottom: 8px;
}
.skeleton-file-copy i:last-child {
  width: min(35%, 180px);
  height: 9px;
  margin-bottom: 0;
}
.skeleton-file-action {
  width: 24px;
  height: 8px;
}
@keyframes placeholder-pulse {
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .data-loading::after,
  .category-grid.data-loading > *::after,
  .skeleton-list span {
    animation: none;
  }
  .category-card,
  .storage-bar span,
  .meter span,
  .drawer,
  .dialog {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .toast {
    animation: none;
  }
}

@media (max-width: 980px) {
  .header-inner {
    width: min(calc(100% - 30px), 900px);
    gap: 15px;
  }
  .main-nav {
    gap: 0;
  }
  .main-nav a {
    padding-inline: 10px;
  }
  .user-button span:last-child {
    display: none;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .hero-copy {
    z-index: 2;
  }
  .hero-copy h1,
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions,
  .hero-note {
    justify-content: center;
  }
  .cloud-visual {
    width: 420px;
    height: 420px;
  }
  .category-grid.compact {
    grid-template-columns: repeat(3, 1fr);
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
  .navigation-hidden:not(.screen-player) .site-header {
    display: block;
  }
  .auth-brand {
    display: block;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .quick-upload {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
  .quick-upload div {
    flex: 1;
  }
  .quick-upload h2 {
    margin-top: 0;
  }
  .quick-upload p,
  .quick-upload .button {
    margin: 0;
  }
}
@media (max-width: 760px) {
  .container,
  .header-inner,
  .navigation-hidden .header-inner {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }
  .site-header {
    position: sticky;
  }
  .header-inner {
    height: auto;
    min-height: 66px;
    padding-block: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand {
    font-size: 17px;
  }
  .header-logo,
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .brand {
    order: 1;
  }
  .header-actions {
    order: 2;
    margin-left: auto;
    gap: 8px;
  }
  .nav-toggle {
    display: block;
    order: 3;
    margin-left: 0;
  }
  .main-nav {
    order: 4;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    padding: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .main-nav.open {
    display: flex;
  }
  .header-actions .button {
    display: none;
    width: 40px;
    padding: 0;
    font-size: 0;
  }
  .header-actions .button span {
    font-size: 20px;
  }
  .user-button {
    padding: 0;
  }
  .home-hero {
    min-height: auto;
    padding: 70px 0;
  }
  .hero-grid {
    gap: 25px;
  }
  .hero-copy h1 {
    font-size: 43px;
  }
  .cloud-visual {
    width: 330px;
    height: 330px;
    transform: scale(0.9);
  }
  .visual-main {
    inset: 85px;
  }
  .visual-photo {
    top: 25px;
  }
  .visual-doc {
    right: 0;
    bottom: 35px;
  }
  .feature-grid,
  .category-grid,
  .stat-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }
  .category-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-heading,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading .button {
    width: 100%;
  }
  .profile-preview {
    width: 100%;
  }
  .file-row {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }
  .file-cell {
    display: none;
  }
  .library-toolbar {
    flex-direction: column;
  }
  .search-box {
    max-width: none;
    flex: none;
    width: 100%;
  }
  .guest-gate {
    padding: 32px 24px;
  }
  .guest-gate h2 {
    font-size: 24px;
    line-height: 1.3;
  }
  .guest-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .guest-banner > div:last-child {
    width: 100%;
  }
  .guest-banner .button {
    flex: 1;
  }
  .setting-control {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px 0;
    gap: 9px;
  }
  .setting-control select {
    width: 100%;
  }
  .auth-form-wrap {
    padding: 100px 16px 40px;
  }
  .auth-card h1 {
    font-size: 33px;
  }
  .quick-upload {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-upload .button {
    width: 100%;
    margin-top: 5px;
  }
}
@media (max-width: 430px) {
  .drawer {
    padding: 20px;
  }
  .dialog {
    padding: 24px 20px;
  }
  .profile-picture-editor {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-picture-editor > div {
    align-items: center;
  }
  .storage-card {
    padding: 22px;
  }
  .storage-card h2 {
    font-size: 28px;
  }
  .storage-ring {
    width: 68px;
    height: 68px;
    border-width: 7px;
  }
  .card-top {
    gap: 12px;
  }
  .section-row {
    gap: 12px;
  }
  .section-row h2 {
    font-size: 22px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-note {
    flex-wrap: wrap;
  }
  .cloud-visual {
    margin-left: -14px;
  }
  .category-grid.compact {
    grid-template-columns: 1fr 1fr;
  }
  .category-card {
    min-height: 125px;
  }
  .selection-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .profile-edit {
    display: none;
  }
}

/* Workspace overview */
.screen-home .dashboard-wrap {
  max-width: 1180px;
}
/* Shared signed-in workspaces. */
.screen-home .app-page,
.files-page,
.transfers-page {
  padding-top: 24px;
  padding-bottom: 32px;
}
.screen-home .dashboard-heading,
.files-page .page-heading {
  margin-bottom: 20px;
}
.screen-home .dashboard-heading h1,
.files-page .page-heading h1,
.transfers-heading h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}
.home-search {
  margin-bottom: 20px;
}
.home-search .search-box {
  flex: 1;
  width: auto;
}
.recent-panel {
  overflow: hidden;
}
.recent-panel .section-row {
  padding: 18px 20px;
  align-items: center;
  margin: 0;
}
.recent-panel h2,
.home-transfer-summary h2 {
  font-size: 18px;
  margin: 0;
}
.recent-panel .section-row a,
.home-transfer-summary .section-row a {
  font-size: 13px;
  flex-shrink: 0;
}
#homeRecent .file-row {
  grid-template-columns: 42px minmax(0, 1fr) 90px 40px;
  min-height: 72px;
}
#homeRecent .file-checkbox,
#homeRecent .file-cell:nth-of-type(3) {
  display: none;
}
#homeRecent .file-cell:nth-of-type(2) {
  display: block;
  text-align: end;
}
#homeRecent .file-icon {
  width: 42px;
  height: 42px;
}
#homeRecent .file-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#homeRecent .file-action {
  width: 40px;
  height: 40px;
}
.workspace-status {
  min-height: 19px;
  margin: 0 0 4px;
}
#filesLoadStatus,
.transfer-scope {
  color: var(--muted);
  font-size: 12px;
}
.library-load-status {
  min-height: 19px;
  margin: 0 0 4px;
}
.link-retry {
  padding: 0;
  margin-inline-start: 10px;
  color: var(--accent-text);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}
.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.type-filters .category-card {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
  text-align: start;
  transform: none;
}
.type-filters .category-card[aria-current] {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.type-filters .category-card b {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.type-filters .category-card small {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.type-filters .category-icon {
  display: none;
}
.home-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 4px;
}
.screen-home .storage-card {
  min-height: 0;
  padding: 22px;
  box-shadow: none;
  border-radius: 18px;
}
.screen-home .storage-card h2 {
  font-size: 28px;
}
.screen-home .storage-ring {
  width: 66px;
  height: 66px;
}
.screen-home .storage-bar {
  margin-top: 16px;
}
.home-transfer-summary {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.home-transfer-summary .section-row {
  align-items: center;
  margin: 0 0 16px;
}
#homeTransferCounts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.home-transfer-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}
.home-transfer-link b {
  color: var(--accent-text);
}
.files-page .library-toolbar {
  margin-bottom: 4px;
}
.files-page .list-heading {
  margin-top: 0;
  margin-bottom: 12px;
}
.files-page .list-heading h2 {
  font-size: 20px;
}
.files-page .file-selection-actions {
  flex-wrap: wrap;
  margin-inline-start: auto;
}
.files-page .file-selection-buttons {
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  .home-summary-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .screen-home .dashboard-heading {
    align-items: flex-start;
    gap: 16px;
  }
  .home-search {
    flex-direction: row;
  }
  .home-search .button {
    flex-shrink: 0;
    padding-inline: 14px;
  }
  .type-filters {
    gap: 6px;
  }
  .type-filters .category-card {
    padding: 6px 10px;
  }
  .type-filters .category-card small {
    display: none;
  }
  .screen-home .storage-card,
  .home-transfer-summary {
    padding: 18px;
  }
}
@media (max-width: 430px) {
  #homeRecent .file-row {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 10px;
    padding: 12px;
  }
  #homeRecent .file-cell:nth-of-type(2) {
    display: none;
  }
  #homeRecent .file-icon {
    width: 36px;
    height: 36px;
  }
  .screen-home .dashboard-heading {
    flex-wrap: wrap;
  }
}

/* Transfers workspace */
/* .transfers-container { max-width: 1080px; } */
.transfers-heading {
  align-items: flex-start;
  margin-bottom: 12px;
}
.transfers-heading .button {
  flex-shrink: 0;
}
.transfers-page .stat-grid {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.transfers-page .stat-card {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 14px;
}
.transfers-page .stat-card b {
  font-size: 14px;
  line-height: inherit;
  margin: 0;
}
.transfers-page .stat-card[data-transfer-filter="active"] {
  flex: 1.12;
  font-weight: 700;
  color: var(--ink);
}
.transfers-page .stat-card.active {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--border);
}
.transfers-page .stat-card:hover {
  border-color: var(--accent-text);
}
.transfer-scope {
  margin: 0 0 12px;
}
.transfer-next-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 12px;
}
.transfer-handoff {
  background: var(--canvas);
  color: var(--muted);
  border: 1px solid var(--border);
}
.transfers-page .transfer-sections {
  margin-top: 16px;
}
.transfers-page .transfer-group {
  padding: 0;
  margin: 0;
}
.transfer-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.transfer-group-heading h2 {
  margin: 0;
  font-size: 18px;
}
.transfer-group-heading > span {
  color: var(--muted);
  font-size: 13px;
}
.transfers-page .transfer-card {
  grid-template-columns: 36px minmax(0, 1fr) minmax(160px, auto);
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: none;
}
.transfers-page .transfer-main {
  min-width: 0;
  overflow-wrap: anywhere;
}
.transfer-main b {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}
.transfer-main small {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 3px;
}
.transfer-error {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 5px 0 0;
  color: var(--ink);
}
.transfer-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 40px;
  max-width: 360px;
}
.transfer-side > .transfer-badge {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}
.transfer-side .transfer-next-steps {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.transfer-side .transfer-next-steps:empty {
  display: none;
}
.transfer-action {
  width: auto;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  box-shadow: none;
  transition: background-color 0.15s ease;
}
.transfer-action:hover {
  background: var(--accent-soft);
  transform: none;
}
.transfer-action:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .transfer-action {
    transition: none;
  }
}
.transfer-badge {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  padding: 3px 8px;
}
.transfer-card[data-status="failed"] .transfer-badge,
.transfer-card[data-status="expired"] .transfer-badge {
  color: var(--ink);
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  border: 1px solid var(--border);
}
.transfers-page .transfer-card .file-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin-top: 2px;
}
.transfers-page .transfer-card .ui-icon {
  width: 18px;
  height: 18px;
}
.transfer-progress {
  display: block;
  width: min(100%, 440px);
  height: 6px;
  margin-top: 8px;
  border: 0;
  border-radius: 4px;
  accent-color: var(--accent);
}
.transfer-progress::-webkit-progress-bar {
  background: var(--border);
  border-radius: 4px;
}
.transfer-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 4px;
}
.transfer-progress:indeterminate {
  opacity: 0.7;
}
.transfer-empty {
  position: relative;
  min-height: 180px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}
.transfer-empty > * {
  position: relative;
  z-index: 1;
}
.transfer-empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 19px;
  box-shadow: none;
}
.transfer-empty-icon .ui-icon {
  width: 28px;
  height: 28px;
}
.transfer-empty h2 {
  margin: 0 0 7px;
  font-size: 20px;
}
.transfer-empty p {
  max-width: 390px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}
.transfer-empty .button .ui-icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 760px) {
  .transfers-heading {
    gap: 20px;
  }
  .transfers-page .stat-card {
    padding: 10px 6px;
    gap: 6px;
    font-size: 12px;
  }
  .transfer-empty {
    min-height: 180px;
    padding-inline: 20px;
  }
}
@media (max-width: 760px) {
  .transfers-page .transfer-card {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 12px;
    gap: 8px 10px;
  }
  .transfers-page .transfer-card .file-icon {
    width: 32px;
    height: 32px;
  }
  .transfer-side {
    grid-column: 2;
    width: 100%;
    max-width: none;
    gap: 6px;
  }
}
@media (min-width: 1100px) and (max-width: 1400px) {
  .inspector-docked .transfers-page .transfer-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .inspector-docked .transfer-side {
    grid-column: 2;
    max-width: none;
  }
}

/* Android app footer */
.site-footer {
  padding: 32px 0 26px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.footer-app-card {
  min-height: 220px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 26px;
  overflow: hidden;
}
.footer-app-copy {
  max-width: 700px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
}
.footer-app-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent-text);
  background: var(--violet-soft);
  border-radius: 20px;
}
.footer-app-icon img {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 100%;
  object-fit: contain;
}
.footer-app-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 3vw, 34px);
}
.footer-app-copy p:not(.eyebrow) {
  max-width: 540px;
  margin-bottom: 20px;
  color: var(--muted);
}
.playstore-qr {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(33, 31, 64, 0.05);
}
.playstore-qr img {
  width: 150px;
  height: 150px;
  display: block;
  object-fit: contain;
}
.playstore-qr small {
  margin-top: 6px;
  color: #555465;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 64px;
  padding-block: 48px;
}
.footer-brand {
  max-width: 410px;
}
.footer-brand p {
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.footer-tagline {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
}
.footer-links h2 {
  margin: 6px 0 14px;
  font-size: 14px;
  letter-spacing: 0;
}
.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
}
.footer-links a:hover,
.footer-top-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-bottom {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.footer-top-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 600;
}
@media (max-width: 760px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding-block: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}
@media (max-width: 760px) {
  .footer-app-card {
    padding: 28px;
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-app-copy {
    gap: 16px;
  }
  .footer-app-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
  .playstore-qr {
    align-self: center;
  }
}
@media (max-width: 430px) {
  .footer-app-card {
    padding: 24px 18px;
  }
  .footer-app-copy {
    flex-direction: column;
  }
  .footer-app-copy .button {
    width: 100%;
  }
  .footer-bottom {
    padding-block: 18px;
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Small state transitions; content is visible even when motion is disabled. */
.file-thumbnail {
  transition: opacity 160ms ease-out;
}
.file-row,
.stat-card,
.home-transfer-link,
.category-card {
  transition:
    background-color 140ms ease-out,
    border-color 140ms ease-out;
}
.file-context-menu {
  animation: menu-reveal 120ms ease-out;
  transform-origin: top;
}
@keyframes menu-reveal {
  from {
    opacity: 0.7;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .file-thumbnail,
  .file-row,
  .stat-card,
  .home-transfer-link,
  .category-card {
    transition: none;
  }
  .file-context-menu,
  .skeleton-file-icon,
  .skeleton-file-copy i,
  .skeleton-file-action {
    animation: none;
  }
}
