/* 管理端：登录门、顶栏、标签页、内容表、上传面板 */
body.admin {
  background: var(--desk);
}
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background-image: var(--dots);
  background-size: 28px 28px;
}
.gate-card {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(400px, 100%);
  padding: 32px 28px 26px;
  background: var(--paper);
  border: 1px solid var(--ink);
  outline: 1px solid var(--line-2);
  outline-offset: 6px;
  box-shadow: var(--shadow);
}
.gate-card::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 30px;
  height: 30px;
  background: linear-gradient(225deg, var(--desk) 0 calc(50% - 0.5px), var(--ink) calc(50% - 0.5px) calc(50% + 0.5px), #dfe3dc calc(50% + 0.5px));
}
.gate-card h1 {
  font-size: var(--fs-lg);
}
.back-link {
  justify-self: start;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-2);
}
.back-link:hover {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

.app {
  min-height: 100dvh;
  background: var(--paper);
  background-image: var(--dots);
  background-size: 28px 28px;
}
.a-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(14px, 3vw, 36px);
  background: rgba(248, 249, 246, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-2);
}
.a-top .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.a-top .brand em {
  font-style: normal;
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent-ink);
  border: 1px solid rgba(178, 56, 32, 0.4);
  border-radius: 2px;
}
.a-top-actions {
  display: flex;
  gap: 8px;
}
.a-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 36px) 80px;
}
.a-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-2);
}
.a-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink-2);
  font-weight: 500;
  border: 1px solid transparent;
  border-bottom: 0;
  margin-bottom: -1px;
  transition: color 0.2s, background-color 0.2s;
}
.a-tabs button:hover {
  color: var(--ink);
  background: var(--paper-3);
}
.a-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line-2);
}
.a-tabs button[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 3px;
  background: var(--accent);
}
.a-tabs .n {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.a-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 0 18px;
}
.a-bar h2 {
  font-size: var(--fs-lg);
}
.a-bar .hint {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

.table {
  background: var(--paper);
  border: 1px solid var(--line-2);
}
.trow {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.trow:last-child {
  border-bottom: 0;
}
.trow.head {
  padding-block: 10px;
  background: var(--paper-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.trow.articles {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.thumb {
  position: relative;
  width: 120px;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(135deg, var(--paper-3) 0 8px, #e8ebe5 8px 16px);
  overflow: hidden;
}
.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tinfo {
  min-width: 0;
}
.tinfo b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tinfo span {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ttime {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tact {
  display: flex;
  gap: 4px;
}
.tact .icon-btn:hover {
  color: var(--ink);
}
.tact .icon-btn.del:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 16px;
  text-align: center;
  background: var(--paper-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.drop:hover,
.drop.over,
.drop:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop svg {
  color: var(--accent);
}
.drop b {
  font-weight: 500;
  word-break: break-all;
}
#v-file:focus-visible + .drop,
.field:has(#v-file:focus-visible) .drop {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.time-row {
  display: flex;
  gap: 8px;
}
.time-row .input {
  flex: 1;
}
.progress .bar {
  height: 6px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.progress .hint {
  margin-top: 6px;
}
.modal--sm {
  width: min(420px, calc(100vw - 24px));
}
.modal--sm h2 {
  font-size: var(--fs-md);
}
.modal--sm .hint {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}

@media (max-width: 720px) {
  .trow {
    grid-template-columns: 88px minmax(0, 1fr) auto;
  }
  .trow.head {
    display: none;
  }
  .trow .thumb {
    width: 88px;
  }
  .trow .ttime {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .trow.articles {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .trow.articles .ttime {
    grid-column: 1;
    grid-row: 2;
  }
  .trow.articles .tact {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .a-top .brand span {
    display: none;
  }
}
