.owner-entry-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.owner-users-screen,
.owner-users-screen * {
  box-sizing: border-box;
}

.owner-users-screen {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1100px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 20px 120px;
  overflow-x: clip;
}

.owner-users-header,
.owner-users-toolbar,
.owner-users-meta,
.owner-pagination,
.owner-modal-actions,
.owner-password-actions,
.owner-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.owner-users-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  width: 100%;
  padding: 4px 4px 2px;
}

.owner-users-header h1 {
  min-width: 0;
  margin: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.owner-back {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 24px;
}

.owner-panel-open .page-profile {
  display: none;
}

.owner-panel-open .workspace:not(.has-conversation) {
  grid-template-columns: minmax(0, 1100px);
}

.owner-back,
.owner-users-toolbar button,
.owner-user-actions button,
.owner-pagination button,
.owner-modal-card button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--text);
  background: var(--surface-solid);
  font: inherit;
  font-weight: 700;
}

.owner-back:hover,
.owner-users-toolbar button:hover,
.owner-user-actions button:hover,
.owner-pagination button:hover,
.owner-modal-card button:hover {
  border-color: var(--primary);
}

.owner-users-header .primary,
.owner-modal-card .primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.owner-users-toolbar {
  width: 100%;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--text) 7%, transparent);
}

.owner-users-toolbar input,
.owner-modal-card input:not([type='checkbox']) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--input-text, var(--text));
  background: var(--input-bg, var(--surface-solid));
  font: inherit;
  outline: none;
}

.owner-users-toolbar input {
  flex: 1 1 auto;
}

.owner-users-toolbar input:focus,
.owner-modal-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.owner-users-meta,
.owner-pagination {
  justify-content: space-between;
  color: var(--muted);
}

.owner-users-meta {
  min-height: 30px;
  padding: 0 7px;
  margin-top: -6px;
}

.owner-users-meta > span {
  padding: 6px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.owner-users-list {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.owner-users-columns,
.owner-user-card {
  display: grid;
  grid-template-columns: minmax(130px, 1.15fr) minmax(90px, .75fr) minmax(82px, .55fr) minmax(82px, .55fr) minmax(190px, 1.1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.owner-users-columns {
  padding: 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.owner-user-card {
  padding: 17px 20px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--text) 7%, transparent);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.owner-user-card:hover {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  box-shadow: 0 16px 42px color-mix(in srgb, var(--text) 10%, transparent);
}

.owner-user-primary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.owner-user-primary span,
.owner-user-value {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-user-primary strong,
.owner-user-primary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-user-value b {
  display: none;
}

.owner-user-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.owner-user-actions button {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 44px;
  padding-inline: 12px;
  white-space: normal;
}

.owner-user-actions button:not(.destructive) {
  background: color-mix(in srgb, var(--surface-solid) 86%, var(--primary) 4%);
}

.owner-user-actions .destructive {
  min-width: 108px;
}

.owner-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(8 10 18 / 58%);
  backdrop-filter: blur(8px);
}

.owner-modal-card {
  display: grid;
  gap: 14px;
  width: min(440px, calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  min-width: 0;
  padding: 22px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: 0 24px 80px rgb(0 0 0 / 32%);
}

.owner-modal-card h2,
.owner-modal-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.owner-modal-card label,
.owner-password-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.owner-password-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.owner-password-actions button {
  flex: 1 0 max-content;
  width: auto;
  max-width: 100%;
  min-width: 0;
  padding-inline: 13px;
  white-space: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.owner-modal-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 4px;
}

.owner-modal-actions button {
  flex: 0 1 auto;
}

.owner-modal-card .destructive,
.owner-user-actions .destructive {
  color: #fff;
  border-color: #d7354f;
  background: #d7354f;
}

.owner-warning {
  color: #e84a5f;
  font-weight: 700;
}

.owner-confirm {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.owner-confirm input {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .owner-users-screen {
    padding: 0 14px 130px;
  }

  .owner-users-header {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .owner-users-header h1 {
    font-size: clamp(25px, 8vw, 38px);
  }

  .owner-create {
    min-width: 0;
    padding-inline: 12px !important;
    white-space: nowrap;
  }

  .owner-users-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-users-toolbar button {
    width: 100%;
  }

  .owner-users-columns {
    display: none;
  }

  .owner-user-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
  }

  .owner-user-value {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .owner-user-value b {
    display: inline;
    color: var(--text);
  }

  .owner-user-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-user-actions button {
    width: 100%;
    min-height: 46px;
  }

  .owner-modal-card {
    padding: 18px;
    border-radius: 24px;
  }

  .owner-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-modal-actions button {
    width: 100%;
  }
}

@media (max-width: 410px) {
  .owner-users-header {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .owner-create {
    grid-column: 1 / -1;
    width: 100%;
  }

  .owner-password-actions button:last-child {
    flex-basis: 100%;
  }
}

@media (max-width: 350px) {
  .owner-password-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .owner-password-actions button {
    width: 100%;
  }
}
