.user-manager-panel {
  padding: 0;
  overflow: hidden;
}

.users-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.quota-normalize-button {
  height: 38px;
  padding: 0 13px;
  border: 1px solid #9fdcc9;
  border-radius: 10px;
  background: #eaf9f3;
  color: #147451;
  font-size: 12px;
  font-weight: 800;
}

.quota-normalize-button:disabled {
  cursor: wait;
  opacity: .58;
}

.user-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.user-filter .search {
  max-width: 280px;
}

.filter-reset {
  height: 43px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.user-table-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  color: var(--muted);
  font-size: 11px;
  background: #f8fafc;
}

.user-table-summary select {
  height: 30px;
  margin: 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.user-table {
  min-width: 1420px;
}

.user-table th,
.user-table td {
  padding: 13px 12px;
  white-space: nowrap;
}

.user-table th:first-child,
.user-table td:first-child {
  padding-left: 20px;
}

.user-table td:nth-child(2),
.user-table td:nth-child(10) {
  white-space: normal;
  min-width: 130px;
}

.user-table th:last-child,
.user-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 150px;
  background: #fff;
  box-shadow: -8px 0 14px rgba(33, 50, 83, .05);
}

.user-table th:last-child {
  background: #f8fafc;
}

.user-table td strong,
.user-table td small {
  display: block;
}

.user-table td small {
  max-width: 170px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.user-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.user-action-row button {
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #1f68d8;
  background: #eaf2ff;
  font-size: 10px;
  font-weight: 800;
}

.user-action-row button.danger {
  color: #d43b5f;
  background: #fff0f3;
}

.user-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}

.user-pagination div {
  display: flex;
  gap: 7px;
}

.user-pagination button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #56677e;
  font-size: 11px;
  font-weight: 700;
}

.user-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.user-mobile-list {
  display: none;
}

.users-permission-note {
  margin: 0 20px 20px;
  padding: 14px;
  border: 1px solid #f2d28a;
  border-radius: 11px;
  background: #fff8e7;
  color: #8a6215;
  font-size: 12px;
}

.dialog-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

.user-dialog-card {
  width: min(700px, 100%);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.dialog-head h2 {
  margin: 6px 0 0;
  font-size: 23px;
}

.dialog-head .muted {
  margin: 7px 0 0;
  font-size: 11px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
}

.dialog-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dialog-field-grid .full-field {
  grid-column: 1 / -1;
}

.dialog-card > label,
.dialog-field-grid > label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.dialog-field-grid > label {
  margin-top: 0;
}

.dialog-card label small {
  color: var(--muted);
  font-weight: 400;
}

.dialog-card input,
.dialog-card select {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #fff;
}

.dialog-card input:focus,
.dialog-card select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.dialog-card input[readonly] {
  color: var(--muted);
  background: #f4f6f9;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 8px;
}

.dialog-actions .ghost {
  border-color: var(--line);
  color: var(--muted);
  background: #fff;
}

@media (max-width: 760px) {
  .users-section-head {
    align-items: center;
  }

  .users-section-head .primary {
    flex: none;
  }

  .users-head-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .quota-normalize-button {
    height: 34px;
    padding: 0 9px;
    font-size: 10px;
  }

  .user-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .user-filter .search {
    width: 100%;
    max-width: none;
  }

  .user-table-summary {
    align-items: flex-start;
  }

  .user-manager-panel .table-scroll {
    display: none;
  }

  .user-mobile-list {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .user-mobile-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f9fbfd;
  }

  .user-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .user-mobile-head strong,
  .user-mobile-head small {
    display: block;
  }

  .user-mobile-head small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
  }

  .user-mobile-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
  }

  .user-mobile-card dt {
    color: var(--muted);
    font-size: 9px;
  }

  .user-mobile-card dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-size: 11px;
    font-weight: 700;
  }

  .dialog-card {
    padding: 24px 20px;
  }

  .dialog-field-grid {
    grid-template-columns: 1fr;
  }

  .dialog-field-grid .full-field {
    grid-column: auto;
  }
}
