:root {
  color-scheme: dark;
  --bg: #0a1712;
  --bg-soft: #10241c;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #ecfff4;
  --muted: #b6d7c4;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #2fcc74;
  --accent-2: #1ca55b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 10%, rgba(47, 204, 116, 0.2), transparent 30%),
    radial-gradient(circle at 12% 22%, rgba(216, 255, 120, 0.14), transparent 35%),
    linear-gradient(140deg, var(--bg) 0%, var(--bg-soft) 60%, #09120f 100%);
}

.container {
  width: min(1200px, 94vw);
  margin: 24px auto 40px;
}

h1 {
  margin: 0 0 16px;
  font-size: 1.65rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(3px);
}

.controls-block {
  background: rgba(7, 22, 16, 0.28);
  border: 1px solid rgba(181, 255, 147, 0.2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.controls-block-filter {
  border-color: rgba(181, 255, 147, 0.32);
}

.controls-title {
  margin: 0 0 10px;
  font-size: 1.02rem;
  color: #d7f4e4;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

.field-button {
  align-content: end;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  background: rgba(7, 22, 16, 0.45);
  color: var(--text);
}

input::placeholder {
  color: #9cc4ae;
}

.fulltext-field {
  grid-column: 1 / -1;
}

.actions-toolbar {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.actions-left,
.actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions-right {
  margin-left: auto;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #072114;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:hover:not(:disabled) {
  background: var(--accent-2);
  color: #eafbf1;
}

.btn-filelike {
  border: 1px solid var(--line);
  background: rgba(7, 22, 16, 0.45);
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.btn-filelike:hover:not(:disabled) {
  background: rgba(7, 22, 16, 0.65);
  color: #f3fff8;
}

.filelike-main {
  background: #707577;
  color: #f4f5f6;
  border-radius: 4px;
  padding: 7px 12px;
  line-height: 1;
  font-weight: 700;
}

.filelike-text {
  white-space: nowrap;
}

.btn-ghost {
  border-color: rgba(181, 255, 147, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: #cfe8da;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #eafbf1;
}

.btn-secondary-action {
  width: 100%;
  min-height: 40px;
  border-color: rgba(181, 255, 147, 0.42);
  background: rgba(255, 255, 255, 0.03);
  color: #cfe8da;
}

.btn-secondary-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #eafbf1;
}

.btn-x {
  width: 14px;
  text-align: center;
  line-height: 1;
}

.status {
  margin: 2px 0 0;
  color: var(--muted);
}

.summary {
  margin-bottom: 10px;
  font-weight: 600;
}

.subheading {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.table-top-control {
  margin-bottom: 8px;
}

.table-top-range {
  width: 100%;
}

.back-to-top-btn {
  min-width: 160px;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: translateY(8px);
}

.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(181, 255, 147, 0.22);
  text-align: left;
  padding: 8px 10px;
  font-size: 0.88rem;
}

th:last-child,
td:last-child {
  border-right: none;
}

th {
  position: sticky;
  top: 0;
  background: var(--card-strong);
  z-index: 1;
  text-align: center;
}

.sort-btn {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  padding: 0 14px 0 0;
  text-align: center;
  cursor: pointer;
}

.sort-label {
  display: block;
  width: 100%;
}

.sort-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #b5ff93;
  font-size: 0.82rem;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 920px) {
  .row {
    grid-template-columns: 1fr;
  }

  .actions-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-left,
  .actions-right {
    width: 100%;
    margin-left: 0;
  }

  .actions-right {
    justify-content: stretch;
  }

  .actions-left button,
  .actions-right button {
    flex: 1;
  }

  .btn-filelike {
    justify-content: center;
  }
}
