/* undefeated shell — dark soft UI for i.tnkbos.com */
:root {
  --bg: #0b0d10;
  --sidebar: #111418;
  --panel: #161b22;
  --panel2: #0f1318;
  --line: #252b33;
  --text: #e8edf2;
  --muted: #8b96a5;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.14);
  --ok: #3ecf8e;
  --warn: #e6b84d;
  --bad: #e85d5d;
  --sidebar-w: 240px;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

body { overflow: hidden; }

.app {
  display: flex;
  height: 100vh;
  min-height: 100%;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 20px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2dd4bf, #0d9488);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #042f2e;
  letter-spacing: -0.02em;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.nav-section {
  margin-bottom: 18px;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 560;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: var(--text);
  background: var(--accent-dim);
  border-color: rgba(45, 212, 191, 0.22);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-item.soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--line);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel2);
  border: 1px solid var(--line);
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.account-meta { min-width: 0; flex: 1; }
.account-meta .name {
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-meta .bal {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 2px;
}

/* ── Main ── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(45, 212, 191, 0.07) 0%, transparent 55%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 12px;
  border-bottom: 1px solid transparent;
}

.topbar h1 {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 650;
}

.content {
  flex: 1;
  min-height: 0;
  padding: 0 0 0;
  position: relative;
}

.view {
  display: none;
  height: 100%;
}

.view.active {
  display: block;
  height: 100%;
}

.view-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: block;
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 860px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }
  .sidebar.collapsed .nav-section,
  .sidebar.collapsed .sidebar-foot { display: none; }
  .mobile-toggle { display: inline-flex; }
  .content { height: calc(100vh - 160px); min-height: 520px; }
}
