:root {
  --bg: #14171c;
  --panel: #1b1f27;
  --border: #262b35;
  --text: #c7ccd6;
  --muted: #838a99;
  --accent: #4fb8ab;
  --accent-dim: #2f4a47;
  --row-hover: #20242e;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 920px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.crumbs {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 14px;
  scrollbar-width: none;
}
.crumbs::-webkit-scrollbar {
  display: none;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 2px;
}
.crumbs a:hover,
.crumbs a:focus-visible {
  color: var(--accent);
}
.crumbs .sep {
  color: var(--border);
  margin: 0 2px;
}
.crumbs .current {
  color: var(--text);
  padding: 4px 2px;
}

.zip-btn,
.row-btn {
  flex-shrink: 0;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.zip-btn:hover,
.row-btn:hover {
  background: var(--accent-dim);
}
.zip-btn:focus-visible,
.row-btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main {
  flex: 1;
  padding: 0 16px 32px;
}

.status {
  padding: 40px 4px;
  color: var(--muted);
  font-size: 14px;
}

table.listing {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.listing thead th {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.c-actions {
  width: 1%;
}

.c-name {
  text-align: left;
}
.c-size,
.c-mtime,
.c-actions {
  text-align: right;
}

.listing tbody tr {
  border-bottom: 1px solid var(--border);
}
.listing tbody tr:hover {
  background: var(--row-hover);
}

.listing td {
  padding: 10px 8px;
  vertical-align: middle;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--muted);
}
tr.is-dir .icon {
  color: var(--accent);
}

.name-link {
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name-link:hover,
.name-link:focus-visible {
  color: var(--accent);
}

.c-size,
.c-mtime {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.c-actions {
  text-align: right;
  white-space: nowrap;
}

.row-btn.small {
  padding: 5px 10px;
  font-size: 12px;
  margin-left: 6px;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
  padding: 48px 8px;
}

/* Mobile: drop the modified column, tighten padding, keep size + actions */
@media (max-width: 560px) {
  .col-mtime {
    width: 0;
  }
  .bar {
    padding: 12px;
    gap: 8px;
  }
  main {
    padding: 0 10px 24px;
  }
  .listing td,
  .listing thead th {
    padding: 9px 6px;
  }
  .zip-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}
