/* Shared design tokens and components for the supplied six-screen portal pack. */
.portal-page {
  --pm-blue: #0864ef;
  --pm-navy: #09234b;
  --pm-muted: #556b8b;
  --pm-line: #dfe8f5;
  --pm-radius: 10px;
  background: #f3f7fe;
  color: var(--pm-navy);
}
.portal-page .portal-sidebar {
  width: 240px;
  background: linear-gradient(150deg, #06274f, #032143);
}
.portal-page .portal-frame {
  margin-left: 240px;
}
.portal-page .portal-sidebar nav a {
  font-size: 12px;
  gap: 10px;
  padding: 13px 10px;
}
.portal-page .portal-topbar {
  height: 68px;
}
.portal-page .portal-main {
  padding: 24px;
  max-width: 1800px;
}
.portal-page .portal-card {
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius);
  box-shadow: 0 3px 12px #214a8010;
  padding: 20px;
}
.portal-page h1 {
  font-size: 29px;
  color: #071c43;
}
.portal-page [data-panel] > h1 + p,
.pm-page-description {
  color: var(--pm-muted);
  margin: 5px 0 20px;
  font-size: 13px;
}
.portal-page h2 {
  color: #0a2149;
  font-size: 18px;
}
.portal-page h2 > svg {
  width: 23px;
  height: 23px;
  margin-right: 10px;
  vertical-align: middle;
  color: var(--pm-blue);
}
.portal-page .button {
  background: linear-gradient(120deg, #0767fa, #0560ec);
  border-color: #0864ef;
  color: #fff;
  gap: 8px;
  font-size: 12px;
  border-radius: 6px;
}
.portal-page .button:hover {
  background: #0655cd;
  border-color: #0655cd;
  transform: none;
}
.portal-page .button-outline {
  background: #fff;
  color: #0755ca;
  border-color: #a8c6f6;
}
.portal-page .button-outline:hover {
  background: #eef5ff;
  color: #064da9;
  border-color: #7da9e9;
}
.portal-page button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.pm-summary-grid,
.portal-page .am-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
#admin-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pm-summary-tile {
  --pm-kpi-accent: #0864ef;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #cfe0f6;
  border-inline-start: 4px solid var(--pm-kpi-accent);
  border-radius: var(--pm-radius);
  background: linear-gradient(115deg, #f4f8ff 0%, #fff 78%);
  min-width: 0;
  box-shadow: 0 3px 10px #214a8008;
}
.pm-summary-icon,
.pm-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  color: #0767ec;
  background: #eaf3ff;
  border-radius: 50%;
}
.pm-summary-icon svg {
  width: 27px;
  height: 27px;
}
.pm-summary-tile > div {
  min-width: 0;
}
.pm-summary-tile > div > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.pm-summary-tile strong {
  display: block;
  font-size: 30px;
  line-height: 1.3;
  margin: 4px 0 1px;
}
.pm-summary-tile small {
  display: block;
  color: var(--pm-muted);
  font-size: 10px;
}
.pm-tone-green .pm-summary-icon {
  color: #07934d;
  background: #e5f8ec;
}
.pm-tone-green {
  --pm-kpi-accent: #0b9b64;
  border-color: #c8eadb;
  background: linear-gradient(115deg, #effaf4 0%, #fff 78%);
}
.pm-tone-violet {
  --pm-kpi-accent: #8044d8;
  border-color: #e0d2f7;
  background: linear-gradient(115deg, #f7f2ff 0%, #fff 78%);
}
.pm-tone-violet .pm-summary-icon {
  color: #7540c5;
  background: #eee5ff;
}
.pm-tone-teal {
  --pm-kpi-accent: #078c9a;
  border-color: #c6e9eb;
  background: linear-gradient(115deg, #effafb 0%, #fff 78%);
}
.pm-tone-teal .pm-summary-icon {
  color: #087f8c;
  background: #dcf4f4;
}
.pm-tone-amber .pm-summary-icon {
  color: #ac6c00;
  background: #fff3d9;
}
.pm-tone-amber {
  --pm-kpi-accent: #d38a0a;
  border-color: #f0dfba;
  background: linear-gradient(115deg, #fff9eb 0%, #fff 78%);
}
.pm-tone-red .pm-summary-icon {
  color: #d52449;
  background: #ffedf0;
}
.pm-tone-red {
  --pm-kpi-accent: #d52449;
  border-color: #f2d0d8;
  background: linear-gradient(115deg, #fff4f6 0%, #fff 78%);
}
.pm-heading-row,
.pm-section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.pm-heading-row > div,
.pm-section-heading > div {
  flex: 1;
  min-width: 0;
}
.pm-heading-row > button,
.pm-section-heading > button {
  margin-left: auto;
  flex-shrink: 0;
}
.pm-heading-row h2,
.pm-section-heading h2 {
  margin: 0;
}
.pm-section-heading p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--pm-muted);
}
.pm-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.pm-section-icon svg {
  width: 23px;
  height: 23px;
}
.pm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  text-align: center;
  padding: 24px 16px;
  gap: 9px;
  color: #162f55;
}
.pm-empty-state strong {
  font-size: 13px;
}
.pm-empty-state p {
  max-width: 350px;
  margin: 0;
  color: var(--pm-muted);
  font-size: 12px;
}
.pm-empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #edf5ff;
  color: #0866ed;
  border-radius: 50%;
  margin-bottom: 5px;
}
.pm-empty-icon svg {
  width: 32px;
  height: 32px;
}
.pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff3f8;
  color: #53627c;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
}
.pm-badge-success {
  background: #e3f7eb;
  color: #087143;
}
.pm-badge-warning {
  background: #fff1dc;
  color: #925500;
}
.pm-badge-blue {
  background: #e8f2ff;
  color: #0755ca;
}
.pm-badge-danger {
  background: #ffebef;
  color: #b61535;
}
.pm-information {
  border: 1px solid #d6e5fb;
  background: #eff6ff;
  color: #375680;
  border-radius: 7px;
  padding: 13px 15px;
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.7;
}
.pm-information p {
  margin: 5px 0;
}
.portal-page .portal-form {
  display: grid;
  gap: 16px;
}
.pm-form-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}
.pm-form-field label {
  margin: 0;
  font-weight: 600;
  color: #1c345a;
}
.portal-page .pm-form-field input,
.portal-page .pm-form-field select {
  width: 100%;
  border-color: #c7d7ee;
  min-height: 41px;
  margin: 0;
}
.portal-page .pm-form-field input:read-only {
  background: #f5f8fc;
  color: #506986;
}
.portal-page .pm-checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
}
.portal-page .pm-checkbox-field input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  flex-shrink: 0;
}
.portal-page .portal-form > button,
.portal-form > fieldset,
.portal-form > small {
  grid-column: 1 / -1;
}
.portal-page #profile-form .portal-form,
#leave-form .portal-form,
#slot-editor .portal-form,
#template-list .portal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.portal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  grid-column: 1 / -1;
}
.portal-form-actions > .button {
  flex: 1;
}
.pm-day-picker {
  padding: 0;
  margin: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pm-day-picker legend {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 600;
}
.pm-day-picker label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dce6f4;
  border-radius: 6px;
  background: #f8faff;
  font-size: 11px;
  cursor: pointer;
}
.pm-day-picker label:has(input:checked) {
  background: #eaf3ff;
  border-color: #b6d0fa;
  color: #0755ca;
}
.portal-page .pm-day-picker input {
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  margin: 0;
}
.pm-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
  align-items: start;
}
.pm-profile-aside {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.portal-page .pm-profile-aside > .portal-card {
  margin: 0;
}
.pm-profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 24px;
}
.pm-profile-identity .portal-avatar {
  width: 64px;
  height: 64px;
  background: #e7effb;
  color: #33588d;
  font-size: 22px;
}
.pm-profile-identity strong {
  display: block;
  font-size: 17px;
  margin-bottom: 7px;
}
.pm-profile-identity small {
  display: block;
  margin-top: 6px;
}
.pm-hours-list {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
}
.pm-hours-list > div {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid #e7eef8;
  font-size: 12px;
}
.pm-hours-list dt {
  font-weight: 600;
}
.pm-hours-list dd {
  margin: 0;
}
.pm-hours-list .pm-badge {
  margin: 2px;
  font-size: 10px;
}
.portal-page .dashboard-columns {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.dashboard-columns > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dashboard-columns > div > .portal-card {
  flex: 1;
}
.portal-page .metric-card {
  background: #fff !important;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 10px #214a8008;
}
.portal-page .metric-icon {
  border-radius: 50%;
  padding: 15px;
}
.portal-page .metric-card > span:last-child {
  flex: 1;
  font-size: 12px;
}
.portal-page .metric-card strong {
  font-size: 30px;
}
.portal-page #quick-actions-panel {
  margin: 18px 0 0;
}
.portal-page .quick-actions a {
  min-height: 83px;
  padding: 16px;
  justify-content: flex-start;
  border-radius: 9px;
  gap: 14px;
}
.quick-actions a > svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.quick-actions a > span {
  min-width: 0;
}
.quick-actions a strong {
  display: block;
  font-size: 13px;
}
.quick-actions a small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
.quick-actions .pm-quick-chevron {
  margin-left: auto;
  width: 17px;
}
.portal-page .dashboard-bottom {
  margin-top: 18px;
}
.portal-page .lead-filters {
  padding: 18px;
  margin: 18px 0;
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  background: white;
  grid-template-columns: minmax(150px, 1.4fr) repeat(5, minmax(90px, 1fr)) auto auto;
  gap: 12px;
}
#lead-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lead-appointments-wrap {
  overflow: auto;
  border: 1px solid #cad9ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px #214a800c;
}
.portal-page .portal-table.lead-appointments-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}
.portal-page .lead-appointments-table th {
  background: linear-gradient(100deg, #eaf3ff, #f4f7ff 58%, #effaf6);
  border-bottom: 1px solid #c8d9ef;
  border-right: 1px solid #dce7f4;
  color: #193b6d;
  padding-top: 13px;
  padding-bottom: 13px;
}
.portal-page .lead-appointments-table td {
  border-bottom: 1px solid #dce6f2;
  border-right: 1px solid #e5edf6;
  transition: background-color 120ms ease;
}
.portal-page .lead-appointments-table th:last-child,
.portal-page .lead-appointments-table td:last-child {
  border-right: 0;
}
.portal-page .lead-appointments-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}
.portal-page .lead-appointments-table tbody tr:hover td {
  background: #edf5ff;
}
.portal-page .lead-appointments-table tbody tr:last-child td {
  border-bottom: 0;
}
.lead-filters label > span {
  color: #173b70;
  font-size: 11px;
  font-weight: 700;
}
.lead-filters > button {
  justify-self: start;
}
.lead-customer-cell strong,
.lead-appointment-cell strong {
  display: block;
  color: #132f60;
  font-size: 12px;
}
.lead-customer-cell small,
.lead-appointment-cell small {
  display: block;
  margin-top: 4px;
}
.lead-mobile-link,
.lead-appointment-method {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #35547f;
  font-size: 11px;
}
.lead-mobile-link svg,
.lead-appointment-method svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #0864ef;
}
.lead-appointment-method.is-phone svg {
  color: #078451;
}
.lead-meeting-cell {
  min-width: 128px;
}
.lead-meeting-join {
  border-color: #a8ddc3 !important;
  background: #eaf8f0 !important;
  color: #08744a !important;
  font-weight: 700;
}
.lead-meeting-join:hover {
  background: #d9f2e4 !important;
  border-color: #7dcca5 !important;
}
.lead-meeting-join svg {
  width: 14px;
  height: 14px;
}
.lead-meeting-note {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #dfe7f1;
  border-radius: 999px;
  background: #f3f6fa;
  color: #536780;
  font-size: 10px;
  white-space: nowrap;
}
.lead-meeting-note.is-phone {
  border-color: #c8eadb;
  background: #eef9f3;
  color: #08744a;
}
.lead-meeting-note.is-pending {
  border-color: #f0dfba;
  background: #fff8e9;
  color: #8a610f;
}
.lead-actions-cell {
  white-space: nowrap;
}
.lead-actions-cell .table-button {
  margin: 0 4px 4px 0;
}
.lead-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 0;
  color: var(--pm-muted);
  font-size: 11px;
}
.lead-pagination-controls,
.lead-page-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.lead-page-arrow,
.lead-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #c8d8ee;
  border-radius: 6px;
  background: #fff;
  color: #24508b;
  font: inherit;
  cursor: pointer;
}
.lead-page-arrow {
  font-size: 22px;
  line-height: 1;
}
.lead-page-button[aria-current='page'] {
  border-color: #0864ef;
  background: #0864ef;
  color: #fff;
}
.lead-page-arrow:disabled {
  opacity: 0.45;
  cursor: default;
}
.portal-detail-dialog.leads-detail-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 96vw);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 18px;
  overflow-y: auto;
  border-radius: 14px 0 0 14px;
}
.portal-detail-dialog.leads-detail-dialog::backdrop {
  background: linear-gradient(90deg, #071b4328 0%, #071b436e 70%, #071b43a0 100%);
}
.appointment-detail {
  display: grid;
  gap: 13px;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.appointment-detail > details {
  padding: 10px 12px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
}
.appointment-detail > details > summary {
  color: #24466f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.appointment-detail > details[open] {
  display: grid;
  gap: 10px;
}
.appointment-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0 12px;
  border-bottom: 1px solid var(--pm-line);
}
.appointment-detail-heading h3 {
  margin: 0 0 5px;
  color: #0a2149;
  font-size: 18px;
}
.appointment-reference {
  color: var(--pm-muted);
  font-size: 11px;
}
.appointment-detail-badges {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.appointment-detail-badges:empty {
  display: none;
}
.appointment-detail-section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--pm-line);
  border-radius: 9px;
  background: #fff;
}
.appointment-detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
}
.appointment-detail-section-title svg {
  width: 18px;
  height: 18px;
  margin: 0;
}
.appointment-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #edf2f9;
}
.appointment-detail-row:last-child {
  border-bottom: 0;
}
.appointment-detail-row > svg,
.appointment-contact-card > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #0864ef;
}
.appointment-detail-row-copy,
.appointment-contact-value {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.appointment-detail-row-copy small,
.appointment-contact-value small {
  color: var(--pm-muted);
  font-size: 10px;
}
.appointment-detail-row-copy strong,
.appointment-contact-value strong {
  overflow-wrap: anywhere;
  color: #15335f;
  font-size: 11px;
}
.appointment-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.appointment-detail-section-email {
  background: linear-gradient(135deg, #f4f8ff, #fff 72%);
}
.appointment-detail-section-meeting {
  background: linear-gradient(135deg, #f0faf5, #fff 72%);
}
.appointment-email-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  background: #fff;
}
.appointment-email-line > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #0864ef;
}
.appointment-email-address {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #15335f;
  font-size: 12px;
  font-weight: 650;
}
.appointment-copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 5px !important;
  border-radius: 7px !important;
}
.portal-page .appointment-copy-icon {
  min-height: 30px;
}
.appointment-copy-icon svg {
  width: 16px;
  height: 16px;
  margin: 0;
}
.appointment-email-actions {
  display: flex;
  margin-top: 9px;
}
.appointment-email-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}
.portal-page .appointment-email-action {
  min-height: 31px;
  padding: 5px 10px;
  gap: 6px;
  font-size: 11px;
}
.appointment-email-action svg {
  width: 14px;
  height: 14px;
  margin: 0;
}
.appointment-phone-action {
  margin-top: 8px;
}
.appointment-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e3ebf7;
  border-radius: 8px;
  background: #fbfdff;
}
.appointment-contact-value {
  flex: 1;
}
.appointment-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 6px;
}
.appointment-contact-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 10px;
  text-decoration: none;
}
.appointment-contact-action[href^='tel:'] {
  border-color: #09965c;
  background: #0ba765;
  color: #fff;
}
.appointment-contact-action[href^='tel:']:hover {
  border-color: #07814e;
  background: #078c56;
  color: #fff;
}
.appointment-contact-action svg,
.appointment-join-button svg {
  width: 14px;
  height: 14px;
  margin: 0;
}
.appointment-meet-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 8px 0;
}
.appointment-meet-link > a {
  min-width: 0;
  overflow: hidden;
  color: #0755ca;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appointment-meet-link .button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
}
.appointment-meet-link .appointment-copy-icon {
  min-height: 30px;
}
.appointment-join-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.portal-page .portal-table {
  font-size: 12px;
}
.portal-page .portal-table th {
  color: #36527a;
  padding: 12px 10px;
  font-size: 10px;
  white-space: nowrap;
}
.portal-page .portal-table td {
  padding: 13px 10px;
}
.portal-page .portal-table .table-button {
  padding: 7px 10px;
  min-height: 32px;
}
.portal-page .pm-working-slots {
  position: relative;
}
#availability-owner {
  margin-bottom: 18px;
}
#availability-owner form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}
#availability-owner .pm-form-field {
  min-width: 240px;
}
#availability-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
#availability-list > .pm-empty-state {
  grid-column: 1 / -1;
}
.pm-availability-day {
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.pm-availability-day > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.pm-availability-day > summary::-webkit-details-marker {
  display: none;
}
.pm-availability-day summary strong {
  display: block;
  font-size: 13px;
}
.pm-availability-day summary small {
  display: block;
  font-size: 11px;
}
.pm-availability-day[open] {
  grid-column: 1 / -1;
  background: #f9fbff;
}
.pm-availability-day[open] > summary {
  border-bottom: 1px solid #dbe6f4;
}
.pm-availability-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding: 14px;
  gap: 12px;
}
.pm-availability-slots > details {
  background: white;
  padding: 14px;
  border: 1px solid #e1eaf7;
  border-radius: 7px;
}
.pm-availability-slots > details > summary {
  font-size: 12px;
  cursor: pointer;
}
.pm-availability-slots form {
  margin-top: 15px;
}
.portal-page #availability > .portal-card {
  margin-top: 18px;
}
.portal-page #management > .portal-card {
  margin: 16px 0;
}
.pm-advisor-shortcut {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.pm-advisor-shortcut > h2 {
  margin: 0;
}
.pm-advisor-shortcut > p {
  grid-column: 1;
  margin: 0;
}
.pm-advisor-shortcut > a {
  grid-column: 2;
  grid-row: 1 / 3;
}
#slot-editor {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #bdd3f5;
  border-radius: 8px;
  background: #f6faff;
}
#slot-editor > details > summary {
  cursor: pointer;
  font-weight: 600;
}
#slot-list,
#template-list {
  display: grid;
  gap: 8px;
}
#slot-list > details,
#template-list > details {
  margin-top: 0;
  border: 1px solid #dce6f5;
  border-radius: 6px;
}
#slot-list > details > summary,
#template-list > details > summary {
  cursor: pointer;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
}
#slot-list > details > details {
  margin: 9px 12px;
  padding: 10px;
  background: #f8faff;
  border: 1px solid #e4ecf7;
  border-radius: 7px;
}
#slot-list > details > details > summary {
  cursor: pointer;
  font-size: 12px;
}
#slot-list form,
#template-list form {
  padding: 14px;
}
#system-settings .portal-form {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  margin-top: 15px;
}
#system-settings .portal-form > button {
  grid-column: auto;
}
.pm-integration-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}
.pm-integration-grid > div {
  background: #f7faff;
  border: 1px solid #e2eaf6;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 11px;
  flex: 1;
  min-width: 160px;
}
.pm-integration-grid strong {
  display: block;
  margin-bottom: 4px;
}
.pm-job-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.pm-job-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  margin: 6px 0;
  border: 1px solid #e0e8f4;
  border-radius: 6px;
  background: #fafcff;
  font-size: 11px;
}
.pm-job-row.pm-job-failed {
  background: #fff3f5;
  border-color: #ffdce4;
}
.pm-job-row > button {
  margin-left: auto;
}
.portal-page .am-page-heading {
  margin: 0 0 18px;
}
.am-eyebrow {
  display: none;
}
.portal-page .am-page-heading p {
  color: var(--pm-muted);
}
.am-directory {
  background: white;
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  padding: 18px;
}
.am-toolbar {
  margin: 14px 0;
}
.pm-advisor-table {
  max-width: 100%;
  overflow: auto;
}
.pm-account-table {
  min-width: 950px;
}
.pm-account-table td strong,
.pm-account-table td small {
  display: block;
}
.pm-account-table tbody tr[data-selected='true'] {
  background: #eaf3ff;
}
.portal-page .pm-account-table input[type='radio'] {
  min-height: 16px;
  width: 16px;
  height: 16px;
  padding: 0;
}
.pm-row-actions {
  white-space: nowrap;
}
.pm-row-actions > button + button {
  margin-left: 6px;
}
.pm-advisor-detail {
  background: white;
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  margin-top: 17px;
  overflow: hidden;
}
.pm-selected-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #f2f7ff;
  border-bottom: 1px solid #e4ecf8;
}
.pm-selected-heading > div {
  min-width: 0;
}
.pm-selected-heading h3 {
  font-size: 15px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.pm-selected-heading h3 .pm-badge {
  margin-left: 12px;
}
.pm-selected-heading p {
  color: var(--pm-muted);
  font-size: 11px;
  margin: 0;
}
.pm-tabs {
  display: flex;
  max-width: 100%;
  overflow: auto;
  border-bottom: 1px solid #e1eaf7;
}
.portal-page .pm-tabs > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: white;
  color: #4b6083;
  padding: 15px 12px;
  min-width: 160px;
  flex: 1;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.pm-tabs svg {
  width: 18px;
  height: 18px;
}
.portal-page .pm-tabs > button[aria-selected='true'] {
  color: #075bec;
  border-bottom-color: #0864ef;
  font-weight: 600;
  background: #fafcff;
}
.pm-tab-panel {
  padding: 18px;
}
.pm-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.pm-setting-card {
  border: 1px solid #e0e9f6;
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}
.pm-setting-card .pm-section-heading {
  align-items: flex-start;
}
.pm-setting-card .pm-section-heading h2 {
  font-size: 15px;
}
.pm-setting-card .pm-section-heading p {
  font-size: 11px;
}
.pm-setting-card > h4 {
  font-size: 16px;
  margin: 0 0 12px;
}
.pm-tab-panel > form {
  max-width: 720px;
}
.pm-tab-panel .pm-setting-card form {
  margin-top: 16px;
}
.pm-tab-panel .small {
  line-height: 1.7;
}
.pm-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--pm-muted);
}
.pm-pagination > span {
  margin-right: auto;
}
.pm-audit-table {
  min-width: 520px;
}
.pm-activity-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-bottom: 1px solid #edf2f9;
  font-size: 11px;
}
.pm-activity-line svg {
  width: 16px;
  height: 16px;
  color: #5f7a9e;
}
.pm-activity-line time {
  margin-left: auto;
  color: var(--pm-muted);
  font-size: 10px;
}
.portal-page .am-support-grid {
  grid-template-columns: 1fr 1.2fr;
}
@media (min-width: 1700px) {
  .portal-page .portal-main {
    padding: 26px 34px;
  }
}
@media (max-width: 1250px) {
  .pm-summary-grid,
  .portal-page .am-overview,
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-page .dashboard-columns,
  .pm-profile-layout {
    grid-template-columns: 1fr;
  }
  .portal-page .lead-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #availability-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pm-toolbar {
    flex-wrap: wrap;
  }
}
@media (max-width: 850px) {
  .portal-page .portal-sidebar {
    width: 250px;
  }
  .portal-page .portal-frame {
    margin-left: 0;
  }
  .portal-page .portal-main {
    padding: 18px;
  }
  .pm-detail-columns,
  .portal-page .am-support-grid {
    grid-template-columns: 1fr;
  }
  .pm-summary-tile {
    padding: 15px;
    gap: 12px;
  }
  .pm-summary-icon {
    width: 43px;
    height: 43px;
  }
  .pm-summary-icon svg {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 550px) {
  .portal-page .portal-main {
    padding: 14px;
  }
  .portal-page h1 {
    font-size: 25px;
  }
  .portal-page .portal-card {
    padding: 16px;
  }
  .pm-summary-grid,
  .portal-page .am-overview {
    gap: 9px;
  }
  #admin-summary {
    grid-template-columns: 1fr;
  }
  .pm-summary-tile {
    align-items: flex-start;
    padding: 12px;
    gap: 9px;
  }
  .pm-summary-icon {
    width: 35px;
    height: 35px;
  }
  .pm-summary-icon svg {
    width: 21px;
    height: 21px;
  }
  .pm-summary-tile > div > span {
    font-size: 11px;
  }
  .pm-summary-tile strong {
    font-size: 27px;
  }
  .pm-summary-tile small {
    font-size: 10px;
  }
  .pm-heading-row,
  .pm-section-heading {
    flex-wrap: wrap;
    gap: 10px;
  }
  .pm-section-heading > div {
    flex: 1 1 180px;
  }
  .pm-heading-row > button,
  .pm-section-heading > button {
    margin-left: 0;
  }
  .pm-section-heading h2 {
    font-size: 17px;
  }
  .portal-page #profile-form .portal-form,
  #leave-form .portal-form,
  #slot-editor .portal-form,
  #template-list .portal-form {
    grid-template-columns: 1fr;
  }
  .portal-page .lead-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 13px;
  }
  .lead-filters > label:first-child {
    grid-column: 1 / -1;
  }
  .portal-page .quick-actions {
    flex-direction: column;
  }
  #availability-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pm-availability-day > summary {
    padding: 12px;
  }
  .pm-availability-slots {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  #availability-owner .pm-form-field {
    min-width: 0;
    width: 100%;
  }
  .pm-advisor-shortcut {
    grid-template-columns: 1fr;
  }
  .pm-advisor-shortcut > a {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
  #system-settings .portal-form {
    grid-template-columns: 1fr;
  }
  .am-directory {
    padding: 12px;
  }
  .pm-selected-heading {
    padding: 14px;
    align-items: flex-start;
  }
  .pm-selected-heading h3 .pm-badge {
    margin: 6px 0 0;
  }
  .pm-selected-heading p {
    font-size: 10px;
  }
  .pm-tab-panel {
    padding: 12px;
  }
  .pm-setting-card {
    padding: 14px;
  }
  .portal-page .pm-tabs > button {
    min-width: 145px;
    padding: 13px 10px;
  }
  .pm-activity-line time {
    margin-left: 25px;
  }
}
@media (max-width: 850px) {
  #lead-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-detail-dialog.leads-detail-dialog {
    width: min(480px, 100vw);
    border-radius: 12px 0 0 12px;
  }
  .lead-actions-cell {
    white-space: normal;
  }
}
@media (max-width: 520px) {
  .portal-detail-dialog.leads-detail-dialog {
    width: 100vw;
    border-radius: 0;
    padding: 14px;
  }
  .appointment-contact-grid {
    grid-template-columns: 1fr;
  }
  .lead-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
  .lead-pagination-controls {
    width: 100%;
    justify-content: center;
  }
}
