/* ---------- Tables always visible (horizontally scrollable on mobile) ---------- */

.table-wrap {
  display: block;
}

/* ---------- Login ---------- */

.login-wrap {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

.login-panel {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-panel h1 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 800;
}

.login-error {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--status-abort, #a16207);
  border-radius: 6px;
  background: var(--hover);
  color: var(--text);
  font-size: 13.5px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
}

.login-panel .btn {
  width: 100%;
}

/* ---------- Main content sections ---------- */

.sec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.sec h1 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
}

.sec h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
}

.download-item-name {
  font-weight: 700;
}

.download-item-meta {
  color: var(--text-secondary);
  font-size: 13px;
}

.download-item .btn {
  flex: none;
}

.note {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--hover);
  color: var(--text);
  font-size: 13.5px;
}

.sec ul,
.sec ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.sec li {
  margin-bottom: 4px;
}

/* ---------- Stat tiles (metrics) ---------- */

.stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-tile {
  flex: 1 1 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.stat-tile-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.stat-tile-value {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
}

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

/* ---------- Appbar dropdown menu ---------- */

.menu-root {
  position: relative;
}

.menu-toggle {
  background: transparent;
  border-color: transparent;
  color: var(--appbar-text);
}

.menu-toggle:hover {
  background: var(--appbar-hover);
}

.menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
  padding: 6px;
}

.menu-dropdown[hidden] {
  display: none;
}

.menu-link {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.menu-link:hover {
  background: var(--hover);
}

.menu-link-active {
  color: var(--link);
}

.menu-sep {
  height: 1px;
  margin: 6px 2px;
  background: var(--border);
}

/* ---------- Pagination ---------- */

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pager a,
.pager span {
  min-width: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  text-align: center;
}

.pager a:hover {
  background: var(--hover);
}

.pager .cur {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

.pager .dis {
  opacity: 0.5;
  pointer-events: none;
}
