#marketing-view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.marketing-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding: 0 18px;
    background: var(--surface);
}

.marketing-heading {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.marketing-heading h1 {
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
}

.marketing-tabs {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.marketing-tabs button {
    min-height: 40px;
    flex: 0 0 auto;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    padding: 0 14px;
    color: var(--text-soft);
    cursor: pointer;
    font-weight: 650;
}

.marketing-tabs button:hover,
.marketing-tabs button.active {
    color: var(--text);
    background: #f1f3f5;
}

.marketing-tabs button.active {
    border-bottom-color: var(--ink);
}

.marketing-workspace,
.marketing-tab-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.marketing-tab-panel {
    overflow: auto;
    background: var(--surface);
}

.marketing-split {
    display: grid;
    min-height: 100%;
}

.marketing-campaign-layout,
.marketing-account-layout {
    grid-template-columns: minmax(260px, 330px) minmax(520px, 1fr);
}

.marketing-template-layout {
    grid-template-columns: minmax(230px, 280px) minmax(390px, 520px) minmax(360px, 1fr);
}

.marketing-template-layout > .marketing-editor-pane {
    align-self: start;
    height: max-content;
}

.marketing-template-layout > .marketing-editor-pane .marketing-form-scroll {
    flex: 0 0 auto;
    overflow: visible;
}

.marketing-list-pane,
.marketing-table-pane,
.marketing-editor-pane,
.marketing-preview-pane {
    min-width: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.marketing-preview-pane {
    border-right: 0;
    background: #eef1f4;
}

.marketing-pane-header,
.marketing-section-toolbar,
.marketing-editor-footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    background: var(--surface);
}

.marketing-pane-header > div:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.marketing-pane-header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-pane-header span,
.marketing-form-status {
    color: var(--text-soft);
    font-size: 12px;
}

.marketing-header-actions,
.marketing-editor-footer > div,
.marketing-inline-form,
.marketing-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marketing-record-list {
    overflow: auto;
}

.marketing-record {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 13px 16px;
    color: var(--text);
	font: inherit;
    text-align: left;
    cursor: pointer;
}

.marketing-record-main {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.marketing-template-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.marketing-store-icon {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border: 1px solid #c7cdd3;
    border-radius: 5px;
    background: #fff;
    color: #39424b;
    font-size: 11px;
}

.marketing-store-icon img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.marketing-store-marked-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.marketing-store-marked-copy {
    display: grid;
    min-width: 0;
}

.marketing-store-marked-copy strong,
.marketing-store-marked-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-record-meta {
    color: var(--text-soft);
    font-size: 11px;
    text-align: right;
}

.marketing-record-times {
    display: grid;
    min-width: 0;
    gap: 2px;
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.35;
}

.marketing-record-times span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-record-tools {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.marketing-record-action {
	display: inline-grid;
	width: 26px;
	height: 26px;
	place-items: center;
	border: 1px solid var(--line-dark);
	border-radius: 4px;
	background: var(--surface);
	color: var(--text-soft);
	cursor: pointer;
}

.marketing-record-action:hover:not(:disabled) {
	border-color: var(--ink);
	color: var(--ink);
}

.marketing-record-action:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.marketing-progress {
    height: 4px;
    grid-column: 1 / -1;
    overflow: hidden;
    background: #e4e8ec;
}

.marketing-progress i {
    display: block;
    height: 100%;
    background: var(--green);
}

.marketing-mode-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    border: 1px solid #dfc488;
    border-radius: 4px;
    padding: 3px 8px;
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 11px;
    font-weight: 750;
}

.marketing-record:hover {
    background: #f3f5f7;
}

.marketing-record.disabled {
    opacity: 0.62;
}

.marketing-record.active {
    background: #eef1f4;
    box-shadow: inset 3px 0 0 var(--ink);
}

.marketing-record-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.marketing-record strong,
.marketing-record small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-record small {
    color: var(--text-soft);
}

.marketing-editor-pane {
    display: flex;
    min-height: 0;
    flex-direction: column;
}

.marketing-form-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding: 18px;
}

.marketing-form-grid {
    display: grid;
    gap: 14px;
}

.marketing-form-grid + .marketing-form-grid,
.marketing-form-grid + .marketing-product-module-grid,
.marketing-form-grid + .marketing-switch {
    margin-top: 16px;
}

.marketing-form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-form-grid label,
.marketing-inline-form label,
.marketing-section-toolbar > label {
    display: grid;
    min-width: 0;
    gap: 6px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

.marketing-form-grid label.wide {
    grid-column: 1 / -1;
}

.marketing-form-grid input,
.marketing-form-grid select,
.marketing-form-grid textarea,
.marketing-inline-form input,
.marketing-inline-form select,
.marketing-section-toolbar select,
.marketing-search input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid var(--line-dark);
    border-radius: 5px;
    background: #fff;
    padding: 8px 10px;
    color: var(--text);
}

.marketing-form-grid textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.55;
}

.marketing-audience-summary {
    display: flex;
    min-height: 70px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--ink);
    padding: 10px 13px;
}

.marketing-audience-summary strong {
    font-size: 24px;
}

.marketing-audience-summary small {
    margin-left: auto;
    color: var(--text-soft);
}

.marketing-test-row {
    display: flex;
    align-items: center;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.marketing-whitelist-test {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.marketing-whitelist-test input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ink);
}

.marketing-editor-footer {
    min-height: 66px;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.marketing-picker-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 6px 10px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

.marketing-picker-field > span {
    grid-column: 1 / -1;
}

.marketing-picker-field .button {
    justify-content: center;
}

.marketing-picker-field small {
    min-width: 48px;
    padding-bottom: 11px;
    color: var(--text-soft);
    text-align: right;
}

.marketing-selected-banners {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.marketing-selected-banner {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f7f8f9;
}

.marketing-selected-banner img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    background: #fff;
}

.marketing-selected-banner span {
    display: block;
    overflow: hidden;
    padding: 7px 32px 7px 8px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-selected-banner .icon-button {
    position: absolute;
    right: 4px;
    bottom: 3px;
    width: 26px;
    height: 26px;
}

.marketing-product-modules {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.marketing-product-module {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.marketing-product-module > header {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.marketing-product-module > header label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
}

.marketing-product-module > header label:last-child {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
}

.marketing-product-module > header input[type="number"] {
    width: 58px;
    min-height: 34px;
    border: 1px solid var(--line-dark);
    border-radius: 4px;
    padding: 5px 7px;
}

.marketing-product-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.marketing-product-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
}

.marketing-product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f7f8f9;
    padding: 5px;
}

.marketing-product-image-empty {
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    background: #f4f6f8;
    color: #9aa2aa;
    font-size: 24px;
}

.marketing-product-card-body {
    display: grid;
    gap: 3px;
    padding: 7px;
}

.marketing-product-card strong,
.marketing-product-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-product-card strong {
    font-size: 10px;
}

.marketing-product-card small {
    color: var(--text-soft);
    font-size: 9px;
}

.marketing-product-card-price {
    color: #b42318;
    font-size: 11px;
    font-weight: 750;
}

.marketing-product-card .marketing-product-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 27px;
    height: 27px;
    background: rgba(255, 255, 255, .94);
}

.marketing-product-cards .marketing-module-empty {
    min-height: 72px;
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    border: 1px dashed #cbd1d7;
    color: var(--text-soft);
    font-size: 11px;
}

.marketing-image-product-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.marketing-image-product-cards .marketing-module-empty {
    display: grid;
    min-height: 82px;
    grid-column: 1 / -1;
    place-items: center;
    border: 1px dashed #cbd1d7;
    color: var(--text-soft);
    font-size: 11px;
}

.marketing-image-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
}

.marketing-image-product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #f4f6f8;
}

.marketing-image-product-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.marketing-image-product-media .icon-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, .94);
}

.marketing-image-product-card-body {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 7px;
    padding: 9px;
}

.marketing-image-product-material-name,
.marketing-image-product-linked strong,
.marketing-image-product-linked small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-image-product-material-name {
    font-size: 11px;
}

.marketing-image-product-linked {
    display: grid;
    min-width: 0;
    gap: 4px;
    border-top: 1px solid var(--line);
    padding-top: 7px;
}

.marketing-image-product-linked strong {
    font-size: 11px;
}

.marketing-image-product-linked small,
.marketing-image-product-unlinked {
    color: var(--text-soft);
    font-size: 10px;
}

.marketing-image-product-unlinked {
    display: block;
    border-top: 1px solid var(--line);
    padding-top: 7px;
}

.marketing-image-product-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: max-content;
    color: var(--blue);
    font-size: 10px;
    text-decoration: none;
}

.marketing-image-product-link-button {
    width: 100%;
    margin-top: auto;
    justify-content: center;
}

.marketing-safety-message {
    margin: 14px 0 0;
    border-left: 4px solid var(--red);
    background: var(--red-soft);
    padding: 10px 12px;
    color: var(--red);
    font-weight: 700;
}

.marketing-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-weight: 650;
}

.marketing-banner-preview {
    position: relative;
    margin-top: 14px;
    border: 1px solid var(--line);
    background: #f5f6f7;
}

.marketing-banner-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.marketing-banner-preview button {
    position: absolute;
    top: 8px;
    right: 8px;
}

#marketing-preview-frame {
    display: block;
    width: 100%;
    min-height: 960px;
    border: 0;
    background: #fff;
    overflow: hidden;
}

#marketing-preview-variants {
    width: min(260px, 48vw);
    max-width: 100%;
    min-height: 36px;
    border: 1px solid var(--line-dark);
    background: #fff;
    padding: 6px 8px;
}

.marketing-section-toolbar {
    flex-wrap: wrap;
}

.marketing-inline-form {
    flex-wrap: wrap;
}

.marketing-inline-form label:first-child {
    width: 220px;
}

.marketing-inline-form label:nth-child(2) {
    min-width: 280px;
}

.marketing-table-wrap {
    width: 100%;
    overflow: auto;
}

.marketing-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.marketing-table th,
.marketing-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.marketing-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f6f8;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.marketing-table tbody tr[data-account-id] {
    cursor: pointer;
}

.marketing-table tbody tr[data-contact-pool-id],
.marketing-table tbody tr[data-sender-pool-id],
.marketing-table tbody tr[data-content-key],
.marketing-table tbody tr[data-banner-id],
.marketing-table tbody tr[data-product-pool-id] {
    cursor: pointer;
}

.marketing-table tbody tr:hover {
    background: #fafbfc;
}

.marketing-table tbody tr.selected {
    background: #eef1f4;
    box-shadow: inset 3px 0 0 var(--ink);
}

.marketing-table td strong,
.marketing-table td small {
    display: block;
}

.marketing-table td small {
    margin-top: 4px;
    color: var(--text-soft);
}

.marketing-contact-pool-table {
    min-width: 760px;
    table-layout: fixed;
}

.marketing-contact-pool-table th:nth-child(1) {
    width: 33%;
}

.marketing-contact-pool-table th:nth-child(2) {
    width: 18%;
}

.marketing-contact-pool-table th:nth-child(3) {
    width: 13%;
}

.marketing-contact-pool-table th:nth-child(4) {
    width: 12%;
}

.marketing-contact-pool-table th:nth-child(5) {
    width: 16%;
}

.marketing-contact-pool-table th:nth-child(6) {
    width: 8%;
}

.marketing-contact-pool-table td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-table-actions {
    width: 56px;
    text-align: right !important;
}

.marketing-empty-cell {
    height: 180px;
    color: var(--text-soft);
    text-align: center !important;
    vertical-align: middle !important;
}

.marketing-error-cell {
    max-width: 280px;
    overflow: hidden;
    color: var(--red);
    text-overflow: ellipsis;
}

.marketing-wrap-cell {
    max-width: 560px;
    white-space: normal !important;
    line-height: 1.5;
}

.marketing-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    border-bottom: 1px solid var(--line);
}

.compact-editor {
    min-height: 330px;
}

.marketing-import-toolbar {
    border-top: 10px solid #f1f3f5;
}

.marketing-asset-sections {
    display: grid;
    gap: 10px;
    background: #eef1f4;
}

.marketing-asset-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 440px);
    min-height: 360px;
}

.marketing-asset-form {
    display: grid;
    align-content: start;
    gap: 14px;
    border-left: 1px solid var(--line);
    padding: 16px;
    background: #fff;
}

.marketing-asset-form > label:not(.marketing-switch) {
    display: grid;
    gap: 6px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

.marketing-asset-form textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--line-dark);
    resize: vertical;
    padding: 8px 10px;
}

.marketing-copy-fields {
    display: grid;
    gap: 10px;
}

.marketing-copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: end;
    gap: 8px;
}

.marketing-copy-field > label {
    display: grid;
    min-width: 0;
    gap: 5px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

.marketing-copy-field input,
.marketing-copy-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    border: 1px solid var(--line-dark);
    border-radius: 5px;
    background: #fff;
    padding: 8px 9px;
    color: var(--text);
}

.marketing-copy-field-promo {
    align-items: start;
}

.marketing-copy-field-promo textarea {
    min-height: 108px;
    line-height: 1.5;
}

.marketing-contact-pool-rows-layer {
    z-index: 3450;
}

.marketing-contact-pool-rows-dialog {
    display: flex;
    width: min(1500px, calc(100vw - 36px));
    height: min(860px, calc(100dvh - 36px));
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #7c858e;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 74px rgba(18, 21, 25, .28);
}

.marketing-contact-pool-rows-table-wrap {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    background: #fff;
}

.marketing-contact-pool-rows-table {
    width: max-content;
    min-width: 100%;
}

.marketing-contact-pool-rows-table th,
.marketing-contact-pool-rows-table td {
    max-width: 280px;
}

.marketing-contact-pool-rows-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.marketing-contact-pool-rows-table .marketing-import-remark {
    max-width: 360px;
    white-space: normal;
}

.marketing-import-row-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border: 1px solid #b8c0c8;
    border-radius: 4px;
    padding: 2px 7px;
    background: #f2f4f6;
    color: #39424b;
    font-size: 11px;
    font-weight: 700;
}

.marketing-import-row-status.valid {
    border-color: #9bc5aa;
    background: #eaf5ed;
    color: #24683b;
}

.marketing-import-row-status.duplicate {
    border-color: #e2c079;
    background: #fff5dc;
    color: #835a00;
}

.marketing-import-row-status.invalid_email {
    border-color: #d6a3a3;
    background: #fbecec;
    color: #9a2e2e;
}

.marketing-import-row-status.suppressed {
    border-color: #b6a7c7;
    background: #f2edf7;
    color: #63447e;
}

.marketing-contact-pool-rows-footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding: 10px 14px;
    background: #f7f8f9;
    color: var(--text-soft);
    font-size: 12px;
}

#marketing-contact-pool-rows-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

#marketing-contact-pool-rows-pagination > span {
    min-width: 96px;
    text-align: center;
}

.marketing-picker-layer {
    z-index: 3400;
}

.marketing-picker-dialog {
    display: flex;
    width: min(1040px, calc(100vw - 36px));
    height: min(780px, calc(100dvh - 36px));
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #7c858e;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 74px rgba(18, 21, 25, .28);
}

.marketing-picker-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
}

.marketing-picker-toolbar > i {
    color: var(--text-soft);
}

.marketing-picker-toolbar input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    border: 1px solid var(--line-dark);
    border-radius: 4px;
    padding: 7px 10px;
}

.marketing-picker-grid {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: 12px;
    overflow-y: auto;
    padding: 14px;
}

.marketing-picker-item {
    position: relative;
    display: grid;
    grid-template-rows: auto auto;
    min-width: 0;
    height: max-content;
    align-self: start;
    overflow: hidden;
    border: 1px solid #c7cdd3;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.marketing-picker-item:hover,
.marketing-picker-item.selected {
    border-color: #59636d;
    box-shadow: inset 0 0 0 1px #59636d;
}

.marketing-picker-item input {
    position: absolute;
    z-index: 1;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    accent-color: #343c44;
}

.marketing-picker-item img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f4f6f8;
    padding: 6px;
}

.marketing-picker-item > .marketing-product-image-empty {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.marketing-picker-item-body {
    display: grid;
    min-width: 0;
    gap: 3px;
    border-top: 1px solid var(--line);
    padding: 8px;
}

.marketing-picker-item strong,
.marketing-picker-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-picker-item strong {
    font-size: 11px;
}

.marketing-picker-item small {
    color: var(--text-soft);
    font-size: 9px;
}

.marketing-picker-footer {
    display: flex;
    min-height: 62px;
    flex: 0 0 62px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 10px 14px;
}

.marketing-picker-footer > span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}

.marketing-picker-footer > div {
    display: flex;
    gap: 8px;
}

.marketing-picker-empty {
    display: grid;
    min-height: 220px;
    grid-column: 1 / -1;
    place-items: center;
    color: var(--text-soft);
}

.marketing-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.marketing-banner-thumb {
    display: inline-block;
    width: 72px;
    height: 42px;
    margin-right: 10px;
    object-fit: contain;
    vertical-align: middle;
    background: #f3f5f7;
}

.marketing-account-checks {
    margin: 16px 0 0;
    border: 1px solid var(--line);
    padding: 10px 12px;
}

.marketing-account-checks legend {
    padding: 0 6px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.marketing-account-checks > div {
    display: grid;
    gap: 8px;
}

.marketing-account-checks label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marketing-sender-account-summary {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.marketing-sender-account-summary > header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
}

.marketing-sender-account-summary > header > div,
.marketing-sender-account-chip span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.marketing-sender-account-summary small,
.marketing-sender-account-chip small,
.marketing-sender-account-empty {
    color: var(--text-soft);
    font-size: 12px;
}

.marketing-sender-account-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 14px;
}

.marketing-sender-account-chip {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 9px 10px;
    background: #f8f9fa;
}

.marketing-sender-account-chip i {
    color: #2b7a48;
}

.marketing-sender-account-chip strong,
.marketing-sender-account-chip small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketing-sender-account-layer {
    z-index: 3500;
}

.marketing-sender-account-dialog {
    display: flex;
    width: min(1220px, calc(100vw - 36px));
    height: min(850px, calc(100dvh - 36px));
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #7c858e;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 74px rgba(18, 21, 25, .28);
}

.marketing-sender-account-layout {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
}

.marketing-sender-account-list-pane,
.marketing-sender-account-form {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.marketing-sender-account-list-pane {
    border-right: 1px solid var(--line);
}

.marketing-sender-account-list-pane .marketing-table-wrap {
    height: calc(100% - 58px);
}

.marketing-sender-account-form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.marketing-sender-account-scroll {
    min-height: 0;
    overflow: auto;
    padding: 16px;
}

.marketing-form-grid.three-columns {
    grid-template-columns: minmax(0, 2fr) minmax(90px, .7fr) minmax(130px, 1fr);
}

.marketing-server-fields {
    margin: 16px 0 0;
    border: 1px solid var(--line);
    padding: 12px;
}

.marketing-server-fields legend {
    padding: 0 6px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 750;
}

.marketing-sender-provider-note {
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 12px;
}

#marketing-sender-account-list tr[data-sender-account-id] {
    cursor: pointer;
}

.marketing-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border: 1px solid var(--line-dark);
    border-radius: 4px;
    padding: 2px 7px;
    background: #f4f6f8;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 750;
}

.marketing-status.sent,
.marketing-status.completed,
.marketing-status.sending,
.marketing-status.testing {
    border-color: #9bcbb1;
    background: var(--green-soft);
    color: var(--green);
}

.marketing-status.scheduled {
    border-color: #a8c4e4;
    background: var(--blue-soft);
    color: var(--blue);
}

.marketing-status.failed,
.marketing-status.cancelled,
.marketing-status.suppressed {
    border-color: #e6b2b7;
    background: var(--red-soft);
    color: var(--red);
}

.marketing-status.paused,
.marketing-status.pending,
.marketing-status.draft {
    border-color: #dfc488;
    background: var(--amber-soft);
    color: var(--amber);
}

.marketing-report-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(100px, 1fr));
    gap: 1px;
    border-bottom: 1px solid var(--line);
    background: var(--line);
}

.marketing-report-summary > div {
    min-height: 74px;
    background: var(--surface);
    padding: 12px 14px;
}

.marketing-report-summary span,
.marketing-report-summary strong {
    display: block;
}

.marketing-report-summary span {
    color: var(--text-soft);
    font-size: 11px;
}

.marketing-report-summary strong {
    margin-top: 6px;
    font-size: 21px;
}

.marketing-search {
    margin-left: auto;
}

.marketing-search input {
    width: min(320px, 42vw);
    border-color: #aeb5bd;
}

#marketing-view .pagination-bar {
    border-top: 1px solid var(--line);
    padding: 10px 14px;
}

@media (max-width: 1180px) {
    .marketing-template-layout {
        grid-template-columns: 250px minmax(380px, 1fr);
    }

    .marketing-template-layout .marketing-preview-pane {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
    }

    #marketing-preview-frame {
        min-height: 600px;
    }

    .marketing-asset-layout,
    .marketing-management-grid {
        grid-template-columns: 1fr;
    }

    .marketing-asset-form {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 800px) {
    .marketing-header {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding: 12px 14px 0;
    }

    .marketing-heading {
        min-height: 38px;
    }

    .marketing-split,
    .marketing-campaign-layout,
    .marketing-account-layout,
    .marketing-template-layout {
        display: block;
    }

    .marketing-list-pane,
    .marketing-table-pane,
    .marketing-editor-pane,
    .marketing-preview-pane {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .marketing-record-list {
        max-height: 260px;
    }

    .marketing-form-grid.two-columns,
    .marketing-product-module-grid,
    .marketing-report-summary {
        grid-template-columns: 1fr 1fr;
    }

    .marketing-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .marketing-sender-account-layout {
        grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
    }

    .marketing-form-grid.three-columns {
        grid-template-columns: 1fr 100px;
    }

    .marketing-form-grid.three-columns label:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .marketing-tabs button {
        padding: 0 10px;
        font-size: 12px;
    }

    .marketing-form-grid.two-columns,
    .marketing-form-grid.three-columns,
    .marketing-product-module-grid,
    .marketing-report-summary,
    .marketing-test-row {
        grid-template-columns: 1fr;
    }

    .marketing-form-scroll {
        padding: 14px;
    }

    .marketing-selected-banners,
    .marketing-product-cards,
    .marketing-image-product-cards,
    .marketing-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketing-picker-layer {
        padding: 0;
    }

	.marketing-contact-pool-rows-layer {
		padding: 0;
	}

	.marketing-contact-pool-rows-dialog {
		width: 100%;
		height: 100dvh;
		border: 0;
		border-radius: 0;
	}

	.marketing-sender-account-layer {
		padding: 0;
	}

	.marketing-sender-account-dialog {
		width: 100%;
		height: 100dvh;
		border: 0;
		border-radius: 0;
	}

	.marketing-sender-account-layout {
		display: block;
		overflow: auto;
	}

	.marketing-sender-account-list-pane {
		height: 280px;
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}

	.marketing-sender-account-form {
		min-height: calc(100dvh - 280px - 48px);
	}

	.marketing-sender-account-summary-list {
		grid-template-columns: 1fr;
	}

	.marketing-contact-pool-rows-footer {
		align-items: flex-start;
		flex-direction: column;
	}

    .marketing-picker-dialog {
        width: 100%;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .marketing-pane-header,
    .marketing-editor-footer,
    .marketing-section-toolbar {
        padding-right: 12px;
        padding-left: 12px;
    }

    .marketing-editor-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .marketing-editor-footer > div {
        width: 100%;
        flex-wrap: wrap;
    }

    .marketing-inline-form,
    .marketing-inline-form label:first-child,
    .marketing-inline-form label:nth-child(2) {
        width: 100%;
        min-width: 0;
    }
}
