:root {
  color-scheme: dark;
  --chrome: #14181d;
  --chrome-raised: #1f252d;
  --chrome-active: #2f3945;
  --edge: #343d49;
  --text: #f6f8fb;
  --muted: #b8c2cf;
  --focus: #38bdf8;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05070a;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: 100vw;
  height: 100vh;
  background: var(--edge);
}

.pane {
  display: grid;
  grid-template-rows: 32px 40px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: var(--chrome);
}

.tab-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
  padding: 4px 6px 0;
  background: var(--chrome);
}

.tab-button {
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #10141a;
  color: var(--muted);
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-button[aria-selected="true"] {
  background: var(--chrome-active);
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.35);
}

.tab-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.url-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 40px 40px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  background: var(--chrome-active);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.url-bar input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  background: var(--chrome-raised);
  color: var(--text);
}

.url-bar input::placeholder {
  color: #7c8796;
}

.url-bar input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

.url-bar[data-locked="true"] input {
  color: var(--muted);
  background: #171d24;
  cursor: not-allowed;
}

.url-bar button:disabled {
  color: #768293;
  border-color: rgba(255, 255, 255, 0.06);
  background: #171d24;
  cursor: not-allowed;
}

.url-bar button,
.icon-link {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: var(--chrome-raised);
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
}

.url-bar button:hover,
.icon-link:hover,
.tab-button:hover {
  border-color: rgba(56, 189, 248, 0.7);
  background: #28313b;
}

.url-bar button:disabled:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: #171d24;
}

.url-bar button:focus-visible,
.icon-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.icon-button,
.icon-link {
  font-size: 17px;
}

iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #fff;
}

@media (max-width: 820px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(300px, 1fr));
    overflow: auto;
  }

  body {
    overflow: auto;
  }
}
