/* =====================================================================
   platform.css — SENIOR6 PLATFORM brand (the marketing / auth / profile
   chrome). Distinct from the per-org operator skins in tokens.css.
   Load this INSTEAD of tokens.css on platform-branded pages.
   ---------------------------------------------------------------------
   Platform identity:  Senior6  ·  powered by Keyed Systems & the LINQ Network
   ===================================================================== */
:root {
  /* ---- Platform brand colors (Senior6 deep teal-green, from the logo) ---- */
  --brand-primary:        #155a56;   /* Senior6 green (logo wordmark) */
  --brand-primary-dark:   #0e423f;
  --brand-primary-soft:   #e3eeec;
  --brand-accent:         #2c9e74;   /* fresh emerald — CTAs & links */
  --brand-accent-dark:    #1f7b59;
  --brand-accent-soft:    #e4f3ec;

  /* ---- Neutrals / surfaces (faint green-gray) ---- */
  --bg:                   #f5f8f7;
  --surface:              #ffffff;
  --surface-2:            #ecf1f0;
  --border:               #dce6e4;
  --text:                 #14302c;
  --text-muted:           #5a6b68;

  --ok: #2f7d55; --ok-soft: #e3f1e8; --warn: #b4690e;
  --error: #c0392b; --error-soft: #fbeae6;

  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Times New Roman', serif;
  --font-head:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs-base: 17px; --lh-base: 1.65;

  --radius: 14px; --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(20,54,66,.05), 0 6px 18px rgba(20,54,66,.07);
  --shadow-lg: 0 10px 40px rgba(20,54,66,.16);
  --maxw: 1120px; --reading: 760px;

  --appbar-bg: #ffffff; --appbar-fg: #155a56; --logo-h: 30px;
}

/* ---- Platform wordmark (used where there is no image logo) ---- */
.brandmark .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--brand-primary); letter-spacing: .2px; }
.brandmark .wordmark b { color: var(--brand-accent); }
.powered-by { font-size: .72rem; color: var(--text-muted); }
.powered-by b { color: var(--brand-primary); font-weight: 600; }

/* ---- Centered auth card layout ---- */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; padding: 34px 32px; }
.auth-card h1 { font-family: var(--font-display); font-size: 1.7rem; color: var(--brand-primary); margin: 0 0 4px; }
.auth-card .sub { color: var(--text-muted); margin: 0 0 22px; font-size: .95rem; }
.auth-card .field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.auth-card label { font-size: .82rem; font-weight: 600; color: var(--text); }
.auth-card input, .auth-card select, .form-grid input, .form-grid select, .form-grid textarea {
  font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); width: 100%;
}
.auth-card input:focus, .auth-card select:focus { outline: 2px solid var(--brand-accent); border-color: var(--brand-accent); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-card .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-links { margin-top: 18px; font-size: .85rem; color: var(--text-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.auth-links a { color: var(--brand-accent-dark); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* ---- Segmented toggle (email vs code register) ---- */
.seg { display: flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 18px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--text-muted); border-radius: 7px; cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--brand-primary); box-shadow: var(--shadow); }

/* ---- Inline form feedback ---- */
.form-msg { font-size: .85rem; padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; display: none; }
.form-msg.show { display: block; }
.form-msg.err { background: var(--error-soft); color: var(--error); }
.form-msg.ok  { background: var(--ok-soft); color: var(--ok); }

/* ---- Avatar (initials) + dropdown menu in the appbar ---- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; border: 0; cursor: pointer; font-family: var(--font-head); }
.avatar-menu { position: relative; }
.avatar-pop { position: absolute; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; display: none; z-index: 60; }
.avatar-pop.show { display: block; }
.avatar-pop a, .avatar-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; font-size: .88rem; color: var(--text); border-radius: 7px; cursor: pointer; text-decoration: none; }
.avatar-pop a:hover, .avatar-pop button:hover { background: var(--surface-2); }
.avatar-pop .who { padding: 9px 12px 4px; }
.avatar-pop .who strong { display: block; }
.avatar-pop .who span { font-size: .78rem; color: var(--text-muted); }
.avatar-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* D3 — phone layout: roomier auth card; stack the two-up name row */
@media (max-width: 420px) {
  .auth-wrap { padding: 24px 14px; }
  .auth-card { padding: 26px 20px; }
  .auth-card .row-2 { grid-template-columns: 1fr; }
}
