/* ============================================================
   Sa+:tellite — Unified UI Controls
   Paleta canonical:
     Primary:  #0066ff  /  hover #0052cc
     P-light:  #dbeafe  (bg)  /  #1d4ed8 (texto)
     Success:  #dcfce7  (bg)  /  #16a34a (texto)
     Warning:  #fef9c3  (bg)  /  #b45309 (texto)
     Danger:   #fee2e2  (bg)  /  #dc2626 (texto)
     Neutral:  #f1f5f9  (bg)  /  #64748b (texto)
     Text:     #1e293b  dark  /  #64748b  muted  /  #94a3b8  placeholder
     Border:   #e2e8f0  /  hover #cbd5e1
     Surface:  #f8fafc  subtle  /  #ffffff  white
   ============================================================ */

/* ── Reset outlines ───────────────────────────────────────── */
*:focus          { outline: none !important; }
*:focus-visible  { outline: none !important; }
input:focus, textarea:focus, select:focus, button:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* ── Typography helpers ───────────────────────────────────── */
.text-muted    { color: #94a3b8; }
.text-light    { color: #64748b; }
.text-dark     { color: #1e293b; }
.text-primary  { color: #0066ff; }
.text-success  { color: #16a34a; }
.text-warning  { color: #b45309; }
.text-danger   { color: #dc2626; }

/* ── Form groups ──────────────────────────────────────────── */
.cp-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cp-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
}

.cp-form-hint {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
}

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

/* ── Inputs / Textarea / Select ───────────────────────────── */
.cp-form-group input[type="text"],
.cp-form-group input[type="email"],
.cp-form-group input[type="password"],
.cp-form-group input[type="number"],
.cp-form-group input[type="url"],
.cp-form-group input[type="date"],
.cp-form-group textarea,
.cp-form-group select,
.form-input,
.cp-url-inp,
.cp-currency-inp,
.cp-campaign-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.cp-form-group input:focus,
.cp-form-group textarea:focus,
.cp-form-group select:focus,
.form-input:focus,
.cp-url-inp:focus,
.cp-currency-inp:focus,
.cp-campaign-select:focus {
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.cp-form-group input::placeholder,
.cp-form-group textarea::placeholder,
.form-input::placeholder {
    color: #94a3b8;
}

.cp-form-group input[readonly],
.cp-form-group input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.cp-form-group textarea {
    resize: vertical;
    min-height: 72px;
}

/* Login form (usa clases distintas) */
.form-group        { margin-bottom: 16px; }
.form-label        { display: block; font-size: 14px; font-weight: 500; color: #1e293b; margin-bottom: 6px; font-family: 'Inter', sans-serif; }
.form-label .required { color: #dc2626; }

/* ── Buttons ──────────────────────────────────────────────── */

/* Base: reset global padding y estilos de browser */
button {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    -webkit-appearance: none;
}

/* Primary — azul sólido */
.cp-btn-new,
.btn-primary,
.btn-login {
    height: 36px;
    padding: 0 16px;
    background: #0066ff;
    color: #ffffff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.15s;
    text-decoration: none;
}
.cp-btn-new:hover, .btn-primary:hover, .btn-login:hover { background: #0052cc; }
.cp-btn-new:disabled, .btn-primary:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; }

.btn-login { width: 100%; height: auto; padding: 10px 16px; justify-content: center; border-radius: 8px; }

/* Outline — borde gris */
.cp-btn-outline,
.btn-outline {
    height: 36px;
    padding: 0 14px;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.15s;
}
.cp-btn-outline:hover, .btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Danger — rojo */
.cp-btn-danger,
.btn-danger {
    height: 36px;
    padding: 0 16px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.15s;
}
.cp-btn-danger:hover, .btn-danger:hover { background: #b91c1c; }
.cp-btn-danger:disabled, .btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* Icon button (header, action columns) */
.header-icon-btn,
.um-action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.header-icon-btn { border: none; background: #f0f2f5; font-size: 15px; }
.header-icon-btn:hover { background: #e2e8f0; color: #1e293b; }
.um-action-btn:hover   { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
.um-action-btn svg     { display: block; pointer-events: none; }

.um-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Profile new btn (sidebar) */
.btn-profile-new {
    width: 100%;
    padding: 7px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    display: block;
}
.btn-profile-new:hover          { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
.btn-profile-new.disabled       { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; pointer-events: none; }

/* Header compound button */
.header-btn {
    height: 36px;
    padding: 0 14px;
    background: #f0f2f5;
    color: #1e293b;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}
.header-btn:hover { background: #e2e8f0; }
.header-btn-icon  { flex-shrink: 0; color: #64748b; }
.dropdown-arrow   { font-size: 10px; color: #64748b; }

/* ── Badges ───────────────────────────────────────────────── */
.cp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

/* Cuando no tiene color inline usa las clases de estado */
.cp-active     { background: #dcfce7; color: #15803d; }
.cp-attention  { background: #fef9c3; color: #b45309; }
.cp-archived   { background: #f1f5f9; color: #64748b; }

/* Users management */
.um-badge         { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; font-family: 'Inter', sans-serif; white-space: nowrap; }
.um-badge-active  { background: #dcfce7; color: #15803d; }
.um-badge-inactive{ background: #fee2e2; color: #dc2626; }

/* ── Toggle switch ────────────────────────────────────────── */
.um-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
}

.um-toggle-track {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #e2e8f0;
    transition: background 0.2s;
    flex-shrink: 0;
}
.um-toggle-on .um-toggle-track  { background: #22c55e; }
.um-toggle-off .um-toggle-track { background: #e2e8f0; }

.um-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.um-toggle-on .um-toggle-thumb { transform: translateX(16px); }

.um-toggle-label {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.um-toggle-on .um-toggle-label { color: #16a34a; }

/* ── Table ────────────────────────────────────────────────── */
.cp-table-wrap {
    overflow-x: auto;
    width: 100%;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    background: #ffffff;
}

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

.cp-table thead tr {
    border-bottom: 1px solid #f1f5f9;
}

.cp-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #fafafa;
    white-space: nowrap;
}

.cp-table td {
    padding: 12px 14px;
    color: #1e293b;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}

.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr:hover td      { background: #fafafa; }

.cp-th-sub  { color: #94a3b8; font-weight: 400; margin-left: 3px; }
.cp-th-date { display: inline-flex; align-items: center; gap: 4px; }
.cp-muted   { color: #94a3b8; }
.cp-date-cell { color: #64748b; white-space: nowrap; }
.cp-eng     { font-weight: 600; color: #0066ff; }

/* Table: promotion name cell */
.cp-promo-name { font-weight: 600; color: #1e293b; font-size: 13px; }
.cp-promo-sub  { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* Table: profile/artist cell */
.cp-profile-cell { display: flex; align-items: center; gap: 8px; }
.cp-av {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff;
}

/* Table: sounds */
.cp-snd      { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #475569; line-height: 1.4; }
.cp-snd-ic   { color: #94a3b8; font-size: 11px; }
.cp-snd-more { color: #0066ff; font-size: 11px; font-weight: 600; cursor: pointer; }

/* ── User management table cells ─────────────────────────── */
.um-user-cell { display: flex; align-items: center; gap: 10px; }
.um-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; font-family: 'Inter', sans-serif;
}
.um-user-name { font-size: 13px; font-weight: 600; color: #1e293b; font-family: 'Inter', sans-serif; }
.um-user-role { font-size: 11px; color: #94a3b8; font-family: 'Inter', sans-serif; }
.um-email     { font-size: 13px; color: #475569; }
.um-actions   { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.um-empty     { text-align: center; padding: 48px 24px; color: #94a3b8; font-size: 14px; font-family: 'Inter', sans-serif; }

/* ── Search box ───────────────────────────────────────────── */
.cp-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    height: 36px;
    min-width: 200px;
}
.cp-search-box:focus-within { border-color: #0066ff; box-shadow: 0 0 0 3px rgba(0,102,255,0.08); }
.cp-search-ico { color: #94a3b8; flex-shrink: 0; width: 15px; height: 15px; }
.cp-search-inp {
    border: none; background: none; outline: none;
    font-size: 13px; font-family: 'Inter', sans-serif;
    color: #1e293b; width: 100%; padding: 0;
}
.cp-search-inp::placeholder { color: #94a3b8; }

/* ── Select wrap (con flecha custom) ─────────────────────── */
.cp-sel-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    height: 36px;
    cursor: pointer;
    white-space: nowrap;
}
.cp-sel-wrap:focus-within { border-color: #0066ff; }
.cp-sel {
    border: none; background: none; outline: none;
    font-size: 13px; font-family: 'Inter', sans-serif;
    color: #1e293b; cursor: pointer; padding: 0;
    -webkit-appearance: none; appearance: none;
}
.cp-sel-arr { color: #94a3b8; flex-shrink: 0; width: 14px; height: 14px; pointer-events: none; }
.cp-sort-label { font-size: 13px; color: #475569; font-family: 'Inter', sans-serif; }

/* ── Filter pills ─────────────────────────────────────────── */
.cp-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px; border: 1px solid #e2e8f0;
    border-radius: 20px; background: #ffffff;
    font-size: 12px; font-weight: 500;
    color: #475569; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.15s;
}
.cp-pill:hover { background: #f8fafc; border-color: #cbd5e1; }

/* ── Modals ───────────────────────────────────────────────── */
.cp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cp-modal-overlay.cp-modal-visible { display: flex; }

.cp-modal {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modal-in 0.2s ease-out;
}

.cp-modal-sm  { max-width: 420px !important; }
.cp-modal-campaign { max-width: 560px; }
.cp-modal-promo    { max-width: 680px; }

@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.cp-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    margin: 0;
}
.cp-modal-close {
    width: 30px; height: 30px; border-radius: 6px;
    background: none; border: none;
    font-size: 20px; color: #94a3b8;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: all 0.15s; padding: 0;
    line-height: 1;
}
.cp-modal-close:hover { background: #f1f5f9; color: #1e293b; }

.cp-modal-body   { padding: 20px 22px 22px; }
.cp-modal-footer { padding: 14px 22px; border-top: 1px solid #f1f5f9; }

/* ── Autocomplete dropdown ────────────────────────────────── */
.cp-autocomplete { position: relative; }
.cp-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 200;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}
.cp-autocomplete-dropdown.cp-autocomplete-open { display: block; }
.cp-autocomplete-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; cursor: pointer; transition: background 0.1s;
}
.cp-autocomplete-item:hover { background: #f8fafc; }
.cp-autocomplete-img  { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cp-autocomplete-name { font-size: 13px; font-weight: 600; color: #1e293b; display: block; }
.cp-autocomplete-meta { font-size: 11px; color: #94a3b8; display: block; }
.cp-autocomplete-empty { padding: 12px; font-size: 13px; color: #94a3b8; text-align: center; font-family: 'Inter', sans-serif; }

/* Chips (coordinadores multi-select) */
.cp-autocomplete-multi { border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; background: #fff; }
.cp-autocomplete-multi:focus-within { border-color: #0066ff; box-shadow: 0 0 0 3px rgba(0,102,255,0.1); }
.cp-autocomplete-multi input {
    border: none; outline: none; background: none;
    font-size: 13px; font-family: 'Inter', sans-serif;
    color: #1e293b; width: 100%; padding: 2px 0;
}
.cp-coord-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.cp-coord-chip  {
    display: inline-flex; align-items: center; gap: 5px;
    background: #dbeafe; color: #1d4ed8;
    border-radius: 20px; padding: 2px 8px 2px 4px;
    font-size: 12px; font-weight: 500; font-family: 'Inter', sans-serif;
}
.cp-coord-chip-img  { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.cp-coord-chip-rm   {
    background: none; border: none; padding: 0;
    color: #1d4ed8; cursor: pointer; font-size: 14px;
    line-height: 1; opacity: 0.7; display: inline-flex;
}
.cp-coord-chip-rm:hover { opacity: 1; }

/* ── Platform buttons (campaign modal) ───────────────────── */
.cp-platform-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cp-platform-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 12px 16px; border: 2px solid #e2e8f0;
    border-radius: 10px; background: #ffffff;
    color: #64748b; font-size: 11px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer;
    transition: all 0.15s; min-width: 80px;
}
.cp-platform-btn:hover              { border-color: #0066ff; color: #0066ff; }
.cp-platform-btn.cp-platform-btn-active { border-color: #0066ff; background: #dbeafe; color: #1d4ed8; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.um-breadcrumb         { display: flex; align-items: center; gap: 6px; font-size: 13px; font-family: 'Inter', sans-serif; }
.um-breadcrumb-root    { color: #94a3b8; font-weight: 500; }
.um-breadcrumb-sep     { color: #cbd5e1; }
.um-breadcrumb-current { color: #1e293b; font-weight: 600; }

/* ── Page header (admin pages) ───────────────────────────── */
.um-page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 16px;
    margin-bottom: 20px; padding: 24px 24px 0;
}

/* ── Tab count badge ─────────────────────────────────────── */
.um-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: #e2e8f0; color: #64748b;
    font-size: 11px; font-weight: 600; margin-left: 6px;
    font-family: 'Inter', sans-serif;
}
.cp-tab-active .um-tab-count { background: #dbeafe; color: #1d4ed8; }

/* ── Confirm text in delete modal ────────────────────────── */
.um-confirm-text {
    font-size: 14px; color: #475569;
    font-family: 'Inter', sans-serif;
    line-height: 1.6; margin: 0 0 20px;
}

/* ── Pass hint ───────────────────────────────────────────── */
.um-pass-hint { font-size: 11px; color: #94a3b8; font-weight: 400; }

/* ── 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; 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; }
