#aua-access-tab.aua-access-tab {
  appearance: none;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 14px;
}

#aua-access-tab[aria-selected="true"] {
  background: #fff;
  color: #071a2e;
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

main.aua-is-active [role="tabpanel"]:not(#aua-access-panel) { display: none !important; }

.aua-access-panel {
  color: #10243b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-top: 4px;
  min-width: 0;
  padding-bottom: 28px;
}

.aua-access-panel *, .aua-qr-shell * { box-sizing: border-box; }

.aua-page-head, .aua-editor__head, .aua-section__title, .aua-savebar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.aua-page-head {
  background: linear-gradient(135deg, #071a2e, #103654);
  border-radius: 18px;
  color: #fff;
  margin: 18px 0;
  padding: 22px 24px;
  box-shadow: 0 18px 45px rgb(7 26 46 / 14%);
}

.aua-page-head h2, .aua-editor__head h2 { font-size: 24px; line-height: 1.1; margin: 4px 0 6px; }
.aua-page-head h2 { color: #fff; }
.aua-page-head p, .aua-editor__head p { color: #b9c9d8; font-size: 14px; margin: 0; }
.aua-eyebrow { color: #3bc4f2; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.aua-refresh, .aua-page-head button {
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
}

.aua-layout { display: grid; gap: 18px; grid-template-columns: 255px minmax(0, 1fr); align-items: start; }

.aua-users-card, .aua-section, .aua-editor__head, .aua-empty-card, .aua-error {
  background: #fff;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgb(15 35 58 / 6%);
}

.aua-users-card { overflow: hidden; position: sticky; top: 18px; }
.aua-users-card__head { align-items: flex-end; display: flex; justify-content: space-between; padding: 18px 17px 10px; }
.aua-users-card__head strong { font-size: 13px; }

.aua-search { align-items: center; background: #f7f9fc; border: 1px solid #dbe5ef; border-radius: 10px; display: flex; gap: 8px; margin: 0 12px 12px; padding: 8px 10px; }
.aua-search input { background: transparent; border: 0; color: #10243b; font: inherit; min-width: 0; outline: 0; width: 100%; }
.aua-search--wide { margin: 14px 0 12px; max-width: 520px; }

.aua-user-list { border-top: 1px solid #edf2f7; max-height: 68vh; overflow: auto; padding: 8px; }
.aua-user { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 11px; color: inherit; cursor: pointer; display: flex; gap: 10px; padding: 9px; text-align: left; width: 100%; }
.aua-user:hover { background: #f5f9fc; }
.aua-user.is-selected { background: #eaf6fb; border-color: #8bd2eb; }
.aua-avatar { align-items: center; background: #0c2b45; border-radius: 10px; color: #fff; display: flex; flex: 0 0 36px; font-size: 12px; font-weight: 800; height: 36px; justify-content: center; }
.aua-user__copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.aua-user__copy strong, .aua-user__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aua-user__copy strong { font-size: 13px; }
.aua-user__copy small { color: #718096; font-size: 11px; margin-top: 2px; }
.aua-user__state { background: #cbd5e1; border-radius: 999px; height: 8px; width: 8px; }
.aua-user__state.is-active { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }

.aua-editor { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.aua-editor__head { padding: 20px 22px; }
.aua-editor__head p { color: #64748b; }
.aua-editor__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.aua-editor__badges span, .aua-badge { background: #edf2f7; border-radius: 999px; color: #42566d; font-size: 12px; font-weight: 750; padding: 6px 10px; }
.aua-editor__badges .is-active { background: #dcfce7; color: #166534; }
.aua-editor__badges .is-inactive { background: #fee2e2; color: #991b1b; }

.aua-section { padding: 20px 22px; }
.aua-section__title > div { align-items: flex-start; display: flex; gap: 11px; }
.aua-section__title h3 { font-size: 17px; margin: 0 0 4px; }
.aua-section__title p { color: #64748b; font-size: 13px; margin: 0; }
.aua-step { align-items: center; background: #0b90c5; border-radius: 8px; color: #fff; display: flex; flex: 0 0 30px; font-size: 13px; font-weight: 800; height: 30px; justify-content: center; }

.aua-choice-grid, .aua-mode-row { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.aua-choice, .aua-mode { align-items: center; border: 1px solid #dbe5ef; border-radius: 12px; cursor: pointer; display: flex; gap: 11px; min-width: 0; padding: 13px; }
.aua-choice.is-selected, .aua-mode.is-selected { background: #edf9fd; border-color: #37aeda; box-shadow: inset 0 0 0 1px #37aeda; }
.aua-choice input, .aua-mode input { accent-color: #0887ba; }
.aua-choice__icon { align-items: center; background: #e6f2f7; border-radius: 9px; color: #087da9; display: flex; flex: 0 0 34px; font-weight: 900; height: 34px; justify-content: center; }
.aua-choice span:last-child, .aua-mode span { display: flex; flex-direction: column; min-width: 0; }
.aua-choice small, .aua-mode small { color: #6b7f93; font-size: 11px; margin-top: 3px; }

.aua-project-picker { background: #f8fafc; border: 1px solid #e3ebf3; border-radius: 12px; margin-top: 12px; padding: 12px; }
.aua-project-picker.is-disabled { opacity: .52; }
.aua-project-picker__bar { align-items: center; display: flex; gap: 8px; }
.aua-project-picker__bar .aua-search { flex: 1; margin: 0; }
.aua-project-picker__bar button, .aua-presets button, .aua-module__tools button { background: #fff; border: 1px solid #d5e1ec; border-radius: 8px; color: #304861; cursor: pointer; font-size: 12px; font-weight: 700; padding: 8px 10px; }
.aua-project-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; max-height: 230px; overflow: auto; }
.aua-project { align-items: flex-start; background: #fff; border: 1px solid #e0e8f0; border-radius: 9px; display: flex; gap: 8px; padding: 10px; }
.aua-project.is-selected { border-color: #5ebee0; }
.aua-project span { display: flex; flex-direction: column; min-width: 0; }
.aua-project strong { font-size: 12px; }
.aua-project small { color: #718096; font-size: 10px; margin-top: 2px; }

.aua-presets { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.aua-presets > span { color: #64748b; font-size: 12px; font-weight: 700; }
.aua-presets button:hover, .aua-module__tools button:hover { border-color: #3baed8; color: #087ba6; }

.aua-module-list { display: flex; flex-direction: column; gap: 9px; }
.aua-module { border: 1px solid #dce6ef; border-radius: 12px; overflow: hidden; }
.aua-module > summary { align-items: center; cursor: pointer; display: grid; gap: 11px; grid-template-columns: 38px minmax(0, 1fr) auto; list-style: none; padding: 12px 14px; }
.aua-module > summary::-webkit-details-marker { display: none; }
.aua-module[open] > summary { background: #f5fafc; border-bottom: 1px solid #e2ebf3; }
.aua-module__mark { align-items: center; background: #0b2d47; border-radius: 9px; color: #fff; display: flex; font-size: 11px; font-weight: 800; height: 36px; justify-content: center; text-transform: uppercase; }
.aua-module summary > span:nth-child(2) { display: flex; flex-direction: column; }
.aua-module summary strong { font-size: 13px; }
.aua-module summary small { color: #718096; font-size: 11px; margin-top: 2px; }
.aua-module__count { background: #e9f4f8; border-radius: 999px; color: #126e91; font-size: 11px; font-weight: 800; padding: 5px 8px; }
.aua-module__body { padding: 12px 14px 15px; }
.aua-module__tools { display: flex; gap: 7px; justify-content: flex-end; margin-bottom: 6px; }
.aua-sheet { border-top: 1px solid #eef2f6; padding-top: 10px; }
.aua-sheet + .aua-sheet { margin-top: 12px; }
.aua-sheet h4 { color: #52677d; font-size: 11px; letter-spacing: .04em; margin: 0 0 7px; text-transform: uppercase; }
.aua-permission-grid { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aua-permission { align-items: flex-start; border: 1px solid #e1e8ef; border-radius: 9px; cursor: pointer; display: flex; gap: 8px; min-width: 0; padding: 9px; }
.aua-permission.is-selected { background: #eef9fd; border-color: #9bd8ed; }
.aua-permission input { accent-color: #0788ba; margin-top: 2px; }
.aua-permission span { display: flex; flex-direction: column; min-width: 0; }
.aua-permission strong { font-size: 11.5px; line-height: 1.25; }
.aua-permission small { color: #8291a3; font-size: 9px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }

.aua-savebar { background: #071a2e; border-radius: 14px; bottom: 12px; color: #fff; padding: 14px 16px; position: sticky; z-index: 4; }
.aua-savebar > div { display: flex; flex-direction: column; }
.aua-savebar span { color: #adc0d1; font-size: 11px; margin-top: 2px; }
.aua-save { background: #fff; border: 0; border-radius: 9px; color: #071a2e; cursor: pointer; font-weight: 800; padding: 11px 18px; }
.aua-save:disabled { cursor: wait; opacity: .7; }

.aua-loading, .aua-error, .aua-empty-card { align-items: center; display: flex; flex-direction: column; gap: 10px; justify-content: center; min-height: 320px; padding: 36px; text-align: center; }
.aua-loading span { animation: aua-spin .8s linear infinite; border: 3px solid #d7e5ee; border-radius: 999px; border-top-color: #0b8fbe; height: 34px; width: 34px; }
@keyframes aua-spin { to { transform: rotate(360deg); } }
.aua-empty { color: #718096; font-size: 12px; grid-column: 1 / -1; padding: 12px; text-align: center; }

#aua-toast-region { display: flex; flex-direction: column; gap: 8px; position: fixed; right: 22px; top: 22px; z-index: 99999; }
.aua-toast { background: #0c2b45; border-radius: 10px; color: #fff; max-width: 360px; opacity: 0; padding: 12px 15px; transform: translateY(-8px); transition: .2s ease; box-shadow: 0 14px 36px rgb(0 0 0 / 18%); }
.aua-toast.is-visible { opacity: 1; transform: translateY(0); }
.aua-toast--error { background: #9f2d2d; }

main.aua-qr-restricted > *:not(.aua-qr-shell) { display: none !important; }
.aua-qr-shell { align-items: center; background: linear-gradient(145deg, #f7fbfd, #eaf5fa); border: 1px solid #c8e0ea; border-radius: 22px; display: flex; flex-direction: column; margin: 34px auto; max-width: 720px; padding: 52px 30px; text-align: center; }
.aua-qr-shell__icon { align-items: center; background: #092943; border-radius: 18px; color: #fff; display: flex; font-size: 34px; height: 68px; justify-content: center; margin-bottom: 15px; width: 68px; }
.aua-qr-shell h1 { color: #071a2e; font-size: 32px; margin: 7px 0; }
.aua-qr-shell p { color: #5d7187; margin: 0 0 22px; max-width: 520px; }
.aua-qr-shell button { background: #071a2e; border: 0; border-radius: 11px; color: #fff; cursor: pointer; font-size: 15px; font-weight: 800; padding: 14px 22px; }
.aua-qr-shell small { color: #718096; margin-top: 14px; }

@media (max-width: 1000px) {
  .aua-layout { grid-template-columns: 1fr; }
  .aua-users-card { position: static; }
  .aua-user-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 250px; }
}

@media (max-width: 720px) {
  .aua-page-head, .aua-editor__head, .aua-section__title, .aua-savebar { align-items: flex-start; flex-direction: column; }
  .aua-choice-grid, .aua-mode-row, .aua-project-grid, .aua-permission-grid, .aua-user-list { grid-template-columns: 1fr; }
  .aua-project-picker__bar { align-items: stretch; flex-direction: column; }
  .aua-section, .aua-editor__head { padding: 16px; }
  .aua-page-head { border-radius: 14px; padding: 18px; }
}
