:root {
  --green-950: #022c22;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-100: #d1fae5;
  --gold: #d9b44a;
  --surface: #ffffff;
  --page: #eef4f1;
  --text: #18352c;
  --muted: #63756f;
  --line: #dbe6e1;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --success: #067647;
  --success-bg: #ecfdf3;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--green-950);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(217, 180, 74, 0.18), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.16), transparent 32%),
    linear-gradient(145deg, var(--green-950), var(--green-900));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  padding: 32px 18px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(470px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.login-brand {
  text-align: center;
}

.login-logo {
  width: min(290px, 82%);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

h1 {
  margin: 0;
  color: var(--green-900);
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.1;
}

.intro {
  margin: 14px auto 26px;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.6;
}

.google-button {
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font-weight: 800;
  box-shadow: 0 4px 13px rgba(6, 78, 59, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.google-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(6, 78, 59, 0.13);
}

.google-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.google-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #4285f4, #34a853 48%, #fbbc05 70%, #ea4335);
  font-weight: 900;
}

.message-box {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  line-height: 1.45;
  font-size: 14px;
}

.message-box.error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #fecdca;
}

.message-box.success {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid #abefc6;
}

.message-box.info {
  color: #175cd3;
  background: #eff8ff;
  border: 1px solid #b2ddff;
}

.account-panel {
  margin-top: 20px;
}

.account-row {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf9;
}

.account-photo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--green-100);
}

.account-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-row strong,
.account-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row span {
  color: var(--muted);
  font-size: 13px;
}

.setup-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #f5d78d;
  border-radius: 14px;
  background: #fffaeb;
}

.setup-panel h2 {
  margin: 0 0 8px;
  color: #7a2e0e;
  font-size: 18px;
}

.setup-panel p {
  color: #684f2a;
  line-height: 1.55;
}

.setup-panel label {
  display: block;
  margin: 16px 0 7px;
  color: #5f450f;
  font-size: 13px;
  font-weight: 800;
}

.uid-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.uid-row input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e5bf62;
  border-radius: 8px;
  color: #3d310f;
  background: #ffffff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.uid-row button,
.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.uid-row button {
  border: 1px solid #d0a12d;
  color: #5f450f;
  background: #ffffff;
}

.setup-instruction {
  font-size: 13px;
}

.setup-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-button {
  border: 1px solid var(--green-800);
  color: #ffffff;
  background: var(--green-800);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #ffffff;
}

.security-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .login-page {
    padding: 0;
    align-items: stretch;
  }

  .login-card {
    min-height: 100vh;
    padding: 32px 20px;
    border: 0;
    border-radius: 0;
  }

  .setup-actions {
    grid-template-columns: 1fr;
  }
}
