/* FarmAssist connector pages. Colours and type follow the app (src/index.css). */
:root {
  --bg: #f4f1ea;
  --card: #fbfaf6;
  --ink: #1d2a23;
  --muted: #5d6b62;
  --line: #ddd6c6;
  --primary: #2d5d40;
  --primary-deep: #1f4530;
  --primary-soft: #cfe1cf;
  --on-primary: #f4f0e1;
  --danger: #a23b2a;
  --danger-soft: #f6e3de;
  --focus: rgba(45, 93, 64, 0.28);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101914;
    --card: #17221c;
    --ink: #f1eee4;
    --muted: #a9b5ac;
    --line: #2c3a32;
    --primary: #4f9a6c;
    --primary-deep: #8fc9a5;
    --primary-soft: #1f3529;
    --on-primary: #0d1510;
    --danger: #e58a78;
    --danger-soft: #3a211b;
    --focus: rgba(79, 154, 108, 0.35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 32px;
}
[hidden] { display: none !important; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font-family: Fraunces, ui-serif, Georgia, serif; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 1px 2px rgba(29, 42, 35, 0.04), 0 8px 24px rgba(29, 42, 35, 0.06);
}
h1 {
  font-family: Fraunces, ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.lede { color: var(--muted); margin: 0 0 24px; }
label { display: block; font-size: 14px; font-weight: 500; margin: 16px 0 6px; }
input[type="email"], input[type="password"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}
input:focus, button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); border-color: var(--primary); }
.row { display: flex; justify-content: space-between; align-items: baseline; }
.row label { margin-bottom: 6px; }
button {
  font: inherit;
  font-weight: 500;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
}
button:disabled { opacity: 0.6; cursor: default; }
.primary { background: var(--primary); color: var(--on-primary); margin-top: 22px; }
.primary:hover:not(:disabled) { background: var(--primary-deep); color: var(--bg); }
.secondary { background: transparent; color: var(--ink); border-color: var(--line); margin-top: 10px; }
.secondary:hover:not(:disabled) { background: var(--primary-soft); }
.google { display: flex; align-items: center; justify-content: center; gap: 10px; }
.google svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; width: auto; color: var(--primary); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
a { color: var(--primary); text-underline-offset: 3px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0 6px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notice { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 0 0 18px; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--primary-soft); color: var(--ink); }
.who { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 20px; }
.who strong { word-break: break-all; }
.perms { list-style: none; margin: 0 0 8px; padding: 0; }
.perms li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; }
.perms li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%232d5d40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.perms.no li::before { background: var(--danger-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%23a23b2a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.section-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 18px 0 4px; }
.fine { color: var(--muted); font-size: 13px; margin: 16px 0 0; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.actions button { margin: 0; }
.footer { color: var(--muted); font-size: 13px; margin-top: 24px; text-align: center; }
.footer a { color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 8px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
@media (max-width: 420px) { .card { padding: 26px 20px 22px; } h1 { font-size: 23px; } }
