/* JKA Dealer Portal v1.6.29 — SMTP profile manager + mandatory visual release gate */
body.homeaid-system .smtp-profile-manager-card .premium-card-head{
  align-items:center!important;
}
body.homeaid-system .smtp-profile-manager-card .premium-card-body{
  display:grid;
  gap:.8rem;
}
body.homeaid-system .smtp-profile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));
  gap:.75rem;
  align-items:stretch;
}
body.homeaid-system .smtp-profile-card{
  min-width:0;
  height:100%;
  display:flex;
  flex-direction:column;
  gap:.72rem;
  padding:.82rem;
  border:1px solid var(--ha-border);
  border-radius:.85rem;
  background:var(--ha-surface);
  overflow:hidden;
}
body.homeaid-system .smtp-profile-card.is-default{border-color:rgba(216,182,52,.55);box-shadow:0 0 0 1px rgba(216,182,52,.08)}
body.homeaid-system .smtp-profile-card.is-archived{opacity:.72}
body.homeaid-system .smtp-profile-card-head{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:.65rem;align-items:center;min-width:0}
body.homeaid-system .smtp-profile-card-head>div{min-width:0}
body.homeaid-system .smtp-profile-card-head strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem}
body.homeaid-system .smtp-profile-card-head small{display:block;color:var(--ha-subtle);font-size:.66rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:.08rem}
body.homeaid-system .smtp-provider-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:.7rem;background:var(--ha-soft);color:var(--ha-primary)}
body.homeaid-system .smtp-provider-mark.provider-gmail{background:rgba(216,182,52,.1)}
body.homeaid-system .smtp-provider-mark.provider-yahoo{background:rgba(100,80,180,.10)}
body.homeaid-system .smtp-profile-meta{display:grid;grid-template-columns:64px minmax(0,1fr);gap:.26rem .55rem;margin:0;padding:.62rem 0;border-top:1px solid var(--ha-border);border-bottom:1px solid var(--ha-border)}
body.homeaid-system .smtp-profile-meta dt,body.homeaid-system .smtp-profile-meta dd{margin:0;min-width:0;font-size:.68rem;line-height:1.35}
body.homeaid-system .smtp-profile-meta dt{color:var(--ha-subtle);font-weight:750}
body.homeaid-system .smtp-profile-meta dd{overflow-wrap:anywhere;color:var(--ha-text)}
body.homeaid-system .smtp-profile-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;margin-top:auto}
body.homeaid-system .smtp-profile-actions form{margin:0}
body.homeaid-system .smtp-profile-guidance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
body.homeaid-system .smtp-profile-guidance>div{display:flex;gap:.55rem;align-items:flex-start;padding:.65rem .72rem;border:1px solid var(--ha-border);border-radius:.72rem;background:var(--ha-soft);font-size:.68rem;line-height:1.45;color:var(--ha-muted)}
body.homeaid-system .smtp-profile-guidance i{margin-top:.1rem;color:var(--ha-primary)}
body.homeaid-system .smtp-profile-switch-row{display:flex;flex-wrap:wrap;gap:1rem;padding:.65rem .75rem;border:1px solid var(--ha-border);border-radius:.72rem;background:var(--ha-soft)}
body.homeaid-system .smtp-profile-switch-row .form-check{margin:0;min-height:0}
body.homeaid-system .smtp-profile-preset-note{padding:.62rem .7rem;border-radius:.68rem;background:var(--ha-soft);border:1px solid var(--ha-border);color:var(--ha-muted);font-size:.7rem;line-height:1.45}
body.homeaid-system [data-smtp-custom-field].is-provider-fixed{opacity:.72}
body.homeaid-system .smtp-provider-help{display:flex;gap:.55rem;align-items:flex-start;font-size:.7rem;line-height:1.5}
body.homeaid-system .smtp-provider-help i{margin-top:.18rem;flex:0 0 auto}
body.homeaid-system #smtpProfileModal .modal-body{overflow-y:auto}
body.homeaid-system #smtpProfileModal .form-label{width:100%}
body.homeaid-system .smtp-diagnostic-form{display:grid;gap:.72rem}
body.homeaid-system .smtp-diagnostic-actions{margin-top:0!important}
body.homeaid-system .email-compose-card form{display:flex;flex-direction:column;gap:.72rem;height:100%}
body.homeaid-system .email-compose-card form>.form-label{margin:0}
body.homeaid-system .email-delivery-table .mini-chip{max-width:210px;white-space:normal;line-height:1.25}
/* Final release gate: eliminate accidental compounded gaps and ensure sibling card geometry remains deliberate. */
body.homeaid-system .dashboard>section+section,
body.homeaid-system .dashboard>.premium-card+.premium-card{margin-top:.85rem!important}
body.homeaid-system .premium-card-head+ .premium-card-body{min-width:0}
body.homeaid-system .premium-card,body.homeaid-system .premium-card-body,body.homeaid-system .premium-card-head{min-width:0}
body.homeaid-system .modal-dialog-scrollable .modal-content{max-height:calc(100dvh - 1rem)!important}
body.homeaid-system .modal-dialog-scrollable .modal-body{overflow-y:auto!important;overscroll-behavior:contain}
@media(max-width:991.98px){
  body.homeaid-system .smtp-profile-guidance{grid-template-columns:1fr}
  body.homeaid-system .smtp-profile-manager-card .premium-card-head{align-items:flex-start!important}
}
@media(max-width:575.98px){
  body.homeaid-system .smtp-profile-grid{grid-template-columns:1fr}
  body.homeaid-system .smtp-profile-card{padding:.72rem}
  body.homeaid-system .smtp-profile-card-head{grid-template-columns:34px minmax(0,1fr);align-items:start}
  body.homeaid-system .smtp-profile-card-head>.status-pill{grid-column:2;justify-self:start}
  body.homeaid-system .smtp-provider-mark{width:34px;height:34px}
  body.homeaid-system .smtp-profile-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  body.homeaid-system .smtp-profile-actions>*{min-width:0}
  body.homeaid-system .smtp-profile-actions form,body.homeaid-system .smtp-profile-actions .btn{width:100%}
  body.homeaid-system .smtp-profile-actions .mini-chip{grid-column:1/-1;width:max-content;max-width:100%}
  body.homeaid-system .smtp-profile-switch-row{display:grid;grid-template-columns:1fr;gap:.5rem}
  body.homeaid-system #smtpProfileModal .modal-dialog{margin:.35rem!important}
  body.homeaid-system #smtpProfileModal .modal-content{max-height:calc(100dvh - .7rem)!important}
}
