.ahp-backdrop { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(23, 32, 51, .24); }
.ahp-dialog { display: flex; flex-direction: column; width: min(1180px, 100%); max-height: calc(100dvh - 48px); overflow: hidden; border: 1px solid var(--line, #d8e6f6); border-radius: 6px; background: #fff; color: var(--text, #172033); font-size: 16px; outline: none; }
.ahp-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex: 0 0 auto; padding: 24px 26px 21px; border-bottom: 1px solid var(--line, #d8e6f6); }
.ahp-header h2 { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 700; }
.ahp-header p { margin: 8px 0 0; color: var(--muted, #66758a); font-size: 16px; line-height: 1.5; }
.ahp-dialog .ahp-close { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--muted, #66758a); font-size: 27px; line-height: 1; }
.ahp-body { min-height: 0; overflow: auto; padding: 26px; overscroll-behavior: contain; }
.ahp-connection { display: grid; grid-template-columns: 125px minmax(0, 1fr); align-items: center; gap: 16px 0; }
.ahp-connection label { margin: 0; color: var(--text, #172033); font-size: 16px; }
.ahp-dialog input, .ahp-dialog select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong, #b8d1ef); border-radius: 4px; background: #fff; color: var(--text, #172033); font-size: 16px; line-height: 1.4; }
.ahp-dialog .ahp-base { background: #f8fbff; }
.ahp-key-row { display: flex; gap: 14px; min-width: 0; }
.ahp-key-row .ahp-key { flex: 1 1 auto; width: 0; }
.ahp-dialog .ahp-inspect { flex: 0 0 124px; height: 42px; padding: 0 18px; border: 1px solid var(--blue, #1264d8); border-radius: 4px; color: var(--blue, #1264d8); background: #fff; font-size: 16px; }
.ahp-message { margin: 16px 0 0; padding: 10px 12px; border: 1px solid #fac5bf; border-radius: 4px; color: #b42318; background: #fff6f5; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ahp-message[hidden] { display: none; }
.ahp-message-success { border-color: #b5dfcb; color: #087b4c; background: #f2fbf6; }
.ahp-permissions { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line, #d8e6f6); }
.ahp-permissions h3 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 700; }
.ahp-permissions > p { margin: 10px 0 18px; color: var(--muted, #66758a); font-size: 15px; line-height: 1.5; }
.ahp-table-scroll { max-height: 324px; overflow: auto; border: 1px solid var(--line, #d8e6f6); border-radius: 4px; overscroll-behavior: contain; }
.ahp-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; font-size: 16px; }
.ahp-col-name { width: 25%; }
.ahp-col-page { width: 41%; }
.ahp-col-switch { width: 34%; }
.ahp-table th { position: sticky; top: 0; z-index: 1; height: 45px; padding: 10px 18px; border: 0; border-right: 1px solid var(--line, #d8e6f6); border-bottom: 1px solid var(--line, #d8e6f6); background: #eef5fd; color: #435b7b; font-size: 16px; font-weight: 400; text-align: left; }
.ahp-table td { height: 54px; padding: 7px 18px; border: 0; border-right: 1px solid var(--line, #d8e6f6); border-bottom: 1px solid var(--line, #d8e6f6); background: #fff; text-align: left; line-height: 1.4; overflow-wrap: anywhere; }
.ahp-table th:last-child, .ahp-table td:last-child { border-right: 0; }
.ahp-table tr:last-child td { border-bottom: 0; }
.ahp-table .ahp-mapping { min-height: 36px; padding: 6px 10px; font-size: 15px; }
.ahp-switch-cell { display: flex; align-items: center; gap: 13px; min-height: 38px; }
.ahp-dialog .ahp-switch { position: relative; flex: 0 0 48px; width: 48px; height: 26px; min-height: 26px; padding: 0; border: 0; border-radius: 20px; background: #b2bac7; }
.ahp-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.ahp-dialog .ahp-switch-on { background: var(--blue, #1264d8); }
.ahp-switch-on span { left: 25px; }
.ahp-dialog .ahp-switch:disabled { opacity: .6; }
.ahp-table .ahp-empty { height: 110px; text-align: center; color: var(--muted, #66758a); }
.ahp-permissions .ahp-note { margin: 13px 0 0; font-size: 14px; }
.ahp-footer { display: flex; justify-content: flex-end; gap: 14px; flex: 0 0 auto; padding: 18px 26px 22px; border-top: 1px solid var(--line, #d8e6f6); }
.ahp-footer button { min-width: 132px; height: 44px; border-radius: 4px; font-size: 16px; }
.ahp-dialog button:focus-visible, .ahp-dialog input:focus-visible, .ahp-dialog select:focus-visible { outline: 2px solid var(--blue, #1264d8); outline-offset: 2px; }
@media (max-width: 640px) {
  .ahp-backdrop { padding: 12px; }
  .ahp-dialog { max-height: calc(100dvh - 24px); }
  .ahp-header { padding: 18px; }
  .ahp-body { padding: 18px; }
  .ahp-connection { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ahp-connection label:not(:first-child) { margin-top: 8px; }
  .ahp-key-row { gap: 8px; }
  .ahp-dialog .ahp-inspect { flex-basis: 108px; padding: 0 10px; }
  .ahp-table { min-width: 570px; }
  .ahp-footer { padding: 16px 18px; }
  .ahp-footer button { min-width: 100px; }
}
