:root {
  --color-background: #ffffff;
  --color-text: #000000;
  --color-muted: #737373;
  --color-border: #e5e5e5;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-background);
}

button {
  font: inherit;
}

.page {
  min-height: 100vh;
  background: var(--color-background);
  color: var(--color-text);
}

.center-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.message {
  text-align: center;
}

.message h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
}

.message p {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}

.auth-header {
  position: fixed;
  inset: 0 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-text);
  background: var(--color-background);
  padding: 0 16px;
  z-index: 10;
}

.auth-status {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.logout-link {
  color: var(--color-text);
  font-size: 14px;
  text-decoration: none;
}

.logout-link:hover,
.logout-link:focus {
  text-decoration: underline;
}

.uat-banner {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-text);
  color: var(--color-background);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.uat-shell {
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

.switch-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 16px 0;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--color-text);
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label {
  min-width: 180px;
  padding: 10px 16px;
  border-right: 1px solid var(--color-text);
  color: var(--color-text);
  background: var(--color-background);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.segmented-control label:last-child {
  border-right: 0;
}

.segmented-control input:checked + label {
  color: var(--color-background);
  background: var(--color-text);
}

.preview {
  flex: 1;
  min-height: 560px;
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
}

.preview .center-view {
  min-height: calc(100vh - 32px - 49px - 24px);
}

.preview .auth-header {
  position: relative;
}

.preview .auth-view {
  min-height: calc(100vh - 32px - 49px - 24px);
}

.footer {
  position: fixed;
  right: 16px;
  bottom: 12px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
  background: rgba(255, 255, 255, 0.88);
}

@media (max-width: 520px) {
  .segmented-control {
    width: calc(100vw - 32px);
  }

  .segmented-control label {
    min-width: 0;
    padding: 10px 8px;
    font-size: 13px;
  }
}
