﻿* {
  box-sizing: border-box;
}

:root {
  --bg: #090a0c;
  --card: #0d1015;
  --line: #4d3724;
  --line-soft: #2e3946;
  --text: #efe6da;
  --text-soft: #cfb496;
  --accent: #e2c1a0;
  --ok: #c5e6c6;
  --err: #f2b8aa;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(900px 280px at 100% -10%, rgba(105, 72, 45, 0.2), transparent 55%),
    radial-gradient(820px 320px at 0% 110%, rgba(118, 79, 49, 0.18), transparent 50%),
    var(--bg);
  color: var(--text);
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  padding-inline-start: 48px;
}

.settings-btn {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #4f5a69;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a1f26, #13171d);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.title {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.status {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  inset-inline: 12px;
  margin: 0 auto;
  max-width: 980px;
  border: 1px solid #3d2b1f;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-line;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 1200;
}

.status.show {
  opacity: 1;
  transform: translateY(0);
}

.status.neutral {
  background: #121822;
  color: #e5d7c4;
  border-color: #485a6f;
}

.status.success {
  background: linear-gradient(180deg, #102014, #0e1911);
  border-color: #44694b;
  color: #d4f3d7;
}

.status.error {
  background: linear-gradient(180deg, #211314, #1a1011);
  border-color: #7a3f3f;
  color: #f6c6be;
}

.card,
.results-wrap,
.note,
.settings-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 12px;
}

.current-account {
  border: 1px solid #3d2b1f;
  background: #121721;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 13px;
  color: #dfc9ae;
}

.label {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  color: var(--accent);
}

.input {
  width: 100%;
  border: 1px solid #5a412e;
  border-radius: 9px;
  background: #0f1217;
  color: var(--text);
  font-size: 16px;
  padding: 11px 12px;
  outline: none;
}

.input:focus {
  border-color: #a47b56;
  box-shadow: 0 0 0 2px rgba(164, 123, 86, 0.2);
}

.actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.btn,
.mini-btn {
  border: 1px solid #7a5a3f;
  border-radius: 9px;
  background: linear-gradient(180deg, #2a1d14, #1c1410);
  color: #f2dfc7;
  font-family: Tahoma, Arial, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.btn {
  font-size: 14px;
  padding: 11px 10px;
}

.mini-btn {
  font-size: 12px;
  padding: 6px 8px;
}

.btn.primary {
  border-color: #956944;
}

.btn.ghost,
.mini-btn.ghost {
  border-color: #4f5a69;
  background: linear-gradient(180deg, #1a1f26, #13171d);
}

.btn.danger,
.mini-btn.danger {
  border-color: #7f3c3c;
  background: linear-gradient(180deg, #331818, #241212);
  color: #f4caca;
}

.btn:disabled,
.mini-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.results-wrap.hidden {
  display: none;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.results-title {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
}

.results-search {
  margin-top: 9px;
}

.results {
  margin-top: 10px;
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0c1117;
}

.results.empty {
  border-color: #3a2a1d;
  color: #baa288;
  padding: 12px;
  font-size: 13px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  border-bottom: 1px solid #1f2731;
  padding: 7px 8px;
  text-align: right;
  vertical-align: top;
}

.table th {
  position: sticky;
  top: 0;
  background: #101923;
  color: #d7be9f;
}

.actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  padding: 4px 7px;
  border: 1px solid #5d4532;
  color: #e7c8a7;
}

.pill.ok {
  border-color: #39553e;
  color: #c6e2c8;
}

.pill.off {
  border-color: #6a3e3e;
  color: #f2b7b7;
}

.muted {
  color: #8e99a8;
  font-size: 10px;
  margin-top: 2px;
}

.note {
  color: #ccb091;
  font-size: 12px;
  line-height: 1.7;
}

.settings-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(640px, calc(100vw - 24px));
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.52);
}

.settings-panel {
  margin: 0;
  padding: 12px;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.settings-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.accounts-list {
  margin-top: 12px;
  border: 1px solid #2e3946;
  border-radius: 9px;
  max-height: 320px;
  overflow: auto;
  background: #0c1117;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #1f2731;
  padding: 9px;
}

.account-name {
  font-size: 13px;
  color: #ebddcc;
}

.account-key {
  font-size: 11px;
  color: #96a1af;
  margin-top: 2px;
}

@media (min-width: 920px) {
  .actions {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }
}
