.access-modal {
  max-width: 1040px !important;
  width: 100%;
  padding: 26px;
  background: #fafbf8;
  font-family: var(--ui-font);
  color: #283e42;
}
.access-modal .modalhead h2 {
  font-family: var(--ui-font);
  font-size: 29px;
}
.access-modal .modalhead {
  margin-bottom: 12px;
}
.access-manager {
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
}
.access-client-name {
  font-size: var(--ui-body);
  font-weight: 600;
  margin: 0 0 18px;
}
.access-current {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
  background: #eaf3ed;
  border: 1px solid #d7e6db;
  border-radius: 13px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.access-current > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.access-current > div + div {
  border-left: 1px solid #ccdfd4;
  padding-left: 24px;
}
.access-current strong {
  font-size: 23px;
  color: #24594c;
  font-weight: 600;
}
.access-current small,
.access-current > div > span:not(.access-state) {
  font-size: var(--ui-caption);
  color: #5b746c;
}
.access-history {
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
  color: #2c4449;
  padding: 18px 0;
}
.ws-disclosure > .access-history {
  padding: 18px;
}
.access-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.access-section-title h3,
.access-new h3 {
  font: 600 var(--ui-body) var(--ui-font);
  color: #21493f;
  margin: 0;
}
.access-section-title > span {
  font-size: var(--ui-caption);
  border-radius: 15px;
  background: #e9efeb;
  color: #49675e;
  padding: 3px 9px;
}
.access-history-scroll {
  border: 1px solid #dce6e1;
  border-radius: 10px;
  overflow: auto;
  overscroll-behavior: contain;
}
.access-history.compact {
  padding: 0;
  margin-bottom: 22px;
}
.access-history.compact .access-history-scroll {
  max-height: 260px;
}
.access-history table {
  width: 100%;
  min-width: 710px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: var(--ui-caption);
}
.access-history th {
  padding: 10px 13px;
  background: #edf3ef;
  color: #526c62;
  white-space: nowrap;
  font-size: var(--ui-caption);
  font-weight: 500;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #dbe6df;
  position: sticky;
  top: 0;
  z-index: 1;
}
.access-history td {
  padding: 12px 13px;
  border: 0;
  border-bottom: 1px solid #e5ece7;
  vertical-align: middle;
  line-height: var(--ui-leading);
  min-width: 0;
  max-width: none;
}
.access-history tr:last-child td {
  border-bottom: 0;
}
.access-date {
  display: block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.access-history td small {
  display: block;
  font-size: var(--ui-caption);
  color: var(--ui-muted);
  margin-top: 2px;
}
.access-days {
  font-size: var(--ui-body);
  font-weight: 600;
  color: #315e4b;
}
.access-state {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  white-space: nowrap;
}
.access-state.active {
  color: #247052;
  background: #ddefe3;
}
.access-state.future {
  color: #5569a2;
  background: #eef0fc;
}
.access-state.past {
  color: var(--ui-muted);
  background: #eef1ef;
}
.access-unknown {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
}
.access-caption {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
  margin: 9px 0 0;
  line-height: var(--ui-leading);
}
.access-empty {
  padding: 16px;
  background: #f1f5f2;
  border-radius: 9px;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  margin: 0;
}
.access-new {
  background: #fff;
  border: 1px solid #d8e4dd;
  border-radius: 13px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.access-duration {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin: 15px 0;
}
.access-duration label {
  margin: 0;
  width: 180px;
  flex: none;
  font-size: var(--ui-caption);
}
.access-duration input {
  width: 100%;
  font-size: 21px !important;
  font-weight: 600;
  color: #245b47;
  padding: 9px 12px;
  margin-top: 5px;
  height: 46px;
  background: #fff;
  border: 1px solid #bccfc3;
  border-radius: 8px;
}
.access-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
}
.access-presets button {
  background: #f2f6f3;
  border: 1px solid #d9e3dc;
  border-radius: 7px;
  color: #466456;
  padding: 8px 12px;
  font: var(--ui-caption) var(--ui-font);
}
.access-presets button.selected {
  background: #2a604c;
  color: #fff;
  border-color: #2a604c;
}
.access-preview {
  padding: 14px 16px;
  background: #f2f7f3;
  border-radius: 9px;
  min-height: 48px;
  color: #466658;
}
.access-preview p {
  font-size: var(--ui-caption);
  margin: 8px 0 0;
}
.access-preview p:only-child {
  margin: 0;
}
.access-preview-head strong {
  font-size: var(--ui-body);
  color: #245842;
}
.access-preview-period {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 13px 0 0;
}
.access-preview-period > div {
  display: grid;
  gap: 3px;
}
.access-preview-period > div > span:first-child {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
}
.access-preview-period .access-date {
  font-size: 20px;
  font-weight: 600;
  color: #295b46;
}
.access-preview-period small {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
}
.access-specialist label {
  font-size: var(--ui-caption);
  margin-bottom: 18px;
}
.access-specialist select {
  margin-top: 5px;
  border-radius: 8px;
  padding: 11px 12px;
  font: var(--ui-caption) var(--ui-font);
}
.access-account {
  border-top: 1px solid #dee6e0;
  padding-top: 13px;
}
.access-account summary {
  cursor: pointer;
  color: #557166;
  font-size: var(--ui-caption);
  padding: 0 0 8px;
}
.access-account .access-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  font: var(--ui-caption) var(--ui-font);
}
.access-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
}
.access-account > small {
  font-size: var(--ui-caption);
  color: var(--ui-muted);
}
.access-account [hidden] {
  display: none !important;
}
.access-account .password-control {
  max-width: 460px;
  margin: 10px 0 18px;
}
.access-modal .form-actions {
  border-top: 1px solid #dfe7e1;
  margin-top: 22px;
  padding-top: 16px;
}
.access-modal .form-actions button {
  font: var(--ui-caption) var(--ui-font);
  padding: 11px 18px;
  border-radius: 8px;
}
.access-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100dvh - 32px);
}
.access-modal .modalhead {
  flex-shrink: 0;
}
.access-modal #modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.access-modal .access-manager {
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}
.access-modal .form-actions {
  flex-shrink: 0;
  margin-top: 12px;
  padding-top: 12px;
  background: #fafbf8;
}
.access-duration {
  flex-wrap: wrap;
  gap: 14px;
}
.access-duration label {
  width: 175px;
}
.access-duration input[type='date'] {
  font-size: var(--ui-caption) !important;
  font-weight: 500;
}
.access-presets {
  flex: 1;
  min-width: 300px;
}
.access-delete {
  color: #a24a40;
  background: #fff6f3;
  border: 1px solid #efd9d2;
  font: var(--ui-caption) var(--ui-font);
  padding: 7px 11px;
  white-space: nowrap;
}
.access-delete:hover {
  background: #fceae5;
}
.access-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.access-overlap,
.access-delete-error {
  color: #a34e37;
}
.access-confirm {
  width: min(540px, calc(100vw - 28px));
  padding: 25px;
  border: 1px solid #d5e2d9;
  border-radius: 15px;
  background: #fafbf8;
  color: #30473c;
  font: var(--ui-caption)/var(--ui-leading) var(--ui-font);
  box-shadow: 0 20px 90px #14291e40;
}
.access-confirm::backdrop {
  background: #253d3166;
}
.access-confirm h2 {
  font-size: 25px;
  margin: 0 0 18px;
}
.access-confirm-period {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #edf3ee;
  padding: 14px;
  border-radius: 9px;
  margin: 14px 0;
  color: #265640;
}
.access-confirm-period strong {
  margin-left: auto;
}
.access-confirm .form-actions {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid #dae5dd;
}
.access-confirm .form-actions button {
  font: var(--ui-caption) var(--ui-font);
}
@media (max-width: 650px) {
  .access-modal {
    padding: 18px;
  }
  .access-modal .modalhead h2 {
    font-size: 25px;
  }
  .access-client-name {
    font-size: var(--ui-body);
  }
  .access-current {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 12px;
  }
  .access-current > div + div {
    border: 0;
    border-top: 1px solid #ccdfd4;
    padding: 12px 0 0;
  }
  .access-current strong {
    font-size: 21px;
  }
  .access-duration {
    display: block;
  }
  .access-duration label {
    width: 100%;
    display: block;
  }
  .access-presets {
    margin-top: 12px;
  }
  .access-new {
    padding: 15px;
  }
  .access-history table {
    min-width: 650px;
  }
  .access-preview-period {
    gap: 10px;
  }
  .access-preview-period .access-date {
    font-size: var(--ui-body);
  }
  .access-preview {
    padding: 12px;
  }
  .access-history th,
  .access-history td {
    padding: 10px;
  }
  .ws-disclosure > .access-history {
    padding: 12px;
  }
}

.client-account-modal {
  max-width: 1120px !important;
}
.client-account-form {
  display: grid;
  gap: 14px;
}
.client-account-block,
.client-account-form .q-section {
  margin: 0;
  border: 1px solid #dfe8e2;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}
.client-account-block > h3 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #293e33;
}
.client-account-form .q-section header {
  padding: 0 0 14px;
  border: 0;
}
.client-account-form .q-fields {
  padding: 0;
  gap: 14px;
}
.client-account-form .access-client-name {
  display: none;
}
.client-account-form .access-current {
  margin-bottom: 14px;
  padding: 14px;
}
.client-account-form .access-new {
  margin: 12px 0;
  padding: 14px;
}
.client-account-form .access-specialist {
  margin: 0;
  padding: 0;
}
.client-account-form .q-password-reset {
  border-top: 0;
  margin: 0 0 12px;
  padding-top: 0;
}
.client-account-form .form-actions {
  margin-top: 0;
  padding-top: 14px;
}
.client-account-form .access-history {
  margin-bottom: 14px;
}
.client-account-form .access-check {
  margin-top: 10px;
}
@media (max-width: 600px) {
  .client-account-modal {
    padding: 16px;
  }
  .client-account-block,
  .client-account-form .q-section {
    padding: 14px;
  }
  .client-account-block > h3 {
    font-size: 18px;
  }
  .client-account-form .q-fields {
    grid-template-columns: 1fr;
  }
}

.access-modal.client-account-modal #modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}
.client-account-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 6px 2px 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.client-account-body > * {
  min-width: 0;
  flex-shrink: 0;
  align-self: start;
}
.client-account-modal .client-account-body .access-manager {
  overflow: visible;
  min-height: auto;
  padding: 0;
}
.client-account-modal .access-history.compact .access-history-scroll {
  max-height: none;
}
.client-account-modal .client-account-form > .form-actions {
  flex: 0 0 auto;
  margin: 12px 0 0;
  padding: 12px 0 0;
}
.client-account-modal .client-account-body input:not([type='checkbox']):not([type='hidden']),
.client-account-modal .client-account-body select {
  min-height: 44px;
  box-sizing: border-box;
}
.client-account-modal .client-account-body .access-type-label {
  display: block;
  margin: 12px 0;
}
.access-payment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 22px !important;
  border-radius: 8px;
  margin: 0 0 4px;
  background: #355746 !important;
  color: #fff !important;
  border: 1px solid #355746;
  text-decoration: none;
  font-weight: 600;
}
.access-payment-button:hover {
  background: #274536 !important;
}
.client-account-body .q-password-fields {
  min-width: 0;
}
.client-account-body .q-password-fields > label {
  min-width: 0;
}
.client-account-modal .modalhead {
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .client-account-body {
    padding-right: 3px;
    gap: 10px;
  }
  .client-account-modal .client-account-form > .form-actions {
    flex-wrap: wrap;
  }
  .access-payment-button {
    width: 100%;
  }
}
