/* UNIVERSE CONTENT STUDIO - ESTILOS UI MODULARES DE ALTO CONTRASTE */

.cs-workspace-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    margin-top: 20px;
    align-items: start;
}

@media (max-width: 1100px) {
    .cs-workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* CARDS GENERALES DE ALTO CONTRASTE */
.cs-studio-card, .cs-dashboard-card {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.cs-card-header {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cs-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* BATCH SELECTION TOOLBAR */
.cs-batch-toolbar {
    padding: 10px 16px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.cs-batch-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-checkbox-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.cs-checkbox-label input[type="checkbox"],
.cs-story-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.cs-batch-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cs-batch-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-batch-btn {
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.cs-batch-delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.cs-batch-delete-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

.cs-batch-cancel-btn {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.cs-batch-cancel-btn:hover {
    background: #eab308;
    color: #0f172a;
}

/* TYPE SELECTOR */
.cs-type-selector {
    display: flex;
    background: #0f172a;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.08);
}

.cs-type-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cs-type-btn.active, .cs-type-btn:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* STUDIO BODY & PHONE MOCKUP */
.cs-studio-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cs-phone-frame {
    width: 270px;
    height: 480px;
    background: #000;
    border-radius: 36px;
    padding: 10px;
    border: 4px solid #334155;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    position: relative;
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.cs-phone-frame.drag-over, .cs-file-dropzone.drag-over {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5) !important;
}

.cs-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.cs-status-topbar {
    padding: 12px 14px 6px 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 5;
}

.cs-status-progress {
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cs-progress-bar.active {
    width: 60%;
    height: 100%;
    background: #fff;
}

.cs-status-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.cs-user-avatar {
    font-size: 1.4rem;
}

.cs-user-info {
    display: flex;
    flex-direction: column;
}

.cs-user-name {
    font-size: 0.8rem;
    font-weight: 600;
}

.cs-status-time {
    font-size: 0.65rem;
    opacity: 0.8;
}

.cs-screen-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    position: relative;
}

.cs-text-display {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.cs-media-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-media-display img, .cs-media-display video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.cs-media-placeholder {
    color: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.cs-media-placeholder i {
    font-size: 2.5rem;
}

.cs-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
    font-size: 0.82rem;
    text-align: center;
}

/* CONTROLES DEL FORMULARIO - ALTO CONTRASTE */
.cs-form-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cs-control-group label, .cs-box-label {
    display: block;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #f8fafc !important;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.cs-control-group textarea, 
.cs-control-group input[type="text"],
.cs-date-row input,
.cs-option-field select,
.cs-option-field input {
    width: 100%;
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff !important;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

.cs-control-group textarea:focus, 
.cs-control-group input[type="text"]:focus,
.cs-date-row input:focus,
.cs-option-field select:focus,
.cs-option-field input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* PALETA DE COLORES Y PICKER REDONDEADO */
.cs-color-palette {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.cs-color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cs-color-btn.active {
    border-color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255,255,255,0.4);
}

#cs-custom-color {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 0;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

#cs-custom-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

#cs-custom-color::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.cs-file-dropzone {
    border: 2px dashed #475569;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    color: #cbd5e1;
    background: #0f172a;
    transition: all 0.2s ease;
}

.cs-file-dropzone:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    color: #ffffff;
}

.cs-schedule-box {
    background: #0f172a !important;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #334155 !important;
}

.cs-instant-checkbox {
    margin-top: 10px;
}

.cs-instant-checkbox label {
    font-size: 0.88rem !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cs-instant-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* BOTONES DE ALTA VISIBILIDAD */
.cs-btn-primary, .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.cs-btn-primary:hover, .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.cs-btn-secondary {
    background: #334155 !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.cs-btn-secondary:hover {
    background: #475569 !important;
    color: #ffffff !important;
}

.cs-btn-link {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cs-btn-link:hover {
    color: #7dd3fc;
}

.cs-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    justify-content: center;
}

/* DASHBOARD & STORY LIST */
.cs-tabs {
    display: flex;
    gap: 6px;
}

.cs-tab-btn {
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.cs-tab-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    font-weight: 600;
}

.cs-dashboard-body {
    padding: 16px;
}

.cs-story-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: transform 0.15s ease;
}

.cs-story-item:hover {
    transform: translateY(-1px);
    border-color: #475569;
}

.cs-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-item-thumb {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.cs-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: #f8fafc;
    font-weight: 600;
}

.cs-item-info p {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.cs-badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cs-badge-scheduled { background: rgba(59, 130, 246, 0.25); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.cs-badge-published { background: rgba(34, 197, 94, 0.25); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.cs-badge-failed { background: rgba(239, 68, 68, 0.25); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.cs-badge-processing { background: rgba(234, 179, 8, 0.25); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.4); }
.cs-badge-cancelled { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

.cs-item-actions {
    display: flex;
    gap: 6px;
}

.cs-action-btn {
    background: #334155;
    border: none;
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cs-action-btn:hover {
    background: #475569;
    color: #ffffff;
}

.cs-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.cs-action-btn.revoke {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.cs-action-btn.revoke:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.cs-loading-state, .cs-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

/* MODAL CARGA MASIVA EXCEL / CSV & MULTI-MEDIA */
.cs-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cs-modal-container {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.cs-modal-container.cs-modal-large {
    max-width: 780px;
}

.cs-modal-header {
    padding: 16px 20px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.cs-modal-close:hover {
    color: #ffffff;
}

.cs-modal-body {
    padding: 20px;
}

/* MULTI-MEDIA MODAL SPECIFICS */
.cs-multi-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 0.88rem;
    color: #f8fafc;
    font-weight: 600;
}

.cs-antiban-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* GRID DE MINIATURAS PROFESIONAL DE ALTO CONTRASTE */
.cs-multi-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    max-height: 240px;
    overflow-y: auto;
    padding: 12px;
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #334155;
    margin-bottom: 16px;
}

.cs-multi-thumb-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #1e293b;
    border: 1px solid #475569;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.cs-multi-thumb-card:active {
    cursor: grabbing;
}

.cs-multi-thumb-card:hover {
    transform: scale(1.03);
    border-color: #3b82f6;
}

.cs-multi-thumb-card img, 
.cs-multi-thumb-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* NUMERACIÓN DE SECUENCIA DRAG-TO-REORDER */
.cs-thumb-seq-badge {
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

/* BOTÓN DE QUITAR EN LA ESQUINA SUPERIOR DERECHA (ELIMINACIÓN DE ÓVALO ROJO GIGANTE) */
.cs-multi-thumb-remove {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 22px !important;
    height: 22px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 1.5px solid #ffffff !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    z-index: 20 !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cs-multi-thumb-remove:hover {
    background: #dc2626 !important;
    transform: scale(1.15) !important;
}

/* TOGGLE SWITCH Y PICKERS SEPARADOS DE FECHA Y HORA */
.cs-toggle-box {
    background: #0f172a;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #334155;
    margin-top: 4px;
}

.cs-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.cs-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.cs-toggle-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cs-datetime-picker-row {
    display: flex;
    gap: 12px;
}

.cs-picker-col {
    flex: 1;
}

.cs-picker-col label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.cs-picker-col input[type="date"],
.cs-picker-col input[type="time"] {
    width: 100%;
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff !important;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
}

.cs-picker-col input[type="date"]:focus,
.cs-picker-col input[type="time"]:focus {
    border-color: #3b82f6 !important;
}

.cs-multi-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-option-field label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 4px;
}

.cs-modal-desc {
    margin: 0 0 16px 0;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.cs-template-download {
    margin-bottom: 16px;
}

.cs-bulk-dropzone {
    padding: 24px 16px;
}

.cs-modal-footer {
    padding: 14px 20px;
    background: #0f172a;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
