/* =========================================
   CAMPAIGNS PAGE STYLES
   ========================================= */

/* Page title inside header */
.cp-page-title {
    font-size: 17px;
    font-weight: 700;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Main container for campaigns */
.cp-main {
    padding: 25px 0 0 0;
    margin: 0;
    display: block;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
}

/* ── TABS BAR ── */
.cp-tabs-bar {
    display: flex;
    align-items: flex-end;
    gap: 0;
    border-bottom: none;
    background: #ffffff;
    padding: 0 24px;
    position: sticky;
    z-index: 40;
    margin: 0;
    box-shadow: none;
    height: auto;
    flex-shrink: 0;
}

.cp-tab {
    padding: 8px 0 10px;
    margin-right: 20px;
    margin-bottom: -1px;
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    outline: none;
    white-space: nowrap;
}

.cp-tab.cp-tab-active {
    color: rgb(30, 41, 59);
    border-bottom: 2px solid rgb(29, 78, 216);
    border-radius: 0;
}

/* ── TAB CONTENT ── */
.cp-content {
    padding: 5px 24px 32px;
    flex: 1;
    position: relative;
    margin-top: 0;
}

.cp-hidden {
    display: none !important;
}

/* ── DESCRIPTION ── */
.cp-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px 0;
    line-height: 1.6;
    padding-top: 0;
    font-family: 'Inter', sans-serif;
}

.cp-link {
    color: rgb(29, 78, 216);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

/* ── STAT CARDS ── */
.cp-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    margin-top: 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cp-stat {
    background: rgb(239, 246, 255);
    border-radius: 8px;
    padding: 14px 22px;
    min-width: 150px;
}

.cp-stat-num {
    font-size: 26px;
    font-weight: 700;
    color: rgb(29, 78, 216);
    font-family: 'Inter', sans-serif;
    line-height: 1.2;
}

.cp-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(29, 78, 216);
    font-family: 'Inter', sans-serif;
    margin-top: 3px;
}

/* ── FILTERS ROW ── */
.cp-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.cp-filters-l {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cp-filters-r {
    flex-shrink: 0;
}

/* Search */
.cp-search-box {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 360px;
    min-width: 360px;
    flex-shrink: 0;
}

.cp-search-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.cp-search-inp {
    width: 100%;
    height: 34px;
    padding: 7px 14px;
    padding-left: 35px !important;
    font-size: 13px !important;
    font-family: 'Inter', sans-serif;
    color: rgb(30, 41, 59);
    background: rgb(241, 245, 249) !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none !important;
    -webkit-appearance: none;
    box-sizing: border-box;
    line-height: 1;
}

.cp-search-inp:focus {
    border-color: #e2e8f0;
    background: rgb(241, 245, 249) !important;
    outline: none !important;
    box-shadow: none !important;
}

.cp-search-inp::placeholder {
    color: #94a3b8;
}

/* Select wrapper - mismo tamaño que search y botón: 180×34 */
.cp-sel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 180px;
    min-width: 180px;
    height: 34px;
    box-sizing: border-box;
    gap: 8px;
    background: rgb(241, 245, 249);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.cp-sel-wrap:hover {
    background: #f1f5f9;
}

.cp-sel-wrap:focus-within {
    background: #f1f5f9;
    outline: none;
    box-shadow: none;
    border-color: #e2e8f0;
}

.cp-sel {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: rgb(30, 41, 59);
    text-align: left;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.cp-sel:focus {
    outline: none;
    box-shadow: none;
}

.cp-sel-arr {
    width: 14px;
    height: 14px;
    color: #64748b;
    flex-shrink: 0;
    pointer-events: none;
    margin-left: auto;
}

/* New Promotion Button - más estrecho, mismo alto 34px */
.cp-btn-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 120px;
    height: 34px;
    padding: 0 20px;
    box-sizing: border-box;
    background: rgb(29, 78, 216);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    outline: none;
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cp-btn-new:hover {
    background: rgb(30, 64, 175);
}

.cp-btn-new:focus {
    outline: none;
    box-shadow: none;
}

/* ── FILTER PILLS ── */
.cp-pills {
    display: flex;
    gap: 7px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.cp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}

.cp-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ── TABLE ── */
.cp-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    overflow-x: auto;
}

.cp-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    min-width: 800px;
}

.cp-table thead tr {
    background: #f8fafc;
}

.cp-table th {
    padding: 9px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.cp-th-sub {
    opacity: 0.6;
    font-size: 10px;
    margin-left: 2px;
}

.cp-th-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cp-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.cp-table tbody tr:last-child {
    border-bottom: none;
}

.cp-table tbody tr:hover {
    background: #f8fafc;
}

.cp-table td {
    padding: 11px 14px;
    vertical-align: top;
    color: rgb(30, 41, 59);
}

.cp-muted {
    color: #94a3b8 !important;
}

.cp-promo-name {
    font-weight: 500;
    color: rgb(30, 41, 59);
    margin-bottom: 2px;
    line-height: 1.4;
}

.cp-promo-sub {
    font-size: 11px;
    color: #94a3b8;
}

/* Profile cell */
.cp-profile-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.cp-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cp-av-img {
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

/* Badge */
.cp-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.cp-active {
    background: #dcfce7;
    color: #16a34a;
}

.cp-paused {
    background: #fef9c3;
    color: #ca8a04;
}

/* Engagement rate */
.cp-eng {
    font-weight: 500;
    color: rgb(30, 41, 59);
}

/* Sounds */
.cp-snd {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgb(30, 41, 59);
    margin-bottom: 2px;
    white-space: nowrap;
}

.cp-snd-ic {
    color: #94a3b8;
    font-size: 11px;
}

.cp-snd-more {
    font-size: 11px;
    color: #94a3b8;
}

/* Sound cell con cover + nombre */
.cp-snd-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cp-snd-cover {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.cp-snd-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 14px;
}

.cp-snd-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.cp-snd-name {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.cp-snd-author {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.cp-date-cell {
    white-space: nowrap;
    color: #64748b;
    font-size: 12px;
}

/* ── CREATORS TABLE EXTRAS ── */
.cp-creator-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-creator-name {
    font-weight: 500;
    font-size: 13px;
    color: rgb(30, 41, 59);
    line-height: 1.3;
}

.cp-creator-handle {
    font-size: 11px;
    color: #94a3b8;
}

.cp-status-revision {
    font-size: 12px;
    font-weight: 500;
    color: #d97706;
}

.cp-status-interest {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.cp-summary {
    font-size: 12px;
    color: #64748b;
    line-height: 1.55;
    max-width: 380px;
}

/* ── ANALYTICS SECTION ── */
.cp-an-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* Platform toggle group */
.cp-platforms {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px;
}

.cp-plat {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    padding: 0 8px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    outline: none;
}

.cp-plat.cp-plat-active {
    background: #ffffff;
    color: rgb(30, 41, 59);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cp-plat:hover:not(.cp-plat-active) {
    background: #e2e8f0;
    color: rgb(30, 41, 59);
}

.cp-an-selects {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cp-date-range-btn {
    gap: 7px;
    font-size: 13px;
    color: rgb(30, 41, 59);
}

.cp-date-range-btn span {
    font-size: 13px;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
}

/* Metric cards grid */
.cp-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.cp-metric {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
}

.cp-metric:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cp-metric.cp-metric-on {
    border-color: rgb(29, 78, 216);
    background: rgb(239, 246, 255);
}

.cp-metric-top {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.cp-metric-plus {
    font-size: 9px;
    color: #94a3b8;
}

.cp-metric-title {
    font-size: 11.5px;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    flex: 1;
}

.cp-chk {
    width: 15px;
    height: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: transparent;
    flex-shrink: 0;
}

.cp-chk.cp-chk-on {
    background: rgb(29, 78, 216);
    border-color: rgb(29, 78, 216);
    color: #ffffff;
}

.cp-metric-val {
    font-size: 20px;
    font-weight: 700;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* Chart box */
.cp-chart-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    background: #ffffff;
}

.cp-chart-title {
    font-size: 13.5px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    margin-bottom: 3px;
}

.cp-chart-sub {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    margin-bottom: 14px;
}

/* ── LIVE POSTS SECTION ── */
.cp-outline-btn {
    padding: 6px 11px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}

.cp-outline-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cp-sort-label {
    font-size: 13px;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

.cp-view-toggle {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.cp-view-btn {
    padding: 6px 9px;
    background: #ffffff;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    outline: none;
}

.cp-view-btn.cp-view-on {
    background: rgb(239, 246, 255);
    color: rgb(29, 78, 216);
}

/* Posts grid */
.cp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 16px;
}

.cp-post-card {
    cursor: pointer;
    transition: transform 0.15s;
}

.cp-post-card:hover {
    transform: translateY(-2px);
}

.cp-post-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    margin-bottom: 8px;
}

.cp-post-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 7px 8px;
    gap: 5px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
}

.cp-post-plat {
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.45);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-post-flag {
    font-size: 11px;
    line-height: 1;
}

.cp-post-time {
    font-size: 10px;
    color: rgba(255,255,255,0.75);
    margin-left: auto;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.cp-post-caption-overlay {
    position: absolute;
    top: 45%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 8px;
    font-size: 11px;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.4;
}

.cp-post-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
}

.cp-post-sound {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Inter', sans-serif;
    max-width: 100%;
}

.cp-post-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    margin-bottom: 3px;
}

.cp-post-user {
    font-size: 12px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    margin-bottom: 2px;
}

.cp-post-cap {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── STATUS DROPDOWN (All Statuses) ── */
.cp-status-dropdown {
    position: relative;
}

.cp-status-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 180px;
    height: 34px;
    padding: 0 12px;
    background: rgb(241, 245, 249);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: rgb(30, 41, 59);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.cp-status-open .cp-status-trigger {
    border-color: rgb(29, 78, 216);
}

.cp-status-trigger:hover {
    border-color: #cbd5e1;
}

.cp-status-label {
    flex: 1;
    text-align: left;
}

.cp-status-chevron {
    width: 14px;
    height: 14px;
    color: #64748b;
    flex-shrink: 0;
}

.cp-status-chevron-up {
    display: none;
}

.cp-status-open .cp-status-chevron-down {
    display: none;
}

.cp-status-open .cp-status-chevron-up {
    display: block;
}

.cp-status-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 8px 0;
    z-index: 100;
}

.cp-status-open .cp-status-panel {
    display: block;
}

.cp-status-header {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(30, 41, 59);
}

.cp-status-sep {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.cp-status-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
}

.cp-status-item:hover {
    background: #f8fafc;
}

.cp-status-item-title {
    font-size: 13px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    margin-bottom: 2px;
}

.cp-status-item-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.cp-status-new {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: rgb(29, 78, 216);
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    transition: background 0.1s;
}

.cp-status-new:hover {
    background: rgb(239, 246, 255);
}

/* ── MODAL GESTIONAR ESTATUS ── */
.cp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 24px 24px;
}

.cp-modal-overlay.cp-modal-visible {
    display: flex;
}

.cp-modal {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}

.cp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.cp-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.cp-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    border-radius: 6px;
}

.cp-modal-close:hover {
    background: #f1f5f9;
    color: rgb(30, 41, 59);
}

.cp-modal-body {
    padding: 24px;
}

.cp-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.cp-status-row:last-of-type {
    border-bottom: none;
}

.cp-status-row .cp-status-name {
    font-weight: 600;
    font-size: 13px;
    color: rgb(30, 41, 59);
    min-width: 140px;
}

.cp-status-row .cp-status-meta {
    flex: 1;
    font-size: 12px;
    color: #64748b;
}

.cp-status-edit {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: rgb(29, 78, 216);
    background: rgb(239, 246, 255);
    border: 1px solid rgb(219, 234, 254);
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.cp-status-edit:hover {
    background: rgb(219, 234, 254);
}

.cp-modal-footer {
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.cp-status-form .cp-form-group {
    margin-bottom: 16px;
}

.cp-status-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    margin-bottom: 6px;
}

.cp-status-form input[type="text"],
.cp-status-form textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: rgb(30, 41, 59);
    box-sizing: border-box;
}

.cp-status-form textarea {
    resize: vertical;
    min-height: 60px;
}

.cp-form-row {
    display: flex;
    gap: 16px;
}

.cp-form-row .cp-form-group {
    flex: 1;
}

.cp-form-color {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cp-form-color input[type="text"] {
    flex: 1;
}

.cp-form-color input[type="color"] {
    width: 36px;
    height: 34px;
    padding: 2px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
}

.cp-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.cp-form-actions .cp-btn-danger {
    margin-right: auto;
}

.cp-btn-outline {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgb(30, 41, 59);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.cp-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cp-btn-danger {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #dc2626;
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.cp-btn-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* ── MODAL CREAR/EDITAR CAMPAÑA ── */
.cp-modal-campaign {
    max-width: 520px;
    overflow: visible;
}

.cp-campaign-form .cp-form-group {
    margin-bottom: 16px;
}

.cp-campaign-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    margin-bottom: 6px;
}

.cp-campaign-form input[type="text"],
.cp-campaign-form input[type="number"],
.cp-campaign-form input[type="url"],
.cp-campaign-form input[type="date"],
.cp-campaign-form select {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: rgb(30, 41, 59);
    box-sizing: border-box;
    background: #ffffff;
}

.cp-campaign-form .cp-form-row {
    display: flex;
    gap: 16px;
}

.cp-campaign-form .cp-form-row .cp-form-group {
    flex: 1;
}

.cp-form-hint {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Plataforma: botón grupo multi-selección */
.cp-platform-btns {
    display: flex;
    gap: 10px;
}

.cp-platform-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgb(71, 85, 105);
    transition: border-color 0.2s, background 0.2s;
}

.cp-platform-btn svg {
    flex-shrink: 0;
}

.cp-platform-btn[data-platform="youtube"] svg {
    color: #FF0000;
}

.cp-platform-btn[data-platform="meta"] svg {
    color: #0866FF;
}

.cp-platform-btn[data-platform="tiktok"] svg {
    color: #000000;
}

.cp-platform-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.cp-platform-btn.cp-platform-btn-active {
    border-color: rgb(29, 78, 216);
    background: rgb(239, 246, 255);
    color: rgb(29, 78, 216);
}

.cp-platform-btn.cp-platform-btn-active[data-platform="youtube"] svg {
    color: #FF0000;
}

.cp-platform-btn.cp-platform-btn-active[data-platform="meta"] svg {
    color: #0866FF;
}

.cp-platform-btn.cp-platform-btn-active[data-platform="tiktok"] svg {
    color: #000000;
}

.cp-campaign-form select[multiple] {
    min-height: 80px;
}

/* Autocomplete */
.cp-autocomplete {
    position: relative;
}

.cp-autocomplete input[type="text"] {
    width: 100%;
}

.cp-autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1100;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.cp-autocomplete-dropdown::-webkit-scrollbar {
    width: 5px;
}

.cp-autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.cp-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 10px;
}

.cp-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.cp-autocomplete-dropdown.cp-autocomplete-open {
    display: block;
}

.cp-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.cp-autocomplete-item:hover {
    background: #f8fafc;
}

.cp-autocomplete-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cp-autocomplete-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    line-height: 1.2;
}

.cp-autocomplete-name {
    font-size: 13px;
    font-weight: 600;
    color: rgb(30, 41, 59);
}

.cp-autocomplete-meta {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 1px;
}

.cp-autocomplete-empty {
    padding: 16px 12px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* Coordinadores chips */
.cp-autocomplete-multi {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    min-height: 42px;
}

.cp-autocomplete-multi:focus-within {
    border-color: rgb(29, 78, 216);
    outline: none;
}

.cp-coord-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.cp-coord-chips:empty {
    margin-bottom: 0;
}

.cp-coord-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px 3px 4px;
    background: #f1f5f9;
    border-radius: 16px;
    font-size: 11px;
}

.cp-coord-chip-img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.cp-coord-chip-name {
    font-weight: 500;
    color: rgb(30, 41, 59);
}

.cp-coord-chip-rm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: #cbd5e1;
    color: #475569;
    font-size: 14px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.cp-coord-chip-rm:hover {
    background: #94a3b8;
    color: #fff;
}

.cp-autocomplete-multi input[type="text"] {
    border: none;
    padding: 4px 0;
}

.cp-autocomplete-multi input[type="text"]:focus {
    outline: none;
    box-shadow: none;
}

/* ── MODAL NUEVA PROMOCIÓN ── */
.cp-modal-promo {
    max-width: 560px;
}

.cp-promo-modal-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
}

.cp-promo-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@keyframes cp-promo-slide-left {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cp-promo-slide-right {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#cp-new-promo-modal.cp-modal-visible .cp-promo-option:nth-child(1) {
    animation: cp-promo-slide-left 0.45s ease-out forwards;
}

#cp-new-promo-modal.cp-modal-visible .cp-promo-option:nth-child(2) {
    animation: cp-promo-slide-right 0.45s ease-out forwards;
}

.cp-promo-option {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    outline: none;
}

.cp-promo-option:hover {
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.15);
}

.cp-promo-option-img {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.cp-promo-option-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-promo-option-label {
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    color: rgb(30, 41, 59);
    text-align: center;
    font-family: 'Inter', sans-serif;
    border-left: 2px solid #e2e8f0;
    border-right: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ── Budget tracker bar ── */
.cp-budget-bar-wrap {
    min-width: 120px;
}

.cp-budget-bar-wrap.cp-muted-bar .cp-budget-label {
    color: #94a3b8;
    font-size: 13px;
}

.cp-budget-nums {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin-bottom: 5px;
    white-space: nowrap;
}

.cp-budget-spent {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.cp-budget-total {
    font-size: 12px;
    color: #94a3b8;
}

.cp-budget-track {
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.cp-budget-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 99px;
    transition: width 0.4s ease;
}
