/* SOC_NEWSLETTERS_V9_20260812 */

.newsletter-view {
    overflow: auto;
}

.newsletter-panel {
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

.newsletter-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
    gap: 18px;
}

.nl-compose,
.nl-card,
.nl-history-card {
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 20px;
    background: rgba(10, 11, 17, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.nl-compose {
    padding: 20px;
}

.nl-side {
    display: grid;
    align-content: start;
    gap: 18px;
}

.nl-card {
    padding: 17px;
}

.nl-history-card {
    grid-column: 1 / -1;
    padding: 20px;
}

.nl-section-head,
.nl-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}

.nl-section-head span,
.nl-card-title span {
    display: block;
    color: #8f79ff;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.nl-section-head h2,
.nl-card-title strong {
    margin: 4px 0 0;
    color: #fff;
}

.nl-recipient-pill {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid rgba(117, 91, 255, 0.25);
    border-radius: 999px;
    background: rgba(105, 78, 238, 0.12);
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.76rem;
}

.nl-recipient-pill b {
    color: #fff;
    font-size: 1rem;
}

.nl-compose label {
    display: grid;
    gap: 7px;
    margin-top: 13px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.8rem;
    font-weight: 800;
}

.nl-compose input,
.nl-compose textarea,
.nl-compose select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 13px;
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    font: inherit;
    outline: none;
}

.nl-compose textarea {
    min-height: 210px;
    resize: vertical;
    line-height: 1.55;
}

.nl-compose input:focus,
.nl-compose textarea:focus,
.nl-compose select:focus {
    border-color: rgba(125, 93, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(112, 82, 255, 0.08);
}

.nl-field-row,
.nl-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.nl-choice {
    grid-template-columns: auto 1fr !important;
    align-items: start;
    gap: 10px !important;
    margin-top: 0 !important;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.nl-choice.warning {
    border-color: rgba(255, 174, 64, 0.18);
    background: rgba(133, 82, 18, 0.08);
}

.nl-choice input {
    width: auto;
    margin-top: 2px;
}

.nl-choice span {
    display: grid;
    gap: 3px;
}

.nl-choice small {
    color: rgba(255, 255, 255, 0.48);
    font-weight: 500;
    line-height: 1.4;
}

.nl-test-box {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
}

.nl-test-box > div:first-child {
    display: grid;
    gap: 3px;
}

.nl-test-box small {
    color: rgba(255, 255, 255, 0.48);
}

.nl-test-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nl-staff-target {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
    margin: 0 !important;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.03);
}

.nl-staff-target input {
    width: auto;
}

.nl-staff-target span {
    display: grid;
    gap: 1px;
}

.nl-staff-target small {
    font-size: 0.68rem;
}

.nl-button {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.nl-button.primary {
    border-color: rgba(115, 82, 255, 0.4);
    background: linear-gradient(135deg, #7757ff, #5034c8);
}

.nl-button.big {
    width: 100%;
    min-height: 50px;
    margin-top: 16px;
}

.nl-button.danger {
    border-color: rgba(255, 77, 95, 0.25);
    color: #ffadb5;
}

.nl-button.ghost {
    width: 100%;
    margin-top: 8px;
    background: rgba(148, 29, 43, 0.08);
}

.nl-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.nl-preview-mail {
    padding: 22px;
    border: 1px solid #2b2d38;
    border-radius: 18px;
    background: #12131a;
}

.nl-preview-brand {
    color: #b89cff;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.nl-preview-mail h2 {
    margin: 10px 0 7px;
    color: #fff;
    font-size: 1.35rem;
}

.nl-preview-mail > small {
    color: #a9a4b2;
}

.nl-preview-body {
    margin-top: 17px;
}

.nl-preview-body p {
    margin: 0 0 13px;
    color: #d8d4dc;
    font-size: 0.82rem;
    line-height: 1.6;
}

.nl-preview-cta {
    display: inline-block;
    margin-top: 3px;
    padding: 10px 15px;
    border-radius: 999px;
    background: #7c5cff;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
}

.nl-preview-mail footer {
    margin: 19px -22px -22px;
    padding: 14px 22px;
    border-top: 1px solid #292b35;
    color: #77727f;
    font-size: 0.66rem;
    line-height: 1.5;
}

.nl-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nl-progress-head > div {
    display: grid;
    gap: 3px;
}

.nl-progress-head span {
    color: #9c86ff;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.nl-progress-head b {
    color: #fff;
}

.nl-progress-track {
    height: 8px;
    margin: 14px 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.nl-progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7656ff, #b56dff);
}

.nl-progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.nl-progress-stats span {
    display: grid;
    gap: 2px;
    padding: 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.67rem;
}

.nl-progress-stats b {
    color: #fff;
    font-size: 0.92rem;
}

.nl-progress-error {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 174, 64, 0.22);
    border-radius: 10px;
    background: rgba(155, 93, 20, 0.09);
    color: #ffc77f;
    font-size: 0.75rem;
    line-height: 1.45;
}

.nl-history-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 13px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.nl-history-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.nl-history-row > div {
    display: grid;
    gap: 4px;
}

.nl-history-row strong {
    color: #fff;
}

.nl-history-row small {
    color: rgba(255, 255, 255, 0.46);
}

.nl-history-meta {
    justify-items: end;
}

.nl-history-meta .status {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.65rem;
    font-weight: 900;
}

.nl-history-meta .status.completed {
    background: rgba(37, 151, 95, 0.15);
    color: #8ee3b5;
}

.nl-history-meta .status.paused {
    background: rgba(181, 112, 29, 0.14);
    color: #ffc97f;
}

.nl-history-meta .status.cancelled {
    background: rgba(164, 35, 51, 0.13);
    color: #ff9eaa;
}

.nl-empty {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.46);
    text-align: center;
}

@media (max-width: 1180px) {
    .newsletter-shell {
        grid-template-columns: 1fr;
    }

    .nl-history-card {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .nl-field-row,
    .nl-choice-grid {
        grid-template-columns: 1fr;
    }

    .nl-progress-stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   SOC_NEWSLETTERS_V10_DESIGN_STUDIO_20260812
========================================================== */

.nl-design-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nl-design-head > div {
    display: grid;
    gap: 4px;
}

.nl-design-head strong {
    color: #fff;
    font-size: 0.9rem;
}

.nl-design-head small {
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.72rem;
}

.nl-design-head select {
    width: min(270px, 44%);
    min-height: 42px;
}

.nl-editor-modebar {
    display: flex;
    gap: 7px;
    margin-top: 14px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.18);
}

.nl-editor-modebar button {
    flex: 1;
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(255, 255, 255, 0.56);
    font-weight: 850;
    cursor: pointer;
}

.nl-editor-modebar button.active {
    background: linear-gradient(135deg, rgba(119, 87, 255, 0.96), rgba(80, 52, 200, 0.96));
    color: #fff;
}

.nl-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px 12px 0 0;
    background: rgba(255, 255, 255, 0.025);
}

.nl-editor-toolbar[hidden] {
    display: none !important;
}

.nl-editor-toolbar button {
    min-width: 36px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0 9px;
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.nl-editor-toolbar button:hover {
    border-color: rgba(133, 105, 255, 0.48);
    background: rgba(115, 84, 255, 0.12);
}

.nl-shortcode-panel {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(133, 105, 255, 0.13);
    border-radius: 12px;
    background: rgba(102, 74, 222, 0.045);
}

.nl-shortcode-panel > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.nl-shortcode-panel strong {
    color: #fff;
    font-size: 0.78rem;
}

.nl-shortcode-panel small {
    color: rgba(255, 255, 255, 0.43);
    font-size: 0.67rem;
}

.nl-shortcodes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nl-shortcodes button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    cursor: pointer;
}

.nl-shortcodes button:hover {
    border-color: rgba(159, 129, 255, 0.42);
    background: rgba(123, 91, 255, 0.11);
}

.nl-shortcodes span {
    font-size: 0.7rem;
    font-weight: 800;
}

.nl-shortcodes code {
    color: #b8a8ff;
    font-size: 0.65rem;
}

.nl-visual-wrap,
.nl-html-wrap {
    margin-top: 10px;
}

.nl-visual-wrap[hidden],
.nl-html-wrap[hidden] {
    display: none !important;
}

.nl-visual-editor,
.nl-html-editor {
    display: block;
    width: 100%;
    min-height: 620px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #0b0c11;
}

.nl-visual-editor {
    background: #f2f2f4;
}

.nl-html-editor {
    padding: 16px;
    color: #d9d5e1;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.58;
    white-space: pre;
    tab-size: 2;
    resize: vertical;
}

.nl-preview-card {
    min-height: 730px;
}

.nl-card-title > div {
    display: grid;
    gap: 3px;
}

.nl-preview-as {
    display: grid;
    gap: 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.64rem;
    font-weight: 800;
}

.nl-preview-as select {
    min-width: 135px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    padding: 0 9px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.nl-preview-frame {
    display: block;
    width: 100%;
    height: 640px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 14px;
    background: #fff;
}

.nl-notice {
    margin-top: 12px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 0.76rem;
    line-height: 1.45;
}

.nl-notice[hidden] {
    display: none !important;
}

.nl-notice.info {
    border: 1px solid rgba(111, 155, 255, 0.22);
    background: rgba(65, 102, 181, 0.1);
    color: #bcd1ff;
}

.nl-notice.success {
    border: 1px solid rgba(62, 198, 127, 0.22);
    background: rgba(31, 139, 83, 0.1);
    color: #9ce6bd;
}

.nl-notice.warning {
    border: 1px solid rgba(255, 183, 75, 0.22);
    background: rgba(158, 98, 24, 0.1);
    color: #ffd08b;
}

.nl-notice.error {
    border: 1px solid rgba(255, 83, 101, 0.24);
    background: rgba(161, 31, 47, 0.1);
    color: #ffadb6;
}

@media (max-width: 1180px) {
    .nl-preview-card {
        min-height: 0;
    }

    .nl-preview-frame {
        height: 560px;
    }
}

@media (max-width: 700px) {
    .nl-design-head,
    .nl-shortcode-panel > div:first-child,
    .nl-card-title {
        align-items: stretch;
        flex-direction: column;
    }

    .nl-design-head select {
        width: 100%;
    }

    .nl-visual-editor,
    .nl-html-editor {
        min-height: 500px;
    }
}
