@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap");

:root {
  --bg-base: #041026;
  --bg-deep: #020814;
  --surface: rgba(13, 27, 54, 0.82);
  --surface-strong: #102a56;
  --line: rgba(173, 197, 242, 0.28);
  --text: #edf4ff;
  --text-muted: #9db1d6;
  --accent: #1dd5a5;
  --accent-strong: #0eb88b;
  --warning: #f7b731;
  --error: #ff7d7d;
  --success: #53e08c;
  --shadow: 0 22px 58px rgba(1, 7, 20, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 20%, rgba(29, 213, 165, 0.25), transparent 42%),
    radial-gradient(circle at 85% 0%, rgba(39, 151, 255, 0.28), transparent 36%),
    linear-gradient(168deg, var(--bg-base), var(--bg-deep));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 24%, transparent 82%);
}

h1,
h2,
p {
  margin: 0;
}

.admin-shell {
  width: min(1280px, calc(100vw - 40px));
  margin: 26px auto 40px;
  display: grid;
  gap: 16px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(18, 44, 88, 0.9), rgba(6, 17, 36, 0.88));
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin-top: 8px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 14px;
}

.config-card,
.table-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(16, 42, 86, 0.86), rgba(6, 18, 38, 0.9));
  box-shadow: var(--shadow);
}

.config-card,
.table-card {
  padding: 18px;
}

.watch-card {
  display: grid;
  gap: 14px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

h2 {
  font-size: 18px;
  letter-spacing: 0.01em;
}

h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.table-subtitle {
  color: var(--text-muted);
  font-size: 12px;
}

.section-title-wrap.compact {
  margin-bottom: 0;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.filter-group span {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(29, 213, 165, 0.4);
  background: rgba(29, 213, 165, 0.16);
  color: #7ef1cf;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(123, 252, 218, 0.35);
  background: rgba(29, 213, 165, 0.14);
  color: #7ef1cf;
  font-size: 11px;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.config-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(173, 197, 242, 0.16);
  background: rgba(6, 19, 39, 0.6);
  font-size: 14px;
}

.watch-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.config-editor {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(173, 197, 242, 0.2);
  background: rgba(6, 19, 39, 0.56);
  display: grid;
  gap: 10px;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 12px;
}

.editor-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #d4e2ff;
}

.editor-grid input[type="text"] {
  width: 100%;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

code {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #b9d0ff;
  word-break: break-all;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(173, 197, 242, 0.22);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: rgba(5, 16, 33, 0.76);
}

.mini-table {
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid rgba(173, 197, 242, 0.18);
  padding: 10px 9px;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 41, 84, 0.96);
  color: #c8d8f9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

input,
select {
  width: 130px;
  padding: 9px 10px;
  border: 1px solid rgba(169, 194, 240, 0.32);
  border-radius: 10px;
  background: rgba(4, 12, 25, 0.8);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: #6d86af;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(29, 213, 165, 0.72);
  box-shadow: 0 0 0 3px rgba(29, 213, 165, 0.16);
}

select {
  width: 180px;
}

select option {
  background: #0f264d;
  color: #edf4ff;
}

button {
  border: 1px solid rgba(123, 188, 255, 0.38);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #d4e4ff;
  background: linear-gradient(160deg, rgba(45, 128, 225, 0.3), rgba(10, 33, 72, 0.85));
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(155, 210, 255, 0.62);
  box-shadow: 0 10px 18px rgba(8, 25, 52, 0.35);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 213, 165, 0.16);
}

button.danger {
  border-color: rgba(255, 125, 125, 0.58);
  color: #ffd9d9;
  background: linear-gradient(160deg, rgba(189, 47, 47, 0.45), rgba(62, 14, 21, 0.85));
}

button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.actions {
  min-width: 210px;
}

.address-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tronscan-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(123, 188, 255, 0.38);
  color: #d4e4ff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(160deg, rgba(45, 128, 225, 0.24), rgba(10, 33, 72, 0.76));
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.tronscan-link:hover {
  transform: translateY(-1px);
  border-color: rgba(155, 210, 255, 0.62);
  box-shadow: 0 8px 14px rgba(8, 25, 52, 0.28);
}

.tronscan-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 213, 165, 0.16);
}

.tx-link {
  color: #8fc9ff;
  text-decoration: none;
  font-weight: 700;
}

.tx-link:hover {
  color: #b8deff;
}

.tx-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 213, 165, 0.16);
  border-radius: 6px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status.success {
  color: #8af2bc;
  border-color: rgba(83, 224, 140, 0.35);
  background: rgba(83, 224, 140, 0.14);
}

.status.warn {
  color: #ffd58a;
  border-color: rgba(247, 183, 49, 0.4);
  background: rgba(247, 183, 49, 0.14);
}

.status.error {
  color: #ffc1c1;
  border-color: rgba(255, 125, 125, 0.34);
  background: rgba(255, 125, 125, 0.14);
}

.status.muted {
  color: #a8bbdd;
  border-color: rgba(168, 187, 221, 0.22);
  background: rgba(168, 187, 221, 0.08);
}

.placeholder {
  color: var(--text-muted);
  padding: 18px;
  text-align: center;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(450px, 96vw);
  padding: 26px;
}

.login-subtitle {
  margin: 10px 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #d4e2ff;
}

.login-form input {
  width: 100%;
}

.login-form button {
  margin-top: 4px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  background: linear-gradient(160deg, rgba(28, 212, 163, 0.58), rgba(9, 59, 56, 0.92));
  border-color: rgba(123, 252, 218, 0.42);
}

@media (max-width: 900px) {
  .admin-shell {
    width: calc(100vw - 24px);
    margin: 14px auto 26px;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head button {
    align-self: flex-start;
  }

  .section-title-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .config-row {
    grid-template-columns: 1fr;
  }

  .watch-grid {
    grid-template-columns: 1fr;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  input,
  select {
    width: 100%;
    max-width: 160px;
  }
}
