.ui-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 18, 34, 0.36);
  backdrop-filter: blur(2px);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.ui-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.form-modal,
.confirm-dialog {
  position: fixed;
  z-index: 80;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  box-shadow: 0 24px 70px rgba(27, 22, 39, 0.2);
}
.form-modal {
  width: min(660px, calc(100vw - 30px));
  max-height: 88vh;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -47%);
  border-radius: 15px;
  overflow: hidden;
}
.form-modal.show,
.confirm-dialog.show {
  opacity: 1;
  pointer-events: auto;
}
.form-modal.show {
  transform: translate(-50%, -50%);
}
.form-modal header,
.detail-drawer header,
.filter-drawer header {
  height: 73px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.form-modal header > div,
.detail-drawer header > div,
.filter-drawer header > div {
  flex: 1;
}
.form-modal header span,
.detail-drawer header span,
.filter-drawer header span {
  font-size: 8px;
  color: #8d80a5;
  letter-spacing: 1px;
  font-weight: 700;
}
.form-modal h2,
.detail-drawer h2,
.filter-drawer h2 {
  font-size: 16px;
  margin: 4px 0 0;
  letter-spacing: -0.2px;
}
.close-ui {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #747b87;
}
.close-ui svg {
  width: 15px;
}
.form-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-height: calc(88vh - 140px);
  overflow: auto;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 9px;
  font-weight: 700;
  color: #525967;
}
.field label b {
  color: #e34850;
}
.field input,
.field select,
.field textarea,
.filter-body input,
.filter-body select {
  width: 100%;
  border: 1px solid #dfe2e7;
  border-radius: 8px;
  background: #fff;
  padding: 0 11px;
  height: 39px;
  outline: 0;
  font-size: 10px;
  color: #29313e;
}
.field textarea {
  height: 78px;
  padding-top: 10px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-body input:focus,
.filter-body select:focus {
  border-color: #ad92f5;
  box-shadow: 0 0 0 3px rgba(116, 71, 238, 0.09);
}
.field input.invalid,
.field select.invalid {
  border-color: #e34850;
  background: #fffafa;
}
.field small {
  font-size: 8px;
  color: #8b93a0;
}
.field .error {
  color: #d93640;
  display: none;
}
.field input.invalid ~ .error,
.field select.invalid ~ .error {
  display: block;
}
.form-modal form > footer {
  height: 67px;
  padding: 0 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-modal footer p {
  margin-right: auto;
  color: #8a919d;
  font-size: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.form-modal footer p svg {
  width: 12px;
}
.form-modal footer button,
.detail-drawer footer button,
.filter-drawer footer button {
  height: 36px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cancel-ui {
  border: 1px solid var(--border);
  background: #fff;
  color: #626a78;
}
.submit-form {
  border: 0;
  background: #7447ee;
  color: #fff;
}
.submit-form svg {
  width: 14px;
}
.detail-drawer,
.filter-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(460px, 100vw);
  background: #fff;
  z-index: 80;
  box-shadow: -20px 0 60px rgba(27, 22, 39, 0.16);
  transform: translateX(105%);
  transition: 0.25s;
  display: flex;
  flex-direction: column;
}
.filter-drawer {
  width: min(360px, 100vw);
}
.detail-drawer.show,
.filter-drawer.show {
  transform: none;
}
.drawer-body,
.filter-body {
  padding: 20px;
  overflow: auto;
  flex: 1;
}
.detail-status {
  padding: 12px;
  background: #f8f6fe;
  border: 1px solid #e8e1fa;
  border-radius: 9px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
}
.detail-status b {
  font-size: 10px;
  color: #6540d5;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.detail-item {
  border-bottom: 1px solid #eef0f3;
  padding-bottom: 11px;
}
.detail-item span,
.detail-item b {
  display: block;
}
.detail-item span {
  font-size: 8px;
  color: #8a929f;
  margin-bottom: 5px;
}
.detail-item b {
  font-size: 10px;
  color: #303846;
}
.activity-box {
  margin-top: 22px;
}
.activity-box h3 {
  font-size: 11px;
}
.activity-box > div {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}
.activity-box i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a60ed;
  box-shadow: 0 0 0 4px #eee9ff;
  margin-top: 3px;
}
.activity-box p {
  margin: 0;
}
.activity-box b,
.activity-box span {
  display: block;
  font-size: 9px;
}
.activity-box span {
  color: #8b93a0;
  font-size: 8px;
  margin-top: 3px;
}
.detail-drawer > footer,
.filter-drawer > footer {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  gap: 8px;
}
.detail-drawer footer .danger-action {
  border: 1px solid #f1c6c9;
  background: #fff7f7;
  color: #d93640;
}
.secondary-action,
.reset-filter {
  border: 1px solid var(--border);
  background: #fff;
  color: #5e6673;
}
.primary-action,
.apply-filter {
  border: 0;
  background: #7447ee;
  color: #fff;
  margin-left: auto;
}
.detail-drawer footer svg {
  width: 13px;
}
.filter-body {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.filter-body label {
  font-size: 9px;
  font-weight: 700;
  color: #505866;
}
.filter-body input,
.filter-body select {
  display: block;
  margin-top: 7px;
}
.filter-body .check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.filter-body .check-line input {
  width: 15px;
  height: 15px;
  margin: 0;
}
.confirm-dialog {
  width: min(380px, calc(100vw - 30px));
  left: 50%;
  top: 50%;
  transform: translate(-50%, -47%);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}
.confirm-dialog.show {
  transform: translate(-50%, -50%);
}
.confirm-icon {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  background: #fff0e2;
  color: #e37b18;
}
.confirm-icon svg {
  width: 20px;
}
.confirm-dialog h3 {
  font-size: 14px;
  margin: 0;
}
.confirm-dialog p {
  font-size: 10px;
  line-height: 1.6;
  color: #7d8592;
}
.confirm-dialog > div:last-child {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.confirm-dialog button {
  height: 36px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 9px;
  font-weight: 700;
}
.cancel-confirm {
  border: 1px solid var(--border);
  background: white;
}
.confirm-action {
  border: 0;
  background: #e34850;
  color: white;
}
@media (max-width: 560px) {
  .form-body {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: 1;
  }
  .form-modal {
    max-height: 94vh;
  }
  .form-body {
    max-height: calc(94vh - 140px);
  }
  .form-modal footer p {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}
