.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--accent);
  text-underline-offset: 3px;
}
.download-link:hover {
  background: var(--raised);
  border-radius: 7px;
}
:root {
  color-scheme: dark;
  --bg: #111518;
  --surface: #181e22;
  --raised: #20282d;
  --line: #303b42;
  --text: #eef3f5;
  --muted: #a6b4bd;
  --accent: #98dfc0;
  --danger: #ffb2ac;
  --radius: 10px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--raised);
  color: var(--text);
  padding: 10px 16px;
  font-weight: 600;
}
button:hover {
  background: #2a363e;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: #14281f;
  border-color: var(--accent);
}
.primary:hover {
  background: #b7ecd5;
}
.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.danger {
  color: var(--danger);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid #53616a;
  color: var(--text);
  border-radius: 7px;
  padding: 12px;
}
label {
  display: block;
  font-weight: 600;
  margin: 18px 0 8px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin-bottom: 10px;
  line-height: 1.2;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
  line-height: 1.6;
}
.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  margin-bottom: 12px;
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.login-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.login-card .brand-mark {
  margin-bottom: 30px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #173529;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.wide {
  width: 100%;
}
.login-card form {
  margin: 25px 0;
}
.error {
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.error:empty {
  display: none;
}
.workspace {
  display: flex;
  min-height: 100dvh;
}
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: #141a1e;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
}
.section-label {
  margin-top: 48px;
  color: var(--muted);
  padding-left: 12px;
}
.nav-button {
  width: 100%;
  text-align: left;
  background: none;
  border-color: transparent;
  margin-bottom: 6px;
  color: var(--muted);
}
.nav-button.active {
  color: var(--accent);
  background: #20332c;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 44px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-footer button {
  display: block;
  margin-top: 12px;
  padding-left: 0;
}
.status-dot {
  display: inline-block;
  background: var(--accent);
  width: 6px;
  height: 6px;
  border-radius: 100%;
  margin-right: 8px;
}
.content {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 76px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
main {
  padding: 40px;
  max-width: 1450px;
  margin: auto;
  min-height: calc(100dvh - 150px);
}
.heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.heading-row p:last-child {
  margin-bottom: 0;
}
.actions {
  display: flex;
  gap: 10px;
}
.file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 12px;
}
#breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
#default-folder-status {
  flex: 1;
  text-align: right;
  overflow-wrap: anywhere;
}
#breadcrumbs button {
  background: none;
  border: none;
  padding: 8px;
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}
#breadcrumbs button[aria-current] {
  color: var(--text);
  font-weight: 600;
}
.table-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 17px 20px;
  background: #1c2429;
}
td {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  overflow-wrap: anywhere;
}
td:first-child {
  min-width: 180px;
}
td:last-child {
  width: 1%;
  white-space: nowrap;
}
.file-name {
  background: none;
  border: none;
  padding: 7px 0;
  text-align: left;
  color: var(--text);
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.file-icon {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  flex-shrink: 0;
}
.row-actions {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 340px;
}
.row-actions button {
  font-size: 12px;
  padding: 8px 10px;
  min-height: 40px;
}
.row-actions button.star {
  font-size: 16px;
  line-height: 1;
}
.row-actions button.starred {
  color: var(--accent);
  border-color: var(--accent);
}
.table-note {
  padding: 17px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.empty {
  text-align: center;
  padding: 65px 25px;
}
.empty h2 {
  font-size: 20px;
}
.empty p {
  color: var(--muted);
  margin: 0;
}
footer {
  padding: 20px 40px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
dialog {
  color: var(--text);
  background: var(--surface);
  border: 1px solid #53616a;
  border-radius: 12px;
  width: min(94vw, 520px);
  padding: 26px;
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #000b;
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.dialog-heading h2 {
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.dialog-actions button {
  flex-shrink: 0;
}
#editor-dialog {
  width: min(94vw, 1000px);
}
#editor-content {
  height: 55dvh;
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  tab-size: 4;
  line-height: 1.6;
}
.info,
#notice {
  padding: 16px 20px;
  background: #20312b;
  border: 1px solid #46695a;
  border-radius: 8px;
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 24px;
}
#notice.error {
  background: #382522;
  border-color: #82534d;
}
.checkbox-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
  margin: 12px 0;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.token-secret {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  background: var(--bg);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  user-select: all;
}
.upload-row {
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.upload-row p {
  font-size: 13px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
.dragover {
  outline: 3px dashed var(--accent);
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10;
  background: var(--accent);
  color: #14281f;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
@media (max-width: 1000px) {
  .sidebar {
    width: 200px;
    padding: 24px 14px;
  }
  main {
    padding: 28px 22px;
  }
  .topbar,
  footer {
    padding-left: 22px;
    padding-right: 22px;
  }
  th,
  td {
    padding: 12px;
  }
  .row-actions {
    max-width: 230px;
  }
}
@media (max-width: 720px) {
  .workspace {
    display: block;
  }
  .sidebar {
    width: 100%;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 12px;
  }
  .section-label,
  .sidebar-footer .status-dot {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 18px;
    gap: 8px;
  }
  .nav-button {
    width: auto;
    margin: 0;
    flex: 1;
    text-align: center;
  }
  .sidebar-footer {
    padding: 0;
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 0;
  }
  .sidebar-footer button {
    font-size: 12px;
    padding: 8px;
    margin: 0;
  }
  .topbar {
    height: 55px;
  }
  .heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  h1 {
    font-size: 28px;
  }
  main {
    padding: 28px 16px;
  }
  .actions {
    width: 100%;
  }
  .actions button {
    flex: 1;
  }
  footer {
    padding: 18px 16px;
    flex-direction: column;
    gap: 6px;
  }
  .login-card {
    padding: 28px 24px;
  }
  dialog {
    padding: 20px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  td:nth-child(2),
  th:nth-child(2) {
    white-space: nowrap;
  }
}
@media (max-width: 720px) {
  .nav-button {
    font-size: 13px;
    padding: 10px 8px;
    white-space: nowrap;
  }
  .table-shell table,
  .table-shell tbody {
    display: block;
    width: 100%;
  }
  .table-shell thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .table-shell tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
  }
  .table-shell tr:first-child {
    border-top: 0;
  }
  .table-shell td {
    display: block;
    border: 0;
    padding: 4px 0;
    min-width: 0 !important;
    width: auto !important;
    white-space: normal !important;
  }
  .table-shell td:first-child,
  .table-shell td:last-child {
    grid-column: 1/-1;
  }
  .table-shell td:first-child {
    font-size: 15px;
    font-weight: 600;
  }
  .table-shell td:nth-child(2),
  .table-shell td:nth-child(3):not(:last-child) {
    font-size: 12px;
    color: var(--muted);
  }
  .row-actions {
    max-width: none;
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
  }
  .row-actions button {
    min-height: 44px;
    background: var(--raised);
  }
  .file-name {
    width: 100%;
  }
  .upload-row .quiet {
    margin-top: 8px;
  }
  .table-note {
    font-size: 11px;
  }
}
.download-button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border-radius: 7px;
  padding: 12px;
  text-decoration: none;
  font-weight: 700;
  margin: 24px 0 12px;
}
.share-card {
  width: min(100%, 540px);
}
.share-card h2 {
  overflow-wrap: anywhere;
}
.share-card form button {
  margin-top: 16px;
}
@media (max-width: 480px) {
  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
