/* Access administration */
.access-page {
  width: min(100%, 1400px);
  margin: 0 auto;
  color: #243142;
}

.access-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.access-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #087E83;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-page-header h1 {
  margin: 0;
  color: #1D2939;
  font-size: 29px;
  line-height: 1.16;
}

.access-page-header p {
  margin: 5px 0 0;
  color: #617084;
  font-size: 15px;
}

.access-header-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.access-header-actions .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.access-tabs,
.diagnostic-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: -4px 0 18px;
  overflow-x: auto;
  border-bottom: 1px solid #DCE5EE;
}

.access-tabs a,
.diagnostic-tabs a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  border-bottom: 3px solid transparent;
  color: #425168;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.access-tabs a:hover,
.diagnostic-tabs a:hover {
  color: #087D82;
  background: #F3F9F9;
}

.access-tabs a.active,
.diagnostic-tabs a.active {
  border-bottom-color: #009DA5;
  color: #087D82;
}

.access-tabs .nav-icon,
.diagnostic-tabs .nav-icon {
  width: 19px;
  height: 19px;
}

.health-page > .diagnostic-tabs {
  margin-bottom: 0;
}

.access-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid #DDE4EA;
  border-top: 3px solid #009DA5;
  border-radius: 7px;
  background: #FFFFFF;
  overflow: hidden;
}

.access-summary > div {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-right: 1px solid #E5EAEF;
}

.access-summary > div:last-child { border-right: 0; }
.access-summary span { color: #68778A; font-size: 14px; font-weight: 700; }
.access-summary strong { color: #243142; font-size: 25px; }
.access-summary .success strong { color: #13805B; }
.access-summary .primary strong { color: #087E83; }
.access-summary .muted strong { color: #7A8796; }

.access-panel {
  border: 1px solid #DDE4EA;
  border-radius: 7px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(31, 48, 68, .05);
}

.access-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 210px 190px;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #E2E8EE;
  background: #FAFCFD;
}

.access-search {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #CCD6DF;
  border-radius: 6px;
  background: #FFFFFF;
}

.access-search .nav-icon { color: #77879A; }
.access-search:focus-within { border-color: #009DA5; box-shadow: 0 0 0 3px rgba(0, 157, 165, .12); }
.access-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #243142; font: inherit; font-size: 14px; }

.access-table-wrap { overflow-x: auto; }
.access-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.access-table th { padding: 11px 14px; color: #68778A; background: #F5F8FA; font-size: 12px; font-weight: 800; text-align: left; text-transform: uppercase; }
.access-table td { padding: 13px 14px; border-top: 1px solid #E7ECF0; vertical-align: middle; font-size: 14px; }
.access-table tbody tr:hover { background: #FAFCFD; }
.access-table th:last-child { width: 110px; }

.access-person { display: flex; align-items: center; gap: 11px; min-width: 250px; }
.access-person > span:last-child { min-width: 0; display: grid; gap: 2px; }
.access-person strong { color: #243142; font-size: 15px; }
.access-person small { color: #6C7A8B; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.access-avatar { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 7px; background: #E1F2F1; color: #087E83; font-size: 16px; font-weight: 800; }

.access-role-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.access-role-chips > span { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; background: #EEF3F7; color: #425166; font-size: 13px; font-weight: 700; }
.access-role-chips > span.muted { color: #7C8998; font-weight: 600; }
.access-date { color: #536276; white-space: nowrap; }

.access-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.access-row-actions form { margin: 0; }
.access-icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #D4DDE5; border-radius: 6px; background: #F8FAFB; color: #415166; cursor: pointer; }
.access-icon-button:hover { border-color: #9ECBCD; background: #F0F9F9; color: #087E83; }
.access-icon-button.danger { color: #B73F3F; }
.access-icon-button.danger:hover { border-color: #E5BABA; background: #FFF5F5; color: #9E3030; }
.access-icon-button:disabled { cursor: not-allowed; opacity: .42; }

.access-empty { padding: 34px 18px; color: #6C7A8B; text-align: center; }

.access-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 26px 70px rgba(20, 34, 52, .3);
  overflow: hidden;
}

.access-user-dialog { width: min(940px, calc(100vw - 28px)); }
.access-role-dialog { width: min(1020px, calc(100vw - 28px)); }
.access-dialog::backdrop { background: rgba(19, 34, 53, .58); backdrop-filter: blur(2px); }
.access-dialog > form { max-height: calc(100vh - 32px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.access-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 22px; border-bottom: 1px solid #E1E7EC; }
.access-dialog header h2 { margin: 0; color: #1D2939; font-size: 22px; }
.access-dialog header p { margin: 4px 0 0; color: #68778A; font-size: 14px; }
.access-dialog-heading { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.access-dialog-heading-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 7px; background: #E2F3F0; color: #008F97; }
.access-dialog-heading-icon svg { width: 21px; height: 21px; }
.access-dialog-close { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border: 0; border-radius: 6px; background: #EEF2F5; color: #546274; cursor: pointer; }
.access-dialog-close:hover { background: #E3EBF0; color: #29384B; }
.access-dialog-close svg { width: 20px; height: 20px; }
.access-dialog-body { padding: 20px 22px; overflow-y: auto; }
.access-dialog footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid #E1E7EC; background: #FAFCFD; }

.access-form-grid { display: grid; gap: 14px; }
.access-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.access-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.access-form-grid label { display: grid; gap: 6px; }
.access-form-grid label > span, .access-fieldset legend { color: #344255; font-size: 13px; font-weight: 800; }
.access-form-grid label:first-child:nth-last-child(3) { grid-column: span 1; }

.access-user-section-head { margin-bottom: 13px; }
.access-user-section-head h3 { margin: 0; color: #243142; font-size: 15px; }
.access-user-section-head p { margin: 3px 0 0; color: #6D7B8D; font-size: 13px; }
.access-password-input { position: relative; display: block; }
.access-password-input .input { width: 100%; padding-right: 42px; }
.access-password-input button { position: absolute; top: 50%; right: 5px; width: 34px; height: 32px; display: grid; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: 5px; background: transparent; color: #6A798C; cursor: pointer; }
.access-password-input button:hover { background: #EDF5F5; color: #087E83; }
.access-password-input button svg { width: 19px; height: 19px; }

.access-fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.access-fieldset legend { margin-bottom: 9px; }
.access-user-roles { padding-top: 17px; border-top: 1px solid #E4E9EE; }
.access-user-roles legend { margin-bottom: 3px; color: #243142; font-size: 15px; }
.access-user-roles > p { margin: 0 0 11px; color: #6D7B8D; font-size: 13px; }
.access-role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.access-choice { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid #D9E1E7; border-radius: 6px; cursor: pointer; }
.access-choice:has(input:checked) { border-color: #8CC8C9; background: #F1FAF9; }
.access-choice input { margin-top: 3px; accent-color: #009DA5; }
.access-choice > span { display: grid; gap: 2px; }
.access-choice strong { color: #2E3B4D; font-size: 14px; }
.access-choice small { color: #6D7B8D; font-size: 12px; line-height: 1.35; }

.access-password-section { display: grid; gap: 11px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #E4E9EE; }
.access-password-section > div:first-child { display: grid; gap: 2px; }
.access-password-section > div:first-child strong { color: #344255; font-size: 14px; }
.access-password-section > div:first-child small { color: #6D7B8D; font-size: 13px; }

.access-role-overview { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 14px; padding: 12px 16px; border: 1px solid #D9E4E6; border-left: 4px solid #009DA5; border-radius: 6px; background: #F5FAFA; color: #5B6B7E; font-size: 14px; }
.access-role-overview strong { color: #087E83; font-size: 18px; }
.access-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.access-role-card { min-height: 238px; display: grid; grid-template-rows: auto 1fr auto auto; border: 1px solid #DCE3E9; border-radius: 7px; background: #FFFFFF; box-shadow: 0 8px 22px rgba(31, 48, 68, .05); overflow: hidden; }
.access-role-card > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px 0; }
.access-role-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; background: #E2F3F0; color: #087E83; }
.access-role-content { padding: 13px 17px 16px; }
.access-role-content h2 { margin: 0; color: #243142; font-size: 19px; }
.access-role-content p { margin: 6px 0 0; color: #667589; font-size: 14px; line-height: 1.45; }
.access-role-stats { display: flex; gap: 24px; padding: 12px 17px; border-top: 1px solid #E7ECF0; background: #FAFCFD; color: #6B798B; font-size: 13px; }
.access-role-stats strong { color: #354458; font-size: 16px; }
.access-role-card > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 17px; border-top: 1px solid #E7ECF0; }
.access-role-card > footer form { margin: 0; }
.btn.quiet-danger { border: 1px solid #E4BEBE; background: #FFFFFF; color: #B23D3D; }
.btn.quiet-danger:hover { background: #FFF4F4; }
.btn.quiet-danger:disabled { cursor: not-allowed; opacity: .45; }

.role-basics { margin-bottom: 18px; }
.access-role-lock-note { margin-bottom: 14px; padding: 11px 13px; border-left: 4px solid #D99118; border-radius: 5px; background: #FFF8E9; color: #725218; font-size: 13px; }
.access-permission-groups { border: 1px solid #DCE3E9; border-radius: 7px; overflow: hidden; }
.access-permission-group { margin: 0; padding: 0; border: 0; border-bottom: 1px solid #E2E8ED; }
.access-permission-group:last-child { border-bottom: 0; }
.access-permission-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; background: #F5F8FA; }
.access-permission-group legend { color: #334256; font-size: 14px; font-weight: 800; }
.access-permission-group-head span { display: flex; gap: 10px; }
.access-permission-group-head button { border: 0; background: transparent; color: #087E83; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.access-permission-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 4px 8px 9px; }
.access-permission-options label { display: flex; align-items: flex-start; gap: 8px; min-height: 42px; padding: 9px 8px; border-radius: 5px; cursor: pointer; }
.access-permission-options label:hover { background: #F3F9F9; }
.access-permission-options input { margin-top: 2px; accent-color: #009DA5; }
.access-permission-options strong { color: #435267; font-size: 13px; line-height: 1.35; }

@media (max-width: 980px) {
  .access-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-summary > div:nth-child(2) { border-right: 0; }
  .access-summary > div:nth-child(-n+2) { border-bottom: 1px solid #E5EAEF; }
  .access-toolbar { grid-template-columns: 1fr 190px 180px; }
  .access-form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-permission-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .access-page-header { align-items: stretch; flex-direction: column; gap: 14px; }
  .access-header-actions { justify-content: stretch; }
  .access-header-actions .btn { flex: 1; justify-content: center; }
  .access-toolbar { grid-template-columns: 1fr; }
  .access-table-wrap { overflow: visible; padding: 10px; }
  .access-table { min-width: 0; }
  .access-table thead { display: none; }
  .access-table tbody { display: grid; gap: 10px; }
  .access-table tr { display: grid; grid-template-columns: 1fr auto; border: 1px solid #DCE3E9; border-radius: 7px; overflow: hidden; }
  .access-table td { display: block; padding: 10px 12px; border-top: 1px solid #EDF1F4; }
  .access-table td:first-child { grid-column: 1 / -1; border-top: 0; }
  .access-table td:nth-child(2), .access-table td:nth-child(4) { grid-column: 1 / -1; }
  .access-table td::before { content: attr(data-label); display: block; margin-bottom: 5px; color: #7A8797; font-size: 12px; font-weight: 800; text-transform: uppercase; }
  .access-table td:first-child::before, .access-row-actions::before { display: none; }
  .access-row-actions { grid-column: 2; grid-row: 2; align-self: center; border-top: 0 !important; }
  .access-person { min-width: 0; }
  .access-form-grid.two, .access-form-grid.three, .access-role-options, .access-role-grid, .access-permission-options { grid-template-columns: 1fr; }
  .access-role-overview { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 520px) {
  .access-summary { grid-template-columns: 1fr; }
  .access-summary > div { min-height: 64px; border-right: 0; border-bottom: 1px solid #E5EAEF; }
  .access-summary > div:last-child { border-bottom: 0; }
  .access-dialog header, .access-dialog-body, .access-dialog footer { padding-right: 15px; padding-left: 15px; }
  .access-dialog footer .btn { flex: 1; }
}

@media (max-width: 980px) {
  .wa-line-filters { grid-template-columns: minmax(0, 1fr) 190px; }
  .wa-filter-button { grid-column: 1 / -1; }
  .wa-service-summary { grid-template-columns: 1fr auto; }
  .wa-service-summary small { grid-column: 1 / -1; grid-row: 2; }
  .wa-lines-help { grid-template-columns: 44px minmax(0, 1fr); }
  .wa-help-visual { display: none; }
}

@media (max-width: 680px) {
  .wa-lines-heading,
  .wa-line-editor-head { grid-template-columns: 48px minmax(0, 1fr); padding: 18px; }
  .wa-line-dialog-head { grid-template-columns: 48px minmax(0, 1fr) 36px; }
  .wa-line-primary-grid { grid-template-columns: 1fr; }
  .wa-lines-logo { width: 48px; height: 48px; }
  .wa-lines-heading h1,
  .wa-line-editor-head h1 { font-size: 22px; }
  .wa-lines-heading p,
  .wa-line-editor-head p { font-size: 15px; }
  .wa-new-line { grid-column: 1 / -1; width: 100%; }
  .wa-line-filters { grid-template-columns: 1fr; padding: 16px 18px; }
  .wa-filter-button { grid-column: auto; }
  .wa-service-summary { grid-template-columns: 1fr; gap: 5px; padding: 12px 18px; }
  .wa-service-summary small,
  .wa-service-summary button { grid-column: auto; grid-row: auto; justify-self: start; }
  .wa-lines-table-wrap { padding: 0 18px 18px; }
  .wa-lines-help { grid-template-columns: 40px minmax(0, 1fr); margin: 0 18px 18px; padding: 15px; }
  .wa-help-icon { width: 38px; height: 38px; }
  .wa-line-form-body { padding: 19px 18px; }
  .wa-phone-readonly { grid-template-columns: 92px minmax(0, 1fr); }
  .wa-user-checks { grid-template-columns: 1fr; }
  .wa-line-form > footer,
  .wa-modal-dialog > footer { padding: 14px 18px; }
  .wa-line-form > footer .btn { flex: 1; }
}
