:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #d1d5db;
  --ink: #0f172a;
  --muted: #475569;
  --brand: #2563eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #e0f2fe 0%, #f8fafc 48%);
}

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

.auth-card {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 18px 40px -30px rgba(15, 23, 42, 0.45);
}

.auth-logo {
  width: 140px;
  height: 46px;
  object-fit: contain;
}

h1 {
  margin: 8px 0 8px;
  font-size: 1.6rem;
}

h2 {
  margin: 6px 0 6px;
  font-size: 1.05rem;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.auth-plan-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.auth-plan-notice strong {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4338ca;
}

.auth-plan-notice span {
  font-size: 0.92rem;
  color: #334155;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.oauth-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid #747775;
  background: #fff;
  color: #1f1f1f;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  width: 100%;
}

.oauth-btn:hover {
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
  background-color: #f8f9fa;
}

.github-icon {
  margin-right: 10px;
  min-width: 20px;
}

.oauth-btn-contents {
  flex-grow: 1;
  text-align: center;
  font-weight: 500;
}

.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: WHITE;
  background-image: none;
  border: 1px solid #747775;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  vertical-align: middle;
  white-space: nowrap;
  width: 100%;
  min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 10px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity .218s;
  transition: opacity .218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
  border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents,
.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}

.auth-tabs button {
  flex: 1;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.auth-tabs button.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  font-size: 0.95rem;
}

input:focus {
  outline: 2px solid #bfdbfe;
  border-color: #60a5fa;
}

button[type="submit"] {
  height: 40px;
  border-radius: 10px;
  border: 1px solid #60a5fa;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.text-link-btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
}

.auth-reset {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.auth-message {
  margin-top: 12px;
  min-height: 20px;
  color: #b91c1c;
  font-size: 0.88rem;
}

.auth-message.success {
  color: #166534;
}

.hidden {
  display: none !important;
}
