/* ============================================================
   accounty — auth pages (login / register / forgot password)
   ============================================================ */

:root {
  --acc: #22614f;        /* primary green */
  --acc-strong: #17493b; /* hover / emphasis */
  --tint: #e5eeea;       /* light green tint */
  --side: #0f211b;       /* dark brand panel */
  --text: #1f2622;
  --muted: #5d665f;
  --faint: #8a938c;
  --border: #dfe3dd;
  --border-soft: #e3e6e1;
  --error: #a34b2e;
  --error-border: #c88b7a;
  --ok: #2e8f63;
  --warn: #c08a2e;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #f7f8f5;
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

/* ---------- layout ---------- */

.auth-layout {
  display: flex;
  min-height: 100vh;
}

.brand-panel {
  flex: 1 1 40%;
  background: var(--side);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
}

.form-panel {
  flex: 1 1 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 56px);
}

.form-card { width: min(400px, 100%); }

/* ---------- brand panel ---------- */

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.wordmark-chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--acc);
  display: grid;
  place-items: center;
  font: 600 14px var(--mono);
  color: #fff;
}

.brand-copy { max-width: 420px; }

.brand-headline {
  margin: 0;
  font-size: clamp(21px, 2.6vw, 29px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.4px;
}

.brand-sub {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
}

.doc-stack {
  display: flex;
  align-items: flex-end;
  margin-top: 30px;
  padding-left: 8px;
}

.doc {
  width: 74px;
  height: 94px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.doc + .doc { margin-left: -14px; }
.doc-left { transform: rotate(-7deg); }
.doc-mid { position: relative; z-index: 1; }
.doc-right { transform: rotate(7deg); }

.doc-ext {
  align-self: flex-start;
  font: 600 8px var(--mono);
  color: #fff;
  border-radius: 3px;
  padding: 2px 4px;
}
.doc-ext-pdf { background: #9d4535; }
.doc-ext-xlsx { background: #2e7d5b; }
.doc-ext-jpg { background: #4f6d95; }

.doc-line { height: 3px; border-radius: 2px; background: #e8eae4; }
.doc-line-title { background: #d8ddd6; width: 78%; }
.doc-line-90 { width: 90%; }
.doc-line-70 { width: 70%; }

.compliance {
  font: 500 9.5px var(--mono);
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- typography ---------- */

.card-title {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.card-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- segmented control ---------- */

.segmented {
  display: flex;
  background: #eceee8;
  border-radius: 8px;
  padding: 3px;
  margin-top: 16px;
}

.seg-btn {
  flex: 1;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.seg-btn.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 30, 25, 0.15);
}

/* ---------- fields ---------- */

.field { margin-top: 14px; }
form .field:first-of-type { margin-top: 18px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 12px;
  font-size: 14px;   /* desktop; bumped to 16px on mobile (see media query) */
  outline: none;
  background: #fff;
  color: var(--text);
}

.field input::placeholder { color: #98a19a; }
.field input:focus { border-color: var(--acc); }
.field input.is-invalid { border-color: var(--error-border); }

.field-error {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: var(--error);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 58px; }

.pw-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: 5px;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.pw-toggle:hover { background: #f2f4ef; color: var(--acc-strong); }

/* Hide the browser/keychain native reveal & autofill icons where we render
   our own "Show" button, so they don't overlap it. */
.password-wrap input::-ms-reveal,
.password-wrap input::-ms-clear { display: none; }
.password-wrap input::-webkit-credentials-auto-fill-button,
.password-wrap input::-webkit-strong-password-auto-fill-button,
.password-wrap input::-webkit-strong-password-and-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

/* ---------- checkbox rows ---------- */

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: #3c453e;
  line-height: 1.5;
  cursor: pointer;
}

.check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--acc);
  cursor: pointer;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

/* ---------- buttons ---------- */

.btn-primary {
  width: 100%;
  margin-top: 16px;
  height: 44px;
  border: none;
  border-radius: 7px;
  background: var(--acc);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.btn-primary:hover { background: var(--acc-strong); }
.btn-primary:disabled { opacity: 0.7; cursor: default; }

.btn-ghost {
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #3c453e;
  cursor: pointer;
}
.btn-ghost:hover { border-color: #b9c2ba; background: #fbfcf9; }

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;   /* also used as an <a> */
  box-sizing: border-box;
}
.btn-google:hover { color: #3c453e; }

.g-chip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eceee8;
  display: grid;
  place-items: center;
  font: 600 10px var(--mono);
  color: #3c453e;
}

/* ---------- misc ---------- */

.text-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--acc);
  text-decoration: none;
  cursor: pointer;
}
.text-link:hover { color: var(--acc-strong); text-decoration: underline; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: #98a19a;
  font-size: 11px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.switch-line {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin: 20px 0 0;
}
.switch-line a { font-weight: 600; }

.success-box {
  margin-top: 12px;
  background: #e9f3ed;
  border: 1px solid #cfe4d8;
  border-radius: 8px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: #1d6b47;
  font-weight: 500;
}
.success-box a {
  margin-left: auto;
  font-weight: 600;
  color: var(--acc-strong);
  text-decoration: none;
}
.success-box a:hover { text-decoration: underline; }

.check-dot {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
}

[hidden] { display: none !important; }

/* ---------- password strength ---------- */

.strength {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.strength-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #eceee8;
}

.strength-label {
  flex: none;
  font: 500 10px var(--mono);
  color: var(--faint);
  width: 52px;
  text-align: right;
}

.strength[data-score="1"] .strength-seg:nth-child(1) { background: var(--error); }
.strength[data-score="1"] .strength-label { color: var(--error); }
.strength[data-score="2"] .strength-seg:nth-child(-n+2) { background: var(--warn); }
.strength[data-score="2"] .strength-label { color: var(--warn); }
.strength[data-score="3"] .strength-seg:nth-child(-n+3) { background: var(--ok); }
.strength[data-score="3"] .strength-label { color: var(--ok); }

/* ---------- confirmation states (verify email / reset sent) ---------- */

.confirm {
  text-align: center;
  padding: 12px 0;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tint);
  display: grid;
  place-items: center;
  margin: 0 auto;
  font: 600 20px var(--mono);
  color: var(--acc-strong);
}

.confirm h2 {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.confirm-text {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.confirm-text strong { color: var(--text); }

.confirm-hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--faint);
}

.confirm .btn-ghost { margin-top: 18px; height: 38px; font-size: 12.5px; font-weight: 600; }
.confirm .switch-line { margin-top: 18px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .auth-layout { flex-direction: column; }

  .brand-panel {
    flex: none;
    gap: 14px;
    padding: 20px clamp(16px, 5vw, 28px);
  }

  .brand-headline { font-size: 19px; }
  .brand-sub { font-size: 12.5px; margin-top: 6px; }
  .doc-stack { display: none; }
  .compliance { display: none; }

  .form-panel {
    flex: 1;
    align-items: flex-start;
    padding-top: 28px;
  }
}

@media (max-width: 480px) {
  .row-between { flex-wrap: wrap; }
}

/* ---------- app additions (flash, language switcher, link boxes) ---------- */

.wordmark img { width: 26px; height: 26px; border-radius: 7px; }

.form-panel { position: relative; }

.lang-switch {
  position: absolute;
  top: 18px;
  right: 22px;
  font: 500 11px var(--mono);
  letter-spacing: 1px;
}
.lang-switch a {
  color: var(--faint);
  text-decoration: none;
  padding: 0 4px;
}
.lang-switch a.is-active { color: var(--acc-strong); font-weight: 600; }
.lang-switch a:hover { color: var(--acc); }

.form-alert {
  margin-top: 14px;
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
}
.form-alert-danger  { background: #f6ece7; border: 1px solid var(--error-border); color: var(--error); }
.form-alert-success { background: #e9f3ed; border: 1px solid #cfe4d8; color: #1d6b47; }
.form-alert-warning { background: #f7f0e2; border: 1px solid #e3cf9f; color: #8a6420; }

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.link-box input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  font: 500 11.5px var(--mono);
  color: var(--muted);
  background: #fbfcf9;
}
.link-box .btn-ghost { height: 36px; font-size: 12px; white-space: nowrap; }

.btn-google[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- mobile: 16px base + 16px inputs (no iOS zoom on focus) ---------- */
/* Placed last so it overrides the base .field input size above. */
@media (max-width: 767.98px) {
  html, body { font-size: 16px; }
  .field input[type="text"],
  .field input[type="email"],
  .field input[type="password"] { font-size: 16px; }
}
