.access-panel {
  overflow: visible;
}

.access-panel-head {
  align-items: flex-start;
  gap: 18px;
}

.access-loading,
.access-empty {
  padding: 24px;
  color: #71817d;
  text-align: center;
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.access-users-list {
  border: 1px solid #dce9e5;
  border-radius: 18px;
  background: #f8fcfb;
  padding: 10px;
  align-self: start;
}

.access-list-title {
  padding: 5px 8px 10px;
  color: #59706a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.access-user-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  margin: 0 0 6px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #253833;
  text-align: left;
  cursor: pointer;
}

.access-user-card:hover,
.access-user-card.active {
  border-color: #bfe1d9;
  background: #fff;
}

.access-user-card.active {
  box-shadow: 0 7px 18px rgba(30, 116, 98, .08);
}

.access-user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #dff6f0;
  color: #197765;
  font-weight: 800;
}

.access-user-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-user-copy strong,
.access-user-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.access-user-copy strong {
  font-size: 13px;
}

.access-user-copy small {
  color: #7b8b87;
  font-size: 11px;
}

.access-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7d1ce;
}

.access-dot.on {
  background: #28ad91;
}

.access-editor {
  min-width: 0;
  border: 1px solid #dce9e5;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.access-editor-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-editor-top label,
.access-template-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-editor-top label > span,
.access-template-row strong {
  color: #536a64;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.access-editor input {
  min-height: 42px;
  border: 1px solid #d7e5e1;
  border-radius: 12px;
  background: #fbfdfc;
  padding: 0 12px;
  color: #263a35;
  font: inherit;
}

.access-editor input:focus {
  outline: 2px solid rgba(42, 180, 151, .13);
  border-color: #91cfc0;
}

.access-brand-select {
  position: relative;
  min-width: 0;
}

.access-brand-select-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfe2dd;
  border-radius: 12px;
  background: #fbfdfc;
  padding: 0 12px;
  color: #263a35;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.access-brand-select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-brand-select-trigger i {
  flex: 0 0 auto;
  color: #2aa98d;
  font-size: 16px;
  font-style: normal;
  line-height: 1;
  transition: transform .16s ease;
}

.access-brand-select.open .access-brand-select-trigger {
  border-color: #62c5b0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(42, 180, 151, .11);
}

.access-brand-select.open .access-brand-select-trigger i {
  transform: rotate(180deg);
}

.access-brand-select.disabled .access-brand-select-trigger,
.access-brand-select-trigger:disabled {
  background: #f2f5f4;
  color: #879490;
  cursor: default;
}

.access-brand-select-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #bcded6;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(36, 93, 79, .16);
}

.access-brand-select-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 8px 10px;
  color: #314b44;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.access-brand-select-option:hover {
  background: #eefaf7;
}

.access-brand-select-option.active {
  background: #dff5ef;
  color: #137b65;
  font-weight: 700;
}

.access-brand-select-option b {
  color: #20a88b;
  font-size: 13px;
}

.access-brand-select-option:disabled {
  color: #a3aeab;
  cursor: default;
}

.access-owner-note,
.access-template-note {
  margin-top: 12px;
  border: 1px solid #cce8e1;
  border-radius: 12px;
  background: #f0fbf8;
  padding: 10px 12px;
  color: #42665e;
  font-size: 12px;
  line-height: 1.45;
}

.access-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: end;
  gap: 14px;
  margin-top: 16px;
}

.access-template-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.access-template-row small {
  color: #7a8985;
  font-size: 12px;
}

.access-permission-groups {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.access-permission-group {
  border: 1px solid #e0ebe8;
  border-radius: 14px;
  overflow: hidden;
}

.access-permission-group h3 {
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid #e7efed;
  background: #f8fbfa;
  color: #33544c;
  font-size: 13px;
}

.access-permission-table {
  display: grid;
}

.access-permission-row {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf3f1;
}

.access-permission-row:last-child {
  border-bottom: 0;
}

.access-permission-name {
  color: #263c36;
  font-size: 13px;
  font-weight: 700;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
}

.access-action,
.access-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #526a64;
  font-size: 12px;
  cursor: pointer;
}

.access-action input,
.access-active-toggle input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #adc9c1;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.access-action input:checked,
.access-active-toggle input:checked {
  border-color: #22aa8d;
  background: #22aa8d;
}

.access-action input:checked::after,
.access-active-toggle input:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.access-active-toggle {
  width: 100%;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #dceae6;
  border-radius: 12px;
  background: #fbfdfc;
}

.access-active-toggle > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-active-toggle strong {
  color: #304d45;
}

.access-active-toggle small {
  color: #788984;
}

.access-save-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e7efed;
  color: #697c77;
  font-size: 12px;
}

@media (max-width: 980px) {
  .access-layout {
    grid-template-columns: 1fr;
  }

  .access-users-list {
    max-height: 260px;
    overflow: auto;
  }
}

@media (max-width: 700px) {
  .access-editor-top,
  .access-template-row,
  .access-permission-row {
    grid-template-columns: 1fr;
  }

  .access-save-row,
  .access-panel-head {
    align-items: stretch;
    flex-direction: column;
  }
}
.access-v2-panel {
  overflow: visible;
}

.access-v2-user-picker {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #dce9e5;
  border-radius: 16px;
  background: #f8fcfb;
}

.access-v2-user-picker label,
.access-v2-scope-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-v2-user-picker label > span,
.access-v2-scope-grid label > span {
  color: #536a64;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.access-v2-new-note {
  color: #71817d;
  font-size: 12px;
  line-height: 1.45;
  padding-bottom: 10px;
}

.access-v2-editor {
  margin-top: 14px;
}

.access-v2-scope {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cfe6df;
  border-radius: 14px;
  background: #f7fcfa;
}

.access-v2-scope-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.access-v2-scope-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.access-v2-scope-head strong {
  color: #33544c;
  font-size: 13px;
}

.access-v2-scope-head small {
  color: #72837e;
  font-size: 12px;
  line-height: 1.4;
}

.access-v2-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #526a64;
  font-size: 12px;
  cursor: pointer;
}

.access-v2-all-toggle input,
.access-v2-multi-option input {
  appearance: none;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #adc9c1;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.access-v2-all-toggle input:checked,
.access-v2-multi-option input:checked {
  border-color: #22aa8d;
  background: #22aa8d;
}

.access-v2-all-toggle input:checked::after,
.access-v2-multi-option input:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.access-v2-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #e0ece8;
}

.access-v2-all-note,
.access-v2-scope-loading,
.access-v2-client-empty {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #dce9e5;
  border-radius: 12px;
  background: #fff;
  color: #647872;
  font-size: 12px;
  line-height: 1.45;
}

.access-v2-multi {
  position: relative;
}

.access-v2-multi.open .access-brand-select-trigger {
  border-color: #62c5b0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(42, 180, 151, .11);
}

.access-v2-multi.open .access-brand-select-trigger i {
  transform: rotate(180deg);
}

.access-v2-multi-menu {
  position: absolute;
  z-index: 95;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid #bcded6;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(36, 93, 79, .16);
  overflow: hidden;
}

.access-v2-multi-tools {
  padding: 9px;
  border-bottom: 1px solid #e5efec;
  background: #fbfdfc;
}

.access-v2-multi-tools input {
  width: 100%;
  min-height: 38px;
  margin: 0;
}

.access-v2-multi-tools > div {
  display: flex;
  gap: 7px;
  margin-top: 7px;
}

.access-v2-multi-tools button,
.access-v2-copy-row button {
  border: 1px solid #cfe2dd;
  border-radius: 9px;
  background: #fff;
  padding: 7px 10px;
  color: #367165;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.access-v2-multi-tools button:hover,
.access-v2-copy-row button:hover {
  border-color: #94cfc1;
  background: #eefaf7;
}

.access-v2-multi-list {
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
}

.access-v2-multi-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  color: #314b44;
  font-size: 12px;
  cursor: pointer;
}

.access-v2-multi-option:hover {
  background: #eefaf7;
}

.access-v2-empty-small {
  padding: 14px 10px;
  color: #7b8b87;
  font-size: 12px;
  text-align: center;
}

.access-v2-template-row {
  margin-top: 16px;
}

.access-v2-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px dashed #bcded6;
  border-radius: 12px;
  background: #fbfdfc;
  color: #62756f;
  font-size: 12px;
}

@media (max-width: 800px) {
  .access-v2-user-picker,
  .access-v2-scope-grid {
    grid-template-columns: 1fr;
  }

  .access-v2-scope-head,
  .access-v2-copy-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* V267: compact client-rights action bar */
.access-v2-actionbar {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto auto;
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e0ece8;
}

.access-v2-actionbar-copy,
.access-v2-actionbar-toggle,
.access-v2-actionbar-save {
  min-height: 64px;
  border: 1px solid #d7e8e3;
  border-radius: 13px;
  background: #fbfdfc;
}

.access-v2-actionbar-copy {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(190px, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
}

.access-v2-actionbar-copy-head {
  min-width: 0;
}

.access-v2-actionbar-copy-head strong,
.access-v2-actionbar-copy-head small {
  display: block;
}

.access-v2-actionbar-copy-head strong {
  color: #365a51;
  font-size: 12px;
}

.access-v2-actionbar-copy-head small {
  margin-top: 3px;
  color: #778883;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-v2-actionbar-copy .access-v2-multi {
  min-width: 0;
}

.access-v2-apply-button {
  min-height: 40px;
  border: 1px solid #bcded6;
  border-radius: 10px;
  background: #fff;
  padding: 8px 13px;
  color: #2d7565;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.access-v2-apply-button:disabled {
  opacity: .45;
  cursor: default;
}

.access-v2-actionbar-summary {
  grid-column: 1 / -1;
  color: #647872;
  font-size: 12px;
}

.access-v2-actionbar-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  white-space: nowrap;
  cursor: pointer;
}

.access-v2-actionbar-toggle input {
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  border: 1px solid #adc9c1;
  border-radius: 6px;
  background: #fff;
  position: relative;
}

.access-v2-actionbar-toggle input:checked {
  border-color: #22aa8d;
  background: #22aa8d;
}

.access-v2-actionbar-toggle input:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.access-v2-actionbar-toggle span strong,
.access-v2-actionbar-toggle span small {
  display: block;
}

.access-v2-actionbar-toggle span strong {
  color: #355a50;
  font-size: 12px;
}

.access-v2-actionbar-toggle span small {
  margin-top: 2px;
  color: #7b8b87;
  font-size: 10px;
}

.access-v2-actionbar-save {
  display: flex;
  align-items: center;
  padding: 9px;
}

.access-v2-actionbar-save .button {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .access-v2-actionbar {
    grid-template-columns: 1fr auto;
  }
  .access-v2-actionbar-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .access-v2-actionbar,
  .access-v2-actionbar-copy {
    grid-template-columns: 1fr;
  }
  .access-v2-actionbar-copy {
    grid-column: auto;
  }
  .access-v2-actionbar-toggle,
  .access-v2-actionbar-save {
    width: 100%;
  }
}
/*$vite$:1*/