:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #677489;
  --line: #dfe5ee;
  --primary: #0f7ed6;
  --primary-dark: #0b62aa;
  --danger: #c9362c;
  --danger-bg: #fff1ef;
  --shadow: 0 18px 48px rgba(34, 47, 76, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
  display: grid;
  gap: 18px;
}

.dashboard-view {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.is-hidden {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.field,
.search-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.field input,
.search-field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.field input:focus,
.search-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 126, 214, 0.12);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.ghost-button:hover {
  border-color: #b7c3d3;
}

.danger-button {
  min-height: 36px;
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #ffd4cf;
}

.danger-button:hover {
  border-color: #f2a9a1;
}

.compact {
  min-width: 88px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 12px;
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #f9fbfe;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.openid-cell {
  max-width: 380px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.message.is-error {
  color: var(--danger);
}

.message.is-success {
  color: #0f7a4f;
}

@media (max-width: 720px) {
  .dashboard-view {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .topbar {
    align-items: flex-start;
  }

  h1 {
    font-size: 23px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .summary-row {
    flex-direction: column;
  }
}
