:root {
  --ink: #0b1221;
  --muted: #5a6473;
  --panel: #f7f9fc;
  --line: #e1e7f5;
  --accent: #1f4dd6;
  --accent-strong: #1539a3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, #e8edff, #f8f9ff 35%), #f3f6ff;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

.shell {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab,
.tab-add {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tab {
  min-width: 150px;
  justify-content: space-between;
}

.tab-add {
  width: 44px;
  height: 40px;
  justify-content: center;
  font-size: 18px;
}

.tab.active {
  background: #e8edff;
  border-color: #d1dbff;
  color: var(--accent);
}

.tab.loading {
  border-color: #ffd17a;
}

.tab__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  text-align: left;
}

.tab__close {
  font-size: 13px;
  opacity: 0.6;
}

.tab:hover,
.tab-add:hover {
  border-color: #cbd7ff;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.nav-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.nav-btn:hover {
  border-color: #cfd7ec;
  color: var(--ink);
  background: #fdfefe;
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.address {
  flex: 1;
  min-width: 0;
}

.address input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.address input:focus {
  border-color: #cbd7ff;
  box-shadow: 0 0 0 4px rgba(31, 77, 214, 0.12);
}

.go {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.go:hover {
  background: var(--accent-strong);
}

.go:active {
  transform: translateY(1px);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fdfefe;
  font-size: 14px;
  color: var(--muted);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c4cede;
  box-shadow: inset 0 0 0 1px #b5becf;
}

.status-indicator.active {
  background: #f6c23e;
  box-shadow: 0 0 0 4px rgba(246, 194, 62, 0.2);
}

.status-indicator.live {
  background: #18a957;
  box-shadow: 0 0 0 4px rgba(24, 169, 87, 0.18);
}

.viewport {
  position: relative;
  flex: 1;
  background: linear-gradient(120deg, #f7f9ff, #eef2ff);
}

.page-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  background: #fff;
}

.page-frame.active {
  display: block;
}

@media (max-width: 720px) {
  .shell {
    width: 100vw;
    min-height: 100vh;
  }

  .nav-bar {
    flex-wrap: wrap;
  }

  .nav-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .go {
    width: 100%;
  }
}
