.test-play-app {
  --test-play-text: #2f3a47;
  --test-play-text-strong: #202b37;
  --test-play-text-muted: #697586;
  --test-play-border: #e2e5ea;
  --test-play-border-strong: #d2d8e0;
  --test-play-surface: rgba(255, 255, 255, 0.92);
  --test-play-surface-strong: rgba(252, 252, 253, 0.97);
  --test-play-shadow: rgba(77, 88, 102, 0.1);
  --test-play-accent: #1677ff;
  --test-play-accent-strong: #0958d9;
  --test-play-accent-soft: #e8f3ff;
  --test-play-danger: #c97e89;
  --test-play-danger-strong: #b46572;
  --test-play-danger-soft: #fff0f2;
  --test-play-warning: #c7ab67;
  --test-play-warning-strong: #aa8740;
  --test-play-warning-soft: #f8f1de;
  --test-play-active-soft: #eef4ff;
  --test-play-header-start: #fbfcfd;
  --test-play-header-end: #f1f4f8;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 8px;
  background:
    radial-gradient(circle at top left, rgba(255, 211, 105, 0.18), transparent 28%),
    linear-gradient(160deg, #f4efe2 0%, #fcfaf4 48%, #eef3f8 100%);
  color: var(--test-play-text);
}

.test-play-app__filters,
.test-play-app__grid-panel {
  min-height: 0;
  border: 1px solid var(--test-play-border);
  border-radius: 14px;
  background: var(--test-play-surface);
  box-shadow: 0 12px 28px var(--test-play-shadow);
}

.test-play-app__filters {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.test-play-app__heading strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--test-play-text-strong);
}

.test-play-app__filters-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.test-play-app__search-input {
  flex: 1;
  min-width: 0;
}

.test-play-app__search-input .ant-input {
  height: 38px;
}

.test-play-app :where(.ant-input, .ant-select-selector) {
  border-color: var(--test-play-border-strong) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: var(--test-play-text) !important;
  box-shadow: none !important;
}

.test-play-app :where(.ant-input:hover, .ant-select:hover .ant-select-selector) {
  border-color: #b7c0cb !important;
}

.test-play-app :where(.ant-input:focus, .ant-input-focused, .ant-select-focused .ant-select-selector) {
  border-color: var(--test-play-accent) !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14) !important;
}

.test-play-app__icon-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.test-play-app__icon-button.ant-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  border-color: #d6dbe3;
  background: #ffffff;
  color: #3f4b59;
  box-shadow: 0 6px 14px rgba(77, 88, 102, 0.08);
}

.test-play-app__icon-button.ant-btn:hover,
.test-play-app__icon-button.ant-btn:focus-visible {
  border-color: #8cb8ff;
  background: #ffffff;
  color: #1f2937;
  box-shadow:
    0 0 0 2px rgba(22, 119, 255, 0.14),
    0 8px 18px rgba(77, 88, 102, 0.1);
}

.test-play-app__icon-button.ant-btn.ant-btn-primary,
.test-play-app__icon-button--primary.ant-btn {
  border-color: var(--test-play-accent);
  background: var(--test-play-accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.22);
}

.test-play-app__icon-button.ant-btn.ant-btn-primary:hover,
.test-play-app__icon-button.ant-btn.ant-btn-primary:focus-visible,
.test-play-app__icon-button--primary.ant-btn:hover,
.test-play-app__icon-button--primary.ant-btn:focus-visible {
  border-color: var(--test-play-accent-strong);
  background: var(--test-play-accent-strong);
  color: #ffffff;
  box-shadow:
    0 0 0 2px rgba(22, 119, 255, 0.18),
    0 10px 22px rgba(22, 119, 255, 0.24);
}

.test-play-app__icon-button--danger.ant-btn {
  border-color: #e3b7c3;
  background: linear-gradient(180deg, #fff9fb 0%, #fbe8ee 100%);
  color: var(--test-play-danger-strong);
  box-shadow:
    0 8px 18px rgba(201, 126, 137, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.test-play-app__icon-button--danger.ant-btn:hover,
.test-play-app__icon-button--danger.ant-btn:focus-visible {
  border-color: var(--test-play-danger);
  background: linear-gradient(180deg, #fff7fa 0%, #f7dfe8 100%);
  color: var(--test-play-danger-strong);
  box-shadow:
    0 0 0 2px rgba(201, 134, 156, 0.18),
    0 10px 20px rgba(201, 126, 137, 0.18);
}

.test-play-app__icon-button.ant-btn:disabled,
.test-play-app__icon-button.ant-btn.ant-btn-disabled,
.test-play-app__icon-button.ant-btn[disabled] {
  border-color: #e2e6ec !important;
  background: #f6f7f9 !important;
  color: #9aa3af !important;
  box-shadow: none !important;
  opacity: 1;
}

.test-play-app__filters-detail {
  display: grid;
  min-height: 0;
}

.test-play-app__filters-toggle.ant-btn {
  flex: 0 0 auto;
}

.test-play-app__filters-extra-shell {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.28s ease;
}

.test-play-app__filters-detail--expanded .test-play-app__filters-extra-shell {
  grid-template-rows: 1fr;
}

.test-play-app__filters-extra {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.22s ease,
    transform 0.28s ease,
    padding-bottom 0.28s ease;
}

.test-play-app__filters-detail--expanded .test-play-app__filters-extra {
  padding-top: 10px;
  border-top: 1px solid #eceff3;
  padding-bottom: 4px;
  opacity: 1;
  transform: translateY(0);
}

.test-play-app__filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.test-play-app__filter-field > span {
  font-size: 12px;
  color: var(--test-play-text-muted);
}

.test-play-app__grid-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.test-play-app__grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e8ebf0;
  background: linear-gradient(180deg, #fcfcfd 0%, #f5f7fa 100%);
}

.test-play-app__grid-meta-inline {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--test-play-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.test-play-app__grid-meta-inline-range,
.test-play-app__grid-meta-inline-page {
  white-space: nowrap;
}

.test-play-app__grid-meta-inline-divider {
  color: #aab3be;
}

.test-play-app__grid-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.test-play-app__grid-surface {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.test-play-app__grid-surface .ant-spin-nested-loading,
.test-play-app__grid-surface .ant-spin-container {
  height: 100%;
}

.test-play-app__grid-surface .ag-root-wrapper {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.test-play-app__grid-surface .ag-header {
  border-bottom: 1px solid #dfe5ec;
  background: linear-gradient(180deg, var(--test-play-header-start) 0%, var(--test-play-header-end) 100%);
}

.test-play-app__grid-surface .ag-header-cell,
.test-play-app__grid-surface .ag-header-group-cell {
  color: #4a5563;
  font-weight: 700;
  background: transparent;
  box-shadow: inset -1px 0 0 rgba(202, 208, 217, 0.28);
}

.test-play-app__grid-surface .ag-row {
  transition: background-color 0.18s ease;
}

.test-play-app__grid-surface .ag-row.test-play-app__grid-row--odd {
  --test-play-row-bg: #ffffff;
}

.test-play-app__grid-surface .ag-row.test-play-app__grid-row--even {
  --test-play-row-bg: #fafbfc;
}

.test-play-app__grid-surface .ag-row.test-play-app__grid-row--dirty {
  --test-play-row-bg: var(--test-play-warning-soft);
}

.test-play-app__grid-surface .ag-row.test-play-app__grid-row--active {
  --test-play-row-bg: var(--test-play-active-soft);
}

.test-play-app__grid-cell.ag-cell {
  display: flex;
  align-items: center;
  background: var(--test-play-row-bg, #fff);
  color: var(--test-play-text);
  box-shadow: inset 0 -1px 0 rgba(226, 231, 238, 0.9);
}

.test-play-app__grid-cell--edited.ag-cell {
  color: #80551d;
  font-weight: 700;
  background: linear-gradient(180deg, #fbf3dd 0%, #f6ebcf 100%);
  box-shadow:
    inset 3px 0 0 var(--test-play-warning),
    inset 0 -1px 0 rgba(214, 176, 109, 0.42);
}

.test-play-app__grid-cell--active.ag-cell {
  box-shadow:
    inset 0 0 0 1px rgba(22, 119, 255, 0.2),
    inset 0 -1px 0 rgba(226, 231, 238, 0.9);
}

.test-play-app__editor-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  overflow: hidden;
}

.test-play-app__editor-shell--open {
  pointer-events: auto;
}

.test-play-app__editor-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(44, 63, 79, 0);
  transition: background-color 0.28s ease;
  cursor: pointer;
}

.test-play-app__editor-shell--open .test-play-app__editor-backdrop {
  background: rgba(56, 78, 97, 0.24);
}

.test-play-app__editor-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(255, 211, 105, 0.12), transparent 24%),
    linear-gradient(160deg, #f8f5ec 0%, #fcfbf7 48%, #f1f4f8 100%);
  transform: translate3d(100%, 0, 0);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -16px 0 44px rgba(86, 110, 125, 0.16);
  overflow: hidden;
}

.test-play-app__editor-shell--open .test-play-app__editor-panel {
  transform: translate3d(0, 0, 0);
}

.test-play-app__editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top, 0px)) 24px 18px;
  border-bottom: 1px solid rgba(225, 229, 235, 0.92);
  background: rgba(252, 251, 248, 0.94);
  backdrop-filter: blur(18px);
}

.test-play-app__editor-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.test-play-app__editor-heading strong {
  overflow: hidden;
  color: var(--test-play-text-strong);
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-play-app__editor-heading span {
  color: var(--test-play-text-muted);
  font-size: 13px;
}

.test-play-app__editor-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(220, 225, 232, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(102, 112, 122, 0.08);
}

.test-play-app__editor-actions .ant-tooltip-disabled-compatible-wrapper {
  display: inline-flex;
}

.test-play-app__editor-close.ant-btn {
  flex: 0 0 auto;
}

.test-play-app__editor-delete.ant-btn,
.test-play-app__editor-close.ant-btn,
.test-play-app__editor-apply.ant-btn {
  flex: 0 0 auto;
}

.test-play-app__editor-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.test-play-app__editor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.test-play-app__editor-card,
.test-play-app__editor-form {
  border: 1px solid rgba(223, 227, 233, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px rgba(102, 112, 122, 0.08);
}

.test-play-app__editor-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
}

.test-play-app__editor-card-label {
  color: var(--test-play-text-muted);
  font-size: 12px;
}

.test-play-app__editor-card strong {
  color: var(--test-play-text-strong);
  font-size: 18px;
}

.test-play-app__editor-form {
  padding: 24px;
}

.test-play-app__editor-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.test-play-app__editor-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-play-app__editor-field > span {
  color: #5e7287;
  font-size: 12px;
  font-weight: 600;
}

.test-play-app__editor-field .ant-input,
.test-play-app__editor-field .ant-select-selector {
  min-height: 42px;
  border-radius: 12px !important;
}

.test-play-app__editor-field--edited .ant-input,
.test-play-app__editor-field--edited .ant-select-selector {
  border-color: var(--test-play-warning) !important;
  background: #faf5e8 !important;
  box-shadow: 0 0 0 1px rgba(214, 176, 109, 0.12);
}

.test-play-app__editor-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 100%;
  padding: 18px;
  border: 1px dashed #d9dde4;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #f6f2e8 100%);
  color: #6a7280;
}

.test-play-app__editor-note strong {
  color: #404956;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .test-play-app__filters-extra {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .test-play-app__editor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .test-play-app {
    height: 100%;
    min-height: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .test-play-app__filters-extra {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-play-app__grid-toolbar {
    justify-content: flex-end;
  }

  .test-play-app__grid-actions {
    margin-left: 0;
  }

  .test-play-app__editor-header,
  .test-play-app__editor-body,
  .test-play-app__editor-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .test-play-app__editor-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .test-play-app__filters-main {
    flex-wrap: nowrap;
  }

  .test-play-app__filters-extra {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-play-app__grid-toolbar {
    gap: 10px;
  }

  .test-play-app__grid-meta-inline {
    flex: 1 1 auto;
    min-width: 0;
  }

  .test-play-app__grid-actions {
    justify-content: flex-end;
  }

  .test-play-app__editor-heading strong {
    font-size: 20px;
    white-space: normal;
  }

  .test-play-app__editor-heading span {
    font-size: 12px;
  }

  .test-play-app__editor-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}
