/*
 * Family portal layout refinement — 0.45.79.33.
 * Presentation only. Scoped to the authenticated My Insight K9 shell.
 */
.ik9-family-shell[data-ik9-family-shell] {
  --ik9-family-surface:#ffffff;
  --ik9-family-soft:#f6f8fa;
  --ik9-family-soft-red:#fff2f4;
  --ik9-family-ink:#1b1e22;
  --ik9-family-muted:#5b6672;
  --ik9-family-line:#d9e0e6;
  --ik9-family-red:#bc1326;
}

.ik9-family-shell[data-ik9-family-shell] .ik9-crm-content {
  display:block;
}

.ik9-family-shell[data-ik9-family-shell] .ik9-family-page-intro {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  margin:0 0 24px;
  padding:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-page-intro > div:first-child {
  min-width:0;
  max-width:760px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-page-intro h1 {
  margin:0 0 10px;
  font-size:clamp(30px,4.5vw,42px);
  line-height:1.08;
  letter-spacing:-.025em;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-page-summary {
  margin:0!important;
  max-width:700px;
  color:var(--ik9-family-muted);
  font-size:17px;
  line-height:1.55;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-page-kicker,
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section-kicker {
  margin:0 0 7px!important;
  color:#a51223;
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
  line-height:1.3;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-page-actions {
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:10px;
}

.ik9-family-shell[data-ik9-family-shell] .ik9-family-section,
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-form-section,
.ik9-family-shell[data-ik9-family-shell] .ik9-family-messages-panel {
  min-width:0;
  margin:18px 0;
  padding:22px;
  border:1px solid var(--ik9-family-line);
  border-radius:14px;
  background:var(--ik9-family-surface);
  box-shadow:0 8px 22px rgb(21 31 42 / 4%);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:0 0 18px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section-heading > div {
  min-width:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section-heading h2,
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section > h2:first-child,
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-form-section > h2:first-child {
  margin:0 0 7px;
  font-size:23px;
  line-height:1.18;
  letter-spacing:-.015em;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section-heading p:last-child {
  margin:0;
  color:var(--ik9-family-muted);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-section-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:18px 0 0!important;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-record-stack {
  display:grid;
  gap:12px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-record-stack > .ik9-crm-record {
  margin:0!important;
  background:var(--ik9-family-soft);
}

.ik9-family-shell[data-ik9-family-shell] .ik9-crm-empty {
  display:grid;
  gap:5px;
  min-height:0;
  margin:0;
  padding:18px;
  background:var(--ik9-family-soft);
  border-color:var(--ik9-family-line);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-empty strong {
  display:block;
  color:var(--ik9-family-ink);
  font-size:17px;
  line-height:1.35;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-empty span {
  color:var(--ik9-family-muted);
  font-size:15px;
  line-height:1.5;
}

/* Family home. */
.ik9-family-shell[data-family-view="dashboard"] .ik9-family-page-intro.is-dashboard {
  margin-bottom:20px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-next {
  margin:0 0 18px;
  padding:20px;
  border-radius:14px;
  background:var(--ik9-family-soft);
  box-shadow:none;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-next .ik9-family-section-actions {
  margin-top:14px!important;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:18px 0 4px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card {
  display:flex;
  min-width:0;
  min-height:112px;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
  padding:18px;
  color:var(--ik9-family-ink)!important;
  text-decoration:none!important;
  border:1px solid var(--ik9-family-line);
  border-top:3px solid var(--ik9-family-red);
  border-radius:13px;
  background:#fff;
  box-shadow:0 5px 16px rgb(21 31 42 / 4%);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card:hover {
  background:#fff8f9;
  border-color:#e6aeb5;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card strong {
  color:#a51223;
  font-size:19px;
  line-height:1.22;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card span {
  color:var(--ik9-family-muted);
  font-size:14px;
  line-height:1.4;
}

/* Appointments and connected scheduling account. */
.ik9-family-shell[data-family-view="appointments"] .ik9-family-appointments-section {
  margin-bottom:14px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:14px 0 0;
  padding:18px;
  border:1px solid #e0c4c8;
  border-radius:13px;
  background:var(--ik9-family-soft-red);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link div {
  display:grid;
  gap:4px;
  min-width:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link strong {
  color:var(--ik9-family-ink);
  font-size:17px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link small {
  color:var(--ik9-family-muted);
  font-size:14px;
  line-height:1.45;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link .ik9-crm-button {
  flex:0 0 auto;
}

/* Dogs. */
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card {
  display:grid;
  align-content:start;
  gap:16px;
  padding:20px!important;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  min-width:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card-head > div {
  min-width:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card h2 {
  margin:0 0 5px!important;
  font-size:25px!important;
  line-height:1.16;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card p {
  margin:0;
  color:var(--ik9-family-muted);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card .ik9-crm-badge {
  flex:0 0 auto;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card .ik9-crm-button {
  justify-self:start;
}

/* Training, messages, health, documents. */
.ik9-family-shell[data-ik9-family-shell] .ik9-family-training-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:0 0 14px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-training-grid > .ik9-family-training-feature {
  margin:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-training-feature > h2 {
  margin-top:0!important;
}
.ik9-family-shell[data-family-view="training"] .ik9-family-record-section,
.ik9-family-shell[data-family-view="documents"] .ik9-family-section,
.ik9-family-shell[data-family-view="health"] .ik9-family-section {
  margin-top:14px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-messages-panel {
  margin-top:0!important;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-messages-panel > .ik9-help {
  margin:-4px 0 18px;
  padding:12px 14px;
  border-radius:9px;
  background:var(--ik9-family-soft);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-messages-panel > .ik9-crm-record {
  background:var(--ik9-family-soft);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-health-history {
  margin-top:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-form-section {
  border-top:3px solid var(--ik9-family-red);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-form-section > .ik9-crm-form {
  margin:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-section .ik9-attendee-invite-form {
  margin:0;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-section .ik9-form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 16px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-section .ik9-field {
  display:grid;
  gap:6px;
  min-width:0;
  margin:0;
  font-weight:600;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-section .ik9-field > span {
  color:var(--ik9-family-ink);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-section .ik9-attendee-invite-form > button {
  margin-top:16px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-agreement-list {
  display:grid;
  gap:10px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-agreement-list > p {
  margin:0;
  padding:14px;
  border:1px solid var(--ik9-family-line);
  border-radius:10px;
  background:var(--ik9-family-soft);
}

/* Account. */
.ik9-family-shell[data-ik9-family-shell] .ik9-family-account-summary {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:0 0 18px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-account-summary > div {
  min-width:0;
  padding:15px;
  border:1px solid var(--ik9-family-line);
  border-radius:11px;
  background:var(--ik9-family-soft);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-account-summary dt {
  color:var(--ik9-family-muted);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-account-summary dd {
  margin:4px 0 0;
  font-weight:700;
}
.ik9-family-shell[data-family-view="account"] fieldset {
  background:var(--ik9-family-soft);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-form-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:18px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-form-actions > :first-child {
  flex:1 1 260px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-form-actions > :last-child {
  flex:0 1 auto;
}

/* Improve form and field rhythm across all family views without changing fields. */
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-form label,
.ik9-family-shell[data-ik9-family-shell] .ik9-form label {
  margin-bottom:16px;
}
.ik9-family-shell[data-ik9-family-shell] fieldset:last-of-type {
  margin-bottom:18px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-form small,
.ik9-family-shell[data-ik9-family-shell] .ik9-form small {
  display:block;
  margin-top:7px;
  color:var(--ik9-family-muted);
  font-weight:400;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-crm-check {
  display:flex!important;
  align-items:flex-start;
  gap:8px;
}

@media (max-width:960px) {
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:760px) {
  .ik9-family-shell[data-ik9-family-shell] .ik9-crm-content {
    padding:20px 16px 24px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-page-intro {
    display:grid;
    gap:14px;
    margin-bottom:20px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-page-intro h1 {
    font-size:30px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-page-summary {
    font-size:16px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-page-actions,
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-page-actions .ik9-crm-button {
    width:100%;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-section,
  .ik9-family-shell[data-ik9-family-shell] .ik9-crm-form-section,
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-messages-panel {
    padding:17px;
    margin:14px 0;
    border-radius:12px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-section-heading {
    margin-bottom:15px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-section-heading h2,
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-section > h2:first-child,
  .ik9-family-shell[data-ik9-family-shell] .ik9-crm-form-section > h2:first-child {
    font-size:21px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-next {
    padding:16px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card {
    min-height:98px;
    padding:14px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card strong {
    font-size:17px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-card span {
    font-size:13px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link {
    display:grid;
    gap:14px;
    padding:16px;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-scheduling-link .ik9-crm-button {
    width:100%;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-grid,
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-training-grid,
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-section .ik9-form-grid,
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-account-summary {
    grid-template-columns:1fr;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card {
    padding:17px!important;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card h2 {
    font-size:23px!important;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card .ik9-crm-button {
    width:100%;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-form-actions {
    display:grid;
    grid-template-columns:1fr;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-form-actions > * {
    width:100%;
  }
}

@media (max-width:360px) {
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dashboard-grid {
    grid-template-columns:1fr;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card-head {
    display:grid;
  }
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-dog-card .ik9-crm-badge {
    justify-self:start;
  }
}


/* Persistent family-linked attendee waivers. */
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-context {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:0 0 10px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-context > div {
  display:grid;
  gap:4px;
  min-width:0;
  padding:14px 15px;
  border:1px solid var(--ik9-family-line);
  border-radius:10px;
  background:var(--ik9-family-soft);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-context span {
  color:var(--ik9-family-muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-context strong {
  overflow-wrap:anywhere;
  color:var(--ik9-family-ink);
  font-size:17px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-list {
  display:grid;
  gap:10px;
  margin-top:20px;
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:15px;
  border:1px solid var(--ik9-family-line);
  border-radius:11px;
  background:var(--ik9-family-soft);
}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card h3,
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card p {margin:0}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card h3 {font-size:19px;line-height:1.25}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card p {margin-top:5px;color:var(--ik9-family-muted);font-size:14px}
.ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card .ik9-chip {flex:0 0 auto;max-width:46%;white-space:normal;text-align:center}
@media(max-width:600px){
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-context {grid-template-columns:1fr}
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card {display:grid}
  .ik9-family-shell[data-ik9-family-shell] .ik9-family-attendee-card .ik9-chip {max-width:100%;justify-self:start}
}
