:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
  color: #1f2937;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid #0f766e;
  border-radius: 6px;
  padding: 0 12px;
  color: #ffffff;
  background: #0f766e;
  cursor: pointer;
}

button.secondary {
  color: #1f2937;
  background: #ffffff;
  border-color: #cbd5e1;
}

.app-shell,
.install-shell,
.public-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.oauth-result-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.oauth-result {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.oauth-result.success {
  border-color: #0f766e;
}

.oauth-result.error {
  border-color: #b91c1c;
}

.oauth-details {
  margin-bottom: 18px;
  color: #64748b;
  overflow-wrap: anywhere;
}

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

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

p {
  margin: 8px 0 0;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 0;
}

.tab-button {
  color: #334155;
  background: #ffffff;
  border-color: #d4dce7;
}

.tab-button.active {
  color: #ffffff;
  background: #334155;
  border-color: #334155;
}

.tab-panel {
  display: none;
  min-height: 320px;
  padding: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.tab-panel.active {
  display: block;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.status-grid div {
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
}

dt {
  font-size: 12px;
  color: #64748b;
}

dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.notice {
  margin-top: 16px;
  color: #92400e;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #d9e2ec;
  text-align: left;
  vertical-align: top;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 6px;
}

.settings-form input,
.settings-form select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
}

.settings-form button {
  align-self: end;
}

.steps {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 760px) {
  .topbar,
  .status-grid,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}
