:root {
  --page: #f6f8fc;
  --surface: #ffffff;
  --surface-hover: #f3f6fb;
  --text: #1f2328;
  --muted: #697386;
  --line: #e2e7ee;
  --blue: #0b57d0;
  --blue-hover: #0847ad;
  --blue-soft: #e9f0ff;
  --green: #137a4b;
  --green-soft: #e6f4ed;
  --red: #b3261e;
  --red-soft: #fce8e6;
  --shadow: 0 18px 55px rgba(38, 50, 67, 0.14);
  color: var(--text);
  background: var(--page);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 15px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

button,
select,
label[for],
.upload-orb {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.upload-orb:focus-within {
  outline: 3px solid rgba(11, 87, 208, 0.22);
  outline-offset: 2px;
}

svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 16px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.brand-mark {
  position: relative;
  width: 29px;
  height: 29px;
  display: block;
}

.brand-mark i {
  position: absolute;
  inset: 2px 5px 5px 2px;
  border: 2px solid var(--blue);
  border-radius: 7px 11px 7px 7px;
}

.brand-mark i:last-child {
  inset: 7px 0 0 7px;
  border-color: rgba(11, 87, 208, 0.38);
}

.repository-picker {
  margin: 29px 6px 0;
  display: grid;
  gap: 7px;
}

.repository-picker > span {
  padding-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.repository-picker select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.sidebar nav {
  margin-top: 22px;
  display: grid;
  gap: 4px;
}

.nav {
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  color: #596579;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 560;
}

.nav svg {
  width: 20px;
  height: 20px;
}

.nav:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav.active {
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 650;
}

.sidebar-footer {
  margin-top: auto;
}

.quota {
  margin: 0 7px 17px;
  padding: 15px 4px 0;
  border-top: 1px solid var(--line);
}

.quota-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.quota-copy span,
.quota small {
  color: var(--muted);
}

.quota-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.quota-track {
  height: 5px;
  margin: 10px 0 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5eaf1;
}

.quota-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.3s ease;
}

.quota small {
  display: block;
  font-size: 10px;
}

.account {
  min-height: 52px;
  padding: 7px 7px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 30px;
  gap: 9px;
  align-items: center;
  border-radius: 11px;
}

.account:hover {
  background: var(--surface-hover);
}

.account > b {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 13px;
}

.account span {
  min-width: 0;
}

.account span strong,
.account span small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account span strong {
  font-size: 12px;
  font-weight: 650;
}

.account span small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.logout {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.logout:hover {
  color: var(--red);
  background: var(--red-soft);
}

.logout svg {
  width: 17px;
  height: 17px;
}

.workspace {
  min-width: 0;
  padding: 42px clamp(28px, 5.5vw, 82px) 60px;
}

.topbar {
  min-height: 78px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 24px;
  align-items: center;
}

.page-heading button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.page-heading button:hover {
  color: var(--blue);
}

.page-heading h1 {
  margin: 4px 0 0;
  font-size: clamp(31px, 4vw, 43px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 710;
}

.upload-orb {
  position: relative;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(11, 87, 208, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.upload-orb:hover {
  transform: translateY(-2px);
  background: var(--blue-hover);
  box-shadow: 0 16px 32px rgba(11, 87, 208, 0.34);
}

.upload-orb input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-orb svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.9;
}

.upload-orb span {
  position: absolute;
  top: calc(100% + 7px);
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
}

.primary,
.secondary,
.text-button {
  min-height: 41px;
  padding: 9px 15px;
  border-radius: 9px;
  font-weight: 620;
}

.primary {
  border: 1px solid var(--blue);
  color: #fff;
  background: var(--blue);
}

.primary:hover {
  border-color: var(--blue-hover);
  background: var(--blue-hover);
}

.secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.secondary:hover {
  border-color: #bdc7d5;
  background: var(--surface-hover);
}

.text-button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.text-button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.file-surface {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.table-header,
.entry {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 120px;
  gap: 20px;
  align-items: center;
}

.table-header {
  min-height: 43px;
  padding: 0 58px 0 20px;
  border-bottom: 1px solid var(--line);
  color: #7a8494;
  background: #fbfcfe;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.entry {
  position: relative;
  min-height: 70px;
  padding: 0 58px 0 20px;
  border-bottom: 1px solid #edf0f4;
  transition: background 0.12s ease;
}

.entry:last-child {
  border-bottom: 0;
}

.entry:hover,
.entry:focus-within {
  background: var(--surface-hover);
}

.entry-name {
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.entry-name > span:last-child {
  min-width: 0;
}

.entry-name strong,
.entry-name small {
  display: block;
}

.entry-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 620;
}

.entry-name small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.entry-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.entry-icon.folder {
  color: var(--blue);
  background: var(--blue-soft);
}

.entry-icon.file {
  color: #5f6d80;
  background: #edf1f5;
}

.entry-icon svg {
  width: 22px;
  height: 22px;
}

.entry-meta {
  color: var(--muted);
  font-size: 12px;
}

.integrity {
  width: max-content;
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 650;
}

.integrity.folder {
  padding: 0;
  color: #a2aab6;
  background: transparent;
}

.entry-more {
  position: absolute;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0 0 7px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  letter-spacing: 1px;
  opacity: 0;
}

.entry:hover .entry-more,
.entry:focus-within .entry-more {
  opacity: 1;
}

.entry-more:hover {
  color: var(--text);
  background: #e4e9f0;
}

.empty {
  min-height: 370px;
  padding: 50px 20px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-upload {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
}

.empty-upload svg {
  width: 28px;
  height: 28px;
}

.empty h2 {
  margin: 18px 0 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.empty p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f3c9c5;
  border-radius: 10px;
  color: #8b1d17;
  background: var(--red-soft);
  font-size: 13px;
}

.notice[data-kind="success"] {
  border-color: #b8dfca;
  color: #0d6840;
  background: var(--green-soft);
}

.upload-queue {
  margin: 0 0 18px;
  padding: 15px 17px;
  border: 1px solid #cddcf7;
  border-radius: 11px;
  background: #eef4ff;
}

.upload-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.upload-item strong {
  font-size: 12px;
}

.upload-item span {
  color: var(--blue);
  font-size: 11px;
}

.upload-progress {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #cedcf3;
}

.upload-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.18s ease;
}

.context-menu {
  position: fixed;
  z-index: 50;
  width: 220px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.context-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-size: 12px;
}

.context-menu button:hover,
.context-menu button:focus-visible {
  background: var(--surface-hover);
}

.context-menu button.danger {
  color: var(--red);
}

.context-menu button.danger:hover {
  background: var(--red-soft);
}

.context-menu svg {
  width: 17px;
  height: 17px;
}

.context-menu hr {
  height: 1px;
  margin: 6px 5px;
  border: 0;
  background: var(--line);
}

.admin-toolbar {
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid #cfddf7;
  border-radius: 15px;
  background: var(--blue-soft);
}

.admin-toolbar > div > span,
dialog small,
.credentials-sheet > small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.admin-toolbar h2 {
  margin: 5px 0 3px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.admin-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.users {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.user {
  position: relative;
  min-height: 68px;
  padding: 0 58px 0 20px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px 110px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #edf0f4;
}

.user-more {
  position: absolute;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0 0 7px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  letter-spacing: 1px;
  opacity: 0;
}

.user:hover .user-more,
.user:focus-within .user-more {
  opacity: 1;
}

.user-more:hover {
  color: var(--text);
  background: #e4e9f0;
}

.user:last-child {
  border-bottom: 0;
}

.user strong,
.user small {
  display: block;
}

.user strong {
  font-size: 13px;
}

.user small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.user-quota {
  color: var(--muted);
  font-size: 12px;
}

.status {
  width: max-content;
  padding: 6px 10px;
  border: 0;
  border-radius: 99px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 650;
}

.status.disabled {
  color: var(--red);
  background: var(--red-soft);
}

dialog {
  width: min(450px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(29, 39, 53, 0.24);
}

dialog::backdrop {
  background: rgba(29, 38, 51, 0.38);
  backdrop-filter: blur(3px);
}

dialog > form,
.credentials-sheet,
.share-sheet {
  padding: 29px;
}

dialog h2,
.credentials-sheet h2 {
  margin: 6px 0 20px;
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

dialog label {
  margin: 14px 0;
  display: grid;
  gap: 7px;
  color: #465266;
  font-size: 12px;
  font-weight: 620;
}

input,
dialog select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd3de;
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
}

input:focus,
dialog select:focus {
  border-color: var(--blue);
}

dialog footer {
  margin-top: 23px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.error {
  padding: 10px 12px;
  border-radius: 8px;
  color: #8b1d17;
  background: var(--red-soft);
  font-size: 12px;
}

.share-sheet > p,
.credentials-sheet > p {
  margin: -7px 0 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.generated-link {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.generated-link input {
  min-width: 0;
  color: #39465a;
  background: #f5f7fa;
  font-size: 11px;
}

.credentials-sheet label {
  color: var(--muted);
  font-size: 11px;
}

.credentials-sheet code {
  padding: 11px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #f5f7fa;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.credential-actions {
  margin: 18px 0 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.full {
  width: 100%;
}

.login-page {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: #eef2f8;
}

.login-layout {
  width: min(860px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
  border: 1px solid #dce2ea;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 26px 75px rgba(38, 50, 67, 0.15);
}

.login-identity {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--blue);
}

.login-identity::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  top: -190px;
  right: -160px;
  border: 65px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.login-identity p {
  margin: 0;
  opacity: 0.76;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-identity h1 {
  margin: 5px 0 14px;
  font-size: clamp(68px, 9vw, 98px);
  line-height: 0.84;
  letter-spacing: -0.075em;
}

.login-identity span {
  max-width: 310px;
  display: block;
  opacity: 0.82;
  font-size: 13px;
  line-height: 1.5;
}

.shelf-mark {
  position: absolute;
  top: 52px;
  left: 48px;
  width: 80px;
}

.shelf-mark i {
  position: absolute;
  width: 64px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 5px 12px 5px 5px;
}

.shelf-mark i:nth-child(2) {
  transform: translate(7px, 8px);
  opacity: 0.55;
}

.shelf-mark i:nth-child(3) {
  transform: translate(14px, 16px);
  opacity: 0.25;
}

.login-form {
  padding: 48px 43px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form header small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.login-form h2 {
  margin: 5px 0 20px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.login-form label {
  margin: 11px 0;
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 620;
}

.login-form .primary {
  margin-top: 14px;
}

.share-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
}

.share-status {
  position: relative;
  width: min(520px, calc(100% - 48px));
  padding-top: 92px;
}

.share-status .shelf-mark {
  top: 0;
  left: 0;
}

.share-status p {
  margin: 0 0 8px;
  opacity: 0.72;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-status h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
    padding-bottom: 70px;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    width: auto;
    height: 68px;
    padding: 8px 12px;
    display: block;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .brand,
  .repository-picker,
  .sidebar-footer {
    display: none;
  }

  .sidebar nav {
    margin: 0;
    display: flex;
    justify-content: space-around;
  }

  .nav {
    min-width: 78px;
    min-height: 51px;
    padding: 4px 12px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
  }

  .nav svg {
    width: 19px;
    height: 19px;
  }

  .workspace {
    padding: 25px 14px 34px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .upload-orb {
    position: fixed;
    z-index: 18;
    right: 18px;
    bottom: 86px;
    width: 58px;
    height: 58px;
  }

  .upload-orb span {
    display: none;
  }

  .top-actions {
    grid-column: 2;
  }

  .icon-button span {
    display: none;
  }

  .icon-button {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .table-header {
    display: none;
  }

  .entry {
    grid-template-columns: minmax(0, 1fr);
    min-height: 68px;
    padding-right: 50px;
  }

  .entry > .entry-meta,
  .entry > .integrity {
    display: none;
  }

  .entry-more {
    opacity: 1;
  }

  .admin-toolbar {
    padding: 22px;
    align-items: flex-start;
  }

  .user {
    grid-template-columns: 1fr auto;
  }

  .user-more {
    opacity: 1;
  }

  .user-quota {
    display: none;
  }

  .login-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-identity {
    min-height: 180px;
    padding: 28px;
  }

  .login-identity h1 {
    font-size: 62px;
  }

  .login-identity span {
    display: none;
  }

  .shelf-mark {
    top: 26px;
    left: auto;
    right: 28px;
    transform: scale(0.62);
    transform-origin: top right;
  }

  .login-form {
    padding: 34px 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
