.client-request-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding: 16px;
  border: 1px solid #3e3e3e;
  border-radius: 12px;
  background: #1b1b1b;
}
.client-request-entry strong,
.client-request-entry span { display: block; }
.client-request-entry span { color: #bcbcbc; font-size: 14px; line-height: 1.45; margin-top: 3px; }
.client-request-entry .button { flex: none; min-height: 44px; }

.client-access-dialog {
  box-sizing: border-box;
  width: min(620px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #4a4a4a;
  border-radius: 16px;
  background: #191919;
  color: #f1f1f1;
  color-scheme: dark;
}
.client-access-dialog::backdrop { background: rgb(0 0 0 / .76); }
.client-access-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid #393939;
}
.client-access-dialog-head h2 { margin: 4px 0 0; font-size: clamp(24px, 5vw, 32px); line-height: 1.2; }
.client-access-dialog-head .button { min-width: 44px; min-height: 44px; padding: 0; }
.client-request-form, .client-request-success { padding: 20px 26px 26px; }
.client-request-form > p, .client-request-success p { margin: 0; color: #c8c8c8; line-height: 1.5; }
.client-request-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 18px 0; }
.client-request-fields label { display: block; min-width: 0; font-size: 15px; font-weight: 600; }
.client-request-fields .field { display: block; width: 100%; min-height: 46px; margin: 6px 0 0; font-size: 16px; }
.client-request-fields textarea.field { min-height: 86px; resize: vertical; }
.client-request-wide { grid-column: 1 / -1; }
.client-request-optional { margin-left: 5px; color: #b6b6b6; font-size: 13px; font-weight: 400; }
.client-request-form .client-request-note { font-size: 14px; }
.client-request-form .form-error { margin-top: 12px; color: #ffc4bd; }
.client-request-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.client-request-actions .button, .client-request-success .button { min-height: 46px; }
.client-request-success h3 { margin: 12px 0 6px; font-size: 24px; }
.client-request-success .button { margin-top: 20px; }
.client-request-check {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid #4e4e4e; background: #303030;
}

.agency-access-badge {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border: 1px solid #e5c789;
  border-radius: 999px;
  background: #e6cc94;
  color: #241d11;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.agency-access-badge[hidden] { display: none !important; }
.agency-access-inbox { overflow: hidden; }
.agency-access-inbox .panel-head { gap: 16px; }
.agency-access-inbox .panel-head .button { flex: none; min-height: 44px; }
.agency-access-inbox-body { padding: 0 24px 24px; }
.agency-access-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.agency-access-filters .button { min-height: 44px; }
.agency-access-filters .button[aria-pressed=true] { color: #161616; background: #dedede; border-color: #dedede; }
.agency-access-feedback { padding: 22px 18px; margin: 0; border: 1px dashed #474747; border-radius: 10px; color: #c9c9c9; }
.agency-access-feedback h3 { margin: 0 0 5px; color: #f1f1f1; font-size: 17px; }
.agency-access-feedback p { margin: 0; }
.agency-access-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.agency-access-item { display: grid; gap: 14px; min-width: 0; padding: 18px; background: #202020; border: 1px solid #424242; border-radius: 12px; }
.agency-access-item-head { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; }
.agency-access-item-head h3 { margin: 0; color: #f4f4f4; font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.agency-access-item-head p { margin: 5px 0 0; color: #c8c8c8; overflow-wrap: anywhere; }
.agency-access-item-state { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #c3c3c3; font-size: 13px; }
.agency-access-state { display: inline-flex; padding: 4px 9px; border: 1px solid #595959; border-radius: 999px; color: #e1e1e1; font-weight: 650; }
.agency-access-state.is-pending { background: #393021; border-color: #866e44; color: #f7d89c; }
.agency-access-state.is-accepted { background: #21342a; border-color: #476750; color: #c6efd2; }
.agency-access-contact { display: flex; flex-wrap: wrap; gap: 9px 28px; margin: 0; min-width: 0; }
.agency-access-contact > div { min-width: 0; }
.agency-access-contact dt { font-size: 13px; color: #bcbcbc; }
.agency-access-contact dd { margin: 3px 0 0; color: #eee; overflow-wrap: anywhere; }
.agency-access-contact a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.agency-access-request-message { padding: 8px 12px; background: #191919; border-radius: 8px; }
.agency-access-request-message summary { padding: 6px 0; color: #e7e7e7; cursor: pointer; }
.agency-access-request-message p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.agency-access-item-actions, .agency-access-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.agency-access-item-actions .button, .agency-access-pages .button { min-height: 44px; }
.agency-access-item-actions .primary { margin-left: auto; }
.agency-access-reviewed { margin: 0; font-size: 13px; color: #c7c7c7; overflow-wrap: anywhere; }
.agency-access-pages { justify-content: center; margin-top: 16px; }

@media (max-width: 800px) {
  .agency-clients-tabs > [data-clients-tab=requests] { grid-column: 1 / -1; }
  .agency-mobile-nav [data-access-label] { position: relative; }
  .agency-mobile-nav .agency-access-badge { position: absolute; inset: 2px auto auto calc(50% + 6px); z-index: 1; }
}
@media (max-width: 520px) {
  .client-request-entry { align-items: flex-start; flex-direction: column; gap: 10px; }
  .client-request-entry .button { width: 100%; }
  .client-access-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .client-access-dialog-head, .client-request-form, .client-request-success { padding-left: 16px; padding-right: 16px; }
  .client-request-fields { grid-template-columns: 1fr; gap: 12px; }
  .client-request-actions > .button { flex: 1 1 auto; }
  .agency-access-inbox-body { padding: 0 12px 16px; }
  .agency-access-item { padding: 14px; }
  .agency-access-item-actions .button { flex: 1 1 105px; }
  .agency-access-item-actions .primary { margin-left: 0; }
}
