/*
 * Digital Practice CMS UI
 * Single source for shared layout, card, menu, table, form, upload/edit and profile styling.
 * Page files should only keep truly page-specific preview/interaction CSS.
 */

:root {
  --dp-navy: #00344a;
  --dp-pink: #e23d64;
  --dp-blue: #0096cf;
  --dp-orange: #ff9e5a;
  --dp-border: #c9d4dc;
  --dp-muted: #667680;
  --dp-bg: #f7fafc;
  --dp-soft: #f4f8fa;
}

/* Shell and panel container */
  .dp-shell {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
  }
  .dp-panel {
    background: #fff;
    border: 1px solid #d1dbe2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    display: flow-root;
  }
  .dp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
  }
  .dp-title {
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 24px;
    margin: 0;
    color: #00344a;
  }
  .dp-subtitle {
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 15px;
    margin: 4px 0 0 0;
    color: #666;
  }
  .dp-button,
  .dp-button-secondary {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 5px;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    text-align: center;
  }
  .dp-button {
    background: #e23d64;
    color: #fff;
    border: none;
  }
  .dp-button:hover {
    background: #0096cf;
  }
  .dp-button-secondary {
    background: #fff;
    color: #00344a;
    border: 1px solid #00344a;
  }
  .dp-button-secondary:hover {
    background: #f5f5f5;
  }
  /* Side menu */
  #dp-menu {
    width: 200px;
    background: #fafafa;
    border-right: 1px solid #d1dbe2;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  #dp-menu.collapsed {
    transform: translateX(-200px);
  }
  .dp-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    font-size: 18px;
    font-family: "Hanken Grotesk", sans-serif;
    font-weight: 600;
    color: #00344a;
    border-bottom: 1px solid #d1dbe2;
  }
  .dp-menu-item {
    display: block;
    padding: 6px 16px;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 15px;
    color: #00344a;
    cursor: pointer;
    text-decoration: none;
    border-left: 3px solid transparent;
  }
  .dp-menu-item:hover,
  .dp-menu-item.active {
    background: #f0f5fa;
    border-left-color: #0096cf;
    color: #00344a;
  }
  /* Menu toggle button */
  .dp-menu-toggle {
    /* small collapse affordance; always visible to reopen */
    position: fixed;
    top: 16px;
    left: 204px;
    z-index: 1100;
    width: 24px;
    height: 24px;
    background: #ffffff;
    color: #00344a;
    border: 1px solid #d1dbe2;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
    line-height: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  }
  .dp-menu-toggle:hover {
    background: #f0f5fa;
    border-color: #0096cf;
    color: #0096cf;
  }

  /* Override legacy button classes with modern styling */
  .butn, .smbutn, .cta-pink {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 5px;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 16px;
    background: #e23d64;
    color: #fff;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: none;
    margin: 4px 0;
  }
  .butn:hover, .smbutn:hover, .cta-pink:hover {
    background: #0096cf;
  }
  .butn:disabled, .smbutn:disabled, .cta-pink:disabled {
    opacity: 0.4;
  }
  /* Normalize heading styles across pages */
  h1, h2, h3 {
    font-family: "Hanken Grotesk", sans-serif;
    color: #00344a;
    margin-top: 0;
  }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; margin-bottom: 16px; }
  h3 { font-size: 18px; margin-bottom: 12px; }
  /* Simplify horizontal rules */
  hr {
    border: 0;
    border-top: 1px solid #c9d4dc;
    margin: 24px 0;
  }
  /* Normalize inputs and selects */
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 15px;
    border: 1px solid #b8c6ce;
    border-radius: 4px;
    padding: 8px;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
  }
  input[type=file]::-webkit-file-upload-button, input[type=file]::file-selector-button {
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 15px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: #e23d64;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  input[type=file]::-webkit-file-upload-button:hover, input[type=file]::file-selector-button:hover {
    background: #0096cf;
  }

  /* Legacy content containers styled like modern panels */
  .content1, .content {
    background: #fff;
    border: 1px solid #c9d4dc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
  }
  /* The main AJAX target is a layout container, not a card. */
  #content.content {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  /* Tables styling */
  table.dp-table,
  table.schedules {
    width: 100%;
    border-collapse: collapse;
  }
  table.dp-table th,
  table.dp-table td,
  table.schedules th,
  table.schedules td {
    padding: 4px 8px;
    border-bottom: 1px solid #eef1f4;
    text-align: left;
    font-size: 15px;
  }
  table.dp-table th,
  table.schedules th {
    font-weight: 600;
    color: #00344a;
    background: #f7f9fc;
  }
  table.dp-table tr:nth-child(even) td,
  table.schedules tr:nth-child(even) td {
    background: #fafcfe;
  }


  .dp-table-wrap {
    width: 100%;
    overflow-x: auto;
  }
  table.schedules td,
  table.schedules th {
    overflow-wrap: anywhere;
    vertical-align: middle;
  }

  /* Define column widths for schedule flow tables to ensure consistent sizing. */
  table.schedules th:nth-child(1) { width: 70px; }
  table.schedules th:nth-child(2) { width: 240px; }
  table.schedules th:nth-child(3),
  table.schedules th:nth-child(4),
  table.schedules th:nth-child(5),
  table.schedules th:nth-child(6) {
    width: 80px;
    text-align: center;
  }
  table.schedules th:nth-child(7),
  table.schedules th:nth-child(8),
  table.schedules th:nth-child(9),
  table.schedules th:nth-child(10),
  table.schedules th:nth-child(11),
  table.schedules th:nth-child(12) {
    width: 60px;
    text-align: center;
  }


  /* Shared card page shell: matches Upload Content */
  .dp-shell,
  .dp-form-shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 1500px;
    margin: 24px auto 40px auto !important;
    padding: 0 20px;
    color: #1b2b34;
    font-family: "Hanken Grotesk", Arial, sans-serif;
    text-align: left;
  }
  .dp-panel,
  .dp-form-panel,
  .content1 {
    box-sizing: border-box;
    border: 1px solid #c9d4dc;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0, 52, 74, 0.10), 0 1px 0 rgba(0, 52, 74, 0.08);
    padding: 28px;
    overflow: hidden;
  }
  .dp-form-header,
  .dp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 20px;
    margin: 0 0 24px 0 !important;
    border-bottom: 1px solid #e7edf1;
  }
  .dp-form-header img,
  .dp-page-header img {
    width: 150px;
    max-width: 28%;
    height: auto;
    margin: 0 !important;
    object-fit: contain;
  }
  .dp-form-title,
  .dp-page-title {
    color: #00344a;
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    margin: 0 !important;
  }
  .dp-form-subtitle,
  .dp-page-subtitle {
    color: #667680;
    font-size: 15px;
    line-height: 1.45;
    max-width: 680px;
    margin: 8px 0 0 0 !important;
  }


  /* When the left navigation is visible, the brand already lives in the sidebar.
     Hide duplicate right-pane header logos to keep page headers consistent and compact. */
  #content .dp-form-header > img,
  #content .dp-page-header > img {
    display: none !important;
  }
  .dp-section-title {
    color: #e23d64;
    font-size: 16px;
    margin: 20px 0 14px 0;
    font-weight: 700;
  }
  .dp-panel form > div[style*="width:100%"],
  .dp-form-panel form > div[style*="width:100%"] {
    box-sizing: border-box;
    max-width: 100%;
    clear: both;
  }
  .dp-panel form > div[style*="float"],
  .dp-form-panel form > div[style*="float"],
  .dp-panel form div[style*="width:50%"],
  .dp-form-panel form div[style*="width:50%"] {
    box-sizing: border-box;
  }
  .dp-panel form div[style*="width:50%"],
  .dp-form-panel form div[style*="width:50%"] {
    min-width: 260px;
  }
  .dp-panel input[type="text"], .dp-panel input[type="email"], .dp-panel input[type="password"], .dp-panel input[type="date"], .dp-panel input[type="number"], .dp-panel select, .dp-panel textarea,
  .dp-form-panel input[type="text"], .dp-form-panel input[type="email"], .dp-form-panel input[type="password"], .dp-form-panel input[type="date"], .dp-form-panel input[type="number"], .dp-form-panel select, .dp-form-panel textarea {
    border: 1px solid #b8c6ce !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    background: #fff;
    color: #1b2b34;
    box-shadow: inset 0 1px 2px rgba(0, 52, 74, 0.04);
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Form breathing room: keep controls from touching each other or the panel edge. */
  .dp-panel form,
  .dp-form-panel form {
    box-sizing: border-box;
    max-width: 100%;
    padding-right: 12px;
  }
  .dp-panel label,
  .dp-form-panel label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 6px;
  }
  .dp-panel input[type="text"], .dp-panel input[type="email"], .dp-panel input[type="password"], .dp-panel input[type="date"], .dp-panel input[type="number"], .dp-panel select, .dp-panel textarea,
  .dp-form-panel input[type="text"], .dp-form-panel input[type="email"], .dp-form-panel input[type="password"], .dp-form-panel input[type="date"], .dp-form-panel input[type="number"], .dp-form-panel select, .dp-form-panel textarea {
    margin: 4px 0 12px 0 !important;
  }
  .dp-panel form div[style*="float:right"],
  .dp-form-panel form div[style*="float:right"],
  .dp-panel form div[style*="float: right"],
  .dp-form-panel form div[style*="float: right"] {
    padding-right: 12px;
  }
  .dp-panel .tox-tinymce,
  .dp-form-panel .tox-tinymce,
  .dp-panel .mce-tinymce,
  .dp-form-panel .mce-tinymce {
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
    box-sizing: border-box !important;
    margin-right: 12px !important;
  }

  .dp-panel .smbutn, .dp-panel .butn, .dp-form-panel .smbutn, .dp-form-panel .butn,
  .dp-panel .cta-pink, .dp-form-panel .cta-pink {
    border-radius: 10px !important;
    box-shadow: none !important;
    font-weight: 700;
    padding: 10px 16px !important;
  }
  .dp-table-wrap,
  .dp-panel .dp-table-wrap,
  .dp-form-panel .dp-table-wrap {
    width: 100%;
    overflow-x: auto;
  }
  .dp-panel table,
  .dp-form-panel table {
    max-width: 100%;
  }
  .dp-panel table.schedules,
  .dp-form-panel table.schedules,
  .dp-panel #mytable,
  .dp-form-panel #mytable {
    min-width: 760px;
  }
  @media (max-width: 900px) {
    .dp-shell, .dp-form-shell { padding: 12px; margin-top: 12px !important; }
    .dp-panel, .dp-form-panel, .content1 { padding: 20px; border-radius: 18px; }
    .dp-form-header, .dp-page-header { display: block; }
    .dp-form-header img, .dp-page-header img { margin-top: 16px !important; max-width: 180px; }
  }



  /* Neutralize legacy global margins inside modern cards. */
  .dp-shell div,
  .dp-form-shell div,
  .dp-panel div,
  .dp-form-panel div,
  .dp-shell p,
  .dp-form-shell p,
  .dp-shell form,
  .dp-form-shell form {
    margin-top: 0;
  }
  .dp-panel > form,
  .dp-form-panel > form {
    margin: 0;
  }
  .dp-menu a.dp-menu-item {
    margin: 0 !important;
  }
  .dp-panel .content1,
  .dp-form-panel .content1 {
    max-width: 100%;
    box-sizing: border-box;
  }



  .dp-result-success,
  .dp-result-error,
  .dp-result-warning {
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #c9d4dc;
    background: #f7fafc;
  }
  .dp-result-success { border-left: 4px solid #008a5b; }
  .dp-result-error { border-left: 4px solid #e23d64; }
  .dp-result-warning { border-left: 4px solid #f0a500; }



  /* Density pass: narrower nav, wider work area, compact tables/forms. */
  :root {
    --dp-menu-width: 176px;
    --dp-content-gap: 10px;
    --dp-content-left: calc(var(--dp-menu-width) + var(--dp-content-gap));
  }
  #dp-menu {
    width: var(--dp-menu-width) !important;
    background: #fbfcfd;
  }
  #dp-menu.collapsed {
    transform: translateX(calc(-1 * var(--dp-menu-width))) !important;
  }
  .dp-menu-header {
    padding: 16px 14px 14px 14px !important;
    font-size: 17px !important;
    line-height: 1.15;
  }
  .dp-menu-item {
    padding: 6px 12px !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
  }
  .dp-menu-toggle {
    left: calc(var(--dp-menu-width) + 4px) !important;
    top: 18px !important;
  }
  #content.content {
    margin-left: var(--dp-content-left) !important;
    width: calc(100vw - var(--dp-content-left) - 10px) !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  #content .dp-shell,
  #content .dp-form-shell {
    width: 100% !important;
    max-width: 1500px !important;
    margin: 20px auto 34px auto !important;
    padding: 0 10px !important;
    box-sizing: border-box;
  }
  #content .dp-panel,
  #content .dp-form-panel,
  #content .content1 {
    padding: 24px !important;
  }
  #content .dp-form-header,
  #content .dp-page-header {
    margin-bottom: 20px !important;
    padding-bottom: 18px !important;
  }
  #content .dp-form-header img,
  #content .dp-page-header img {
    width: 136px !important;
  }

  .dp-auth-card {
    margin: 12px 12px 14px 12px !important;
    padding: 10px 10px !important;
    border: 1px solid #c9d4dc;
    border-radius: 12px;
    background: #fff;
    color: #00344a;
    font-family: "Hanken Grotesk", Arial, sans-serif;
  }
  .dp-auth-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .dp-auth-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    flex: 0 0 9px;
    background: #9aa6ad;
  }
  .dp-auth-ok { background: #008a5b; }
  .dp-auth-off { background: #e23d64; }
  .dp-auth-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dp-auth-subtitle {
    display: block;
    font-size: 11px;
    line-height: 1.25;
    color: #667680;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dp-auth-button {
    display: block;
    width: 100%;
    margin-top: 8px !important;
    padding: 6px 8px !important;
    border-radius: 8px;
    border: 1px solid #b8c6ce;
    background: #f7f9fc;
    color: #00344a;
    font: 700 12px "Hanken Grotesk", Arial, sans-serif;
    cursor: pointer;
  }
  .dp-auth-button:hover {
    border-color: #0096cf;
    color: #0096cf;
  }

  table.dp-table th,
  table.dp-table td,
  table.schedules th,
  table.schedules td,
  #mytable th,
  #mytable td,
  #mytable2 th,
  #mytable2 td {
    padding: 3px 5px !important;
    font-size: 15px !important;
    line-height: 1.15 !important;
  }
  table.schedules {
    table-layout: fixed;
  }
  table.schedules th,
  table.schedules td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  table.schedules th:nth-child(1), table.schedules td:nth-child(1) { width: 44px !important; }
  table.schedules th:nth-child(2), table.schedules td:nth-child(2) { width: 250px !important; }
  table.schedules th:nth-child(3), table.schedules td:nth-child(3) { width: 66px !important; text-align: center; }
  table.schedules th:nth-child(4), table.schedules td:nth-child(4),
  table.schedules th:nth-child(5), table.schedules td:nth-child(5),
  table.schedules th:nth-child(6), table.schedules td:nth-child(6),
  table.schedules th:nth-child(8), table.schedules td:nth-child(8),
  table.schedules th:nth-child(9), table.schedules td:nth-child(9),
  table.schedules th:nth-child(10), table.schedules td:nth-child(10) {
    width: 54px !important;
    text-align: center;
  }
  table.schedules th:last-child,
  table.schedules td:last-child {
    width: 74px !important;
    text-align: center;
  }
  table.schedules .dp-hidden-col {
    display: none !important;
  }
  table.schedules a {
    margin: 1px !important;
  }
  .dp-table-wrap,
  .dp-panel .dp-table-wrap,
  .dp-form-panel .dp-table-wrap {
    overflow-x: visible !important;
  }


  /* Navigation polish pass: compact logo, icons, connection card alignment. */
  .dp-menu-brand {
    padding: 14px 12px 12px 12px !important;
    border-bottom: 1px solid #e7edf1;
  }
  .dp-menu-logo {
    display: block;
    width: 152px;
    max-width: 100%;
    height: auto;
    margin: 0 0 8px 0 !important;
  }
  .dp-menu-product {
    display: block;
    color: #00344a;
    font-family: "Hanken Grotesk", Arial, sans-serif;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }
  .dp-auth-card {
    margin: 10px 10px 12px 10px !important;
    padding: 9px 9px !important;
  }
  .dp-auth-row {
    align-items: flex-start !important;
    gap: 7px !important;
  }
  .dp-auth-row > span:last-child,
  .dp-auth-copy {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
  }
  .dp-auth-dot {
    margin-top: 4px;
  }
  .dp-auth-title,
  .dp-auth-subtitle {
    text-align: left;
  }
  .dp-menu-item {
    display: flex !important;
    align-items: center;
    gap: 9px;
    min-height: 28px;
    border-radius: 8px;
    margin: 1px 8px !important;
    padding: 6px 8px !important;
    border-left: 0 !important;
  }
  .dp-menu-item i {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    color: #6a7b84;
    font-size: 15px;
  }
  .dp-menu-item span {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.15;
  }
  .dp-menu-item:hover,
  .dp-menu-item.active {
    background: #edf6fb !important;
    color: #00344a !important;
  }
  .dp-menu-item:hover i,
  .dp-menu-item.active i {
    color: #0096cf;
  }

  /* Schedule action buttons: modern compact icon cluster, centered. */
  table.schedules th:last-child,
  table.schedules td:last-child {
    width: 92px !important;
    text-align: center !important;
  }
  .dp-schedule-actions {
    text-align: center !important;
    white-space: nowrap !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .dp-schedule-actions .dp-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0 1px !important;
    border-radius: 5px;
    color: #53636c !important;
    text-decoration: none !important;
    vertical-align: middle;
  }
  .dp-schedule-actions .dp-action-icon:hover {
    background: #edf6fb;
    color: #0096cf !important;
  }
  .dp-schedule-actions .dp-action-icon i {
    font-size: 12px;
    line-height: 1;
  }



/* Coherence pass: uniform card rhythm, clearer nav, and safer form/table spacing. */
:root {
  --dp-menu-bg: #f3f7fa;
  --dp-menu-item-bg: #ffffff;
  --dp-menu-item-hover: #e6f2f9;
  --dp-card-max: 1500px;
}
#dp-menu {
  background: var(--dp-menu-bg) !important;
  border-right-color: #d9e5ec !important;
}
.dp-menu-brand {
  background: var(--dp-menu-bg) !important;
}
.dp-menu-item {
  background: transparent !important;
  color: #00344a !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  margin: 2px 8px !important;
  padding: 7px 9px !important;
}
.dp-menu-item i {
  color: #526873 !important;
}
.dp-menu-item:hover,
.dp-menu-item.active {
  background: var(--dp-menu-item-hover) !important;
  border-color: #d3e7f1 !important;
}
.dp-menu-item:hover i,
.dp-menu-item.active i {
  color: #0096cf !important;
}
#content .dp-shell,
#content .dp-form-shell,
.dp-shell,
.dp-form-shell {
  max-width: var(--dp-card-max) !important;
}
#content .dp-panel,
#content .dp-form-panel,
#content .content1,
.dp-panel,
.dp-form-panel,
.content1 {
  padding: 28px !important;
}
.dp-form-header,
.dp-page-header {
  padding-bottom: 22px !important;
  margin-bottom: 26px !important;
}
.dp-form-content {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  box-sizing: border-box;
}
.dp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  align-items: end;
  width: 100%;
  box-sizing: border-box;
}
.dp-form-grid.dp-form-grid-3 {
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, 0.75fr) minmax(180px, 0.75fr);
}
.dp-field {
  min-width: 0;
  margin: 0 !important;
}
.dp-field label,
.dp-field-label {
  display: block;
  margin: 0 0 6px 0 !important;
  font-size: 15px;
  font-weight: 500;
  color: #0f2533;
}
.dp-field input[type="text"],
.dp-field input[type="email"],
.dp-field input[type="password"],
.dp-field input[type="date"],
.dp-field input[type="number"],
.dp-field select,
.dp-field textarea {
  margin: 0 !important;
  width: 95% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.dp-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 26px 0 0 0 !important;
  clear: both;
}
.dp-inline-action-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  max-width: 900px;
}
.dp-inline-action-row .dp-action-row {
  margin: 0 !important;
}
.dp-inline-action-row .dp-button,
.dp-inline-action-row .smbutn,
.dp-inline-action-row .butn,
.dp-inline-action-row .cta-pink {
  margin: 0 !important;
  white-space: nowrap;
}
.dp-cms-user-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dp-cms-user-feedback {
  font-weight: 700;
  line-height: 1.3;
}
.dp-cms-user-feedback.is-success {
  color: var(--dp-blue, #0096cf);
}
.dp-cms-user-feedback.is-error {
  color: var(--dp-pink, #e23d64);
}
html[data-dp-theme="dark"] .dp-cms-user-feedback.is-success {
  color: #53c8f0 !important;
}
html[data-dp-theme="dark"] .dp-cms-user-feedback.is-error {
  color: #ff6f91 !important;
}
.dp-cms-table-feedback {
  margin: 0 0 12px 0 !important;
  font-weight: 800;
  line-height: 1.3;
}
.dp-cms-table-feedback.is-success {
  color: var(--dp-blue, #0096cf);
}
.dp-cms-table-feedback.is-error {
  color: var(--dp-pink, #e23d64);
}
html[data-dp-theme="dark"] .dp-cms-table-feedback.is-success {
  color: #53c8f0 !important;
}
html[data-dp-theme="dark"] .dp-cms-table-feedback.is-error {
  color: #ff6f91 !important;
}
.dp-account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px 0 !important;
}
.dp-account-summary > div {
  border: 1px solid var(--dp-border, #c9d4dc);
  border-radius: 8px;
  background: var(--dp-soft, #f4f8fa);
  padding: 14px 16px;
}
.dp-account-summary span,
.dp-account-summary strong {
  display: block;
}
.dp-account-summary span {
  color: var(--dp-muted, #667680);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.dp-account-summary strong {
  color: var(--dp-navy, #00344a);
  font-size: 18px;
  line-height: 1.25;
  margin-top: 4px;
  word-break: break-word;
}
.dp-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.dp-stat-card span,
.dp-stat-card strong {
  display: block;
}
.dp-stat-card strong {
  font-size: 24px;
  line-height: 1;
  color: var(--dp-navy, #00344a);
}
.dp-row-action-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dp-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #b8c6ce;
  border-radius: 8px;
  background: #fff;
  color: #00344a;
  cursor: pointer;
}
.dp-icon-button:hover {
  border-color: var(--dp-blue, #0096cf);
  color: var(--dp-blue, #0096cf);
}
.dp-icon-button-danger:hover {
  border-color: var(--dp-pink, #e23d64);
  color: var(--dp-pink, #e23d64);
}
.dp-collapsible-section {
  border: 1px solid #c9d4dc;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.dp-collapsible-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  color: #00344a;
  font-weight: 800;
  list-style: none;
}
.dp-collapsible-section summary::-webkit-details-marker {
  display: none;
}
.dp-collapsible-section summary::before {
  content: "\f054";
  font-family: FontAwesome;
  color: var(--dp-blue, #0096cf);
  width: 16px;
  flex: 0 0 16px;
}
.dp-collapsible-section[open] summary::before {
  content: "\f078";
}
.dp-collapsible-section summary span {
  flex: 1 1 auto;
}
.dp-collapsible-section summary strong {
  color: #667680;
  font-size: 14px;
}
.dp-collapsible-section .dp-table,
.dp-collapsible-section .dp-empty-state {
  margin: 0;
}
.dp-collapsible-section .dp-table {
  border-top: 1px solid #e3ebf0;
}
.dp-modal-backdrop[hidden] {
  display: none !important;
}
.dp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 20, 30, 0.48);
}
.dp-modal {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #c9d4dc;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 52, 74, 0.22);
  padding: 24px;
}
.dp-modal form {
  gap: 14px;
}
.dp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c9d4dc;
  border-radius: 999px;
  background: #fff;
  color: #00344a;
  cursor: pointer;
}
.dp-modal-close:hover {
  border-color: var(--dp-pink, #e23d64);
  color: var(--dp-pink, #e23d64);
}
html[data-dp-theme="dark"] .dp-stat-card strong {
  color: #e5f0f5 !important;
}
html[data-dp-theme="dark"] .dp-account-summary > div {
  background: var(--dp-surface-2) !important;
  border-color: var(--dp-border-strong) !important;
}
html[data-dp-theme="dark"] .dp-account-summary span {
  color: var(--dp-text-muted) !important;
}
html[data-dp-theme="dark"] .dp-account-summary strong {
  color: var(--dp-text-strong) !important;
}
html[data-dp-theme="dark"] .dp-icon-button,
html[data-dp-theme="dark"] .dp-modal,
html[data-dp-theme="dark"] .dp-modal-close {
  background: #102630 !important;
  border-color: #365462 !important;
  color: #d9e6ed !important;
}
html[data-dp-theme="dark"] .dp-icon-button:hover,
html[data-dp-theme="dark"] .dp-modal-close:hover {
  border-color: #53c8f0 !important;
  color: #53c8f0 !important;
}
html[data-dp-theme="dark"] .dp-icon-button-danger:hover {
  border-color: #ff6f91 !important;
  color: #ff6f91 !important;
}
html[data-dp-theme="dark"] .dp-modal-backdrop {
  background: rgba(0, 0, 0, 0.68);
}
html[data-dp-theme="dark"] .dp-collapsible-section {
  background: #102630 !important;
  border-color: #365462 !important;
}
html[data-dp-theme="dark"] .dp-collapsible-section summary {
  color: #d9e6ed !important;
}
html[data-dp-theme="dark"] .dp-collapsible-section summary strong {
  color: #98acb6 !important;
}
html[data-dp-theme="dark"] .dp-collapsible-section .dp-table {
  border-top-color: #365462;
}
.dp-login-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
}
.dp-login-panel {
  width: min(620px, calc(100vw - 40px));
  margin: 40px auto !important;
}
.dp-login-header {
  align-items: center;
}
.dp-login-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}
.dp-login-logo {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 136px !important;
  max-width: 28% !important;
  height: auto !important;
  flex: 0 0 auto;
}
.dp-login-panel .dp-button {
  margin-top: 12px !important;
}
html[data-dp-theme="dark"] .dp-login-logo {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.dp-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.dp-password-row .dp-button-secondary {
  white-space: nowrap;
  margin: 4px 0 12px 0 !important;
}
.dp-meta-connection-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-weight: 800;
  line-height: 1.2;
  margin-left: 8px !important;
}
.dp-meta-connection-status.is-loading {
  color: var(--dp-muted, #667680);
}
.dp-meta-connection-status.is-success {
  color: var(--dp-blue, #0096cf);
}
.dp-meta-connection-status.is-error {
  color: var(--dp-pink, #e23d64);
}
html[data-dp-theme="dark"] .dp-meta-connection-status.is-loading {
  color: #98acb6 !important;
}
html[data-dp-theme="dark"] .dp-meta-connection-status.is-success {
  color: #53c8f0 !important;
}
html[data-dp-theme="dark"] .dp-meta-connection-status.is-error {
  color: #ff6f91 !important;
}
@media (max-width: 640px) {
  .dp-login-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .dp-login-logo {
    max-width: 180px !important;
  }
  .dp-password-row {
    grid-template-columns: 1fr;
  }
  .dp-account-summary {
    grid-template-columns: 1fr;
  }
}
.dp-panel form,
.dp-form-panel form {
  padding-right: 0 !important;
}
.dp-panel .tox-tinymce,
.dp-form-panel .tox-tinymce,
.dp-panel .mce-tinymce,
.dp-form-panel .mce-tinymce {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 12px 0 !important;
}
.dp-two-list-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}
.dp-two-list-grid > div {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border-left: 0 !important;
}
.dp-two-list-grid table {
  width: 100% !important;
}
.profile-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}
.profile-summary-card > div {
  min-width: 0;
  margin: 0 !important;
}
.profile-edit-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 0 !important;
}
@media (max-width: 900px) {
  .dp-form-grid,
  .dp-form-grid.dp-form-grid-3,
  .dp-inline-action-row,
  .profile-summary-card,
  .dp-two-list-grid {
    grid-template-columns: 1fr;
  }
  #content .dp-panel,
  #content .dp-form-panel,
  #content .content1,
  .dp-panel,
  .dp-form-panel,
  .content1 {
    padding: 20px !important;
  }
}



  /* Profile table polish. */
  table.client_edus {
    width: 100%;
    border-collapse: collapse;
  }
  table.client_edus th,
  table.client_edus td {
    padding: 4px 6px;
    border-bottom: 1px solid #eef1f4;
    font-size: 15px;
    vertical-align: middle;
  }
  table.client_edus th {
    background: #f7f9fc;
    color: #00344a;
    font-weight: 600;
  }
  table.client_edus tr:nth-child(even) td {
    background: #fafcfe;
  }

/* Upload/Edit content page shared styles moved out of page-level <style> blocks. */
/* Digital Practice report-style form shell */
.dp-form-shell, .dp-form-shell * {
  box-sizing: border-box;
}
.dp-form-shell {
  --dp-navy: #00344a;
  --dp-pink: #e23d64;
  --dp-blue: #0096cf;
  --dp-border: #c9d4dc;
  --dp-muted: #667680;
  --dp-bg: #f7fafc;
  width: 100%;
  max-width: 1500px;
  margin: 20px auto 34px auto !important;
  padding: 0 14px;
  color: #1b2b34;
  font-family: "Hanken Grotesk", sans-serif;
  text-align: left;
}
.dp-form-shell div,
.dp-form-shell p,
.dp-form-shell h1,
.dp-form-shell h2,
.dp-form-shell h3 {
  font-family: "Hanken Grotesk", sans-serif;
}
.dp-form-panel {
  border: 1px solid var(--dp-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 52, 74, 0.10), 0 1px 0 rgba(0, 52, 74, 0.08);
  padding: 28px;
  overflow: hidden;
}
.dp-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  margin: 0 0 26px 0 !important;
  border-bottom: 1px solid var(--dp-border);
}
.dp-form-header img {
  width: 150px;
  max-width: 28%;
  height: auto;
  margin: 0 !important;
}
.dp-form-title {
  color: var(--dp-navy);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 !important;
}
.dp-form-subtitle {
  color: var(--dp-muted);
  font-size: 15px;
  line-height: 1.45;
  max-width: 650px;
  margin: 8px 0 0 0 !important;
}
.dp-form-shell input[type="text"],
.dp-form-shell input[type="date"],
.dp-form-shell select,
.dp-form-shell textarea {
  border: 1px solid #b8c6ce;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #1b2b34;
  box-shadow: inset 0 1px 2px rgba(0, 52, 74, 0.04);
}
.dp-form-shell textarea {
  width: 100%;
  max-width: 100%;
}
.dp-form-shell input[type="file"] {
  margin-top: 8px;
}
.dp-form-shell .smbutn,
.dp-form-shell .butn {
  border-radius: 10px !important;
  box-shadow: none !important;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.dp-form-shell .smbutn:hover,
.dp-form-shell .butn:hover {
  transform: translateY(-1px);
}
.dp-form-actions {
  clear: both;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0 0 !important;
}
.dp-form-actions input,
.dp-form-actions .smbutn {
  float: none !important;
  margin: 0 !important;
}
.dp-form-option {
  margin-left: auto;
  color: var(--dp-muted);
  font-size: 15px;
}
.dp-form-shell #loader {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
}
.dp-inline-loader {
  display: none;
  align-items: center;
  gap: 9px;
  color: var(--dp-navy);
  font-size: 15px;
  font-weight: 700;
  min-height: 34px;
}
.dp-loader-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e7edf1;
  border-top-color: var(--dp-pink);
  border-radius: 50%;
  display: inline-block;
  animation: dpSpin 0.8s linear infinite;
}
@keyframes dpSpin {
  to { transform: rotate(360deg); }
}
.dp-form-deactivate {
  clear: both;
  margin: 18px 0 0 0 !important;
  padding: 12px 14px;
  border: 1px solid var(--dp-border);
  border-radius: 12px;
  background: var(--dp-bg);
  color: var(--dp-muted);
  font-size: 15px;
}
@media (max-width: 900px) {
  .dp-form-panel {
    padding: 20px;
  }
  .dp-form-header {
    display: block;
  }
  .dp-form-header img {
    margin-top: 16px !important;
    max-width: 180px;
  }
  .dp-form-option {
    margin-left: 0;
    width: 100%;
  }
}



/* Coherence alignment override */
.dp-form-shell { max-width: 1500px !important; margin: 20px auto 34px auto !important; padding: 0 14px !important; }
.dp-form-panel { padding: 28px !important; }
.dp-form-header { padding-bottom: 22px !important; margin-bottom: 26px !important; }
.dp-form-panel .tox-tinymce, .dp-form-panel .mce-tinymce { width: 100% !important; max-width: 100% !important; margin-right: 0 !important; }


/* Upload / edit content page consistency pass */
.dp-form-shell {
  max-width: var(--dp-card-max, 1500px) !important;
  margin: 24px auto 40px auto !important;
  padding: 0 16px !important;
}
.dp-form-panel {
  padding: 28px !important;
  border-radius: 24px !important;
}
.dp-form-header {
  padding-bottom: 22px !important;
  margin-bottom: 26px !important;
}
.dp-form-header img:not(.dp-login-logo) {
  display: none !important;
}
.dp-form-panel > form > div[style*="width:100%"] {
  display: grid !important;
  grid-template-columns: minmax(270px, 0.72fr) minmax(420px, 1.28fr);
  gap: 24px 32px;
  align-items: start;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  box-sizing: border-box;
}
.dp-form-panel > form > div[style*="width:100%"] > div:nth-child(1),
.dp-form-panel > form > div[style*="width:100%"] > div:nth-child(2) {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}
.dp-form-panel > form > div[style*="width:100%"] > div:nth-child(n+3) {
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.dp-form-panel > form > div[style*="width:100%"] > div:nth-child(2) > div {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 14px 0 !important;
  box-sizing: border-box;
}
.dp-form-panel input[type="text"],
.dp-form-panel input[type="date"],
.dp-form-panel select,
.dp-form-panel textarea {
  width: 95% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.dp-form-panel #tags,
.dp-form-panel #link,
.dp-form-panel #video_title,
.dp-form-panel #bespoke_practice,
.dp-form-panel #sponsor_select,
.dp-form-panel #codigo {
  width: 95% !important;
  max-width: 100% !important;
}
.dp-form-panel input[type="checkbox"] {
  width: auto !important;
  margin: 0 6px 0 0 !important;
}
.dp-form-panel input[type="file"] {
  display: block;
  margin: 8px 0 18px 0 !important;
  max-width: 95%;
}
.dp-form-panel #uploadPreview,
.dp-form-panel #videoThumbPreview {
  display: block;
  width: min(200px, 95%) !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 8px 0 10px 0 !important;
  object-fit: contain;
}
.dp-form-panel #uploadVideoPreview {
  display: block;
  width: 95% !important;
  max-width: 520px !important;
  max-height: 360px !important;
  margin: 8px 0 10px 0 !important;
  object-fit: contain;
}
.dp-form-panel .carrousel-container,
.dp-form-panel .carrousel-container-insta,
.dp-form-panel .video-container,
.dp-form-panel .instagramData,
.dp-form-panel #instagramDataContainer {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.dp-form-panel .carrousel-container > div,
.dp-form-panel .carrousel-container-insta > div,
.dp-form-panel .video-container > div {
  height: min(520px, 62vh) !important;
  gap: 14px;
}
.dp-form-panel .drag-n-drop,
.dp-form-panel .drag-n-drop-insta {
  gap: 10px !important;
}
.dp-form-panel textarea.postText {
  width: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
  box-sizing: border-box;
}
.dp-form-panel .tox-tinymce,
.dp-form-panel .mce-tinymce {
  width: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
  margin: 0 12px 18px 0 !important;
  box-sizing: border-box;
}
.dp-form-actions {
  margin-top: 24px !important;
}
.dp-form-deactivate {
  margin-top: 18px !important;
}
@media (max-width: 1000px) {
  .dp-form-panel > form > div[style*="width:100%"] {
    grid-template-columns: 1fr;
  }
  .dp-form-panel .carrousel-container > div,
  .dp-form-panel .carrousel-container-insta > div,
  .dp-form-panel .video-container > div {
    height: auto !important;
    min-height: 420px;
  }
}


/* Upload/Edit pages previously had their own form shell sizing which made them
   wider than the rest of the card UI. Force them back onto the shared page
   rhythm used by the other screens. */
.dp-content-page-shell {
  width: calc(100% - 48px) !important;
  max-width: var(--dp-card-max, 1500px) !important;
  margin: 24px auto 40px auto !important;
  padding: 0 !important;
}
.dp-content-page-panel {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 28px !important;
}
.dp-content-page-panel .dp-form-header {
  margin-bottom: 26px !important;
}
@media (max-width: 900px) {
  .dp-content-page-shell {
    width: calc(100% - 24px) !important;
    margin-top: 16px !important;
  }
  .dp-content-page-panel {
    padding: 20px !important;
  }
}

/* ========================================================================
   Authoritative shared layout rules
   Keep these at the end of the single shared CSS file so page-level legacy
   styles cannot make Upload/Edit diverge from the rest of the CMS.
   ======================================================================== */
:root {
  --dp-menu-width: 176px;
  --dp-content-gap: 10px;
  --dp-content-left: calc(var(--dp-menu-width) + var(--dp-content-gap));
  --dp-card-max: 1500px;
}
#content.content {
  margin-left: var(--dp-content-left) !important;
  width: calc(100vw - var(--dp-content-left) - 10px) !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
#content .dp-shell,
#content .dp-form-shell,
#content .dp-content-page-shell {
  box-sizing: border-box !important;
  width: calc(100% - 48px) !important;
  max-width: var(--dp-card-max) !important;
  margin: 24px auto 40px auto !important;
  padding: 0 !important;
}
#content .dp-panel,
#content .dp-form-panel,
#content .dp-content-page-panel {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 28px !important;
  border-radius: 24px !important;
}
#content .dp-form-header,
#content .dp-page-header {
  padding-bottom: 22px !important;
  margin: 0 0 26px 0 !important;
  border-bottom: 1px solid #e7edf1 !important;
}
#content .dp-form-header > img,
#content .dp-page-header > img {
  display: none !important;
}
.dp-field input[type="text"],
.dp-field input[type="email"],
.dp-field input[type="password"],
.dp-field input[type="date"],
.dp-field input[type="number"],
.dp-field select,
.dp-field textarea,
.dp-form-panel input[type="text"],
.dp-form-panel input[type="email"],
.dp-form-panel input[type="password"],
.dp-form-panel input[type="date"],
.dp-form-panel input[type="number"],
.dp-form-panel select,
.dp-form-panel textarea {
  width: 95% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.dp-form-panel .tox-tinymce,
.dp-form-panel .mce-tinymce,
.dp-content-page-panel .tox-tinymce,
.dp-content-page-panel .mce-tinymce {
  width: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
  margin: 0 12px 18px 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 900px) {
  #content.content {
    margin-left: 40px !important;
    width: calc(100vw - 50px) !important;
  }
  #content .dp-shell,
  #content .dp-form-shell,
  #content .dp-content-page-shell {
    width: calc(100% - 24px) !important;
    margin-top: 16px !important;
  }
  #content .dp-panel,
  #content .dp-form-panel,
  #content .dp-content-page-panel {
    padding: 20px !important;
  }
}


/* ========================================================================
   Legacy div-margin neutralization
   The original CMS stylesheet gave every div a 20px margin. That made pages
   using <div class="dp-shell"> / <div class="dp-panel"> render wider and
   looser than pages using <main>/<section>. Keep the markup flexible by
   making the card system tag-agnostic and controlling spacing here.
   ======================================================================== */
#content .dp-shell,
#content div.dp-shell,
#content main.dp-shell {
  margin: 24px auto 40px auto !important;
  padding: 0 !important;
}
#content .dp-panel,
#content div.dp-panel,
#content section.dp-panel {
  margin: 0 !important;
}
#content .dp-panel div,
#content .dp-panel p,
#content .dp-panel h1,
#content .dp-panel h2,
#content .dp-panel h3,
#content .dp-panel h4,
#content .dp-panel form {
  margin-top: 0;
}
#content .dp-panel .dp-header,
#content .dp-panel .dp-form-header,
#content .dp-panel .dp-page-header {
  margin: 0 0 26px 0 !important;
}
#content .dp-panel .dp-field {
  margin: 0 0 16px 0 !important;
}
#content .dp-panel .dp-action-row,
#content .dp-panel .dp-inline-action-row {
  margin-top: 18px !important;
}
#content .dp-panel .dp-table-wrap {
  margin: 0 !important;
}
#content .dp-panel .profile-notes-card {
  margin: 16px 0 22px 0px !important;
}


/* ========================================================================
   Accessibility and alignment pass: neutral borders/focus/field/button tweaks
   Brand colors are intentionally left unchanged.
   ======================================================================== */
#content input[type="text"],
#content input[type="email"],
#content input[type="password"],
#content input[type="date"],
#content input[type="number"],
#content select,
#content textarea,
.dp-panel input[type="text"],
.dp-panel input[type="email"],
.dp-panel input[type="password"],
.dp-panel input[type="date"],
.dp-panel input[type="number"],
.dp-panel select,
.dp-panel textarea,
.dp-form-panel input[type="text"],
.dp-form-panel input[type="email"],
.dp-form-panel input[type="password"],
.dp-form-panel input[type="date"],
.dp-form-panel input[type="number"],
.dp-form-panel select,
.dp-form-panel textarea,
.dp-field input[type="text"],
.dp-field input[type="email"],
.dp-field input[type="password"],
.dp-field input[type="date"],
.dp-field input[type="number"],
.dp-field select,
.dp-field textarea {
  border-color: #b8c6ce !important;
}
#content input[type="text"]:focus,
#content input[type="email"]:focus,
#content input[type="password"]:focus,
#content input[type="date"]:focus,
#content input[type="number"]:focus,
#content select:focus,
#content textarea:focus,
.dp-field input[type="text"]:focus,
.dp-field input[type="email"]:focus,
.dp-field input[type="password"]:focus,
.dp-field input[type="date"]:focus,
.dp-field input[type="number"]:focus,
.dp-field select:focus,
.dp-field textarea:focus {
  border-color: #0096cf !important;
  outline: 2px solid rgba(0, 150, 207, 0.20);
  outline-offset: 1px;
  box-shadow: inset 0 1px 2px rgba(0, 52, 74, 0.04), 0 0 0 2px rgba(0, 150, 207, 0.10);
}
.dp-inline-action-row {
  align-items: end !important;
  column-gap: 22px !important;
}
.dp-inline-action-row .dp-action-row {
  align-self: end !important;
  margin: 0 !important;
  padding: 0 0 1px 0 !important;
  display: flex;
  align-items: center;
}
.dp-inline-action-row .dp-action-row input[type="submit"],
.dp-inline-action-row .dp-action-row button,
.dp-inline-action-row .dp-action-row .smbutn,
.dp-inline-action-row .dp-action-row .butn,
.dp-inline-action-row .dp-action-row .cta-pink {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.copy-fb-to-ig-btn,
#content .copy-fb-to-ig-btn {
  width: auto !important;
  min-width: 214px !important;
  padding: 12px 22px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: normal !important;
  vertical-align: middle !important;
}

/* Practice Profile picker alignment */
.dp-profile-picker-row {
  display: grid;
  grid-template-columns: minmax(360px, 760px) auto;
  column-gap: 24px;
  row-gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 980px;
  margin: 0 !important;
  align-content: center;
}
.dp-profile-picker-field select {
  width: 100% !important;
}
.dp-profile-picker-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px !important;
  padding: 0 !important;
  min-height: 44px;
}
.dp-profile-picker-action input[type="submit"],
.dp-profile-picker-action button,
.dp-profile-picker-action .smbutn,
.dp-profile-picker-action .butn,
.dp-profile-picker-action .cta-pink {
  margin: 0 !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dp-profile-picker-action img {
  height: 24px;
  width: 24px;
  object-fit: contain;
}
@media (max-width: 760px) {
  .dp-profile-picker-row {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================
   Mobile layout pass
   - Menu is collapsed by default on small screens and works as an overlay.
   - Content uses the full viewport width on mobile.
   - Large tables scroll horizontally inside their own container, not the page.
   ======================================================================== */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  #dp-menu {
    width: min(84vw, 248px) !important;
    max-width: 248px !important;
    transform: translateX(-100%) !important;
    box-shadow: 12px 0 30px rgba(0, 52, 74, 0.14);
    z-index: 1200;
  }

  #dp-menu:not(.collapsed),
  body.dp-menu-expanded #dp-menu {
    transform: translateX(0) !important;
  }

  #dp-menu.collapsed {
    transform: translateX(-100%) !important;
  }

  .dp-menu-toggle {
    top: 12px !important;
    left: 12px !important;
    width: 30px !important;
    height: 30px !important;
    z-index: 1300 !important;
    background: #ffffff !important;
  }

  body.dp-menu-expanded .dp-menu-toggle {
    left: min(calc(84vw + 8px), 256px) !important;
  }

  .dp-menu-brand {
    padding: 18px 16px 14px 16px !important;
  }

  .dp-menu-logo {
    width: 152px !important;
    max-width: 100% !important;
  }

  .dp-auth-card {
    margin: 12px 10px 14px 10px !important;
    padding: 12px !important;
  }

  .dp-menu-item {
    min-height: 36px !important;
    padding: 8px 14px !important;
  }

  #content.content,
  body #content.content {
    float: none !important;
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 10px 24px 10px !important;
    box-sizing: border-box !important;
  }

  #content .dp-shell,
  #content div.dp-shell,
  #content main.dp-shell,
  #content .dp-form-shell,
  #content .dp-content-page-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px auto 28px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #content .dp-panel,
  #content div.dp-panel,
  #content section.dp-panel,
  #content .dp-form-panel,
  #content .dp-content-page-panel,
  #content .content1 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 18px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #content .dp-form-header,
  #content .dp-page-header,
  #content .dp-header {
    display: block !important;
    margin-bottom: 18px !important;
    padding-bottom: 14px !important;
  }

  .dp-title,
  #content h1 {
    font-size: 26px !important;
    line-height: 1.15 !important;
  }

  .dp-subtitle,
  #content .dp-form-subtitle,
  #content .dp-page-subtitle {
    font-size: 15px !important;
    line-height: 1.35 !important;
  }

  .dp-form-content,
  .dp-page-body,
  #content .dp-panel > form {
    padding: 0 !important;
    margin: 0 !important;
  }

  .dp-form-grid,
  .dp-form-grid.dp-form-grid-3,
  .dp-inline-action-row,
  .dp-profile-picker-row,
  .profile-overview-grid,
  .profile-lists-grid,
  .dp-two-list-grid,
  .profile-summary-card {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 100% !important;
  }

  .dp-field,
  .dp-field-wide,
  .dp-action-row,
  .dp-profile-picker-action,
  #content .dp-panel .dp-field,
  #content .dp-panel .dp-action-row {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .dp-field input[type="text"],
  .dp-field input[type="email"],
  .dp-field input[type="password"],
  .dp-field input[type="date"],
  .dp-field input[type="number"],
  .dp-field select,
  .dp-field textarea,
  #content input[type="text"],
  #content input[type="email"],
  #content input[type="password"],
  #content input[type="date"],
  #content input[type="number"],
  #content select,
  #content textarea {
    width: 100% !important;
    max-width: 100% !important;
  }

  .dp-profile-picker-action input[type="submit"],
  .dp-profile-picker-action button,
  .dp-action-row input[type="submit"],
  .dp-action-row button,
  .dp-button,
  .smbutn,
  .butn,
  .cta-pink {
    width: auto !important;
    max-width: 100% !important;
  }

  .copy-fb-to-ig-btn,
  #content .copy-fb-to-ig-btn {
    width: 100% !important;
    min-width: 0 !important;
  }

  .dp-table-wrap,
  #content .dp-table-wrap,
  .profile-table-scroll,
  #content .profile-table-scroll {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  .dp-table-wrap table,
  .dp-table-wrap table.schedules,
  #content .dp-table-wrap table,
  #content table.schedules,
  #content #mytable,
  #content #mytable2 {
    min-width: 840px !important;
    width: max-content !important;
    table-layout: auto !important;
    white-space: nowrap;
  }

  .profile-table-scroll table.profile-schedule-table {
    min-width: 560px !important;
  }

  .profile-table-scroll table.profile-content-table {
    min-width: 640px !important;
  }

  .profile-notes-card,
  #content .dp-panel .profile-notes-card {
    margin: 16px 0 22px 0 !important;
  }

  .profile-side-stack,
  .profile-card,
  .profile-main-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .tox-tinymce,
  .mce-tinymce,
  #content .tox-tinymce,
  #content .mce-tinymce {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (min-width: 761px) {
  body:not(.dp-menu-expanded) #dp-menu:not(.collapsed) {
    transform: translateX(0) !important;
  }
}

/* ========================================================================
   Upload/Edit content refinement pass
   - Keep compact global card rhythm.
   - Make narrow controls narrow instead of stretching across wide columns.
   - Keep preview/editor areas inside panel padding.
   ======================================================================== */
.dp-content-page-panel > form > div[style*="width:100%"] {
  grid-template-columns: minmax(320px, 0.82fr) minmax(480px, 1.18fr) !important;
  gap: 22px 34px !important;
}
.dp-content-page-panel #post_style {
  width: 180px !important;
  max-width: 180px !important;
}
.dp-content-page-panel input[type="date"] {
  width: 190px !important;
  max-width: 190px !important;
}
.dp-content-page-panel #code_prefix_cliedu,
.dp-content-page-panel #code_prefix_funny,
.dp-content-page-panel #codigo {
  width: 180px !important;
  max-width: 180px !important;
}
.dp-content-page-panel #content_type,
.dp-content-page-panel #lang1,
.dp-content-page-panel select[name="language"] {
  width: min(95%, 420px) !important;
}
.dp-content-page-panel #title,
.dp-content-page-panel input[name="title"] {
  width: min(95%, 520px) !important;
}
.dp-content-page-panel #tags,
.dp-content-page-panel #link,
.dp-content-page-panel #video_title,
.dp-content-page-panel #bespoke_practice,
.dp-content-page-panel #sponsor_select {
  width: min(95%, 520px) !important;
}
.dp-code-help {
  display: block;
  color: var(--dp-muted);
  font-size: 15px;
  line-height: 1.35;
  margin: 4px 0 8px 0 !important;
}
.dp-content-page-panel .tox-tinymce,
.dp-content-page-panel .mce-tinymce,
.dp-content-page-panel textarea.postText {
  width: calc(100% - 18px) !important;
  max-width: calc(100% - 18px) !important;
  margin-right: 18px !important;
}
.dp-result-media video {
  width: auto !important;
  max-width: 100% !important;
  max-height: min(620px, 72vh) !important;
}
@media (max-width: 1000px) {
  .dp-content-page-panel > form > div[style*="width:100%"] {
    grid-template-columns: 1fr !important;
  }
  .dp-content-page-panel #post_style,
  .dp-content-page-panel input[type="date"],
  .dp-content-page-panel #code_prefix_cliedu,
  .dp-content-page-panel #code_prefix_funny,
  .dp-content-page-panel #codigo,
  .dp-content-page-panel #content_type,
  .dp-content-page-panel #lang1,
  .dp-content-page-panel select[name="language"],
  .dp-content-page-panel #title,
  .dp-content-page-panel input[name="title"],
  .dp-content-page-panel #tags,
  .dp-content-page-panel #link,
  .dp-content-page-panel #video_title,
  .dp-content-page-panel #bespoke_practice,
  .dp-content-page-panel #sponsor_select {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* ========================================================================
   Layout overflow hardening and practice-group alignment pass
   ======================================================================== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

#content,
.content {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.dp-shell,
div.dp-shell,
main.dp-shell {
  min-width: 0;
  max-width: 1500px !important;
  width: min(1500px, calc(100vw - var(--dp-menu-space, 220px) - 32px)) !important;
  overflow-x: visible;
}

.dp-panel,
div.dp-panel,
section.dp-panel,
.dp-form-content,
.dp-form-grid,
.dp-content-page-panel,
.dp-content-page-shell {
  min-width: 0;
  max-width: 100%;
}

.dp-panel {
  overflow-x: clip;
}

.dp-table-wrap,
.dp-responsive-table,
.profile-table-scroll,
.dp-content-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Practice Groups uses the same picker alignment pattern as Practice Profile. */
.dp-group-picker-row {
  display: grid;
  grid-template-columns: minmax(320px, 760px) auto;
  column-gap: 24px;
  row-gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 980px;
  margin: 0 !important;
  align-content: center;
}

.dp-group-picker-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px !important;
  padding: 0 !important;
  min-height: 44px;
}

.dp-group-form-card {
  margin-top: 22px !important;
  padding: 20px 22px !important;
  border: 1px solid var(--dp-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 52, 74, 0.06);
  max-width: 980px;
}

.dp-group-edit-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(180px, 260px);
  gap: 18px 24px;
  align-items: end;
  margin: 18px 0 18px 0 !important;
}

.dp-group-add-row {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  column-gap: 24px;
  row-gap: 14px;
  align-items: center;
  max-width: 760px;
  margin: 20px 0 22px 0 !important;
}

.dp-group-add-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px !important;
  padding: 0 !important;
  min-height: 44px;
}

.dp-group-list-card {
  margin-top: 22px !important;
}

@media (max-width: 760px) {
  .dp-shell,
  div.dp-shell,
  main.dp-shell {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .dp-group-picker-row,
  .dp-group-edit-grid,
  .dp-group-add-row {
    grid-template-columns: 1fr;
  }

  .dp-group-picker-action,
  .dp-group-add-row,
  .dp-group-add-action {
    align-items: stretch;
  }

  .dp-group-add-action {
    margin-top: 0 !important;
  }
}

.dp-readonly-pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--dp-border);
  border-radius: 9px;
  background: var(--dp-soft);
  color: var(--dp-navy);
  font-weight: 600;
}


/* Final viewport-width guard: content should never force page-level horizontal scroll. */
body > #content.content,
#content.content {
  width: auto !important;
  max-width: none !important;
  margin-left: var(--dp-content-left) !important;
  margin-right: 10px !important;
  float: none !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}
@media (max-width: 760px) {
  body > #content.content,
  #content.content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
}

/* ========================================================================
   UI cleanup pass: distribution widths, practice cards, upload/editor polish,
   tablet/mobile viewport and reports link styling.
   ======================================================================== */

/* Prevent tiny page-level horizontal scroll while preserving table-local scroll. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}
#content.content {
  max-width: 100% !important;
  overflow-x: clip !important;
}
#content .dp-shell,
#content div.dp-shell,
#content main.dp-shell,
#content .dp-form-shell,
#content .dp-content-page-shell {
  width: 100% !important;
  max-width: min(var(--dp-card-max, 1500px), 100%) !important;
  box-sizing: border-box !important;
}
#content .dp-panel,
#content div.dp-panel,
#content section.dp-panel,
#content .dp-form-panel,
#content .dp-content-page-panel {
  max-width: 100% !important;
  overflow-x: hidden !important;
}
#content .dp-table-wrap,
#content .dp-responsive-table,
#content .dp-content-table-scroll,
#content .profile-table-scroll {
  overflow-x: auto !important;
  overflow-y: auto;
}
#content img,
#content video,
#content iframe {
  max-width: 100%;
}

/* Content Distribution: give cramped columns enough room and keep filter actions aligned. */
.table-filters {
  grid-template-columns: minmax(150px, 220px) minmax(190px, 260px) minmax(190px, 270px) minmax(110px, 150px) minmax(150px, 210px) auto !important;
  align-items: end !important;
}
.table-filters .filter-actions,
.filter-actions {
  align-self: end !important;
  align-items: end !important;
  padding-bottom: 0 !important;
}
#mytable #id,
#mytable th#id,
#mytable td:nth-child(2) {
  width: 70px !important;
  min-width: 70px !important;
  white-space: nowrap !important;
}
#mytable #code,
#mytable th#code,
#mytable td:nth-child(3) {
  width: 86px !important;
  min-width: 86px !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
#mytable #type,
#mytable th#type,
#mytable td:nth-child(5) {
  width: 94px !important;
  min-width: 94px !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
#mytable th#image,
#mytable td:nth-child(1) {
  width: 86px !important;
  min-width: 86px !important;
}
#mytable th#edit,
#mytable td:last-child {
  width: 58px !important;
  min-width: 58px !important;
  text-align: center !important;
}
.media-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
}
.media-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 2px 8px;
  border: 1px solid #c9d4dc;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--dp-navy);
  background: var(--dp-soft);
}
.media-type-video { border-color: #c9e6f3; background: #edf8fc; }
.media-type-carousel { border-color: #f3ccd6; background: #fff1f5; }
.media-type-image { border-color: #d9e7dd; background: #f2faf4; }

/* Practice Setup/Editor: more modern defaults table and full-width Meta Ads card. */
.practice-setup-form,
.practice-editor-form {
  width: 100% !important;
  max-width: 1180px !important;
}
.practice-section.ad-reporting-tools,
.ad-reporting-tools {
  width: 100% !important;
  max-width: 100% !important;
}
.defaults-table {
  width: min(100%, 620px) !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
  margin-top: 10px !important;
}
.defaults-table th {
  border-bottom: 0 !important;
  color: var(--dp-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 0 10px 2px 0 !important;
}
.defaults-table td {
  background: var(--dp-soft);
  border-top: 1px solid #e3ebef;
  border-bottom: 1px solid #e3ebef;
  padding: 8px 10px !important;
  vertical-align: middle !important;
}
.defaults-table td:first-child {
  border-left: 1px solid #e3ebef;
  border-radius: 10px 0 0 10px;
  font-weight: 700;
  color: var(--dp-navy);
  min-width: 170px;
}
.defaults-table td:last-child {
  border-right: 1px solid #e3ebef;
  border-radius: 0 10px 10px 0;
}
.defaults-table input[type="number"] {
  width: 82px !important;
  min-width: 82px !important;
  margin: 0 !important;
  text-align: center;
  background: #fff;
}
.ad-status-panel,
.ad-keyword-editor,
.ad-report-module {
  border-color: var(--dp-border) !important;
  border-radius: 12px !important;
}
.ad-status-panel {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Upload/Edit content: make the long forms feel more like the practice cards. */
.dp-content-page-panel > form > div[style*="width:100%"] > div:nth-child(1),
.dp-content-page-panel > form > div[style*="width:100%"] > div:nth-child(2) {
  border: 1px solid #e3ebef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 52, 74, 0.04);
  padding: 18px 20px !important;
}
.dp-content-page-panel > form > div[style*="width:100%"] > div:nth-child(n+3) {
  margin-top: 18px !important;
}
.dp-content-page-panel label,
.dp-content-page-panel .dp-field-label {
  font-weight: 600;
  color: var(--dp-navy);
}
.dp-content-page-panel .tox-tinymce,
.dp-content-page-panel .mce-tinymce,
.dp-content-page-panel textarea.postText {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
}

/* External Reports link in menu. */
.dp-menu-external .dp-menu-external-icon {
  margin-left: auto;
  width: 12px;
  flex: 0 0 12px;
  font-size: 11px;
  color: #7b8c95 !important;
}
.dp-menu-external:hover .dp-menu-external-icon {
  color: var(--dp-blue) !important;
}

/* Tablet/mobile behavior: collapse menu earlier, avoid arrow/header overlap. */
@media (max-width: 1024px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  #dp-menu {
    width: min(84vw, 248px) !important;
    max-width: 248px !important;
    transform: translateX(-100%) !important;
    box-shadow: 12px 0 30px rgba(0, 52, 74, 0.14);
    z-index: 1200;
  }

  #dp-menu:not(.collapsed),
  body.dp-menu-expanded #dp-menu {
    transform: translateX(0) !important;
  }

  #dp-menu.collapsed {
    transform: translateX(-100%) !important;
  }

  .dp-menu-toggle {
    top: 12px !important;
    left: 12px !important;
    width: 30px !important;
    height: 30px !important;
    z-index: 1300 !important;
    background: #ffffff !important;
  }

  body.dp-menu-expanded .dp-menu-toggle {
    left: min(calc(84vw + 8px), 256px) !important;
  }

  #content.content,
  body #content.content {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 50px 10px 24px 10px !important;
    box-sizing: border-box !important;
  }

  #content .dp-shell,
  #content div.dp-shell,
  #content main.dp-shell,
  #content .dp-form-shell,
  #content .dp-content-page-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 28px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .dp-form-grid,
  .dp-form-grid.dp-form-grid-3,
  .dp-inline-action-row,
  .dp-profile-picker-row,
  .profile-overview-grid,
  .profile-lists-grid,
  .dp-two-list-grid,
  .profile-summary-card,
  .dp-group-picker-row,
  .dp-group-edit-grid,
  .dp-group-add-row,
  .table-filters {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }

  .dp-group-picker-action,
  .dp-group-add-action,
  .filter-actions {
    align-items: stretch !important;
    width: 100% !important;
  }

  .dp-table-wrap,
  #content .dp-table-wrap,
  .profile-table-scroll,
  #content .profile-table-scroll,
  .dp-content-table-scroll,
  #content .dp-content-table-scroll {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dp-table-wrap table,
  .dp-table-wrap table.schedules,
  #content .dp-table-wrap table,
  #content table.schedules,
  #content #mytable,
  #content #mytable2 {
    min-width: 840px !important;
    width: max-content !important;
    table-layout: auto !important;
    white-space: nowrap;
  }
}


/* ========================================================================
   Final layout/mobile fixes
   ======================================================================== */
@media (min-width: 761px) {
  :root {
    --dp-card-max: 1500px;
  }

  #content.content {
    max-width: calc(100vw - var(--dp-content-left, 186px) - 10px) !important;
    overflow-x: hidden !important;
  }

  #content .dp-shell,
  #content div.dp-shell,
  #content main.dp-shell,
  #content .dp-form-shell,
  #content .dp-content-page-shell,
  .dp-shell,
  div.dp-shell,
  main.dp-shell,
  .dp-form-shell,
  .dp-content-page-shell {
    width: min(var(--dp-card-max), calc(100vw - var(--dp-content-left, 186px) - 32px)) !important;
    max-width: var(--dp-card-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}

/* Keep Practice Groups using the stable picker/action alignment. */
.dp-group-picker-row {
  display: grid;
  grid-template-columns: minmax(360px, 760px) auto;
  column-gap: 24px;
  row-gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 980px;
  margin: 0 !important;
  align-content: center;
}

.dp-group-picker-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px !important;
  padding: 0 !important;
  min-height: 44px;
}

.dp-group-add-row {
  display: grid;
  grid-template-columns: minmax(360px, 760px) auto;
  column-gap: 24px;
  row-gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 980px;
  margin: 20px 0 22px 0 !important;
  align-content: center;
}

.dp-group-add-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px !important;
  padding: 0 !important;
  min-height: 44px;
}

.dp-group-picker-action .dp-button,
.dp-group-picker-action .dp-button-secondary,
.dp-group-add-action .dp-button,
.dp-group-add-action .dp-button-secondary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Practice Setup/Editor defaults table can scroll horizontally on narrow screens. */
.defaults-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Content Distribution table wrappers must keep wide columns inside the table area. */
.dp-content-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  body.dp-menu-expanded::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 52, 74, 0.12);
    z-index: 1100;
  }

  body.dp-menu-expanded #dp-menu,
  body.dp-menu-expanded .dp-menu-toggle {
    z-index: 1300 !important;
  }
}

@media (max-width: 760px) {
  .copy-fb-to-ig-btn,
  #content .copy-fb-to-ig-btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 56px) !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
  }

  .defaults-table-scroll .defaults-table {
    min-width: 520px !important;
  }

  .profile-table-scroll table.profile-schedule-table {
    min-width: 500px !important;
  }

  .profile-schedule-table th,
  .profile-schedule-table td {
    padding: 4px 5px !important;
    font-size: 14px !important;
  }

  .profile-schedule-table th:nth-child(1),
  .profile-schedule-table td:nth-child(1) { width: 44px !important; }
  .profile-schedule-table th:nth-child(2),
  .profile-schedule-table td:nth-child(2) { width: 78px !important; }
  .profile-schedule-table th:nth-child(3),
  .profile-schedule-table td:nth-child(3) { width: 78px !important; }
  .profile-schedule-table th:nth-child(4),
  .profile-schedule-table td:nth-child(4) { width: 42px !important; }
  .profile-schedule-table th:nth-child(5),
  .profile-schedule-table td:nth-child(5) { width: 76px !important; }

  .dp-content-table-scroll table,
  #content .dp-content-table-scroll table {
    min-width: 860px !important;
    width: max-content !important;
    table-layout: auto !important;
  }
}

/* Modern searchable content selectors replacing legacy jQuery Mobile selectmenus */
.dp-selector-page-title {
    margin: 18px 0 24px 0 !important;
    padding: 16px 18px !important;
    background: #f7fafc;
    border: 1px solid #dce7ee;
    border-radius: 18px;
}

.dp-selector-page-title h2 {
    margin: 0 0 6px 0 !important;
    color: #00344a;
    font-size: 22px;
    line-height: 1.25;
}

.dp-selector-page-title p {
    margin: 0 !important;
    color: #5d6b73;
    font-size: 15px;
}

.dp-modern-selector-form,
.dp-modern-selector {
    width: 100%;
}

.dp-modern-selector {
    margin: 0 0 18px 0 !important;
    padding: 16px !important;
    background: #ffffff;
    border: 1px solid #dce7ee;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 52, 74, 0.06);
    box-sizing: border-box;
}

.dp-selector-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 12px 0 !important;
}

.dp-selector-head .dp-section-title {
    margin: 0 0 4px 0 !important;
}

.dp-selector-help {
    margin: 0 !important;
    color: #63747d;
    font-size: 14px;
    line-height: 1.45;
}

.dp-selector-head-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dp-selected-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf7fc;
    border: 1px solid #b9e5f4;
    color: #00344a;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.dp-selector-toggle {
    min-height: 32px;
    padding: 5px 12px !important;
    border-radius: 999px;
    border: 1px solid #b9d8e6;
    background: #ffffff;
    color: #00344a;
    font: 800 13px "Hanken Grotesk", Arial, sans-serif;
    cursor: pointer;
}

.dp-selector-toggle:hover {
    border-color: #0096cf;
    color: #0096cf;
}

.dp-selector-search-wrap {
    margin: 0 0 8px 0 !important;
}

.dp-selector-search {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
    border: 1px solid #9fb2bd !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #17242a !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    padding: 11px 13px !important;
    min-height: 44px;
    box-shadow: none !important;
}

.dp-selector-search:focus {
    outline: 2px solid rgba(0, 150, 207, 0.22);
    border-color: #0096cf !important;
}

.dp-selector-list-summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px 0 !important;
    color: #64757d;
    font-size: 13px;
    line-height: 1.35;
}

.dp-select-list-modern {
    display: block;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    border: 1px solid #dce7ee;
    border-radius: 16px;
    background: #ffffff;
}

.dp-selector-items {
    display: block;
}

.dp-select-item {
    display: grid !important;
    grid-template-columns: 20px 44px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 58px !important;
    padding: 5px 8px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e5eef2 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff;
    cursor: pointer;
}

.dp-select-item:hover {
    background: #f7fbfd;
}

.dp-select-item.is-selected,
.dp-select-item:has(input:checked) {
    background: #f0fbff;
    box-shadow: inset 3px 0 0 #0096cf;
}

.dp-select-item input[type="checkbox"],
.dp-select-item input[type="radio"] {
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    accent-color: #e23d64;
}

.dp-select-media-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-width: 44px;
}

.dp-select-media,
.dp-select-media img {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
}

.dp-select-media {
    border: 1px solid #d6e3e9;
    background: #f6fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #00344a;
    font-weight: 800;
    font-size: 10px;
}

.dp-select-media img {
    object-fit: cover;
    display: block;
}

.dp-select-media-placeholder {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf6fb !important;
    color: #00344a !important;
    font-size: 10px !important;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.dp-select-media-video .dp-select-media-placeholder {
    border-radius: 999px !important;
    background: #00344a !important;
    color: #ffffff !important;
    font-size: 15px !important;
    letter-spacing: 0;
}

.dp-select-media-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    max-width: 54px;
    min-height: 15px;
    padding: 1px 4px;
    border-radius: 999px;
    background: #f4f8fa;
    border: 1px solid #d8e5eb;
    color: #00344a;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-select-media-type.media-type-video {
    background: #eaf7fc;
    border-color: #b9e5f4;
}

.dp-select-media-type.media-type-carousel {
    background: #fff3f6;
    border-color: #f4bfd0;
    color: #9f2543;
}

.dp-select-media-type.media-type-text {
    background: #edf6fb;
    border-color: #c4dce7;
    color: #00344a;
}

.dp-select-main {
    min-width: 0 !important;
    display: block !important;
    overflow: hidden !important;
}

.dp-select-title {
    display: block !important;
    color: #17242a !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.dp-select-meta {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin: 2px 0 0 0 !important;
}

.dp-select-tags {
    display: block !important;
    margin-top: 2px !important;
    color: #5e7078 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.dp-select-pill {
    display: inline-flex;
    align-items: center;
    min-height: 16px !important;
    padding: 0 5px !important;
    border-radius: 999px;
    background: #f4f8fa;
    border: 1px solid #d8e5eb;
    color: #00344a;
    font-size: 10px !important;
    font-weight: 700;
    line-height: 1.2 !important;
}

.dp-select-pill-instagram {
    background: #fff3f6;
    border-color: #f4bfd0;
    color: #9f2543;
}

.dp-selector-empty {
    margin: 8px 0 0 0 !important;
    padding: 14px !important;
    color: #5f6f77;
    background: #f8fafb;
    border: 1px dashed #cfdde4;
    border-radius: 14px;
    font-size: 15px;
}

.dp-selector-load-wrap {
    margin: 12px 0 0 0 !important;
    text-align: center;
}

.dp-selector-load-more {
    min-height: 38px;
    padding: 8px 14px !important;
    border-radius: 999px;
    border: 1px solid #b9d8e6;
    background: #f3fafc;
    color: #00344a;
    font: 800 13px "Hanken Grotesk", Arial, sans-serif;
    cursor: pointer;
}

.dp-selector-load-more:hover {
    border-color: #0096cf;
    color: #0096cf;
}

.dp-selector-top-actions {
    justify-content: flex-start !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
}

@media (max-width: 720px) {
    .dp-modern-selector {
        padding: 14px !important;
        border-radius: 18px;
    }

    .dp-selector-head {
        align-items: flex-start;
        gap: 10px;
    }

    .dp-selector-head-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .dp-select-item {
        grid-template-columns: 19px 42px minmax(0, 1fr) !important;
        gap: 7px !important;
        min-height: 56px !important;
        padding: 5px 7px !important;
    }

    .dp-select-media-stack {
        min-width: 42px;
    }

    .dp-select-media,
    .dp-select-media img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 7px !important;
    }

    .dp-select-media-type {
        min-width: 32px;
        font-size: 8.5px;
        padding: 1px 3px;
    }

    .dp-select-title {
        font-size: 12.5px !important;
    }

    .dp-select-tags {
        font-size: 10.5px !important;
    }
}


/* Selector collapse toggle icon-only refinement */
.dp-selector-toggle {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.dp-selector-toggle-icon {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-135deg);
    transition: transform 0.16s ease;
}

.dp-modern-selector.is-collapsed .dp-selector-toggle-icon {
    transform: rotate(45deg);
}


/* Create Form selector: make the category header row act as the collapse toggle. */
.dp-modern-selector-list .dp-selector-head[role="button"] {
    cursor: pointer;
    border-radius: 14px;
    padding: 4px 4px 4px 0 !important;
}

.dp-modern-selector-list .dp-selector-head[role="button"]:focus-visible {
    outline: 2px solid rgba(0, 150, 207, 0.32);
    outline-offset: 3px;
}

.dp-modern-selector-list .dp-selector-head[role="button"]:hover .dp-section-title {
    color: #0096cf;
}

/* ------------------------------------------------------------------------
   Lightweight motion system: subtle feedback without heavy JS.
   ------------------------------------------------------------------------ */
:root {
    --dp-motion-fast: 120ms;
    --dp-motion-normal: 180ms;
    --dp-motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dp-socialpod-loading {
    pointer-events: none;
    opacity: 0.82;
    box-shadow: 0 0 0 3px rgba(0, 150, 207, 0.14) !important;
}

.dp-socialpod-loading i {
    color: #0096cf !important;
}

.dp-selector-body.is-animating {
    overflow: hidden !important;
    transition: max-height var(--dp-motion-normal) var(--dp-motion-ease), opacity var(--dp-motion-normal) ease;
    will-change: max-height, opacity;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes dpFadeUp {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes dpSoftPulse {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(0, 150, 207, 0.18);
        }
        50% {
            box-shadow: 0 0 0 6px rgba(0, 150, 207, 0.04);
        }
    }

    #content > .dp-shell,
    #content > .dp-content-page-shell,
    #content > .dp-form-shell,
    #content .dp-panel,
    #content .dp-content-page-panel,
    #content .dp-form-panel {
        animation: dpFadeUp 220ms var(--dp-motion-ease) both;
    }

    .dp-menu-item,
    .dp-menu-toggle,
    .dp-button,
    .dp-button-secondary,
    .smbutn,
    .dp-action-icon,
    .content-distribution-edit-link,
    .dp-selector-toggle,
    .dp-selector-load-more {
        transition: transform var(--dp-motion-fast) var(--dp-motion-ease),
                    box-shadow var(--dp-motion-fast) ease,
                    background-color var(--dp-motion-fast) ease,
                    border-color var(--dp-motion-fast) ease,
                    color var(--dp-motion-fast) ease,
                    opacity var(--dp-motion-fast) ease;
    }

    .dp-button:hover,
    .dp-button-secondary:hover,
    .smbutn:hover,
    .dp-selector-load-more:hover {
        transform: translateY(-1px);
    }

    .dp-button:active,
    .dp-button-secondary:active,
    .smbutn:active,
    .dp-action-icon:active,
    .content-distribution-edit-link:active,
    .dp-selector-toggle:active,
    .dp-selector-load-more:active {
        transform: translateY(0) scale(0.98);
    }

    .dp-menu-item:hover {
        transform: translateX(2px);
    }

    .dp-action-icon:hover,
    .content-distribution-edit-link:hover,
    .dp-selector-toggle:hover {
        transform: translateY(-1px);
    }

    .dp-field input[type="text"],
    .dp-field input[type="email"],
    .dp-field input[type="password"],
    .dp-field input[type="date"],
    .dp-field input[type="number"],
    .dp-field select,
    .dp-field textarea,
    .dp-selector-search {
        transition: border-color var(--dp-motion-fast) ease,
                    box-shadow var(--dp-motion-fast) ease,
                    background-color var(--dp-motion-fast) ease;
    }

    .dp-field input:focus,
    .dp-field select:focus,
    .dp-field textarea:focus,
    .dp-selector-search:focus {
        box-shadow: 0 0 0 3px rgba(0, 150, 207, 0.12) !important;
    }

    .dp-select-item,
    .profile-schedule-table tbody tr,
    #mytable.contents tbody tr {
        transition: background-color var(--dp-motion-fast) ease,
                    box-shadow var(--dp-motion-fast) ease;
    }

    .dp-select-item:hover,
    .profile-schedule-table tbody tr:hover,
    #mytable.contents tbody tr:hover {
        background-color: #f7fbfd !important;
    }

    .dp-socialpod-loading {
        animation: dpSoftPulse 900ms ease-in-out infinite;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* ========================================================================
   Cookie-backed light/dark theme support
   ======================================================================== */
:root {
  --dp-theme-transition: 160ms ease;
}

html[data-dp-theme="dark"] {
  color-scheme: dark;
  --dp-page-bg: #07161d;
  --dp-surface: #0f2029;
  --dp-surface-2: #142a35;
  --dp-surface-3: #183440;
  --dp-border-dark: #284653;
  --dp-border-soft-dark: #1f3a46;
  --dp-text: #d9e8ee;
  --dp-text-strong: #f4fbfd;
  --dp-text-muted: #9fb4be;
  --dp-soft-dark: #102631;
  --dp-hover-dark: #17323e;
  --dp-focus-dark: rgba(0, 150, 207, 0.28);
}

.dp-theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 24px);
  margin: 10px 12px 14px 12px !important;
  padding: 9px 12px !important;
  border: 1px solid #d6e2e9;
  border-radius: 14px;
  background: #ffffff;
  color: #00344a;
  font-family: "Hanken Grotesk", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: background-color var(--dp-theme-transition),
              border-color var(--dp-theme-transition),
              color var(--dp-theme-transition),
              transform var(--dp-theme-transition),
              box-shadow var(--dp-theme-transition);
}

.dp-theme-toggle:hover {
  background: #f4f9fb;
  border-color: #add3e2;
  transform: translateY(-1px);
}

.dp-theme-toggle:active {
  transform: translateY(0) scale(0.99);
}

.dp-theme-toggle-icon {
  width: 18px;
  text-align: center;
  color: #0096cf;
}

html[data-dp-theme="dark"] body {
  background: var(--dp-page-bg) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] body,
html[data-dp-theme="dark"] div,
html[data-dp-theme="dark"] p,
html[data-dp-theme="dark"] label,
html[data-dp-theme="dark"] td,
html[data-dp-theme="dark"] li,
html[data-dp-theme="dark"] span {
  color: var(--dp-text) ;
}

html[data-dp-theme="dark"] h1,
html[data-dp-theme="dark"] h2,
html[data-dp-theme="dark"] h3,
html[data-dp-theme="dark"] h4,
html[data-dp-theme="dark"] .dp-title,
html[data-dp-theme="dark"] .dp-form-title,
html[data-dp-theme="dark"] .dp-section-title,
html[data-dp-theme="dark"] .dp-menu-product,
html[data-dp-theme="dark"] .profile-practice-name,
html[data-dp-theme="dark"] .dp-select-title,
html[data-dp-theme="dark"] .dp-form-header h1,
html[data-dp-theme="dark"] .dp-header h1 {
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] p,
html[data-dp-theme="dark"] .dp-subtitle,
html[data-dp-theme="dark"] .dp-form-subtitle,
html[data-dp-theme="dark"] .dp-selector-help,
html[data-dp-theme="dark"] .dp-select-tags,
html[data-dp-theme="dark"] .dp-selector-page-title p,
html[data-dp-theme="dark"] .profile-meta,
html[data-dp-theme="dark"] .profile-card-muted {
  color: var(--dp-text-muted) !important;
}

html[data-dp-theme="dark"] a {
  color: #6cc8ee;
}

html[data-dp-theme="dark"] #content,
html[data-dp-theme="dark"] .content {
  background: transparent !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] #dp-menu,
html[data-dp-theme="dark"] .dp-menu {
  background: #0b1a22 !important;
  border-right-color: var(--dp-border-dark) !important;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.26);
}

html[data-dp-theme="dark"] .dp-menu-brand {
  border-bottom-color: var(--dp-border-dark) !important;
}

html[data-dp-theme="dark"] .dp-auth-card,
html[data-dp-theme="dark"] .dp-theme-toggle {
  background: var(--dp-surface-2) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .dp-theme-toggle:hover {
  background: var(--dp-hover-dark) !important;
  border-color: #3b6677 !important;
}

html[data-dp-theme="dark"] .dp-auth-title,
html[data-dp-theme="dark"] .dp-auth-subtitle {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .dp-menu-item {
  color: var(--dp-text) !important;
  border-left-color: transparent;
}

html[data-dp-theme="dark"] .dp-menu-item i,
html[data-dp-theme="dark"] .dp-theme-toggle-icon {
  color: #78d4f7 !important;
}

html[data-dp-theme="dark"] .dp-menu-item:hover,
html[data-dp-theme="dark"] .dp-menu-item.active {
  background: var(--dp-hover-dark) !important;
  border-left-color: #0096cf !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .dp-menu-toggle {
  background: var(--dp-surface-2) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text-strong) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3) !important;
}

html[data-dp-theme="dark"] .dp-panel,
html[data-dp-theme="dark"] .dp-content-page-panel,
html[data-dp-theme="dark"] .dp-form-panel,
html[data-dp-theme="dark"] .dp-profile-card,
html[data-dp-theme="dark"] .profile-card,
html[data-dp-theme="dark"] .profile-notes-card,
html[data-dp-theme="dark"] .profile-list-card,
html[data-dp-theme="dark"] .dp-modern-selector,
html[data-dp-theme="dark"] .dp-selector-page-title,
html[data-dp-theme="dark"] .dp-result-card,
html[data-dp-theme="dark"] .dp-upload-card,
html[data-dp-theme="dark"] .dp-editor-card,
html[data-dp-theme="dark"] .table-filters,
html[data-dp-theme="dark"] .results-summary {
  background: var(--dp-surface) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22) !important;
}

html[data-dp-theme="dark"] .dp-form-section,
html[data-dp-theme="dark"] .dp-field,
html[data-dp-theme="dark"] .dp-select-list,
html[data-dp-theme="dark"] .dp-selector-items,
html[data-dp-theme="dark"] .profile-table-scroll,
html[data-dp-theme="dark"] .dp-table-wrap,
html[data-dp-theme="dark"] .dp-content-table-scroll {
  background: var(--dp-surface) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] input,
html[data-dp-theme="dark"] select,
html[data-dp-theme="dark"] textarea,
html[data-dp-theme="dark"] .dp-selector-search,
html[data-dp-theme="dark"] .dp-field input[type="text"],
html[data-dp-theme="dark"] .dp-field input[type="email"],
html[data-dp-theme="dark"] .dp-field input[type="password"],
html[data-dp-theme="dark"] .dp-field input[type="date"],
html[data-dp-theme="dark"] .dp-field input[type="number"],
html[data-dp-theme="dark"] .dp-field select,
html[data-dp-theme="dark"] .dp-field textarea {
  background: #0b1d25 !important;
  border-color: #375866 !important;
  color: var(--dp-text-strong) !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] input::placeholder,
html[data-dp-theme="dark"] textarea::placeholder,
html[data-dp-theme="dark"] .dp-selector-search::placeholder {
  color: #7f98a3 !important;
}

html[data-dp-theme="dark"] input:focus,
html[data-dp-theme="dark"] select:focus,
html[data-dp-theme="dark"] textarea:focus,
html[data-dp-theme="dark"] .dp-selector-search:focus {
  border-color: #0096cf !important;
  box-shadow: 0 0 0 3px var(--dp-focus-dark) !important;
  outline: none !important;
}

html[data-dp-theme="dark"] .dp-action-icon,
html[data-dp-theme="dark"] .content-distribution-edit-link,
html[data-dp-theme="dark"] .dp-selector-toggle {
  background: var(--dp-surface-2) !important;
  border-color: #3a6575 !important;
  color: var(--dp-text-strong) !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .dp-action-icon:hover,
html[data-dp-theme="dark"] .content-distribution-edit-link:hover,
html[data-dp-theme="dark"] .dp-selector-toggle:hover {
  background: var(--dp-hover-dark) !important;
  border-color: #0096cf !important;
  color: #8dddff !important;
}

html[data-dp-theme="dark"] .cta-pink,
html[data-dp-theme="dark"] .dp-button,
html[data-dp-theme="dark"] .dp-button-secondary,
html[data-dp-theme="dark"] .smbutn,
html[data-dp-theme="dark"] .butn,
html[data-dp-theme="dark"] .dp-selector-load-more {
  background: var(--dp-pink, #e23d64) !important;
  border-color: var(--dp-pink, #e23d64) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .cta-pink:hover,
html[data-dp-theme="dark"] .dp-button:hover,
html[data-dp-theme="dark"] .dp-button-secondary:hover,
html[data-dp-theme="dark"] .smbutn:hover,
html[data-dp-theme="dark"] .butn:hover,
html[data-dp-theme="dark"] .dp-selector-load-more:hover {
  background: var(--dp-blue, #0096cf) !important;
  border-color: var(--dp-blue, #0096cf) !important;
  color: #ffffff !important;
}

html[data-dp-theme="dark"] table,
html[data-dp-theme="dark"] #mytable,
html[data-dp-theme="dark"] .contents,
html[data-dp-theme="dark"] .profile-schedule-table,
html[data-dp-theme="dark"] .profile-content-table {
  background: var(--dp-surface) !important;
  color: var(--dp-text) !important;
  border-color: var(--dp-border-dark) !important;
}

html[data-dp-theme="dark"] th,
html[data-dp-theme="dark"] td,
html[data-dp-theme="dark"] #mytable th,
html[data-dp-theme="dark"] #mytable td,
html[data-dp-theme="dark"] .contents th,
html[data-dp-theme="dark"] .contents td,
html[data-dp-theme="dark"] .profile-schedule-table th,
html[data-dp-theme="dark"] .profile-schedule-table td,
html[data-dp-theme="dark"] .profile-content-table th,
html[data-dp-theme="dark"] .profile-content-table td {
  background: transparent !important;
  color: var(--dp-text) !important;
  border-color: var(--dp-border-soft-dark) !important;
}

html[data-dp-theme="dark"] th,
html[data-dp-theme="dark"] #mytable th,
html[data-dp-theme="dark"] .contents th,
html[data-dp-theme="dark"] .profile-schedule-table th,
html[data-dp-theme="dark"] .profile-content-table th {
  background: var(--dp-surface-2) !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] tr:nth-child(even),
html[data-dp-theme="dark"] #mytable tr:nth-child(even),
html[data-dp-theme="dark"] .contents tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018) !important;
}

html[data-dp-theme="dark"] tr:hover,
html[data-dp-theme="dark"] .dp-select-item:hover,
html[data-dp-theme="dark"] .profile-schedule-table tbody tr:hover,
html[data-dp-theme="dark"] #mytable.contents tbody tr:hover {
  background: var(--dp-hover-dark) !important;
}

html[data-dp-theme="dark"] .dp-select-item,
html[data-dp-theme="dark"] .dp-modern-selector-list .dp-select-item {
  background: var(--dp-surface) !important;
  border-color: var(--dp-border-soft-dark) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .dp-select-item.is-selected,
html[data-dp-theme="dark"] .dp-select-item:has(input:checked) {
  background: #0f3140 !important;
  box-shadow: inset 3px 0 0 #0096cf !important;
}

html[data-dp-theme="dark"] .dp-select-media,
html[data-dp-theme="dark"] .dp-select-media-placeholder,
html[data-dp-theme="dark"] .video-thumb-fallback {
  background: var(--dp-surface-2) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text-muted) !important;
}

html[data-dp-theme="dark"] .dp-select-media-placeholder {
  background: #173441 !important;
  color: #dcebf1 !important;
}

html[data-dp-theme="dark"] .dp-select-media-video .dp-select-media-placeholder {
  background: #00344a !important;
  color: #ffffff !important;
}

html[data-dp-theme="dark"] .dp-select-media-type {
  background: #173441 !important;
  border-color: #426a7a !important;
  color: #dcebf1 !important;
}

html[data-dp-theme="dark"] .dp-select-media-type.media-type-text {
  background: rgba(127, 216, 250, 0.14) !important;
  border-color: rgba(127, 216, 250, 0.38) !important;
  color: #d6eef8 !important;
}

html[data-dp-theme="dark"] .dp-select-pill,
html[data-dp-theme="dark"] .media-type-pill,
html[data-dp-theme="dark"] .dp-selected-count,
html[data-dp-theme="dark"] .status-pill,
html[data-dp-theme="dark"] .profile-pill {
  background: var(--dp-surface-2) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .dp-select-pill-instagram {
  background: rgba(226, 61, 100, 0.13) !important;
  border-color: rgba(226, 61, 100, 0.38) !important;
  color: #ff9db5 !important;
}

html[data-dp-theme="dark"] .dp-form-header,
html[data-dp-theme="dark"] .dp-header,
html[data-dp-theme="dark"] .profile-section-header,
html[data-dp-theme="dark"] .dp-selector-head {
  border-color: var(--dp-border-dark) !important;
}

html[data-dp-theme="dark"] hr {
  border-top-color: #e23d64 !important;
  opacity: 0.8;
}

html[data-dp-theme="dark"] .tox .tox-edit-area__iframe,
html[data-dp-theme="dark"] iframe {
  background: #ffffff;
}

html[data-dp-theme="dark"] img.dp-menu-logo,
html[data-dp-theme="dark"] .dp-form-header img,
html[data-dp-theme="dark"] .dp-menu-brand img {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .dp-theme-toggle {
    transition: none !important;
  }
}

/* ========================================================================
   Dark mode correction pass: contrast, light fallback, cards, controls, TinyMCE
   ======================================================================== */
html[data-dp-theme="light"] {
  color-scheme: light;
  --dp-page-bg: #f7fafc;
}

html[data-dp-theme="light"] body {
  background: #f7fafc !important;
  color: #17242a !important;
}

html[data-dp-theme="light"] #content,
html[data-dp-theme="light"] #content.content,
html[data-dp-theme="light"] .content {
  background: transparent !important;
}

html[data-dp-theme="light"] #dp-menu,
html[data-dp-theme="light"] .dp-menu,
html[data-dp-theme="light"] .dp-menu-brand {
  background: #f7fafc !important;
}

html[data-dp-theme="light"] input[type="checkbox"],
html[data-dp-theme="light"] input[type="radio"] {
  color-scheme: light;
  accent-color: #e23d64;
  background-color: #ffffff !important;
  border-color: #9fb2bd !important;
}

html[data-dp-theme="dark"] {
  color-scheme: dark;
  --dp-page-bg: #07151b;
  --dp-surface: #10232c;
  --dp-surface-2: #172d38;
  --dp-surface-3: #1d3945;
  --dp-border-dark: #365563;
  --dp-border-soft-dark: #294551;
  --dp-text: #c7d9e1;
  --dp-text-strong: #e4eff4;
  --dp-text-muted: #a6bac3;
  --dp-soft-dark: #10232c;
  --dp-hover-dark: #1b3540;
}

html[data-dp-theme="dark"] body,
html[data-dp-theme="dark"] #content,
html[data-dp-theme="dark"] #content.content {
  background: var(--dp-page-bg) !important;
}

html[data-dp-theme="dark"] body,
html[data-dp-theme="dark"] div,
html[data-dp-theme="dark"] p,
html[data-dp-theme="dark"] label,
html[data-dp-theme="dark"] td,
html[data-dp-theme="dark"] li,
html[data-dp-theme="dark"] span {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] h1,
html[data-dp-theme="dark"] h2,
html[data-dp-theme="dark"] h3,
html[data-dp-theme="dark"] h4,
html[data-dp-theme="dark"] .dp-title,
html[data-dp-theme="dark"] .dp-form-title,
html[data-dp-theme="dark"] .dp-section-title,
html[data-dp-theme="dark"] .dp-menu-product,
html[data-dp-theme="dark"] .profile-practice-name,
html[data-dp-theme="dark"] .dp-select-title,
html[data-dp-theme="dark"] .dp-form-header h1,
html[data-dp-theme="dark"] .dp-header h1 {
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] #dp-menu,
html[data-dp-theme="dark"] .dp-menu,
html[data-dp-theme="dark"] .dp-menu-brand {
  background: #0b1a22 !important;
}

html[data-dp-theme="dark"] .dp-menu-brand {
  border-bottom-color: var(--dp-border-dark) !important;
}

html[data-dp-theme="dark"] .dp-menu-logo {
  background: transparent !important;
}

html[data-dp-theme="dark"] .dp-auth-card,
html[data-dp-theme="dark"] .dp-theme-toggle,
html[data-dp-theme="dark"] .dp-menu-item {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .dp-panel,
html[data-dp-theme="dark"] .dp-content-page-panel,
html[data-dp-theme="dark"] .dp-form-panel,
html[data-dp-theme="dark"] .content1,
html[data-dp-theme="dark"] .dp-form-content,
html[data-dp-theme="dark"] .dp-profile-card,
html[data-dp-theme="dark"] .profile-card,
html[data-dp-theme="dark"] .profile-notes-card,
html[data-dp-theme="dark"] .profile-list-card,
html[data-dp-theme="dark"] .dp-modern-selector,
html[data-dp-theme="dark"] .dp-selector-page-title,
html[data-dp-theme="dark"] .dp-result-card,
html[data-dp-theme="dark"] .dp-upload-card,
html[data-dp-theme="dark"] .dp-editor-card,
html[data-dp-theme="dark"] .table-filters,
html[data-dp-theme="dark"] .results-summary,
html[data-dp-theme="dark"] .practice-section,
html[data-dp-theme="dark"] .ad-reporting-tools,
html[data-dp-theme="dark"] .ad-keyword-editor,
html[data-dp-theme="dark"] .ad-report-module,
html[data-dp-theme="dark"] .ad-status-panel,
html[data-dp-theme="dark"] .ad-status-card,
html[data-dp-theme="dark"] .dp-group-form-card,
html[data-dp-theme="dark"] .dp-group-list-card,
html[data-dp-theme="dark"] .dp-readonly-pill,
html[data-dp-theme="dark"] .defaults-table td,
html[data-dp-theme="dark"] .dp-content-page-panel > form > div[style*="width:100%"] > div:nth-child(1),
html[data-dp-theme="dark"] .dp-content-page-panel > form > div[style*="width:100%"] > div:nth-child(2) {
  background: var(--dp-surface) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22) !important;
}

html[data-dp-theme="dark"] .dp-form-section,
html[data-dp-theme="dark"] .dp-field,
html[data-dp-theme="dark"] .form-grid,
html[data-dp-theme="dark"] .practice-field,
html[data-dp-theme="dark"] .dp-select-list,
html[data-dp-theme="dark"] .dp-selector-items,
html[data-dp-theme="dark"] .profile-table-scroll,
html[data-dp-theme="dark"] .dp-table-wrap,
html[data-dp-theme="dark"] .dp-content-table-scroll {
  background: transparent !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .practice-section h3,
html[data-dp-theme="dark"] .ad-module-title,
html[data-dp-theme="dark"] .ad-status-title,
html[data-dp-theme="dark"] .defaults-table td:first-child,
html[data-dp-theme="dark"] .dp-content-page-panel label,
html[data-dp-theme="dark"] .dp-content-page-panel .dp-field-label,
html[data-dp-theme="dark"] .practice-field label,
html[data-dp-theme="dark"] .field-note,
html[data-dp-theme="dark"] .ad-empty-state {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] input,
html[data-dp-theme="dark"] select,
html[data-dp-theme="dark"] textarea,
html[data-dp-theme="dark"] .dp-selector-search,
html[data-dp-theme="dark"] .dp-field input[type="text"],
html[data-dp-theme="dark"] .dp-field input[type="email"],
html[data-dp-theme="dark"] .dp-field input[type="password"],
html[data-dp-theme="dark"] .dp-field input[type="date"],
html[data-dp-theme="dark"] .dp-field input[type="number"],
html[data-dp-theme="dark"] .dp-field select,
html[data-dp-theme="dark"] .dp-field textarea,
html[data-dp-theme="dark"] .practice-field input[type="text"],
html[data-dp-theme="dark"] .practice-field input[type="number"],
html[data-dp-theme="dark"] .practice-field select {
  background: #0b1d25 !important;
  border-color: #63808c !important;
  color: var(--dp-text-strong) !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] input:disabled,
html[data-dp-theme="dark"] select:disabled,
html[data-dp-theme="dark"] textarea:disabled,
html[data-dp-theme="dark"] input[readonly],
html[data-dp-theme="dark"] .disabled {
  background: #172932 !important;
  border-color: #405d69 !important;
  color: #91a8b2 !important;
  opacity: 1 !important;
}

html[data-dp-theme="dark"] input[type="checkbox"],
html[data-dp-theme="dark"] input[type="radio"] {
  color-scheme: dark;
  accent-color: #e23d64;
  background-color: #0b1d25 !important;
  border-color: #86a1ac !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] input[type="file"]::file-selector-button {
  background: #e23d64 !important;
  color: #ffffff !important;
  border: 1px solid #e23d64 !important;
}

html[data-dp-theme="dark"] .dp-action-icon,
html[data-dp-theme="dark"] .content-distribution-edit-link,
html[data-dp-theme="dark"] .dp-selector-toggle {
  background: var(--dp-surface-2) !important;
  border: 1px solid #5f8090 !important;
  color: var(--dp-text-strong) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset !important;
}

html[data-dp-theme="dark"] .dp-action-icon:hover,
html[data-dp-theme="dark"] .content-distribution-edit-link:hover,
html[data-dp-theme="dark"] .dp-selector-toggle:hover {
  background: var(--dp-hover-dark) !important;
  border-color: #0096cf !important;
  color: #b9ecff !important;
}

html[data-dp-theme="dark"] .cta-pink,
html[data-dp-theme="dark"] input[type="submit"].cta-pink,
html[data-dp-theme="dark"] input[type="button"].cta-pink,
html[data-dp-theme="dark"] .dp-button,
html[data-dp-theme="dark"] .dp-button-secondary,
html[data-dp-theme="dark"] .smbutn,
html[data-dp-theme="dark"] .butn,
html[data-dp-theme="dark"] .dp-selector-load-more,
html[data-dp-theme="dark"] button:not(.dp-theme-toggle):not(.dp-action-icon):not(.dp-icon-button):not(.dp-modal-close):not(.schedule-calendar-nav):not(.schedule-calendar-preview-button):not(.schedule-calendar-preview-close) {
  background: #e23d64 !important;
  border-color: #e23d64 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .cta-pink:hover,
html[data-dp-theme="dark"] input[type="submit"].cta-pink:hover,
html[data-dp-theme="dark"] input[type="button"].cta-pink:hover,
html[data-dp-theme="dark"] .dp-button:hover,
html[data-dp-theme="dark"] .dp-button-secondary:hover,
html[data-dp-theme="dark"] .smbutn:hover,
html[data-dp-theme="dark"] .butn:hover,
html[data-dp-theme="dark"] .dp-selector-load-more:hover,
html[data-dp-theme="dark"] button:not(.dp-theme-toggle):not(.dp-action-icon):not(.dp-icon-button):not(.dp-modal-close):not(.schedule-calendar-nav):not(.schedule-calendar-preview-button):not(.schedule-calendar-preview-close):hover {
  background: #0096cf !important;
  border-color: #0096cf !important;
  color: #ffffff !important;
}

html[data-dp-theme="dark"] .logo-preview-white {
  background-color: #1c3540 !important;
}

/* TinyMCE 4 visual-only dark theme. This styles editor chrome/iframe only and does not inject saved content colours. */
html[data-dp-theme="dark"] .mce-tinymce,
html[data-dp-theme="dark"] .mce-container,
html[data-dp-theme="dark"] .mce-panel,
html[data-dp-theme="dark"] .mce-toolbar-grp,
html[data-dp-theme="dark"] .mce-menubar,
html[data-dp-theme="dark"] .mce-statusbar,
html[data-dp-theme="dark"] .mce-edit-area {
  background: #0b1d25 !important;
  border-color: #375866 !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .mce-btn,
html[data-dp-theme="dark"] .mce-btn button,
html[data-dp-theme="dark"] .mce-path-item {
  background: #132934 !important;
  border-color: #375866 !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .mce-btn:hover,
html[data-dp-theme="dark"] .mce-btn:focus,
html[data-dp-theme="dark"] .mce-btn.mce-active,
html[data-dp-theme="dark"] .mce-btn.mce-active button {
  background: #1c3a47 !important;
  color: #b9ecff !important;
}

html[data-dp-theme="dark"] .mce-ico,
html[data-dp-theme="dark"] .mce-caret,
html[data-dp-theme="dark"] .mce-txt,
html[data-dp-theme="dark"] .mce-label {
  color: var(--dp-text) !important;
  border-top-color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .mce-edit-area iframe {
  background: #0b1d25 !important;
}

html[data-dp-theme="light"] .mce-edit-area iframe {
  background: #ffffff !important;
}


/* ========================================================================
   Dark mode correction pass 2: iframe inheritance, profile/card values,
   media pills, loading states, and safer contrast.
   ======================================================================== */
html[data-dp-theme="dark"] {
  --dp-text: #c2d3dc;
  --dp-text-strong: #d8e6ec;
  --dp-text-muted: #98adb7;
  --dp-surface: #10232c;
  --dp-surface-2: #162d38;
  --dp-surface-3: #1d3844;
  --dp-border-dark: #385866;
  --dp-border-soft-dark: #284651;
}

html[data-dp-theme="dark"] .dp-loader-spinner {
  border-color: #274652 !important;
  border-top-color: #e23d64 !important;
}

html[data-dp-theme="dark"] .dp-inline-loader,
html[data-dp-theme="dark"] .dp-socialpod-loading,
html[data-dp-theme="dark"] .dp-socialpod-loading i {
  color: #7fd8fa !important;
}

html[data-dp-theme="dark"] .dp-socialpod-loading {
  box-shadow: 0 0 0 3px rgba(0, 150, 207, 0.24) !important;
}

html[data-dp-theme="dark"] .profile-info-item,
html[data-dp-theme="dark"] .profile-logo-tile,
html[data-dp-theme="dark"] .profile-empty-state,
html[data-dp-theme="dark"] .profile-map,
html[data-dp-theme="dark"] .dp-readonly-pill,
html[data-dp-theme="dark"] .dp-group-form-card,
html[data-dp-theme="dark"] .dp-group-list-card,
html[data-dp-theme="dark"] .dp-group-edit-grid,
html[data-dp-theme="dark"] .dp-group-add-row,
html[data-dp-theme="dark"] .dp-form-card,
html[data-dp-theme="dark"] .dp-card,
html[data-dp-theme="dark"] .practice-card,
html[data-dp-theme="dark"] .practice-editor-card,
html[data-dp-theme="dark"] .upload-card,
html[data-dp-theme="dark"] .editor-card,
html[data-dp-theme="dark"] .content-card,
html[data-dp-theme="dark"] .dp-content-card,
html[data-dp-theme="dark"] .dp-content-page-panel .profile-info-item {
  background: #122833 !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .profile-info-item span,
html[data-dp-theme="dark"] .profile-info-item strong,
html[data-dp-theme="dark"] .profile-muted,
html[data-dp-theme="dark"] .profile-card h2,
html[data-dp-theme="dark"] .profile-card h3,
html[data-dp-theme="dark"] .profile-practice-name,
html[data-dp-theme="dark"] .dp-group-form-card h2,
html[data-dp-theme="dark"] .dp-group-list-card h2 {
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .profile-info-item span,
html[data-dp-theme="dark"] .profile-muted {
  color: var(--dp-text-muted) !important;
}

html[data-dp-theme="dark"] .profile-badge,
html[data-dp-theme="dark"] .profile-pill,
html[data-dp-theme="dark"] .profile-badge-off {
  background: #193440 !important;
  border: 1px solid #3c6271 !important;
  color: #c2d3dc !important;
}

html[data-dp-theme="dark"] .profile-badge-on {
  background: rgba(46, 164, 115, 0.16) !important;
  border-color: rgba(46, 164, 115, 0.38) !important;
  color: #8ee0b7 !important;
}

html[data-dp-theme="dark"] .profile-logo-tile.profile-logo-white {
  background: #203943 !important;
}

html[data-dp-theme="dark"] .media-type-pill,
html[data-dp-theme="dark"] .dp-select-pill,
html[data-dp-theme="dark"] .dp-selected-count,
html[data-dp-theme="dark"] .status-pill {
  background: #183542 !important;
  border-color: #467081 !important;
  color: #d5e6ed !important;
}

html[data-dp-theme="dark"] .media-type-video,
html[data-dp-theme="dark"] .dp-select-media-video + .dp-select-main .dp-select-pill:first-child {
  background: rgba(0, 150, 207, 0.18) !important;
  border-color: rgba(0, 150, 207, 0.42) !important;
  color: #94ddf8 !important;
}

html[data-dp-theme="dark"] .media-type-carousel,
html[data-dp-theme="dark"] .dp-select-pill-instagram {
  background: rgba(226, 61, 100, 0.16) !important;
  border-color: rgba(226, 61, 100, 0.42) !important;
  color: #ff9cb4 !important;
}

html[data-dp-theme="dark"] .media-type-image {
  background: rgba(78, 180, 137, 0.16) !important;
  border-color: rgba(78, 180, 137, 0.4) !important;
  color: #a6e9cb !important;
}

html[data-dp-theme="dark"] .table-filters,
html[data-dp-theme="dark"] .content,
html[data-dp-theme="dark"] .dp-content-table-scroll,
html[data-dp-theme="dark"] .content #mytable,
html[data-dp-theme="dark"] .content table {
  background: var(--dp-surface) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .table-filters input,
html[data-dp-theme="dark"] .table-filters select {
  background: #0b1d25 !important;
  border-color: #63808c !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] iframe#content-distribution-frame,
html[data-dp-theme="dark"] .tox .tox-edit-area__iframe,
html[data-dp-theme="dark"] .mce-edit-area iframe {
  background: #0b1d25 !important;
}

html[data-dp-theme="dark"] .tox-tinymce,
html[data-dp-theme="dark"] .tox .tox-toolbar,
html[data-dp-theme="dark"] .tox .tox-toolbar__primary,
html[data-dp-theme="dark"] .tox .tox-menubar,
html[data-dp-theme="dark"] .tox .tox-statusbar,
html[data-dp-theme="dark"] .tox .tox-edit-area {
  background: #0b1d25 !important;
  border-color: #375866 !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .tox .tox-tbtn,
html[data-dp-theme="dark"] .tox .tox-mbtn,
html[data-dp-theme="dark"] .tox .tox-statusbar__path-item {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .tox .tox-tbtn svg,
html[data-dp-theme="dark"] .tox .tox-mbtn svg {
  fill: var(--dp-text) !important;
}

html[data-dp-theme="light"] iframe#content-distribution-frame,
html[data-dp-theme="light"] .tox .tox-edit-area__iframe,
html[data-dp-theme="light"] .mce-edit-area iframe {
  background: #ffffff !important;
}

/* ========================================================================
   Dark mode correction pass 3: all loading animations/spinners.
   Covers legacy .loader, inline upload/save loaders, SocialPod icons, and
   generic busy states so no loading affordance remains light themed.
   ======================================================================== */
html[data-dp-theme="dark"] .dp-inline-loader,
html[data-dp-theme="dark"] #loader,
html[data-dp-theme="dark"] [aria-busy="true"],
html[data-dp-theme="dark"] .is-loading,
html[data-dp-theme="dark"] .loading {
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .dp-loader-spinner,
html[data-dp-theme="dark"] .loader,
html[data-dp-theme="dark"] .loading-spinner,
html[data-dp-theme="dark"] .spinner,
html[data-dp-theme="dark"] .fa-spinner,
html[data-dp-theme="dark"] .fa-circle-o-notch,
html[data-dp-theme="dark"] .fa-refresh.fa-spin {
  color: #7fd8fa !important;
  border-color: rgba(127, 216, 250, 0.24) !important;
  border-top-color: #e23d64 !important;
  background: transparent !important;
}

html[data-dp-theme="dark"] .loader {
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .dp-socialpod-loading,
html[data-dp-theme="dark"] a.dp-socialpod-loading,
html[data-dp-theme="dark"] button.dp-socialpod-loading,
html[data-dp-theme="dark"] .dp-socialpod-link.dp-socialpod-loading,
html[data-dp-theme="dark"] .profile-schedule-actions .dp-socialpod-loading,
html[data-dp-theme="dark"] .schedule-actions .dp-socialpod-loading {
  background: #132b36 !important;
  border-color: #4d7c8f !important;
  color: #7fd8fa !important;
  box-shadow: 0 0 0 3px rgba(0, 150, 207, 0.22), 0 0 24px rgba(0, 150, 207, 0.12) !important;
  opacity: 1 !important;
}

html[data-dp-theme="dark"] .dp-socialpod-loading i,
html[data-dp-theme="dark"] .dp-socialpod-loading .fa,
html[data-dp-theme="dark"] .dp-socialpod-loading svg {
  color: #7fd8fa !important;
  fill: #7fd8fa !important;
}

html[data-dp-theme="dark"] .dp-socialpod-loading .fa-spinner,
html[data-dp-theme="dark"] .dp-socialpod-loading .fa-circle-o-notch {
  color: #e23d64 !important;
}

.dp-submit-loading,
input.dp-submit-loading,
button.dp-submit-loading,
.smbutn.dp-submit-loading,
.smbutn[disabled].dp-submit-loading {
  background: #d6dee3 !important;
  border-color: #aebec7 !important;
  color: #667783 !important;
  box-shadow: none !important;
  cursor: wait !important;
  opacity: 1 !important;
  filter: grayscale(0.35);
}

html[data-dp-theme="dark"] .dp-submit-loading,
html[data-dp-theme="dark"] input.dp-submit-loading,
html[data-dp-theme="dark"] button.dp-submit-loading,
html[data-dp-theme="dark"] .smbutn.dp-submit-loading,
html[data-dp-theme="dark"] .smbutn[disabled].dp-submit-loading {
  background: #263843 !important;
  border-color: #4a6572 !important;
  color: #9fb3bd !important;
  box-shadow: none !important;
  cursor: wait !important;
  opacity: 1 !important;
}

html[data-dp-theme="dark"] .dp-selector-load-more[disabled],
html[data-dp-theme="dark"] .dp-button[disabled],
html[data-dp-theme="dark"] .smbutn[disabled] {
  background: #132b36 !important;
  border-color: #2f5060 !important;
  color: #8fa6b0 !important;
  opacity: 0.82 !important;
}

html[data-dp-theme="dark"] .dp-loading-overlay,
html[data-dp-theme="dark"] .loading-overlay,
html[data-dp-theme="dark"] .dp-result-loading {
  background: rgba(11, 29, 37, 0.86) !important;
  color: var(--dp-text-strong) !important;
  border-color: #385866 !important;
}

html[data-dp-theme="dark"] .dp-loading-overlay::before,
html[data-dp-theme="dark"] .loading-overlay::before,
html[data-dp-theme="dark"] .dp-result-loading::before {
  border-color: rgba(127, 216, 250, 0.24) !important;
  border-top-color: #e23d64 !important;
}

html[data-dp-theme="light"] .dp-loader-spinner,
html[data-dp-theme="light"] .loader,
html[data-dp-theme="light"] .loading-spinner,
html[data-dp-theme="light"] .spinner {
  border-color: #e7edf1 !important;
  border-top-color: #e23d64 !important;
}


/* ========================================================================
   Legacy GIF loader replacement: CSS-only spinners for theme-safe loading.
   ======================================================================== */
.dp-legacy-progress-spinner {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-width: 4px !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  background: transparent !important;
}

.dp-loading-overlay {
  background: rgba(255, 255, 255, 0.58) !important;
  opacity: 1 !important;
  border-radius: inherit;
  backdrop-filter: blur(1px);
}

.dp-loading-overlay-spinner {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  margin-left: -18px !important;
  margin-top: -18px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

html[data-dp-theme="dark"] .dp-loading-overlay {
  background: rgba(4, 20, 28, 0.64) !important;
}

html[data-dp-theme="dark"] .dp-legacy-progress-spinner {
  border-color: rgba(127, 216, 250, 0.26) !important;
  border-top-color: #e23d64 !important;
  background: transparent !important;
  box-shadow: 0 0 0 1px rgba(127, 216, 250, 0.08), 0 0 18px rgba(0, 150, 207, 0.16) !important;
}

html[data-dp-theme="light"] .dp-legacy-progress-spinner {
  border-color: rgba(0, 52, 74, 0.14) !important;
  border-top-color: #e23d64 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ========================================================================
   Dark mode correction pass 4: keyword autocomplete/selection states.
   ======================================================================== */
html[data-dp-theme="dark"] ::selection {
  background: rgba(0, 150, 207, 0.42);
  color: #f4fbff;
}

html[data-dp-theme="light"] ::selection {
  background: rgba(0, 150, 207, 0.22);
  color: #00344a;
}

html[data-dp-theme="dark"] #tags::selection,
html[data-dp-theme="dark"] input[name="keywords"]::selection {
  background: rgba(0, 150, 207, 0.46);
  color: #f4fbff;
}

html[data-dp-theme="dark"] .ui-autocomplete,
html[data-dp-theme="dark"] .ui-menu,
html[data-dp-theme="dark"] .ui-widget.ui-widget-content,
html[data-dp-theme="dark"] .ui-widget-content {
  background: #102731 !important;
  border: 1px solid #3a5a68 !important;
  color: #d6e4ea !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42) !important;
}

html[data-dp-theme="dark"] .ui-autocomplete {
  border-radius: 14px !important;
  overflow: hidden !important;
  padding: 4px !important;
  z-index: 10050 !important;
}

html[data-dp-theme="dark"] .ui-menu .ui-menu-item,
html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper {
  background: transparent !important;
  color: #d6e4ea !important;
  border: 0 !important;
  border-radius: 10px !important;
  margin: 0 !important;
}

html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper {
  padding: 8px 10px !important;
  line-height: 1.25 !important;
}

html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper.ui-state-active,
html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper.ui-state-focus,
html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper:hover,
html[data-dp-theme="dark"] .ui-state-active,
html[data-dp-theme="dark"] .ui-widget-content .ui-state-active,
html[data-dp-theme="dark"] .ui-widget-header .ui-state-active,
html[data-dp-theme="dark"] a.ui-button:active,
html[data-dp-theme="dark"] .ui-button:active,
html[data-dp-theme="dark"] .ui-button.ui-state-active:hover {
  background: #163a49 !important;
  border: 0 !important;
  color: #f4fbff !important;
  box-shadow: inset 3px 0 0 #0096cf !important;
}

html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper.ui-state-active::selection,
html[data-dp-theme="dark"] .ui-menu .ui-menu-item-wrapper.ui-state-focus::selection {
  background: rgba(226, 61, 100, 0.38);
  color: #ffffff;
}

html[data-dp-theme="light"] .ui-autocomplete,
html[data-dp-theme="light"] .ui-menu,
html[data-dp-theme="light"] .ui-widget.ui-widget-content,
html[data-dp-theme="light"] .ui-widget-content {
  background: #ffffff !important;
  border: 1px solid #c8d7df !important;
  color: #17242a !important;
  box-shadow: 0 14px 32px rgba(0, 52, 74, 0.14) !important;
}

html[data-dp-theme="light"] .ui-autocomplete {
  border-radius: 14px !important;
  overflow: hidden !important;
  padding: 4px !important;
  z-index: 10050 !important;
}

html[data-dp-theme="light"] .ui-menu .ui-menu-item-wrapper.ui-state-active,
html[data-dp-theme="light"] .ui-menu .ui-menu-item-wrapper.ui-state-focus,
html[data-dp-theme="light"] .ui-menu .ui-menu-item-wrapper:hover,
html[data-dp-theme="light"] .ui-state-active,
html[data-dp-theme="light"] .ui-widget-content .ui-state-active,
html[data-dp-theme="light"] .ui-widget-header .ui-state-active {
  background: #eaf7fc !important;
  border: 0 !important;
  color: #00344a !important;
  box-shadow: inset 3px 0 0 #0096cf !important;
}

/* ========================================================================
   Dark mode correction pass 5: upload/update tags autocomplete and selected text.
   jQuery UI loads after the shell CSS in the legacy template, so keep these
   selectors deliberately specific and late in dp-ui.css.
   ======================================================================== */
html[data-dp-theme="dark"] body .ui-autocomplete,
html[data-dp-theme="dark"] body .ui-menu,
html[data-dp-theme="dark"] body .ui-front.ui-autocomplete,
html[data-dp-theme="dark"] body .ui-widget.ui-widget-content.ui-autocomplete {
  background: #102731 !important;
  border: 1px solid #3a5a68 !important;
  color: #d6e4ea !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.46) !important;
}

html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item a,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item div,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item-wrapper,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item a,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item div,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item-wrapper {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  color: #d6e4ea !important;
  text-shadow: none !important;
}

html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item a,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item div,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item-wrapper,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item a,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item div,
html[data-dp-theme="dark"] body .ui-menu .ui-menu-item-wrapper {
  border-radius: 10px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 8px 10px !important;
}

html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item a.ui-state-focus,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item a.ui-state-active,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item a.ui-state-hover,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item div.ui-state-focus,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item div.ui-state-active,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item div.ui-state-hover,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item-wrapper.ui-state-focus,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
html[data-dp-theme="dark"] body .ui-autocomplete .ui-menu-item-wrapper.ui-state-hover,
html[data-dp-theme="dark"] body .ui-widget-content .ui-state-focus,
html[data-dp-theme="dark"] body .ui-widget-content .ui-state-active,
html[data-dp-theme="dark"] body .ui-widget-content .ui-state-hover,
html[data-dp-theme="dark"] body .ui-widget-header .ui-state-focus,
html[data-dp-theme="dark"] body .ui-widget-header .ui-state-active,
html[data-dp-theme="dark"] body .ui-widget-header .ui-state-hover {
  background: #163a49 !important;
  background-image: none !important;
  border: 0 !important;
  color: #f4fbff !important;
  box-shadow: inset 3px 0 0 #0096cf !important;
  text-shadow: none !important;
}

html[data-dp-theme="dark"] body #tags,
html[data-dp-theme="dark"] body input#tags[name="keywords"],
html[data-dp-theme="dark"] body input[name="keywords"] {
  background: #0f222b !important;
  border-color: #8ea5af !important;
  color: #d6e4ea !important;
  caret-color: #7fd8fa !important;
}

html[data-dp-theme="dark"] body #tags::selection,
html[data-dp-theme="dark"] body input#tags[name="keywords"]::selection,
html[data-dp-theme="dark"] body input[name="keywords"]::selection,
html[data-dp-theme="dark"] body .ui-autocomplete ::selection,
html[data-dp-theme="dark"] body .ui-menu ::selection {
  background: rgba(0, 150, 207, 0.58) !important;
  color: #ffffff !important;
}

html[data-dp-theme="dark"] body #tags::-moz-selection,
html[data-dp-theme="dark"] body input#tags[name="keywords"]::-moz-selection,
html[data-dp-theme="dark"] body input[name="keywords"]::-moz-selection,
html[data-dp-theme="dark"] body .ui-autocomplete ::-moz-selection,
html[data-dp-theme="dark"] body .ui-menu ::-moz-selection {
  background: rgba(0, 150, 207, 0.58) !important;
  color: #ffffff !important;
}

html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item a.ui-state-focus,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item a.ui-state-active,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item a.ui-state-hover,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item div.ui-state-focus,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item div.ui-state-active,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item div.ui-state-hover,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item-wrapper.ui-state-focus,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
html[data-dp-theme="light"] body .ui-autocomplete .ui-menu-item-wrapper.ui-state-hover,
html[data-dp-theme="light"] body .ui-widget-content .ui-state-focus,
html[data-dp-theme="light"] body .ui-widget-content .ui-state-active,
html[data-dp-theme="light"] body .ui-widget-content .ui-state-hover {
  background: #eaf7fc !important;
  background-image: none !important;
  border: 0 !important;
  color: #00344a !important;
  box-shadow: inset 3px 0 0 #0096cf !important;
  text-shadow: none !important;
}

/* ========================================================================
   UI audit polish pass: subtle dark/light edge cases across legacy pages.
   Keeps page templates intact and normalises remaining legacy inline UI.
   ======================================================================== */
html[data-dp-theme="light"] {
  color-scheme: light;
}

html[data-dp-theme="light"] body,
html[data-dp-theme="light"] #content,
html[data-dp-theme="light"] #content.content {
  background-color: #f7fafc !important;
}

html[data-dp-theme="light"] .dp-panel,
html[data-dp-theme="light"] .dp-content-page-panel,
html[data-dp-theme="light"] .dp-form-panel,
html[data-dp-theme="light"] .dp-result-card,
html[data-dp-theme="light"] .dp-upload-card,
html[data-dp-theme="light"] .dp-editor-card,
html[data-dp-theme="light"] .dp-modern-selector,
html[data-dp-theme="light"] .profile-card,
html[data-dp-theme="light"] .dp-group-form-card,
html[data-dp-theme="light"] .dp-group-list-card {
  color-scheme: light;
}

html[data-dp-theme="dark"] {
  color-scheme: dark;
  scrollbar-color: #436675 #07151b;
}

html[data-dp-theme="dark"] * {
  scrollbar-color: #436675 #0b1d25;
}

html[data-dp-theme="dark"] ::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html[data-dp-theme="dark"] ::-webkit-scrollbar-track {
  background: #07151b;
}

html[data-dp-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #436675;
  border: 3px solid #07151b;
  border-radius: 999px;
}

html[data-dp-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #5f8595;
}

html[data-dp-theme="dark"] fieldset,
html[data-dp-theme="dark"] legend,
html[data-dp-theme="dark"] details,
html[data-dp-theme="dark"] summary {
  color: var(--dp-text) !important;
  border-color: var(--dp-border-dark) !important;
}

html[data-dp-theme="dark"] legend,
html[data-dp-theme="dark"] summary,
html[data-dp-theme="dark"] .dp-field > label,
html[data-dp-theme="dark"] .field-label,
html[data-dp-theme="dark"] .form-label {
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] option,
html[data-dp-theme="dark"] optgroup {
  background: #0b1d25 !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] input:-webkit-autofill,
html[data-dp-theme="dark"] textarea:-webkit-autofill,
html[data-dp-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--dp-text-strong) !important;
  box-shadow: 0 0 0 1000px #0b1d25 inset !important;
  caret-color: var(--dp-text-strong) !important;
  border-color: #63808c !important;
}

html[data-dp-theme="dark"] input[type="file"] {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] input[type="file"]::-webkit-file-upload-button,
html[data-dp-theme="dark"] input[type="file"]::file-selector-button {
  background: #e23d64 !important;
  color: #ffffff !important;
  border: 1px solid #e23d64 !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] #content div[style*="background:#fff"],
html[data-dp-theme="dark"] #content div[style*="background: #fff"],
html[data-dp-theme="dark"] #content div[style*="background:#ffffff"],
html[data-dp-theme="dark"] #content div[style*="background: #ffffff"],
html[data-dp-theme="dark"] #content div[style*="background-color:#fff"],
html[data-dp-theme="dark"] #content div[style*="background-color: #fff"],
html[data-dp-theme="dark"] #content div[style*="background-color:white"],
html[data-dp-theme="dark"] #content div[style*="background-color: white"],
html[data-dp-theme="dark"] #content td[style*="background:#fff"],
html[data-dp-theme="dark"] #content td[style*="background: #fff"],
html[data-dp-theme="dark"] #content td[style*="background:#ffffff"],
html[data-dp-theme="dark"] #content td[style*="background: #ffffff"] {
  background: var(--dp-surface) !important;
  color: var(--dp-text) !important;
  border-color: var(--dp-border-dark) !important;
}

html[data-dp-theme="dark"] #content div[style*="background:#fff5f5"],
html[data-dp-theme="dark"] #content div[style*="background: #fff5f5"] {
  background: rgba(226, 61, 100, 0.12) !important;
  border-color: rgba(226, 61, 100, 0.42) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] #content [style*="color:#000"],
html[data-dp-theme="dark"] #content [style*="color: #000"],
html[data-dp-theme="dark"] #content [style*="color:black"],
html[data-dp-theme="dark"] #content [style*="color: black"],
html[data-dp-theme="dark"] #content [style*="color:#111"],
html[data-dp-theme="dark"] #content [style*="color: #111"],
html[data-dp-theme="dark"] #content [style*="color:#333"],
html[data-dp-theme="dark"] #content [style*="color: #333"] {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] #content [style*="fill:#262626"],
html[data-dp-theme="dark"] #content svg[color="#262626"] {
  color: var(--dp-text) !important;
  fill: var(--dp-text) !important;
}

html[data-dp-theme="dark"] [id^="reels"] {
  background: var(--dp-surface-2) !important;
  border: 1px solid var(--dp-border-dark) !important;
  border-radius: 8px;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .ui-datepicker,
html[data-dp-theme="dark"] .ui-dialog,
html[data-dp-theme="dark"] .ui-tooltip,
html[data-dp-theme="dark"] .ui-widget-content:not(.ui-autocomplete) {
  background: var(--dp-surface) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .ui-datepicker-header,
html[data-dp-theme="dark"] .ui-dialog-titlebar,
html[data-dp-theme="dark"] .ui-widget-header {
  background: var(--dp-surface-2) !important;
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .ui-datepicker-calendar th,
html[data-dp-theme="dark"] .ui-datepicker-calendar td,
html[data-dp-theme="dark"] .ui-datepicker-calendar a {
  background: transparent !important;
  color: var(--dp-text) !important;
  border-color: var(--dp-border-soft-dark) !important;
}

html[data-dp-theme="dark"] .ui-datepicker-calendar .ui-state-active,
html[data-dp-theme="dark"] .ui-datepicker-calendar .ui-state-hover {
  background: #0f3140 !important;
  color: #b9ecff !important;
  border-color: #0096cf !important;
}

html[data-dp-theme="dark"] .mce-menu,
html[data-dp-theme="dark"] .mce-menu-item,
html[data-dp-theme="dark"] .mce-menu-item-normal,
html[data-dp-theme="dark"] .mce-menu-item-preview,
html[data-dp-theme="dark"] .mce-window,
html[data-dp-theme="dark"] .mce-window-head,
html[data-dp-theme="dark"] .mce-foot,
html[data-dp-theme="dark"] .mce-container-body {
  background: #0b1d25 !important;
  border-color: #375866 !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .mce-menu-item:hover,
html[data-dp-theme="dark"] .mce-menu-item.mce-selected,
html[data-dp-theme="dark"] .mce-menu-item:focus {
  background: #1c3a47 !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .mce-text,
html[data-dp-theme="dark"] .mce-label,
html[data-dp-theme="dark"] .mce-title,
html[data-dp-theme="dark"] .mce-menu-item .mce-text {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .mce-window input,
html[data-dp-theme="dark"] .mce-window textarea,
html[data-dp-theme="dark"] .mce-window select {
  background: #0b1d25 !important;
  border-color: #63808c !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .tox .tox-dialog,
html[data-dp-theme="dark"] .tox .tox-dialog__header,
html[data-dp-theme="dark"] .tox .tox-dialog__footer,
html[data-dp-theme="dark"] .tox .tox-menu,
html[data-dp-theme="dark"] .tox .tox-collection__item,
html[data-dp-theme="dark"] .tox .tox-pop,
html[data-dp-theme="dark"] .tox .tox-pop__dialog {
  background: #0b1d25 !important;
  border-color: #375866 !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .tox .tox-collection__item--active,
html[data-dp-theme="dark"] .tox .tox-collection__item--enabled,
html[data-dp-theme="dark"] .tox .tox-collection__item:hover {
  background: #1c3a47 !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .tox .tox-label,
html[data-dp-theme="dark"] .tox .tox-dialog__title,
html[data-dp-theme="dark"] .tox .tox-collection__item-label {
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .tox .tox-textfield,
html[data-dp-theme="dark"] .tox .tox-textarea,
html[data-dp-theme="dark"] .tox .tox-selectfield select {
  background: #0b1d25 !important;
  border-color: #63808c !important;
  color: var(--dp-text-strong) !important;
}

html[data-dp-theme="dark"] .dp-menu::-webkit-scrollbar-track,
html[data-dp-theme="dark"] #content::-webkit-scrollbar-track,
html[data-dp-theme="dark"] .dp-select-list::-webkit-scrollbar-track,
html[data-dp-theme="dark"] .dp-content-table-scroll::-webkit-scrollbar-track {
  background: #0b1a22;
}

html[data-dp-theme="dark"] .dp-menu::-webkit-scrollbar-thumb,
html[data-dp-theme="dark"] #content::-webkit-scrollbar-thumb,
html[data-dp-theme="dark"] .dp-select-list::-webkit-scrollbar-thumb,
html[data-dp-theme="dark"] .dp-content-table-scroll::-webkit-scrollbar-thumb {
  background: #436675;
  border-color: #0b1a22;
}

html[data-dp-theme="dark"] .dp-chip,
html[data-dp-theme="dark"] .tag,
html[data-dp-theme="dark"] .tags,
html[data-dp-theme="dark"] .badge,
html[data-dp-theme="dark"] .label {
  background: #183542 !important;
  border-color: #467081 !important;
  color: #d5e6ed !important;
}

html[data-dp-theme="dark"] .error,
html[data-dp-theme="dark"] .warning,
html[data-dp-theme="dark"] .notice,
html[data-dp-theme="dark"] .success {
  border-color: var(--dp-border-dark) !important;
  color: var(--dp-text) !important;
}

html[data-dp-theme="dark"] .error {
  background: rgba(226, 61, 100, 0.14) !important;
}

html[data-dp-theme="dark"] .warning,
html[data-dp-theme="dark"] .notice {
  background: rgba(255, 158, 90, 0.13) !important;
}

html[data-dp-theme="dark"] .success {
  background: rgba(46, 164, 115, 0.14) !important;
}

html[data-dp-theme="dark"] img[src*="Instagram-Logo"],
html[data-dp-theme="dark"] img[src*="FB_logo"],
html[data-dp-theme="dark"] img[src*="digital-practice"],
html[data-dp-theme="dark"] img[src*="Logo"] {
  filter: none !important;
}

/* Reports menu icon regression guard.
   fa-line-chart is not available in the older Font Awesome build used here;
   keep the left Reports icon visible with the compatible bar-chart icon. */
.dp-menu-item .dp-menu-reports-icon {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 18px !important;
  flex: 0 0 18px !important;
  text-align: center !important;
}

.dp-menu-item .dp-menu-reports-icon::before {
  display: inline-block !important;
}

.dp-menu-item .dp-menu-performance-icon {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 18px !important;
  flex: 0 0 18px !important;
  text-align: center !important;
}

.dp-menu-item .dp-menu-performance-icon::before {
  display: inline-block !important;
}

#dp-menu,
.dp-menu {
  overflow-x: hidden !important;
}

.dp-login-panel .dp-form-header img.dp-login-logo,
.dp-form-header .dp-login-logo,
img.dp-login-logo {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 190px !important;
  max-width: 36% !important;
  height: auto !important;
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.dp-login-panel .dp-button {
  margin-top: 12px !important;
  background: var(--dp-pink, #e23d64) !important;
  border: 1px solid var(--dp-pink, #e23d64) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

.dp-login-panel .dp-button:hover {
  background: var(--dp-blue, #0096cf) !important;
  border-color: var(--dp-blue, #0096cf) !important;
}

html[data-dp-theme="dark"] .dp-login-panel button.dp-button,
html[data-dp-theme="dark"] .dp-login-panel .dp-button.cta-pink {
  background: var(--dp-pink, #e23d64) !important;
  border-color: var(--dp-pink, #e23d64) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-dp-theme="dark"] .dp-login-panel button.dp-button:hover,
html[data-dp-theme="dark"] .dp-login-panel .dp-button.cta-pink:hover {
  background: var(--dp-blue, #0096cf) !important;
  border-color: var(--dp-blue, #0096cf) !important;
}

html[data-dp-theme="dark"] .dp-result-success,
html[data-dp-theme="dark"] .dp-result-warning,
html[data-dp-theme="dark"] .dp-result-error {
  background: #10232c !important;
  border-color: #345261 !important;
  color: var(--dp-text-strong, #dce8ee) !important;
}

html[data-dp-theme="dark"] .dp-result-success {
  border-left-color: #53c8f0 !important;
}

html[data-dp-theme="dark"] .dp-result-warning {
  border-left-color: #ffb45f !important;
}

html[data-dp-theme="dark"] .dp-result-error {
  border-left-color: #ff6f91 !important;
}


/* Final dark-mode repair for editor result/detail surfaces. */
html[data-dp-theme="dark"] .dp-form-deactivate {
  background: #102630 !important;
  border-color: #365462 !important;
  color: #98acb6 !important;
  box-shadow: none !important;
}
html[data-dp-theme="dark"] .dp-form-deactivate input[type="checkbox"] {
  color-scheme: dark;
  accent-color: #e23d64;
}
html[data-dp-theme="light"] .dp-form-deactivate input[type="checkbox"] {
  color-scheme: light;
  accent-color: #e23d64;
}
html[data-dp-theme="dark"] #content .dp-result-shell {
  color: #c8d7df;
}
html[data-dp-theme="dark"] #content .dp-result-hero,
html[data-dp-theme="dark"] #content .dp-result-meta-item,
html[data-dp-theme="dark"] #content .dp-result-card,
html[data-dp-theme="dark"] #content .dp-result-media-panel,
html[data-dp-theme="dark"] #content .dp-result-tags {
  background: #102630 !important;
  border-color: #365462 !important;
}
html[data-dp-theme="dark"] #content .dp-result-card-header {
  background: #0b1e26 !important;
  border-color: #365462 !important;
}
html[data-dp-theme="dark"] #content .dp-result-title,
html[data-dp-theme="dark"] #content .dp-result-section-title,
html[data-dp-theme="dark"] #content .dp-result-card-title,
html[data-dp-theme="dark"] #content .dp-result-value {
  color: #d9e6ed !important;
}
html[data-dp-theme="dark"] #content .dp-result-subtitle,
html[data-dp-theme="dark"] #content .dp-result-label,
html[data-dp-theme="dark"] #content .dp-result-caption,
html[data-dp-theme="dark"] #content .dp-result-note,
html[data-dp-theme="dark"] #content .dp-result-muted {
  color: #98acb6 !important;
}


/* Schedule publishing/upload result pages */
.dp-publish-page {
  margin: 0;
  min-height: 100vh;
  background: var(--dp-bg, #f7fafc);
  color: #1b2b34;
  font-family: "Hanken Grotesk", Arial, sans-serif;
}
.dp-publish-page * { box-sizing: border-box; }
.dp-publish-shell {
  max-width: 1180px !important;
  padding: 14px 18px 36px 18px !important;
}
.dp-publish-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px !important;
  margin-bottom: 10px !important;
}
.dp-publish-eyebrow {
  color: var(--dp-pink, #e23d64);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 5px 0 !important;
}
.dp-publish-title {
  color: var(--dp-navy, #00344a);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 !important;
}
.dp-publish-subtitle {
  color: var(--dp-muted, #667680);
  font-size: 14px;
  line-height: 1.35;
  margin: 6px 0 0 0 !important;
}
.dp-publish-logo {
  width: 122px;
  max-width: 24vw;
  height: auto;
  margin: 0 !important;
  object-fit: contain;
}
.dp-publish-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px !important;
}
.dp-publish-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid #cfe3ed;
  border-radius: 999px;
  background: #f1f8fb;
  color: #00344a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 12px;
}

/* Keep Instagram/Facebook publish status messages inside the page shell even if dynamic output is long. */
.dp-publish-page {
  overflow-x: hidden;
}
.dp-publish-shell,
.dp-publish-results,
.dp-publish-post,
.dp-publish-alert {
  width: 100%;
  max-width: 100%;
}
.dp-publish-alert,
.dp-publish-alert-title,
.dp-publish-alert-body,
.dp-publish-copy {
  overflow-wrap: anywhere;
}

.dp-publish-status-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 10px !important;
}
.dp-publish-results {
  display: grid;
  gap: 10px;
}
.dp-publish-alert {
  border: 1px solid #d8e4ea;
  border-left-width: 4px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 52, 74, 0.06);
  padding: 8px 12px;
  color: #1b2b34;
  margin: 0 !important;
}
.dp-publish-alert--compact {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 10px;
  row-gap: 2px;
  padding: 6px 10px;
}
.dp-publish-alert--compact .dp-publish-alert-body {
  margin: 0 !important;
}
.dp-publish-alert-title {
  font-size: 13px;
  font-weight: 900;
  color: #00344a;
  margin: 0 !important;
}
.dp-publish-alert-body {
  font-size: 13px;
  color: #5f717a;
  line-height: 1.35;
  margin: 2px 0 0 0 !important;
  word-break: break-word;
}
.dp-publish-alert--success { border-left-color: #2ea473; }
.dp-publish-alert--error { border-left-color: #e23d64; }
.dp-publish-alert--warning { border-left-color: #ff9e5a; }
.dp-publish-alert--info { border-left-color: #0096cf; }
.dp-publish-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px 0 !important;
}
.dp-publish-queue .dp-publish-pill {
  min-height: 24px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.dp-publish-queue .dp-publish-pill.is-success {
  border-color: rgba(46, 164, 115, .44);
  background: rgba(46, 164, 115, .12);
  color: #176541;
}
.dp-publish-queue .dp-publish-pill.is-error {
  border-color: rgba(226, 61, 100, .44);
  background: rgba(226, 61, 100, .12);
  color: #a32343;
}
.dp-publish-post {
  border: 1px solid #d9e6ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 52, 74, 0.08);
  padding: 18px;
  overflow: hidden;
}
.dp-publish-post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d8e8ef;
  border-radius: 16px;
  background: #f6fafc;
  padding: 12px 14px;
  margin-bottom: 14px !important;
}
.dp-publish-date {
  color: #00344a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 !important;
}
.dp-publish-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #cfe3ed;
  border-radius: 999px;
  background: #eef7fb;
  color: #00344a;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  margin: 0 !important;
}
.dp-publish-meta {
  color: #657982;
  font-size: 14px;
  line-height: 1.35;
  margin: 8px 0 12px 0 !important;
}
.dp-publish-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00344a;
  font-weight: 800;
}
.dp-publish-flag {
  color: #e23d64;
  font-weight: 900;
}
.dp-publish-media {
  text-align: center;
  margin: 16px auto !important;
}
.dp-publish-img {
  display: inline-block;
  max-width: min(600px, 100%);
  max-height: 420px;
  width: auto;
  height: auto;
  border-radius: 18px;
  border: 1px solid #dbe7ed;
  box-shadow: 0 16px 38px rgba(0, 52, 74, 0.14);
  object-fit: contain;
  background: #f6fafc;
}
.dp-publish-video {
  max-width: min(520px, 100%);
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid #dbe7ed;
  box-shadow: 0 16px 38px rgba(0, 52, 74, 0.14);
  background: #000;
}
.dp-publish-carousel {
  width: min(100%, 560px);
  margin: 18px auto;
}
.dp-publish-carousel-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(0,52,74,0.12);
  border-radius: 20px;
  background: #f6fafc;
}
.dp-publish-carousel-track {
  display: flex;
  width: 100%;
  transition: transform .26s ease;
  will-change: transform;
}
.dp-publish-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dp-publish-carousel-img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 52, 74, 0.12);
}
.dp-publish-carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,52,74,0.14);
  background: rgba(255,255,255,0.92);
  color: #00344a;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 52, 74, 0.12);
  transition: transform .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}
.dp-publish-carousel-control:hover {
  background: #e23d64;
  border-color: #e23d64;
  color: #fff;
  transform: translateY(-50%) scale(1.04);
}
.dp-publish-carousel-control:disabled {
  cursor: default;
  opacity: .42;
  transform: translateY(-50%);
}
.dp-publish-carousel-control--prev { left: 12px; }
.dp-publish-carousel-control--next { right: 12px; }
.dp-publish-carousel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: #667680;
  font-size: 13px;
}
.dp-publish-carousel-label,
.dp-publish-carousel-count {
  font-weight: 700;
  color: #00344a;
}
.dp-publish-carousel-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dp-publish-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #c7d5dd;
  cursor: pointer;
  transition: width .18s ease, background .18s ease;
}
.dp-publish-carousel-dot.is-active {
  width: 22px;
  background: #e23d64;
}
.dp-publish-copy {
  color: #1f2f36;
  font-size: 15px;
  line-height: 1.55;
  text-align: left !important;
  border: 1px solid #e0eaf0;
  border-radius: 16px;
  background: #fbfdfe;
  padding: 14px 16px;
  margin: 14px 0 0 0 !important;
}
.dp-publish-footer-note {
  text-align: center;
  color: #667680;
  font-size: 13px;
  margin: 18px 0 0 0 !important;
}
.dp-publish-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #667680;
  font-size: 14px;
}
.dp-publish-progress::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #cfe3ed;
  border-top-color: #e23d64;
  animation: dp-spin 0.8s linear infinite;
}
@keyframes dp-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: no-preference) {
  .dp-publish-hero,
  .dp-publish-alert,
  .dp-publish-post {
    animation: dp-publish-enter .32s ease both;
  }
  .dp-publish-post:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(0, 52, 74, 0.11);
    transition: transform .18s ease, box-shadow .18s ease;
  }
}
@keyframes dp-publish-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  .dp-publish-hero { display: block; padding: 20px !important; }
  .dp-publish-logo { margin-top: 18px !important; max-width: 180px; }
  .dp-publish-post { padding: 14px; border-radius: 18px; }
  .dp-publish-post-header { display: block; }
}

html[data-dp-theme="dark"] .dp-publish-page,
html[data-dp-theme="dark"] body.dp-publish-page {
  background: #071820 !important;
  color: #d9e6ed !important;
}
html[data-dp-theme="dark"] .dp-publish-hero,
html[data-dp-theme="dark"] .dp-publish-post,
html[data-dp-theme="dark"] .dp-publish-alert {
  background: #102630 !important;
  border-color: #365462 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24) !important;
}
html[data-dp-theme="dark"] .dp-publish-post-header,
html[data-dp-theme="dark"] .dp-publish-copy {
  background: #132d38 !important;
  border-color: #365462 !important;
}
html[data-dp-theme="dark"] .dp-publish-title,
html[data-dp-theme="dark"] .dp-publish-alert-title,
html[data-dp-theme="dark"] .dp-publish-date,
html[data-dp-theme="dark"] .dp-publish-code {
  color: #f4f8fb !important;
}
html[data-dp-theme="dark"] .dp-publish-subtitle,
html[data-dp-theme="dark"] .dp-publish-alert-body,
html[data-dp-theme="dark"] .dp-publish-meta,
html[data-dp-theme="dark"] .dp-publish-footer-note,
html[data-dp-theme="dark"] .dp-publish-progress {
  color: #a9bac3 !important;
}
html[data-dp-theme="dark"] .dp-publish-copy {
  color: #d8e5ec !important;
}
html[data-dp-theme="dark"] .dp-publish-pill,
html[data-dp-theme="dark"] .dp-publish-type {
  background: #183542 !important;
  border-color: #467081 !important;
  color: #dcebf1 !important;
}
html[data-dp-theme="dark"] .dp-publish-queue .dp-publish-pill.is-success {
  background: rgba(46, 164, 115, .20) !important;
  border-color: rgba(92, 211, 151, .48) !important;
  color: #9ee7be !important;
}
html[data-dp-theme="dark"] .dp-publish-queue .dp-publish-pill.is-error {
  background: rgba(226, 61, 100, .20) !important;
  border-color: rgba(255, 137, 164, .52) !important;
  color: #ff9db5 !important;
}
html[data-dp-theme="dark"] .dp-publish-img {
  background: #0b1d25 !important;
  border-color: #365462 !important;
}
html[data-dp-theme="dark"] .dp-publish-carousel-viewport {
  background: #0b1d25;
  border-color: rgba(214,228,234,0.14);
}
html[data-dp-theme="dark"] .dp-publish-carousel-img {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}
html[data-dp-theme="dark"] .dp-publish-carousel-control {
  background: rgba(13, 34, 43, 0.92);
  border-color: rgba(214,228,234,0.18);
  color: #f4fbff;
}
html[data-dp-theme="dark"] .dp-publish-carousel-control:hover {
  background: #e23d64;
  border-color: #e23d64;
  color: #fff;
}
html[data-dp-theme="dark"] .dp-publish-carousel-footer {
  color: #9db4be;
}
html[data-dp-theme="dark"] .dp-publish-carousel-label,
html[data-dp-theme="dark"] .dp-publish-carousel-count {
  color: #f4fbff;
}
html[data-dp-theme="dark"] .dp-publish-carousel-dot {
  background: #3b5b68;
}
html[data-dp-theme="dark"] .dp-publish-carousel-dot.is-active {
  background: #e23d64;
}

.dp-health-sections {
  display: grid;
  gap: 26px;
  margin-top: 24px !important;
}

.dp-alert {
  margin: 0 0 22px 0 !important;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.35;
}

.dp-alert-success {
  background: rgba(0, 150, 207, 0.10);
  border: 1px solid rgba(0, 150, 207, 0.28);
  color: #005f82;
}

.dp-alert-warning {
  background: rgba(255, 158, 90, 0.16);
  border: 1px solid rgba(255, 158, 90, 0.40);
  color: #8f4308;
}

.dp-alert-error {
  background: rgba(226, 61, 100, 0.12);
  border: 1px solid rgba(226, 61, 100, 0.34);
  color: #a42645;
}

html[data-dp-theme="dark"] .dp-alert-success {
  background: rgba(0, 150, 207, 0.18);
  border-color: rgba(92, 197, 235, 0.42);
  color: #a4e7ff;
}

html[data-dp-theme="dark"] .dp-alert-warning {
  background: rgba(255, 158, 90, 0.18);
  border-color: rgba(255, 194, 150, 0.42);
  color: #ffd2b0;
}

html[data-dp-theme="dark"] .dp-alert-error {
  background: rgba(226, 61, 100, 0.20);
  border-color: rgba(255, 137, 164, 0.52);
  color: #ffb0c2;
}

.dp-health-section {
  margin: 0 !important;
}

.dp-health-table td {
  vertical-align: top;
}

.dp-health-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.dp-health-pill.is-ok {
  background: rgba(0, 150, 207, 0.12);
  border: 1px solid rgba(0, 150, 207, 0.32);
  color: #006f99;
}

.dp-health-pill.is-warn {
  background: rgba(255, 158, 90, 0.18);
  border: 1px solid rgba(255, 158, 90, 0.44);
  color: #9a4c10;
}

.dp-health-pill.is-fail {
  background: rgba(226, 61, 100, 0.14);
  border: 1px solid rgba(226, 61, 100, 0.36);
  color: #b02b4d;
}

html[data-dp-theme="dark"] .dp-health-pill.is-ok {
  background: rgba(0, 150, 207, 0.22);
  border-color: rgba(92, 197, 235, 0.45);
  color: #82dfff;
}

html[data-dp-theme="dark"] .dp-health-pill.is-warn {
  background: rgba(255, 158, 90, 0.20);
  border-color: rgba(255, 194, 150, 0.45);
  color: #ffc296;
}

html[data-dp-theme="dark"] .dp-health-pill.is-fail {
  background: rgba(226, 61, 100, 0.22);
  border-color: rgba(255, 137, 164, 0.52);
  color: #ff9db5;
}
