.bytechips-address-book .bytechips-studio-sidebar {
  position: sticky;
  top: 0;
}

.bc-address-book__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.bc-address-book__add,
.bc-address-book__toolbar,
.bc-address-book__table-wrap,
.bc-address-book__empty,
.bc-address-book__status {
  border: 1px solid var(--bc-studio-border);
  border-radius: 8px;
  background: var(--bc-studio-surface);
  box-shadow: none;
}

.bc-address-book__add {
  padding: 16px;
}

.bc-address-book__add label {
  display: block;
  margin: 0 0 8px;
  color: var(--bc-studio-text);
  font-size: 13px;
  font-weight: 800;
}

.bc-address-book__add-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bc-address-book__add-row input {
  flex: 1 1 320px;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--bc-studio-text);
  font-size: 14px;
}

.bc-address-book__add-row input:focus {
  border-color: #0ea5a4;
  box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.16);
  outline: none;
}

.bytechips-address-book .bc-address-book__add-row .button.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #0ea5a4;
  border-radius: 8px;
  background: #0ea5a4;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(14, 165, 164, 0.18);
}

.bytechips-address-book .bc-address-book__add-row .button.button-primary:hover,
.bytechips-address-book .bc-address-book__add-row .button.button-primary:focus-visible {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 12px 24px rgba(14, 165, 164, 0.24);
  outline: none;
}

.bytechips-address-book .bc-address-book__add-row .button.button-primary:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(14, 165, 164, 0.2);
}

.bc-address-book__hint {
  margin: 8px 0 0;
  color: var(--bc-studio-muted);
  font-size: 12px;
  line-height: 1.6;
}

.bc-address-book__status {
  padding: 11px 13px;
  color: #334155;
  font-size: 13px;
}

.bc-address-book__status[hidden] {
  display: none;
}

.bc-address-book__status.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.bc-address-book__status.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.bc-address-book__status.is-info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.bc-address-book__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.bc-address-book__toolbar .bytechips-dashboard__filter-input {
  flex: 1 1 280px;
}

.bc-address-book__toolbar .bytechips-dashboard__filter-select {
  flex: 0 1 220px;
}

.bc-address-book__page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bc-studio-muted);
  font-size: 13px;
  font-weight: 700;
}

.bc-address-book__page-size .bytechips-dashboard__filter-select {
  flex: 0 0 120px;
}

.bc-address-book__summary {
  color: var(--bc-studio-muted);
  font-size: 13px;
  font-weight: 700;
}

.bc-address-book__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}

.bc-address-book__page-detail {
  color: var(--bc-studio-muted);
  font-size: 13px;
  font-weight: 700;
}

.bc-address-book__page-detail span {
  margin-left: 8px;
  color: var(--bc-studio-text);
}

.bc-address-book__page-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.bc-address-book__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--bc-studio-border);
  border-radius: 6px;
  background: var(--bc-studio-surface);
  color: var(--bc-studio-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.bc-address-book__page:hover,
.bc-address-book__page:focus {
  border-color: #0ea5a4;
  color: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.bc-address-book__page:focus-visible {
  box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.18);
}

.bc-address-book__page.is-active {
  border-color: #0ea5a4;
  background: #0ea5a4;
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 165, 164, 0.18);
}

.bc-address-book__page[disabled] {
  cursor: default;
  opacity: 0.46;
  transform: none;
  box-shadow: none;
}

.bytechips-address-book .bc-address-book__table {
  min-width: 760px;
  table-layout: fixed;
}

.bytechips-address-book .bc-address-book__table th,
.bytechips-address-book .bc-address-book__table td {
  height: 56px;
}

.bytechips-address-book .bc-address-book__table th:nth-child(1),
.bytechips-address-book .bc-address-book__table td:nth-child(1) {
  width: 72px;
}

.bytechips-address-book .bc-address-book__table th:nth-child(2),
.bytechips-address-book .bc-address-book__table td:nth-child(2) {
  width: 42%;
  max-width: none;
}

.bytechips-address-book .bc-address-book__table th:nth-child(3),
.bytechips-address-book .bc-address-book__table td:nth-child(3) {
  width: 26%;
}

.bytechips-address-book .bc-address-book__table th:nth-child(4),
.bytechips-address-book .bc-address-book__table td:nth-child(4) {
  width: 220px;
  text-align: right;
}

.bc-address-book__num {
  color: var(--bc-studio-muted);
  text-align: right;
}

.bc-address-book__sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bc-address-book__sort:hover,
.bc-address-book__sort:focus {
  color: #0ea5a4;
  outline: none;
}

.bc-address-book__email {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bc-studio-text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.bc-address-book__email:hover,
.bc-address-book__email:focus {
  color: #0ea5a4;
  outline: none;
  text-decoration: underline;
}

.bc-address-book__domain {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bc-studio-accent) 9%, transparent);
  color: var(--bc-studio-muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bc-address-book__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.bc-address-book__action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 78px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.bc-address-book__action .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
}

.bc-address-book__action:hover,
.bc-address-book__action:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.bc-address-book__action:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.bc-address-book__action--copy {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: #1d4ed8;
}

.bc-address-book__action--copy:hover,
.bc-address-book__action--copy:focus-visible {
  border-color: #60a5fa;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14);
}

.bc-address-book__action--copy.is-success {
  border-color: #86efac;
  background: #ecfdf5;
  color: #047857;
}

.bc-address-book__action--delete {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.bc-address-book__action--delete:hover,
.bc-address-book__action--delete:focus-visible {
  border-color: #f87171;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.12);
}

.bc-address-book__empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: var(--bc-studio-muted);
}

.bc-address-book__empty[hidden] {
  display: none;
}

.bc-address-book__empty strong {
  color: var(--bc-studio-text);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__add-row input {
  background: #0f172a;
  border-color: var(--bc-studio-border);
  color: var(--bc-studio-text);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__add-row .button.button-primary {
  border-color: #22d3ee;
  background: #22d3ee;
  color: #082f49;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.18);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__add-row .button.button-primary:hover,
:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__add-row .button.button-primary:focus-visible {
  border-color: #67e8f9;
  background: #67e8f9;
  color: #082f49;
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__status.is-success {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__status.is-error {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__status.is-info {
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__page {
  background: #0f172a;
  border-color: #2b374b;
  color: #dbeafe;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__page:hover,
:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__page:focus-visible {
  border-color: #38bdf8;
  background: #172033;
  color: #e0f2fe;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__page.is-active {
  border-color: #22d3ee;
  background: #22d3ee;
  color: #082f49;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.2);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action {
  background: #0f172a;
  border-color: #2b374b;
  color: #dbeafe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--copy {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--copy:hover,
:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--copy:focus-visible {
  border-color: rgba(125, 211, 252, 0.7);
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.14);
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--copy.is-success {
  border-color: rgba(52, 211, 153, 0.64);
  background: rgba(16, 185, 129, 0.16);
  color: #bbf7d0;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--delete {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--delete:hover,
:root[data-bc-theme="dark"] .bytechips-address-book .bc-address-book__action--delete:focus-visible {
  border-color: rgba(252, 165, 165, 0.72);
  background: rgba(248, 113, 113, 0.14);
  color: #fee2e2;
  box-shadow: 0 10px 22px rgba(248, 113, 113, 0.12);
}

@media (max-width: 900px) {
  .bytechips-address-book .bytechips-studio-sidebar {
    position: static;
  }

  .bc-address-book__toolbar,
  .bc-address-book__add-row,
  .bc-address-book__pagination {
    align-items: stretch;
  }

  .bc-address-book__pagination {
    flex-direction: column;
  }

  .bc-address-book__page-detail,
  .bc-address-book__page-buttons {
    width: 100%;
  }

  .bc-address-book__page-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .bc-address-book__add-row {
    flex-direction: column;
  }

  .bc-address-book__add-row input,
  .bc-address-book__add-row .button,
  .bc-address-book__toolbar .bytechips-dashboard__filter-input,
  .bc-address-book__toolbar .bytechips-dashboard__filter-select,
  .bc-address-book__page-size,
  .bc-address-book__page-size .bytechips-dashboard__filter-select {
    width: 100%;
    flex-basis: auto;
  }

  .bc-address-book__page-size {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
  }
}
