:root{
  --bg-nearblack: #0a0f18;
  --bg-midnavy: #0f1330;
  --accent-orange: #f18500;
  --footer-orange: #f08a00;
  --white: #ffffff;
  --card-warm: #fcfcfc;
  --violet-top: #8b42ff;
  --blue-bottom: #2d7bff;
  --neon-magenta: #ff3fb8;
  --neon-cyan: #1fd6ff;
  --menu-darkgray: #2e2e2e;
  --footer-link-gray: #9aa0a6;
  --text-on-dark: #e6eefb;
  --neon-glow: 0 8px 40px rgba(139,66,255,0.12);
  --font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Fullwidth wrapper (dark band) */
.dsms-fullwidth-wrapper {
  background: linear-gradient(180deg, var(--bg-midnavy), rgba(15,19,48,0.95));
  color: var(--text-on-dark);
  padding: 28px 0;
  box-sizing: border-box;
}

/* Container card */
.dsms-container {
  max-width: 1200px;
  margin: 0 auto 24px;
  font-family: var(--font-family);
  color: #0a0f18;
  background: var(--card-warm);
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--neon-glow);
  box-sizing: border-box;
}

/* Title */
.dsms-container h2, .dsms-summary-title { margin: 0 0 12px; color: #0a0f18; }

/* Generic button styles (rounded, bold) */
.dsms-button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-weight: 700;
  font-size: 12px;
  transition: transform .08s ease, box-shadow .12s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Orange primary (buttons with orange bg and black text) */
.dsms-btn-orange {
  background: linear-gradient(180deg, var(--accent-orange), var(--footer-orange));
  color: #000000 !important;
}

/* Ghost small actions */
.dsms-btn-ghost {
  background: rgba(0,0,0,0.04);
  color: #0a0f18;
  border: 1px solid rgba(0,0,0,0.06);
}

/* Neon filter button (magenta -> cyan) */
.dsms-btn-neonline {
  background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan));
  color: #000000 !important;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(255,63,184,0.12), 0 8px 30px rgba(31,214,255,0.06);
}

/* Small text in grids ~10pt (approx 13px) */
.dsms-table-smalltext, .dsms-table-smalltext table, .dsms-table-smalltext th, .dsms-table-smalltext td {
  font-size: 13px;
}

/* fullwidth inner */
.dsms-fullwidth-inner {
  background: transparent;
  padding: 16px;
}

/* Tables */
table.widefat {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  background: var(--card-warm);
  border-radius: 8px;
  overflow: hidden;
}
table.widefat th, table.widefat td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: #0a0f18;
  vertical-align: middle;
}
table.widefat thead {
  background: linear-gradient(180deg,#fbfdff,#f1f7ff);
}

/* Inputs in manage sources white with black text */
.dsms-input-manage, .dsms-input-manage:focus {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 6px 8px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
}

/* Inputs in summary (scan template) white with black text */
.dsms-input-summary, .dsms-input-summary:focus {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 6px 8px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
}

/* Consolidate input 3x wider visually */
.dsms-consolidate-input {
  width: 75%;
  max-width: 100%;
  min-width: 220px;
  background: #ffffff;
  color: #000000;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Filled highlight subtle */
.dsms-filled { background: linear-gradient(180deg,#fffefb,#ffffff); }

/* Summary fullwidth table centered & full width */
.dsms-summary-table-centered {
  width: 100%;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px 0;
}
.dsms-summary-table-centered .dsms-summary-full {
  max-width: 1400px;
  width: 100%;
}

/* Hint box for summary (full width and centered) */
.dsms-summary-hint {
  max-width: 1400px;
  margin: 12px auto;
  background: linear-gradient(180deg,#ffffff,#fcfcff);
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(45,123,255,0.06);
  color: #0a0f18;
  text-align: center;
  box-sizing: border-box;
}

/* Neon separator */
.dsms-sep-neon {
  height: 6px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan));
  box-shadow: 0 6px 30px rgba(31,214,255,0.06), 0 6px 30px rgba(255,63,184,0.06);
}

/* Export table */
.dsms-export-table { width:100%; table-layout:auto; }

/* responsive helpers */
.dsms-fullwidth-inner table.widefat,
.dsms-fullwidth-inner .dsms-summary-full {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* row action small buttons */
.dsms-row-actions .dsms-button { padding:6px 8px; font-size:12px; border-radius:8px; }

/* Focus outlines */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(45,123,255,0.14);
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  .dsms-fullwidth-inner table.widefat th:nth-child(3),
  .dsms-fullwidth-inner table.widefat td:nth-child(3) {
    width: 520px !important;
    min-width: 240px !important;
  }
  .dsms-fullwidth-inner table.widefat th:nth-child(4),
  .dsms-fullwidth-inner table.widefat td:nth-child(4) {
    width: 780px !important;
    min-width: 360px !important;
  }
}
@media (max-width: 900px){
  .dsms-container { padding: 14px; margin: 12px; }
  .dsms-table-smalltext, .dsms-table-smalltext table, .dsms-table-smalltext th, .dsms-table-smalltext td { font-size: 12px; }
  .dsms-consolidate-input { width: 100%; }
  .dsms-summary-hint { margin-left: 12px; margin-right: 12px; }
}

/* Styles for the new existing-file import block */
#dsms-import-existing-block-frontend {
  border: 1px dashed rgba(0,0,0,0.06);
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  margin-top: 8px;
}
#dsms-import-existing-block-frontend select {
  max-width: 520px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
}

/* Preview area */
#dsms-preview-area { margin-top: 12px; }

/* messages */
.dsms-msg-ok { background: #ecfdf5; border-left:4px solid #10b981; padding:8px 10px; border-radius:6px; color:#065f46; }
.dsms-msg-err { background: #fff1f2; border-left:4px solid #ef4444; padding:8px 10px; border-radius:6px; color:#7f1d1d; }

/* small helper text */
.dsms-small { color:#6b7280; font-size:13px; margin-top:6px; display:block; }