.pt-dm-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #7c3aed 100%);
  color: #fff;
  padding: 28px 32px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.16);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 20px;
}

.pt-dm-header::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 253, 0.28) 0%, rgba(124, 58, 237, 0) 70%);
  pointer-events: none;
}

.pt-dm-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.pt-dm-header h1 {
  color: #fff;
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.pt-dm-header p {
  margin: 0;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.pt-extensions-tabs {
  display: flex;
  gap: 12px;
  margin: 0 0 20px 0;
  border-bottom: none;
  padding: 0;
}

.pt-extensions-tabs .nav-tab {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  margin: 0;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
}

.pt-extensions-tabs .nav-tab:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #4f46e5;
}

.pt-extensions-tabs .nav-tab.nav-tab-active {
  background: #ffffff;
  border: 1.5px solid #4f46e5;
  color: #4f46e5;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.14);
}

.pt-dm-card {
  background: #fff;
  padding: 28px 32px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.pt-dm-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.pt-dm-form-table th {
  font-weight: 600;
  color: #334155;
  vertical-align: middle;
  width: 220px;
  font-size: 14px;
  padding: 14px 10px 14px 0;
}

.pt-dm-form-table td {
  vertical-align: middle;
  padding: 14px 0;
}

.pt-dm-field-desc {
  display: inline-block;
  margin-left: 12px;
  font-size: 13px;
  color: #64748b;
  vertical-align: middle;
}

.pt-dm-select,
.pt-dm-wrap input[type="text"],
.pt-dm-wrap input[type="number"] {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: none;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.pt-dm-select:focus,
.pt-dm-wrap input[type="text"]:focus,
.pt-dm-wrap input[type="number"]:focus {
  border-color: #6c63ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.pt_dm_toggle_switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  vertical-align: middle;
}

.pt_dm_toggle_switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.pt_dm_toggle_slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #cbd5e1;
  border-radius: 26px;
  transition: 0.25s;
}

.pt_dm_toggle_slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: 0.25s;
}

.pt_dm_toggle_switch input:checked + .pt_dm_toggle_slider {
  background: #6c63ff;
}
.pt_dm_toggle_switch input:checked + .pt_dm_toggle_slider:before {
  transform: translateX(22px);
}

.pt_dm_color_wrap,
.pt_dm_color_cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pt_dm_swatch {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.pt_dm_native_color {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 56px;
  height: 56px;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.pt_dm_hex_input {
  width: 200px !important;
  max-width: 320px !important;
  font-family: monospace, sans-serif !important;
  font-size: 12px !important;
}

.pt_dm_base_table {
  width: 100%;
  max-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pt_dm_base_table thead tr {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.pt_dm_base_table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
}

.pt_dm_base_th_var {
  width: 42%;
}
.pt_dm_base_th_fetched,
.pt_dm_base_th_dark {
  width: 29%;
}

.pt_dm_base_row td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.pt_dm_base_row:last-child td {
  border-bottom: none;
}
.pt_dm_base_row:nth-child(even) {
  background: #fafbfc;
}
.pt_dm_base_row:hover {
  background: #f1f5f9;
}

.pt_dm_base_td_var .pt_dm_base_title {
  display: block;
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  margin-bottom: 4px;
}

.pt_dm_var_tag {
  background: #ede9fe;
  color: #5b21b6;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.pt_dm_color_hex_label {
  display: inline-block;
  max-width: 240px;
  font-size: 11px;
  color: #475569;
  font-family: monospace, sans-serif;
  font-weight: 500;
  word-break: break-all;
}

.pt_dm_not_fetched {
  color: #94a3b8;
  font-size: 13px;
}

.pt_dm_grip {
  color: #94a3b8;
  cursor: grab;
  font-size: 16px;
  line-height: 1;
  user-select: none;
}

.pt_dm_palette_var_input {
  flex: 1;
  min-width: 200px;
  font-family: monospace;
}

.pt_dm_palette_del_btn {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #000;
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.pt_dm_palette_del_btn:hover {
  background: #fca5a5;
}

.pt_dm_add_row_btn {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #475569;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.pt_dm_add_row_btn:hover {
  background: #f1f5f9;
  border-color: #6c63ff;
  color: #6c63ff;
}

.pt-dm-wrap .button-primary {
  background: linear-gradient(135deg, #6c63ff 0%, #3b82f6 100%);
  border-color: #5651e5;
  border-radius: 6px;
  padding: 4px 28px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.25);
  transition: all 0.2s;
}

.pt-dm-wrap .button-primary:hover {
  background: linear-gradient(135deg, #5651e5 0%, #2563eb 100%);
  border-color: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(108, 99, 255, 0.35);
}

.pt-dm-floating-switch {
  position: fixed;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--pt-dm-btn-bg, #1e222d);
  color: var(--pt-dm-btn-color, #ef8451);
  padding: var(--pt-dm-btn-padding, 12px);
  border: none;
  border-radius: var(--pt-dm-btn-radius, 50px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.25s;
  user-select: none;
  outline: none;
}

.pt-dm-floating-switch:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.pt-dm-floating-switch:active {
  transform: scale(0.95);
}

.pt-dm-floating-switch:focus-visible {
  box-shadow:
    0 0 0 3px var(--pt-dm-btn-color, #6c63ff),
    0 6px 20px rgba(0, 0, 0, 0.25);
}

.pt-dm-pos-bottom-right {
  bottom: 24px;
  right: 24px;
}
.pt-dm-pos-bottom-left {
  bottom: 24px;
  left: 24px;
}
.pt-dm-pos-top-right {
  top: 24px;
  right: 24px;
}
.pt-dm-pos-top-left {
  top: 24px;
  left: 24px;
}

.pt-dm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.pt-dm-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pt-dm-icon-sun {
  display: none;
}

html.pt-dark-mode .pt-dm-icon-sun,
:root[data-pt-theme="dark"] .pt-dm-icon-sun {
  display: flex;
}

html.pt-dark-mode .pt-dm-icon-moon,
:root[data-pt-theme="dark"] .pt-dm-icon-moon {
  display: none;
}

html.pt-theme-transitioning,
html.pt-theme-transitioning *,
html.pt-theme-transitioning *:before,
html.pt-theme-transitioning *:after {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    fill 0.3s ease,
    stroke 0.3s ease !important;
  transition-delay: 0s !important;
}
