/* =========================================================================
   Delapan Attendance V13.0, Login & account pages (single stylesheet)
   Used by templates/portal-login.php and templates/auth-white-label-v12652.php
   when V13 is active. Replaces 8 legacy auth stylesheets. Markup and the
   WordPress authentication flow are unchanged.
   ========================================================================= */
:root {
  --a-yellow: #FECF05;
  --a-yellow-press: #F0C200;
  --a-ink: #141414;
  --a-ink-2: #3A3A37;
  --a-muted: #6A6A64;
  --a-line: #E3E3DE;
  --a-surface: #FFFFFF;
  --a-surface-2: #F7F7F7;
  --a-cream: #FFF8E8;
  --a-danger: #B42318;
  --a-danger-soft: #FEF0EE;
  --a-ok-soft: #FFF6CC;
  --a-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body.da13-auth,
body.da13-auth.da1244-page,
body.da13-auth.da52-body {
  margin: 0;
  min-height: 100vh;
  background: var(--a-cream);
  color: var(--a-ink);
  font-family: var(--a-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.da13-auth *, body.da13-auth *::before, body.da13-auth *::after { box-sizing: border-box; }
body.da13-auth :is(h1, h2, h3, p) { margin: 0; letter-spacing: 0; }
body.da13-auth :is(input, button, select, textarea) { font-family: var(--a-font); }
body.da13-auth a { color: var(--a-ink); }
body.da13-auth :is(a, button, input, label):focus-visible { outline: 2px solid var(--a-ink); outline-offset: 2px; }
body.da13-auth #wpadminbar { display: none; }

/* ---------- layout ---------- */
body.da13-auth :is(.da1244-shell, .da52-layout) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  background: transparent;
}
body.da13-auth .da1244-layout {
  width: 100%;
  max-width: 440px;
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
}
/* Long brand/marketing column is not needed to sign in on a phone. */
body.da13-auth :is(.da1244-brand, .da52-side) { display: none; }

body.da13-auth :is(.da1244-panel, .da52-card) {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 28px 22px 24px;
  border: 1px solid var(--a-line);
  border-radius: 24px;
  background: var(--a-surface);
  box-shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 12px 32px rgba(20, 20, 20, .06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- brand lockup (original Delapan logo) ---------- */
body.da13-auth .da1244-auth-head { display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 0; }
body.da13-auth .da53-brand-lockup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
body.da13-auth .da53-logo-tile {
  grid-row: 1 / span 2;
  width: 96px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--a-yellow);
  border: 0;
  box-shadow: none;
  overflow: hidden;
}
body.da13-auth .da53-logo-image { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; margin: 0; }
body.da13-auth .da53-product-name { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--a-ink); align-self: end; }
body.da13-auth .da53-product-subtitle { display: block; font-size: 13px; font-weight: 500; color: var(--a-muted); align-self: start; }

body.da13-auth .da1244-auth-copy { display: flex; flex-direction: column; gap: 4px; }
body.da13-auth :is(.da1244-eyebrow, .da52-kicker) {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--a-muted);
  text-transform: uppercase;
  background: transparent;
  padding: 0;
  margin: 0;
}
body.da13-auth :is(.da1244-auth-copy h2, .da52-card h2) { font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--a-ink); }
body.da13-auth :is(.da1244-auth-copy p, .da52-desc) { font-size: 14px; color: var(--a-muted); }
body.da13-auth .da52-card > h2 { margin-top: -10px; }

/* ---------- messages ---------- */
body.da13-auth :is(.da1244-error, .da52-notice) {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 0 !important;                       /* inline-override: password_changed notice sets style */
  background: var(--a-danger-soft) !important;
  color: var(--a-danger) !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
body.da13-auth :is(.da1244-error[role="status"], .da52-notice.da52-success) { background: var(--a-ok-soft) !important; color: var(--a-ink) !important; }

/* ---------- forms (wp_login_form + white-label) ---------- */
body.da13-auth :is(#da1244-loginform, .da52-card form) { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
body.da13-auth #da1244-loginform p { margin: 0; }
body.da13-auth :is(#da1244-loginform label, .da52-card form > label) {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--a-ink-2);
}
body.da13-auth .da52-card form > label { margin-bottom: -8px; }
body.da13-auth :is(#da1244-loginform input[type="text"], #da1244-loginform input[type="password"], #da1244-loginform input[type="email"], .da52-card input[type="text"], .da52-card input[type="password"], .da52-card input[type="email"]) {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid var(--a-line);
  border-radius: 14px;
  background: var(--a-surface);
  color: var(--a-ink);
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
body.da13-auth :is(#da1244-loginform input, .da52-card input):focus { border-color: var(--a-ink); }
body.da13-auth :is(#da1244-loginform input, .da52-card input)::placeholder { color: #9A9A93; opacity: 1; }
body.da13-auth .da13-pass { position: relative; display: block; }
body.da13-auth .da13-pass input { padding-right: 82px !important; }
body.da13-auth .da13-pass-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 40px;
  min-width: 68px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--a-surface-2);
  color: var(--a-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
body.da13-auth .da13-caps { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--a-danger); }
body.da13-auth .login-remember label,
body.da13-auth .da52-show {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--a-ink-2) !important;
  cursor: pointer;
}
body.da13-auth :is(.login-remember, .da52-show) input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--a-ink); }

body.da13-auth :is(#da1244-submit, .da52-primary) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin: 4px 0 0;
  padding: 0 20px;
  border: 0;
  border-radius: 9999px;
  background: var(--a-yellow);
  color: var(--a-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
body.da13-auth :is(#da1244-submit, .da52-primary):hover { background: var(--a-yellow-press); }
body.da13-auth #da1244-loginform[aria-busy="true"] #da1244-submit { opacity: .7; cursor: progress; }

/* Google (V12.6.39) */
body.da13-auth .da39-divider { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--a-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
body.da13-auth .da39-divider::before, body.da13-auth .da39-divider::after { content: ''; flex: 1; height: 1px; background: var(--a-line); }
body.da13-auth .da39-divider span { background: transparent; padding: 0; }
body.da13-auth .da39-google-login {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 18px; border: 1.5px solid var(--a-line); border-radius: 9999px;
  background: var(--a-surface); color: var(--a-ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
body.da13-auth .da39-google-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--a-surface-2); font-weight: 700; font-size: 14px; }
body.da13-auth .da39-google-hint { margin: -6px 0 0; font-size: 13px; color: var(--a-muted); text-align: center; }

/* links & footer */
body.da13-auth .da1244-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 13px; color: var(--a-muted); }
body.da13-auth .da1244-links a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; color: var(--a-ink); text-decoration: underline; text-underline-offset: 3px; }
body.da13-auth .da1244-links span { display: inline-flex; align-items: center; min-height: 40px; }
body.da13-auth .da1244-rule { height: 1px; background: var(--a-line); margin: 0; }
body.da13-auth :is(.da1244-footnote, .da52-tip) { font-size: 13px; color: var(--a-muted); line-height: 1.5; }
body.da13-auth .da52-tip { padding: 12px 14px; border-radius: 14px; background: var(--a-surface-2); }
body.da13-auth .da52-back { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 600; color: var(--a-ink); text-decoration: none; }
body.da13-auth :is(.da1244-bottom, .da52-footer) { margin: 0; font-size: 12px; color: var(--a-muted); text-align: center; }
body.da13-auth .da52-link-button { color: var(--a-ink); }

/* Wide screens: show the brand panel next to the form. */
@media (min-width: 900px) {
  body.da13-auth .da1244-layout { max-width: 920px; display: grid; grid-template-columns: 1fr 440px; gap: 24px; align-items: stretch; }
  body.da13-auth .da1244-brand { display: block; }
  body.da13-auth .da1244-brand-card {
    height: 100%; display: flex; flex-direction: column; gap: 20px; padding: 32px;
    border-radius: 24px; background: var(--a-yellow); color: var(--a-ink);
  }
  body.da13-auth .da1244-brand-top { display: flex; gap: 8px; flex-wrap: wrap; }
  body.da13-auth .da1244-chip { padding: 6px 12px; border-radius: 9999px; background: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
  body.da13-auth .da1244-chip-dark { background: var(--a-ink); color: #fff; }
  body.da13-auth .da1244-brand-logo { width: 180px; height: auto; }
  body.da13-auth .da1244-brand-copy h1 { font-size: 24px; font-weight: 700; line-height: 1.2; }
  body.da13-auth .da1244-brand-copy p { margin-top: 8px; font-size: 15px; color: var(--a-ink-2); }
  body.da13-auth .da1244-brand-features { display: grid; gap: 10px; margin-top: auto; }
  body.da13-auth .da1244-feature { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .55); }
  body.da13-auth .da1244-feature strong { display: block; font-size: 14px; }
  body.da13-auth .da1244-feature span { font-size: 13px; color: var(--a-ink-2); }
  body.da13-auth .da1244-brand-note { font-size: 13px; color: var(--a-ink-2); }
}
@media (max-width: 359px) {
  body.da13-auth :is(.da1244-panel, .da52-card) { padding: 22px 16px 20px; border-radius: 20px; }
  body.da13-auth :is(.da1244-auth-copy h2, .da52-card h2) { font-size: 22px; }
}
