: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;
  --table-row-height: 46px;
  --table-font-size: 13px;
  --table-min-width: 900px;
}

/* overall bands and containers */
.dmos-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;
}
.dmos-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;
}

/* headings */
.dmos-container h2 { margin: 0 0 12px; color: #0a0f18; font-weight:700; }

/* buttons */
.dmos-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.06);
}
.dmos-btn-orange { background: linear-gradient(180deg, var(--accent-orange), var(--footer-orange)); color:#000!important; }
.dmos-btn-neonline { background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan)); color:#000!important; border-radius:999px; padding:8px 14px; }

/* small text in tables */
.dmos-table-smalltext, .dmos-table-smalltext table, .dmos-table-smalltext th, .dmos-table-smalltext td {
  font-size: var(--table-font-size);
}

/* table base */
table.widefat {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  background: var(--card-warm);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(10,15,24,0.02);
}
table.widefat thead {
  background: linear-gradient(180deg,#fbfdff,#f1f7ff);
}
table.widefat th, table.widefat td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: #0a0f18;
  vertical-align: middle;
  text-align: left;
  line-height: 1.25;
  height: auto;
  min-height: var(--table-row-height);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* header left alignment and style */
.dmos-th-left {
  text-align: left;
  font-weight:700;
  color:#0a0f18;
  padding-top:14px;
  padding-bottom:14px;
  font-size:13px;
}

/* harmonized row hover */
table.widefat tbody tr {
  transition: background-color .12s ease;
}
table.widefat tbody tr:hover {
  background: linear-gradient(90deg, rgba(255,63,184,0.03), rgba(31,214,255,0.02));
}

/* inputs */
.dmos-input-manage, .dmos-input-manage:focus, .dmos-input-summary, .dmos-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 */
.dmos-consolidate-input { width:75%; max-width:100%; min-width:220px; padding:8px 10px; border-radius:8px; border:1px solid rgba(0,0,0,0.08); }

/* filled highlight */
.dmos-filled { background: linear-gradient(180deg,#fffefb,#ffffff); }

/* table wrappers provide horizontal scroll and neon scrollbar */
.dmos-table-wrap, .dmos-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  background: transparent;
}

/* ensure inner content can be wider than container to enable horizontal scroll if needed */
.dmos-table-wrap table, .dmos-table-scroll table { min-width: var(--table-min-width); }

/* neon scroll for webkit */
.neon-scroll::-webkit-scrollbar { height:12px; background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02)); }
.neon-scroll::-webkit-scrollbar-thumb { background: linear-gradient(90deg,var(--neon-magenta),var(--neon-cyan)); border-radius:999px; box-shadow:0 6px 20px rgba(31,214,255,0.06); border:2px solid rgba(255,255,255,0.06); }

/* truncate cells visually (title attr contains full text from server) */
table.widefat td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* preview mapping tables style */
.dmos-table-wrap table.widefat { background: #fff; border-radius:8px; }

/* autocomplete */
.dmos-autocomplete-list {
  position: absolute;
  z-index: 99999;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(31,214,255,0.06), 0 6px 20px rgba(139,66,255,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  display:none;
  max-height:320px;
  overflow-y:auto;
}
.dmos-autocomplete-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size:13px;
  color:#0a0f18;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dmos-autocomplete-item:hover, .dmos-autocomplete-item.active {
  background: linear-gradient(90deg, rgba(255,63,184,0.06), rgba(31,214,255,0.04));
}

/* row action buttons */
.dmos-row-actions .dmos-button { padding:6px 8px; font-size:12px; border-radius:8px; }

/* neon separator */
.dmos-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); }

/* 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 baseline */
@media (max-width: 1400px) {
  .dmos-table-smalltext, .dmos-table-smalltext table, .dmos-table-smalltext th, .dmos-table-smalltext td { font-size:12px; }
}

/* Column sizing adjustments */
.dmos-fullwidth-inner table.widefat th:nth-child(3),
.dmos-fullwidth-inner table.widefat td:nth-child(3) {
  width: 480px !important;
  min-width: 360px !important;
  box-sizing: border-box;
  white-space: normal !important;
  word-break: break-word;
}

.dmos-fullwidth-inner table.widefat th:nth-child(4),
.dmos-fullwidth-inner table.widefat td:nth-child(4) {
  width: 720px !important;
  min-width: 520px !important;
  box-sizing: border-box;
  white-space: normal !important;
  word-break: break-word;
}

/* Summary table: Scan Template */
.dmos-summary-full th:nth-child(4),
.dmos-summary-full td:nth-child(4) {
  width: 480px !important;
  min-width: 360px !important;
  box-sizing: border-box;
  white-space: normal !important;
  word-break: break-word;
}

/* Small/mobile */
@media (max-width: 900px) {
  .dmos-fullwidth-inner table.widefat th:nth-child(3),
  .dmos-fullwidth-inner table.widefat td:nth-child(3),
  .dmos-fullwidth-inner table.widefat th:nth-child(4),
  .dmos-fullwidth-inner table.widefat td:nth-child(4),
  .dmos-summary-full th:nth-child(4),
  .dmos-summary-full td:nth-child(4) {
    width: auto !important;
    min-width: 260px !important;
    max-width: none !important;
    white-space: normal !important;
  }
}

/* Export preview table consistency */
.dmos-export-table td, .dmos-export-table th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* import existing block */
#dmos-import-existing-block-frontend { border:1px dashed rgba(0,0,0,0.06); padding:10px; border-radius:8px; background:#fff; margin-top:8px; }
#dmos-import-existing-block-frontend select { max-width:520px; padding:8px; border-radius:6px; border:1px solid rgba(0,0,0,0.06); }

/* preview area styling */
#dmos-preview-area { margin-top:12px; }

.dmos-msg-ok { background:#ecfdf5; border-left:4px solid #10b981; padding:8px 10px; border-radius:6px; color:#065f46; }
.dmos-msg-err { background:#fff1f2; border-left:4px solid #ef4444; padding:8px 10px; border-radius:6px; color:#7f1d1d; }

/* Styles for new bulk apply controls */
#dmos-bulk-source-set-frontend input[type="text"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  margin-right: 6px;
  min-width: 160px;
}
#dmos-bulk-source-set-frontend button {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight:700;
}