:root {
  --admin-radius: 18px;
  --admin-edge: #e3e8f1;
  --admin-pink: #f40069;
}

.admin-shell,
.admin-body,
.admin-main,
.admin-card,
.builder-two,
.builder-two-main {
  min-width: 0;
}

.admin-main {
  width: 100%;
  max-width: 1700px;
}

.admin-dashboard-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 16px !important;
  width: 100%;
  margin: 0 0 24px !important;
}

.admin-dashboard-stats > .admin-stat-card {
  grid-column: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  min-height: 155px;
  box-shadow: 0 14px 34px rgba(19, 33, 55, .045);
}

.admin-dashboard-stats .admin-stat-card:nth-child(4) {
  border-top-color: #f3ae43;
}

.admin-dashboard-intro {
  isolation: isolate;
}

.admin-dashboard-intro .admin-btn.secondary {
  flex-shrink: 0;
}

.admin-top .top-user {
  text-decoration: none;
  color: #1a2940;
  border-radius: 10px;
  padding: 6px;
  transition: background-color .16s;
}

.admin-top .top-user:hover {
  color: #d9005c;
  background: #fff1f6;
}

.admin-card,
.admin-dashboard-feature {
  border-color: var(--admin-edge);
  border-radius: var(--admin-radius);
}

.admin-card h2,
.admin-dashboard-feature h2 {
  color: #121f35;
}

.admin-form {
  width: 100%;
  max-width: 1000px;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  max-width: 100%;
}

.admin-field textarea.admin-tinymce {
  min-height: 220px;
}

.admin-field input[type="file"] {
  min-height: 0;
}

.admin-btn {
  border-radius: 11px;
  font-weight: 750;
  transition: transform .17s ease, box-shadow .17s ease, background .17s ease;
}

.admin-btn:disabled,
.builder-move:disabled {
  cursor: wait;
  opacity: .7;
  box-shadow: none;
  transform: none;
}

.admin-btn:focus-visible,
.admin-file-dropzone:focus-within {
  outline: 3px solid rgba(244, 0, 105, .32);
  outline-offset: 3px;
}

.admin-table-wrap {
  border: 1px solid #edf0f5;
  background: white;
}

.admin-table {
  border-radius: 12px;
}

.admin-table th {
  background: #f8f9fc;
}

.admin-table td {
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: #fffafd;
}

.admin-filter-expanded {
  background: #f9fafc;
  padding: 15px;
  border: 1px solid #e8edf4;
  border-radius: 15px;
}

.admin-filter-expanded > .admin-btn {
  white-space: nowrap;
}

.admin-file-control {
  width: 100%;
  min-width: 0;
}

.admin-file-dropzone {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 19px 20px;
  min-height: 112px;
  border: 1.5px dashed #bfcbda;
  background: linear-gradient(135deg, #fafbff, #fff 80%);
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.admin-file-dropzone:hover,
.admin-file-dropzone.is-dragging {
  border-color: #f40069;
  background: #fff6fa;
  box-shadow: 0 8px 24px rgba(244, 0, 105, .06);
}

.admin-file-dropzone.is-invalid {
  border-color: #c83a53;
  background: #fff4f6;
}

.admin-file-dropzone .admin-file-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #de0967;
  background: #ffebf3;
  border-radius: 12px;
  pointer-events: none;
}

.admin-file-dropzone svg {
  width: 24px;
  height: 24px;
}

.admin-file-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  pointer-events: none;
}

.admin-file-copy strong {
  color: #12223b;
  font-size: 14px;
  font-weight: 800;
}

.admin-file-copy small {
  font-size: 12px;
  line-height: 1.55;
  color: #728097;
}

.admin-file-dropzone input.admin-file-native {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0;
  border: 0 !important;
  cursor: pointer;
  z-index: 1;
}

.admin-file-feedback {
  display: grid;
  gap: 10px;
  margin: 12px 0 2px;
}

.admin-file-feedback:empty {
  display: none;
}

.admin-file-message {
  margin: 0;
  color: #51647d;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.admin-file-message.is-error {
  color: #b21f47;
}

.admin-file-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-file-tile {
  min-width: 0;
  min-height: 80px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #e8edf4;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
}

.admin-file-tile img {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  object-fit: cover;
  border-radius: 7px;
  background: #f5f7fa;
}

.admin-file-tile .admin-file-sound {
  display: grid;
  place-items: center;
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: #fce7f0;
  color: #cc0755;
  font-weight: 850;
}

.admin-file-tile span {
  min-width: 0;
  color: #465772;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-form:has(.admin-file-control) > .admin-btn[type="submit"],
.admin-form:has(.admin-file-control) > .admin-btn:not([type]) {
  min-height: 51px;
  width: 100%;
}

.admin-upload-preview {
  display: none;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 99px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 800;
  background: #edf8f2;
  color: #1c7954;
}

.admin-status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.admin-status-badge.is-warning {
  background: #fff7e5;
  color: #9f6c13;
}

.admin-status-badge.is-error {
  background: #ffedf2;
  color: #a52246;
}

.admin-diagnostic-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 30px;
}

.admin-diagnostic-intro h2 {
  margin: 0 0 8px;
}

.admin-diagnostic-intro p {
  margin: 0;
}

.admin-diagnostic-totals {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-diagnostic-pill {
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eff9f3;
  color: #137448;
  font-size: 12px;
  font-weight: 800;
}

.admin-diagnostic-pill.is-error {
  background: #fff0f3;
  color: #aa1f40;
}

.admin-diagnostic-help {
  display: block;
  margin-top: 5px;
  line-height: 1.6;
  color: #7c879a;
  font-size: 12px;
}

.admin-diagnostic-table td:last-child {
  width: 160px;
}

.admin-account-card {
  max-width: 760px;
}

.admin-account-card .admin-form {
  max-width: 650px;
}

.builder-field .builder-text-part input {
  width: 100%;
}

.builder-field-title {
  overflow-wrap: anywhere;
}

.tox-tinymce {
  border: 1px solid #d7deea !important;
  border-radius: 12px !important;
}

.builder-media-dialog {
  max-width: min(940px, calc(100vw - 32px));
}

@media (max-width: 1450px) {
  .admin-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .admin-file-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-diagnostic-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .admin-main {
    padding: 25px 14px 50px;
  }

  .admin-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .admin-dashboard-stats > .admin-stat-card {
    padding: 16px !important;
    min-height: 136px;
  }

  .admin-dashboard-stats .admin-stat-card strong {
    font-size: 31px;
  }

  .admin-dashboard-stats .admin-stat-caption {
    font-size: 10px;
  }

  .admin-file-dropzone {
    padding: 14px;
    min-height: 98px;
  }

  .admin-file-dropzone .admin-file-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .admin-file-list {
    grid-template-columns: 1fr;
  }

  .admin-diagnostic-intro {
    padding: 19px;
  }

  .admin-table {
    min-width: 540px;
  }

  .admin-top .top-breadcrumb {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-file-dropzone,
  .admin-btn,
  .admin-top .top-user {
    transition: none;
  }
}
