* { box-sizing: border-box; }

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #151515;
  background: #f5f5f5;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #f5f5f5;
}

body {
  min-height: 100dvh;
}

button, input, textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: #111;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover { opacity: .92; }
button:disabled { opacity: .55; cursor: not-allowed; }

.secondary {
  background: #e9e9e9;
  color: #111;
}

.small {
  padding: 10px 13px;
  border-radius: 10px;
}

.auth-shell, .app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 24px;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.auth-card, .panel {
  width: 100%;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 22px;
  box-shadow: 0 12px 45px rgba(0,0,0,.06);
}

.auth-card {
  max-width: 430px;
  padding: 30px;
}

.panel {
  padding: 28px;
}

.brand {
  font-weight: 850;
  letter-spacing: -.03em;
  font-size: 20px;
}

h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -.045em;
}

.muted {
  color: #707070;
}

form {
  display: grid;
  gap: 9px;
  margin-top: 26px;
}

form button {
  margin-top: 8px;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 750;
}

input, textarea {
  width: 100%;
  border: 1px solid #d5d5d5;
  border-radius: 12px;
  background: #fff;
  color: #111;
  outline: none;
}

input {
  padding: 13px 14px;
}

textarea {
  min-height: 390px;
  padding: 16px;
  resize: vertical;
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

input:focus, textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,.07);
}

.auth-card > .secondary {
  width: 100%;
  margin-top: 10px;
}

.status {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 14px;
}

.status[data-error="true"], .result[data-error="true"] {
  color: #b42318;
}

.result {
  white-space: pre-wrap;
  margin: 18px 0 0;
  min-height: 24px;
  font: 14px/1.5 ui-monospace, monospace;
}

.topbar, .panel-head, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 8px 0 26px;
}

.panel-head {
  align-items: flex-start;
}

.actions {
  justify-content: flex-start;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .auth-shell, .app-shell { padding: 14px; }
  .auth-card, .panel { padding: 20px; border-radius: 18px; }
  .topbar { align-items: flex-start; }
  .panel-head { flex-direction: column; }
  textarea { min-height: 330px; }
}


.google-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: #fff;
  color: #111;
  border: 1px solid #d5d5d5;
  margin-top: 24px;
}

.google-button:hover {
  background: #f8f8f8;
}

.google-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.google-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  color: #8a8a8a;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e2e2e2;
}

.mode-button {
  width: 100%;
  margin-top: 10px;
}
