/* ═══════════════════════════════════════════════
   DESIGN TOKENS — ACI UK
═══════════════════════════════════════════════ */
:root {
    --teal:        #00a99d;
    --teal-dark:   #007f75;
    --teal-light:  #33bfb5;
    --teal-glow:   rgba(0, 169, 157, 0.25);
    --teal-subtle: rgba(0, 169, 157, 0.10);

    --navy:        #0d1f2d;
    --navy-mid:    #122333;
    --navy-light:  #1a3048;

    --bg-base:       #0b1a27;
    --bg-raised:     #0f2132;
    --bg-card:       #132840;
    --bg-card-hover: #1a3350;
    --bg-input:      #0f2132;

    --border:     #1c3a52;
    --border-mid: #234a66;

    --text-primary:   #e6f2f8;
    --text-secondary: #90bdd4;
    --text-muted:     #527d96;
    --text-dim:       #345a70;

    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-pill: 30px;

    --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg-base);
    min-height: 100vh;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0b1a27 0%, #132840 100%);
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 60px 50px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 60px var(--teal-glow);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    filter: brightness(0) invert(1);
    display: block;
    max-width: 150px;
    margin: 0 auto;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-subtle);
}

.login-btn {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 15px var(--teal-glow);
    margin-top: 10px;
}

.login-btn:hover {
    box-shadow: 0 8px 25px var(--teal-glow);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: var(--radius-sm);
    color: #ff6b6b;
    font-size: 13px;
    text-align: center;
    display: none;
}

.login-error:not(:empty) {
    display: block;
}

/* ═══════════════════════════════════════════════
   APP CONTAINER
═══════════════════════════════════════════════ */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════
   SCROLLBARS
═══════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-mid);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--teal);
}

/* ═══════════════════════════════════════════════
   LAYOUT SHELL
═══════════════════════════════════════════════ */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-card);
}

#app {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Loader */
.app-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(11, 26, 39, 0.97);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-loader-spinner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--teal-light);
    animation: spinLoader 0.9s linear infinite;
}

.app-loader-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    border-bottom: 3px solid var(--teal);
    padding: 22px 40px;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo-section {
    flex-shrink: 0;
}

.logo img {
    filter: brightness(0) invert(1);
    display: block;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.current-user {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    background: rgba(0, 169, 157, 0.12);
    border: 1px solid rgba(0, 169, 157, 0.4);
    color: var(--teal-light);
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.logout-btn:active {
    transform: scale(0.98);
}

.move-btn {
    background: rgba(0, 169, 157, 0.12);
    border: 1px solid rgba(0, 169, 157, 0.4);
    color: var(--teal-light);
    padding: 5px 10px 0 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s;
}

.move-btn:hover {
    background: #ffffff;
    border-color: var(--teal);
    color: white;
}

.move-btn img{
    filter: brightness(0) invert(1);
    transition: all 0.2s;
}

.move-btn:hover img{
    filter: brightness(1) invert(0);
    transition: all 0.2s;
}


.move-btn:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════════
   BADGE SYSTEM
═══════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-action {
    background: var(--teal-subtle);
    color: var(--teal-light);
    border: 1px solid rgba(0, 169, 157, 0.3);
}

.badge-count {
    background: var(--border);
    color: var(--text-muted);
    border: 1px solid var(--border-mid);
}

.badge-status {
    background: rgba(0, 169, 157, 0.12);
    color: var(--teal-light);
    border: 1px solid rgba(0, 169, 157, 0.3);
}

.badge-reason {
    background: rgba(70, 130, 200, 0.12);
    color: #7eb8e8;
    border: 1px solid rgba(70, 130, 200, 0.25);
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════
   EMPTY / NO RESULTS
═══════════════════════════════════════════════ */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 10px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    opacity: 0.2;
    stroke: var(--teal);
    margin-bottom: 10px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   CAMPAIGN VIEW
═══════════════════════════════════════════════ */
.campaign-view {
    width: 100%;
    padding: 40px 50px;
    overflow-y: auto;
    background: var(--bg-card);
}

.campaign-search-wrap {
    position: relative;
    max-width: 520px;
    margin-bottom: 32px;
}

.campaign-search-wrap input {
    width: 100%;
    padding: 13px 46px 13px 18px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-family: var(--font);
    background: var(--bg-raised);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.campaign-search-wrap input::placeholder {
    color: var(--text-dim);
}

.campaign-search-wrap input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-subtle);
}

.campaign-search-wrap .search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    pointer-events: none;
}

.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 18px;
}

.campaign-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.campaign-card:hover {
    border-color: var(--teal);
    box-shadow: 0 8px 28px var(--teal-glow);
    transform: translateY(-4px);
}

.campaign-card-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.campaign-icon {
    width: 52px;
    height: 52px;
    background: var(--teal-subtle);
    border: 1px solid rgba(0, 169, 157, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.campaign-card-body {
    flex: 1;
    min-width: 0;
}

.campaign-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.campaign-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.campaign-stats {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.campaign-stats strong {
    color: var(--text-secondary);
}

.stat-sep {
    color: var(--border-mid);
}

.campaign-arrow {
    font-size: 20px;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: color 0.25s, transform 0.25s;
}

.campaign-card:hover .campaign-arrow {
    color: var(--teal-light);
    transform: translateX(5px);
}

/* ═══════════════════════════════════════════════
   STRATEGY VIEW
═══════════════════════════════════════════════ */
.strategy-view {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Sidebar ── */
.sidebar {
    width: 380px;
    min-width: 340px;
    border-right: 1px solid var(--border);
    background: var(--bg-raised);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 18px 18px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    align-self: flex-start;
}

.back-btn:hover {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.sidebar-campaign-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    border-left: 3px solid var(--teal);
    padding-left: 12px;
    margin-bottom: 10px;
}

.sidebar-campaign-codes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.strategy-search-bar input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.strategy-search-bar input::placeholder {
    color: var(--text-dim);
}

.strategy-search-bar input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-subtle);
}

.strategy-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 12px;
}

.strategy-list-items {
    flex: 1;
    overflow-y: auto;
}

.strategy-item {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-md);
    padding: 13px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.strategy-item:hover {
    border-color: var(--teal);
    box-shadow: 0 4px 14px var(--teal-glow);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.strategy-item.active {
    border-color: var(--teal);
    background: linear-gradient(135deg, #0d2a35 0%, var(--bg-card-hover) 100%);
    box-shadow: 0 4px 18px var(--teal-glow);
}

.strategy-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.strategy-item-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Pagination ── */
.pagination {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 4px 4px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.pagination-info {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.pagination-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 30px;
    text-align: center;
}

.page-number:hover {
    background: var(--teal-subtle);
    border-color: var(--teal);
    color: var(--teal-light);
}

.page-number.active {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.page-ellipsis {
    padding: 5px 3px;
    color: var(--text-dim);
    font-size: 12px;
    align-self: center;
}

/* ── Detail Panel ── */
.detail-panel {
    flex: 1;
    overflow-y: auto;
    padding: 40px 50px;
    background: var(--bg-card);
}

.detail-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--teal);
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.2;
}

.detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════ */
.timeline {
    position: relative;
    padding-left: 38px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--teal) 0%, var(--border) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 34px;
}

.timeline-dot {
    position: absolute;
    left: -31px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--teal);
    z-index: 1;
    box-shadow: 0 0 0 4px var(--teal-subtle);
}

.timeline-day {
    display: inline-block;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    color: white;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px var(--teal-glow);
}

/* ═══════════════════════════════════════════════
   COMM CARDS
═══════════════════════════════════════════════ */
.comm-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.comm-card:hover {
    border-color: var(--teal);
    box-shadow: 0 6px 20px var(--teal-glow);
    transform: translateY(-2px);
}

.comm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.comm-name-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.comm-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.comm-action-badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    color: white;
    flex-shrink: 0;
}

.preview-btn {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.25s;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px var(--teal-glow);
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 15px;
}

.preview-megapack {
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.25s;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px var(--teal-glow);
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 15px;
}

.preview-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 169, 157, 0.5);
    transform: translateY(-2px);
}

.preview-btn:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   STATUS SECTION
═══════════════════════════════════════════════ */
.status-section {
    margin-top: 36px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(0, 127, 117, 0.1), rgba(0, 169, 157, 0.05));
    border-left: 4px solid var(--teal);
    border-radius: var(--radius-md);
}

.status-title {
    font-weight: 800;
    color: var(--teal-light);
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.87);
    animation: fadeIn 0.25s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    width: 92%;
    max-width: 1100px;
    max-height: 92vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-mid);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
    padding: 22px 36px;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 26px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(90deg);
}

.modal-body {
    padding: 36px;
    overflow-y: auto;
    flex: 1;
    background: white;
    color: black;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: 0 auto;
}

.modal-body .comm-body-shell {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

.modal-body.sms-preview {
    background: #f2f2f7;
}

.modal-body .sms-thread {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 8px 0;
}

.modal-body .sms-bubble {
    display: inline-block;
    max-width: min(88%, 520px);
    padding: 11px 14px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.45;
    background: #e9e9eb;
    color: #111111;
    border-top-left-radius: 6px;
    word-break: break-word;
    white-space: normal;
}

.modal-body .sms-bubble p:first-child { margin-top: 0; }
.modal-body .sms-bubble p:last-child  { margin-bottom: 0; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .strategy-view {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: unset;
        max-height: 320px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .detail-panel {
        padding: 24px 20px;
    }

    .campaign-view {
        padding: 24px 20px;
    }

    .campaign-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 18px 20px;
    }

    .timeline {
        padding-left: 28px;
    }
}