:root {
  --bg: #111214;
  --surface: #17191c;
  --surface-2: #1b1e22;
  --text: #f2f2f0;
  --text-2: #d6d8da;
  --muted: #8f949b;
  --line: #2a2d31;
  --line-soft: #22252a;
  --blue: #4a8ee8;
  --red: #e1261c;
  --hover: #1c1f23;
  --button: #f2f2f0;
  --button-text: #151619;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(42px, env(safe-area-inset-top))
    0
    calc(92px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
}

.brand {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: #cfd2d5;
  white-space: nowrap;
}

.brand-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: -2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sign-out {
  border: 0;
  background: none;
  padding: 4px 0;
  color: #e1261c;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sign-out:hover,
.sign-out:focus-visible {
  color: #f0352a;
  outline: none;
}

.langs {
  display: flex;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #62676e;
  user-select: none;
}

.langs button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
}

.langs button.active {
  color: #d8dadd;
}

.login-wrap,
.message-wrap {
  min-height: calc(100vh - 150px);
  min-height: calc(100dvh - 150px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(390px, 100%);
  transform: translateY(-24px);
}

.login-project {
  margin: 0 0 48px;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: normal;
}

.login-project:empty {
  display: none;
  margin: 0;
}

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  color: #9ea3a9;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: #15171a;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:focus {
  border-color: #4d5259;
  background: #181a1e;
}

.field.error input {
  border-color: #6c3437;
}

.inline-error {
  margin-top: -12px;
  margin-bottom: 22px;
  color: #cf777b;
  font-size: 11px;
  line-height: 1.45;
}

.primary {
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  background: var(--button);
  color: var(--button-text);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-card .primary {
  width: 100%;
  margin-top: 8px;
}

.workspace {
  padding-top: 60px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  max-width: 1000px;
  margin-bottom: 35px;
  font-size: 13px;
  line-height: 1.8;
}

.crumb {
  padding: 0;
  border: 0;
  background: none;
  color: #777c83;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.crumb:hover {
  color: #d0d3d6;
}

.crumb.current {
  color: #b9bdc2;
  cursor: default;
}

.sep {
  color: #41454b;
}

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

.title {
  margin: 0;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 560;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.download-folder {
  flex: none;
  height: 42px;
  padding: 0 18px;
  border: 1px solid #3b3f45;
  border-radius: 4px;
  background: transparent;
  color: #e4e6e8;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.115em;
  text-transform: uppercase;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.download-folder:hover {
  background: #1a1c20;
  border-color: #555a61;
}

.list {
  border-top: 1px solid var(--line);
}

.row {
  min-height: 63px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 42px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.12s ease;
}

.row:hover {
  background: var(--hover);
}

.folder-row {
  cursor: pointer;
}

.name-wrap {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-left: 6px;
}

.folder-shape {
  position: relative;
  width: 22px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 3px;
  border-radius: 2px;
  background: var(--blue);
  opacity: 0.93;
}

.folder-shape::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -4px;
  width: 9px;
  height: 5px;
  border-radius: 2px 2px 0 0;
  background: var(--blue);
}

.name {
  min-width: 0;
  color: #e7e8e9;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: normal;
}

.folder-row .name {
  font-weight: 520;
}

.size {
  color: #72777e;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.file-main {
  min-width: 0;
  padding-left: 6px;
}

.file-meta {
  display: none;
}

.file-download {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8f949b;
  transition: background 0.15s ease, color 0.15s ease;
}

.file-download:hover {
  background: #25282d;
  color: #fff;
}

.download-glyph {
  position: relative;
  width: 15px;
  height: 17px;
}

.download-glyph::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 1px;
  height: 11px;
  background: currentColor;
}

.download-glyph::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.download-base {
  position: absolute;
  left: 2px;
  right: 1px;
  bottom: 0;
  height: 1px;
  background: currentColor;
}

.progress-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid #282b30;
  background: rgba(17, 18, 20, 0.965);
  backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}

.progress-inner {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 14px 0 16px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 10px;
  color: #c8cbce;
  font-size: 12px;
}

.progress-name {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.progress-pct {
  flex: 0 0 auto;
  white-space: nowrap;
}

.progress-track {
  height: 2px;
  overflow: hidden;
  background: #30343a;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #f1f1ef;
  transition: width 0.22s linear;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: min(410px, calc(100% - 56px));
  padding: 20px 21px 19px;
  border: 1px solid #30343a;
  border-radius: 5px;
  background: #181a1e;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.toast-title {
  margin-bottom: 7px;
  color: #eceeed;
  font-size: 14px;
  font-weight: 620;
}

.toast-copy {
  color: #979ca3;
  font-size: 12px;
  line-height: 1.58;
}

.toast-action {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: #eceeed;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.message-card {
  width: min(520px, 100%);
  transform: translateY(-24px);
}

.message-eyebrow {
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: #cfd2d5;
}

.message-title {
  margin: 0 0 13px;
  font-size: 28px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.message-copy {
  max-width: 440px;
  margin: 0;
  color: #8f949b;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 720px) {
  .topbar-actions {
    gap: 12px;
  }

  .sign-out {
    font-size: 9px;
  }

  .login-project {
    margin-bottom: 42px;
    font-size: 25px;
  }

  .shell {
    width: min(100% - 32px, 1180px);
    padding-top: max(26px, env(safe-area-inset-top));
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .workspace {
    padding-top: 44px;
  }

  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .title {
    font-size: 26px;
  }

  .download-folder {
    width: 100%;
    min-height: 44px;
  }

  .breadcrumbs {
    font-size: 12px;
    margin-bottom: 28px;
  }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 64px;
  }

  .name-wrap {
    gap: 12px;
    padding: 15px 0 15px 4px;
  }

  .folder-shape {
    width: 21px;
    height: 14px;
  }

  .name {
    font-size: 13px;
  }

  .size {
    display: none;
  }

  .file-main {
    padding: 14px 0 13px 4px;
  }

  .file-meta {
    display: block;
    margin-top: 5px;
    color: #72777e;
    font-size: 11px;
  }

  .file-download {
    width: 40px;
    height: 40px;
  }

  .progress-inner {
    width: min(100% - 32px, 1180px);
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .progress-meta {
    font-size: 11px;
    gap: 14px;
  }

  .toast {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: min(410px, calc(100% - 32px));
  }
}
