/* Smart Property Platform 1.3.92 — one institutional identity card, scoped to SPP. */
.spp-identity-card {
  --spp-id-navy:#102C45;
  --spp-id-gold:#B48A40;
  --spp-id-sage:#537D69;
  --spp-id-muted:#43576A;
  --spp-id-line:#DCE3E0;
  --spp-id-accent:#B48A40;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:84px minmax(0,1fr) auto;
  align-items:center;
  gap:16px 20px;
  width:100%;max-width:100%;min-width:0;
  margin:0 0 16px;padding:18px 22px;
  background:#FBFAF7;border:1px solid var(--spp-id-line);
  border-top:3px solid var(--spp-id-gold);border-radius:15px;
  box-shadow:0 5px 20px rgba(16,44,69,.07);
  color:var(--spp-id-navy);font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  text-align:left;line-height:1.4;
}
.spp-identity-card *, .spp-identity-card *::before, .spp-identity-card *::after {box-sizing:border-box}
.spp-identity-card--super {--spp-id-accent:#B48A40}
.spp-identity-card--owner {--spp-id-accent:#A67830}
.spp-identity-card--admin {--spp-id-accent:#537D69}
.spp-identity-card--student {--spp-id-accent:#305F88}
.spp-identity-card--guardian {--spp-id-accent:#638C73}
.spp-identity-card__brand {min-width:0;align-self:start;display:flex;justify-content:center;align-items:center}
.spp-identity-card .spp-identity-card__logo {
  display:block;width:82px;max-width:100%;height:auto;max-height:88px;
  object-fit:contain;margin:0;padding:0;border:0;box-shadow:none;
}
.spp-identity-card__details {min-width:0;max-width:100%}
.spp-identity-card__place {
  margin:0 0 5px;color:#526B69;font-size:12px;font-weight:750;
  letter-spacing:.04em;line-height:1.4;text-transform:uppercase;
}
.spp-identity-card__person {display:flex;align-items:center;gap:11px;min-width:0;margin-bottom:7px}
.spp-identity-card__avatar {
  flex:none;display:grid;place-items:center;width:40px;height:40px;
  border:1px solid #CBD7D4;border-radius:50%;
  background:#E9F0EC;color:var(--spp-id-navy);
  font-size:14px;font-weight:800;letter-spacing:.01em;
}
.spp-identity-card .spp-identity-card__name {
  display:block;visibility:visible;opacity:1;min-width:0;max-width:100%;
  margin:0!important;padding:0!important;
  color:var(--spp-id-navy)!important;font-size:clamp(28px,2.2vw,32px)!important;
  font-weight:750!important;line-height:1.32!important;
  letter-spacing:-.018em!important;text-transform:none!important;
  white-space:normal;word-break:normal;overflow-wrap:break-word;
}
.spp-identity-card__chips {display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 5px;min-width:0}
.spp-identity-card__chip {
  display:inline-flex;align-items:center;max-width:100%;min-width:0;
  border:1px solid #CBD8D8;background:#E8F0F0;color:#193E55;
  border-radius:6px;padding:3px 9px;
  font-size:15px;font-weight:700;line-height:1.4;white-space:normal;word-break:normal;
}
.spp-identity-card__chip--role {border-color:var(--spp-id-accent);background:#F3F6F3;color:var(--spp-id-navy)}
.spp-identity-card__chip--code {background:#FFF8E9;border-color:#DCC99D;color:#664F28}
.spp-identity-card__privileges {font-size:15px;line-height:1.45;color:#334D5B;margin:0 0 4px;max-width:100%}
.spp-identity-card__email {font-size:14px;line-height:1.45;color:#425C6A;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
.spp-identity-card__actions {display:flex;justify-content:flex-end;align-items:center;min-width:0}
.spp-identity-card .spp-identity-card__logout,
body.wp-admin .spp-identity-card .spp-identity-card__logout {
  display:inline-flex;align-items:center;justify-content:center;
  width:auto;min-height:46px;min-width:128px;max-width:100%;
  padding:10px 15px;margin:0;
  background:#fff!important;color:var(--spp-id-navy)!important;
  border:1px solid #92A8A4!important;border-radius:9px;
  font-size:16px!important;font-weight:700!important;line-height:1.35!important;
  text-decoration:none!important;text-align:center;white-space:nowrap;
  box-shadow:none;cursor:pointer;
}
.spp-identity-card .spp-identity-card__logout:hover,
body.wp-admin .spp-identity-card .spp-identity-card__logout:hover {
  background:#EAF2ED!important;color:#102C45!important;border-color:#537D69!important;
}
.spp-identity-card .spp-identity-card__logout:active,
body.wp-admin .spp-identity-card .spp-identity-card__logout:active {background:#DAE9E1!important;color:#102C45!important}
.spp-identity-card a:focus-visible,
body.wp-admin .spp-identity-card a:focus-visible {outline:3px solid #B48A40!important;outline-offset:3px!important}

/* WP-admin SPP pages only; no changes to other plugins' notices or headers. */
body.wp-admin .spp-identity-card--admin {margin:12px 20px 14px 0;width:calc(100% - 20px)}
/* Homepage identity is its own full-width module, not an element compressing hero copy. */
.spp-home > .spp-identity-card {margin-bottom:14px}
.spp-home .spp-home-hero--signed-in {grid-template-columns:minmax(0,1fr) auto}
.spp-home .spp-home-hero--signed-in .spp-home-hero-copy {min-width:0}
.spp-home .spp-home-hero--signed-in .spp-home-hero-actions {min-width:0}

/* Tablets and narrow admin canvases: the action takes its own row. */
@media (max-width:1000px) {
  .spp-identity-card {grid-template-columns:70px minmax(0,1fr);gap:12px 16px;padding:16px 18px}
  .spp-identity-card .spp-identity-card__logo {width:70px;max-height:78px}
  .spp-identity-card__actions {grid-column:2;justify-content:flex-start}
  .spp-identity-card .spp-identity-card__name {font-size:28px!important}
}
/* Mobile: logo + institution row, then the name across full available width. */
@media (max-width:640px) {
  .spp-identity-card {grid-template-columns:60px minmax(0,1fr);gap:7px 12px;padding:13px 14px;margin-bottom:12px;border-radius:13px}
  .spp-identity-card__brand {grid-column:1;grid-row:1;align-self:center}
  .spp-identity-card .spp-identity-card__logo {width:58px;max-height:64px}
  .spp-identity-card__details {display:contents}
  .spp-identity-card__place {grid-column:2;grid-row:1;align-self:center;margin:0;font-size:11px;line-height:1.45;letter-spacing:.015em}
  .spp-identity-card__person {grid-column:1/-1;grid-row:2;margin:1px 0 0;display:block}
  .spp-identity-card__avatar {display:none}
  .spp-identity-card .spp-identity-card__name {font-size:clamp(24px,6.6vw,28px)!important;line-height:1.35!important}
  .spp-identity-card__chips {grid-column:1/-1;grid-row:3;gap:6px;margin:0}
  .spp-identity-card__chip {font-size:14px;line-height:1.4;padding:3px 7px}
  .spp-identity-card__privileges {grid-column:1/-1;grid-row:4;font-size:14px;line-height:1.45;margin:0}
  .spp-identity-card__email {grid-column:1/-1;grid-row:5;font-size:14px;line-height:1.45;margin:0}
  .spp-identity-card__actions {grid-column:1/-1;grid-row:6;display:block;margin-top:6px}
  .spp-identity-card .spp-identity-card__logout,body.wp-admin .spp-identity-card .spp-identity-card__logout {display:flex;width:100%;min-height:46px;font-size:16px!important}
  body.wp-admin .spp-identity-card--admin {margin:8px 10px 12px 0;width:calc(100% - 10px)}
  /* SPP-specific page shells: avoid a tall site title preceding the identity. */
  body.spp-private-portal-fullwidth .sj-portal {margin-top:6px!important}
  body.spp-private-portal-fullwidth .site-content {padding-top:0}
  .spp-home .spp-home-hero--signed-in {grid-template-columns:minmax(0,1fr);gap:14px;padding:16px}
  .spp-home .spp-home-hero--signed-in h1 {font-size:clamp(23px,7vw,30px)!important;line-height:1.25!important}
}
/* Focused profile workflows show context without consuming the editing viewport. */
.spp-identity-card--compact {grid-template-columns:60px minmax(0,1fr) auto;gap:10px 13px;padding:10px 14px;margin-bottom:12px}
.spp-identity-card--compact .spp-identity-card__logo {width:58px;max-height:62px}
.spp-identity-card--compact .spp-identity-card__place {font-size:11px}
.spp-identity-card--compact .spp-identity-card__avatar {width:30px;height:30px;font-size:12px}
.spp-identity-card--compact .spp-identity-card__name {font-size:24px!important}
.spp-identity-card--compact .spp-identity-card__privileges {font-size:14px}
@media (max-width:640px) {
  .spp-identity-card--compact {grid-template-columns:52px minmax(0,1fr);padding:10px 12px;gap:5px 10px}
  .spp-identity-card--compact .spp-identity-card__logo {width:52px;max-height:55px}
  .spp-identity-card--compact .spp-identity-card__name {font-size:24px!important}
  .spp-identity-card--compact .spp-identity-card__actions {margin-top:3px}
}
@media (prefers-reduced-motion:reduce) {
  .spp-identity-card *, .spp-identity-card *::before, .spp-identity-card *::after {animation:none!important;transition:none!important}
}
