/* Goozam Ready — authentication screens (Choose Organization + Sign In)
   Redesign from mockup handoff (auth.css). Self-contained; loaded LAST so it
   wins over Bootstrap. Keeps all existing form field IDs/JS hooks intact. */

:root {
  --gr-green: #12A150;
  --gr-green-hover: #0E8843;
  --gr-green-ink: #0E8C43;   /* green for text/links (AA on white) */
  --gr-green-tint: #F3FAF5;
  --gr-green-tint-2: #E7F6EC;
  --gr-red: #D81E28;         /* logo mark only */

  --gr-ink: #101828;
  --gr-ink-2: #344054;
  --gr-ink-3: #475467;
  --gr-muted: #667085;
  --gr-muted-2: #98A2B3;

  --gr-bg: #F7F8F9;
  --gr-surface: #FFFFFF;
  --gr-surface-2: #F9FAFB;
  --gr-surface-3: #F2F4F7;
  --gr-border: #E4E7EC;
  --gr-border-strong: #D0D5DD;

  --gr-radius-card: 16px;
  --gr-radius-field: 10px;
  --gr-radius-pill: 999px;
  --gr-shadow-card: 0 18px 48px -28px rgba(16, 24, 40, .24);
  --gr-focus-ring: 0 0 0 4px rgba(18, 161, 80, .14);

  --gr-font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.gr-auth * { box-sizing: border-box; }

body.gr-auth {
  margin: 0;
  padding: 0;
  background: var(--gr-bg);
  color: var(--gr-ink);
  font-family: var(--gr-font);
  -webkit-font-smoothing: antialiased;
}

.gr-auth a {
  color: var(--gr-green-ink);
  font-weight: 500;
  text-decoration: none;
}
.gr-auth a:hover { color: #0A6C34; text-decoration: underline; }

.gr-auth input, .gr-auth button, .gr-auth label, .gr-auth select, .gr-auth textarea { font-family: inherit; }

/* ---------- shell ---------- */

.gr-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gr-topbar {
  flex: 0 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 32px;
  background: var(--gr-surface);
  border-bottom: 1px solid var(--gr-border);
}

.gr-topbar .gr-logo {
  width: 44px; height: 44px; flex: 0 0 auto; display: block;
  border-radius: 50%; object-fit: cover;
}

.gr-wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--gr-ink);
}

.gr-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 32px 48px;
}

.gr-card {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--gr-surface);
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-card);
  box-shadow: var(--gr-shadow-card);
  overflow: hidden;
}

/* single-column card (utility pages like "forgot organization identifier") */
.gr-card--single { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
.gr-card--single .gr-pane { padding: 44px clamp(28px, 7%, 48px); }
.gr-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--gr-muted); }

/* ---------- left brand panel ---------- */

.gr-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 48px 44px;
  background: var(--gr-green-tint);
  border-right: 1px solid var(--gr-border);
}

.gr-panel__head { display: flex; flex-direction: column; gap: 10px; }

.gr-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gr-green-ink);
}

.gr-panel__title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--gr-ink);
  text-wrap: pretty;
}

.gr-panel__body {
  margin: 0;
  max-width: 360px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gr-muted);
  text-wrap: pretty;
}

.gr-panel__art { display: flex; align-items: center; justify-content: center; }
.gr-panel__art svg { width: 100%; max-width: 380px; height: auto; display: block; }

.gr-panel__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 12.5px;
  color: var(--gr-muted-2);
}

/* ---------- right form pane ---------- */

.gr-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px clamp(28px, 6%, 60px);
}

/* top-aligned pane: form starts at the top so the org chip lines up with the
   left panel's "Emergency readiness platform" eyebrow (panel padding-top 48px). */
.gr-pane--top { justify-content: flex-start; padding-top: 48px; }

.gr-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gr-form__head { display: flex; flex-direction: column; gap: 10px; }

.gr-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--gr-ink);
}

.gr-sub { margin: 0; font-size: 15px; line-height: 1.6; color: var(--gr-muted); text-wrap: pretty; }

.gr-field { display: flex; flex-direction: column; gap: 8px; }

.gr-field__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.gr-label { font-size: 13.5px; font-weight: 500; color: var(--gr-ink-2); }

.gr-input {
  height: 50px;
  width: 100%;
  padding: 0 15px;
  font-size: 15px;
  color: var(--gr-ink);
  background: var(--gr-surface);
  border: 1px solid var(--gr-border-strong);
  border-radius: var(--gr-radius-field);
  transition: border-color .16s, box-shadow .16s;
}
.gr-input::placeholder { color: var(--gr-muted-2); }
.gr-input:focus {
  outline: none;
  border-color: var(--gr-green);
  box-shadow: var(--gr-focus-ring);
}
.gr-input[aria-invalid="true"] {
  border-color: var(--gr-red);
  box-shadow: 0 0 0 4px rgba(216, 30, 40, .12);
}

.gr-error { font-size: 13px; color: var(--gr-red); min-height: 0; margin: 0; }

.gr-link-sm { font-size: 13.5px; margin-top: 2px; }

/* password field */
.gr-password { position: relative; display: flex; }
.gr-password .gr-input { padding-right: 52px; }

.gr-reveal {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gr-ink-3);
  background: var(--gr-surface-3);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .16s;
}
.gr-reveal:hover { background: #E9ECF1; }

.gr-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--gr-ink-2);
  cursor: pointer;
}
.gr-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--gr-green); }

.gr-fields { display: flex; flex-direction: column; gap: 18px; }
.gr-actions { display: flex; flex-direction: column; gap: 16px; }

/* ---------- buttons ---------- */

.gr-btn {
  height: 50px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--gr-radius-field);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .16s, border-color .16s, transform .12s;
}
.gr-btn:active { transform: translateY(1px); }
.gr-btn:focus-visible { outline: 2px solid var(--gr-green); outline-offset: 2px; }

.gr-btn--primary { background: var(--gr-green); color: #fff; }
.gr-btn--primary:hover { background: var(--gr-green-hover); color: #fff; text-decoration: none; }
.gr-btn--primary:disabled { background: #A6D8B9; cursor: not-allowed; transform: none; }

.gr-hint { margin: 0; font-size: 13.5px; color: var(--gr-muted); text-align: center; }

/* ---------- org chip / back ---------- */

.gr-chip {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 7px;
  background: var(--gr-surface-2);
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-pill);
}

.gr-chip__avatar {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gr-green);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.gr-chip__name { font-size: 13px; font-weight: 500; color: var(--gr-ink-2); white-space: nowrap; }

.gr-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gr-ink-2);
  background: var(--gr-surface-2);
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-pill);
}
.gr-back:hover { background: #F2F4F7; color: var(--gr-ink); text-decoration: none; border-color: var(--gr-border-strong); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .gr-card { grid-template-columns: minmax(0, 1fr); }
  .gr-panel {
    order: 2;
    border-right: none;
    border-top: 1px solid var(--gr-border);
    padding: 36px 28px;
  }
  .gr-pane { padding: 44px 28px; }
  .gr-form { max-width: none; }
  .gr-panel__art { display: none; }
}

@media (max-width: 600px) {
  .gr-main { padding: 20px 16px 32px; }
  .gr-topbar { padding: 0 20px; }
  .gr-card { border-radius: 12px; }
  .gr-title { font-size: 28px; }
}
