/* ============================================================
   Markia — Componentes UI
   ============================================================ */

/* ===== Tabla ===== */
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--bg-2); color: var(--text-3); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; cursor: pointer; }
.data-table tbody tr:hover { background: var(--bg-2); }
.data-table .col-actions { text-align: right; white-space: nowrap; }

/* ===== Modal ===== */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .15s ease; }
.modal { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-wide { max-width: 900px; }
.modal-xwide { max-width: 1100px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close { background: transparent; border: 0; color: var(--text-2); font-size: 24px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg-2); color: var(--text-1); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Page header ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-header .btn { width: auto; padding: 10px 16px; }

/* ===== KPIs ===== */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; transition: transform .15s, border-color .15s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.kpi .label { color: var(--text-3); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 26px; font-weight: 800; margin-top: 6px; line-height: 1.1; }
.kpi .hint { color: var(--text-3); font-size: 11px; margin-top: 4px; }
.kpi .trend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-top: 6px; }
.kpi .trend.up { background: rgba(16,185,129,.15); color: #6ee7b7; }
.kpi .trend.down { background: rgba(239,68,68,.15); color: #fca5a5; }
.kpi .trend.flat { background: rgba(107,107,125,.15); color: var(--text-3); }
.kpi.accent .value { color: var(--amber); }
.kpi.good .value { color: var(--success); }
.kpi.warn .value { color: var(--warning); }
.kpi.danger .value { color: var(--danger); }

/* Pequeño chart sparkline detrás del kpi */
.kpi .sparkline { position: absolute; bottom: 0; left: 0; right: 0; height: 36px; opacity: .3; pointer-events: none; }

/* ===== Status pill ===== */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-todo { background: rgba(107,107,125,.15); color: #a8a8b8; } .pill-todo .dot { background: #6b6b7d; }
.pill-doing { background: rgba(59,130,246,.15); color: #93c5fd; } .pill-doing .dot { background: #3b82f6; }
.pill-review { background: rgba(245,158,11,.15); color: #fcd34d; } .pill-review .dot { background: #f59e0b; }
.pill-done { background: rgba(16,185,129,.15); color: #6ee7b7; } .pill-done .dot { background: #10b981; }
.pill-blocked { background: rgba(239,68,68,.15); color: #fca5a5; } .pill-blocked .dot { background: #ef4444; }
.pill-active { background: rgba(16,185,129,.15); color: #6ee7b7; } .pill-active .dot { background: #10b981; }
.pill-archived, .pill-suspended, .pill-paused { background: rgba(107,107,125,.15); color: #a8a8b8; } .pill-archived .dot, .pill-suspended .dot, .pill-paused .dot { background: #6b6b7d; }
.pill-draft, .pill-idea { background: rgba(107,107,125,.15); color: #a8a8b8; } .pill-draft .dot { background: #6b6b7d; }
.pill-client_review { background: rgba(245,158,11,.15); color: #fcd34d; } .pill-client_review .dot { background: #f59e0b; }
.pill-internal_review { background: rgba(99,102,241,.15); color: #a5b4fc; } .pill-internal_review .dot { background: #6366f1; }
.pill-approved { background: rgba(16,185,129,.15); color: #6ee7b7; } .pill-approved .dot { background: #10b981; }
.pill-scheduled { background: rgba(245,197,24,.15); color: var(--amber); } .pill-scheduled .dot { background: var(--amber); }
.pill-published { background: rgba(16,185,129,.15); color: #6ee7b7; } .pill-published .dot { background: #10b981; }
.pill-rejected, .pill-failed { background: rgba(239,68,68,.15); color: #fca5a5; } .pill-rejected .dot, .pill-failed .dot { background: #ef4444; }

/* ===== Cards ===== */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.detail-card h4 { font-size: 14px; color: var(--text-2); font-weight: 600; margin-bottom: 12px; }

/* ===== Chart card ===== */
.chart-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.chart-card h4 { font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.chart-wrap { position: relative; height: 240px; }
.chart-row { display: grid; gap: 14px; margin-bottom: 22px; }
.chart-row.cols-2 { grid-template-columns: 2fr 1fr; }
.chart-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .chart-row.cols-2, .chart-row.cols-3 { grid-template-columns: 1fr; } }

/* ===== Filtros ===== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 12px 14px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); }
.filter-bar select, .filter-bar input { width: auto; min-width: 140px; padding: 8px 12px; font-size: 13px; }
.filter-bar .search-input { flex: 1; min-width: 200px; }
.filter-bar label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }

/* ===== Board / Kanban ===== */
.board-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.view-switch { display: inline-flex; background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.view-switch button { background: transparent; border: 0; padding: 7px 14px; border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; transition: all .12s; }
.view-switch button.active { background: var(--bg-3); color: var(--text-1); font-weight: 600; }

.board-group { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.board-group-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.board-group-head h4 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.board-group-head .color-dot { width: 10px; height: 10px; border-radius: 50%; }
.board-group .data-table { border: none; border-radius: 0; }
.board-group .data-table th:first-child, .board-group .data-table td:first-child { padding-left: 16px; }
.add-item-row { padding: 8px 16px; border-top: 1px solid var(--border); }
.add-item-row input { background: transparent; border: none; padding: 6px 0; font-size: 13px; width: 100%; }
.add-item-row input:focus { box-shadow: none; }

.item-name { font-weight: 500; cursor: pointer; }
.item-name:hover { color: var(--amber); }
.item-row td .cell-input { background: transparent; border: 1px dashed transparent; padding: 4px 6px; border-radius: 4px; cursor: text; min-height: 26px; min-width: 60px; display: inline-block; }
.item-row td .cell-input:hover { border-color: var(--border-strong); }
.item-row td .cell-input:focus { background: var(--bg-2); border-color: var(--amber); outline: none; }
.item-completed { opacity: .55; text-decoration: line-through; }

/* Kanban */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; min-height: 60vh; }
.kanban-col { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); min-width: 280px; max-width: 320px; flex: 0 0 280px; display: flex; flex-direction: column; }
.kanban-col-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.kanban-col-head h4 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kanban-col-head .count { background: var(--bg-2); color: var(--text-3); font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.kanban-cards { padding: 10px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kanban-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px; cursor: pointer; transition: all .15s; }
.kanban-card:hover { transform: translateY(-1px); border-color: var(--amber); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.kanban-card .title { font-size: 13px; font-weight: 500; margin-bottom: 6px; line-height: 1.3; }
.kanban-card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kanban-card .avatars { display: flex; margin-left: auto; }
.kanban-card .avatars .avatar { width: 22px; height: 22px; font-size: 9px; margin-left: -6px; border: 2px solid var(--bg-2); }
.kanban-card.dragging { opacity: .4; transform: rotate(2deg); }
.kanban-cards.drag-over { background: rgba(245,197,24,.05); border-radius: 6px; outline: 2px dashed var(--amber); outline-offset: -8px; }
.kanban-add { padding: 8px 12px; border-top: 1px solid var(--border); }
.kanban-add input { background: transparent; border: none; font-size: 12px; padding: 6px 0; width: 100%; }
.kanban-add input:focus { box-shadow: none; }

/* ===== Calendar grid ===== */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-size: 11px; color: var(--text-3); text-align: center; padding: 8px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cal-day { background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; min-height: 110px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-day.other-month { opacity: .35; }
.cal-day.today { border-color: var(--amber); background: rgba(245,197,24,.04); }
.cal-day .date { font-size: 12px; color: var(--text-3); font-weight: 600; }
.cal-day.today .date { color: var(--amber); }
.cal-event { background: var(--bg-2); border-left: 3px solid var(--accent); padding: 5px 7px; border-radius: 4px; font-size: 11px; cursor: pointer; line-height: 1.3; transition: transform .12s; }
.cal-event:hover { background: var(--bg-3); transform: translateX(2px); }
.cal-event .title { font-weight: 500; }
.cal-event .meta { color: var(--text-3); font-size: 10px; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 12px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { font-size: 18px; font-weight: 700; min-width: 200px; text-transform: capitalize; }
.cal-nav button { background: var(--bg-1); border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; color: var(--text-1); cursor: pointer; }
.cal-nav button:hover { border-color: var(--amber); }

/* ===== Timeline / Gantt ===== */
.timeline { width: 100%; overflow-x: auto; }
.tl-axis, .tl-row { display: flex; align-items: stretch; min-height: 34px; }
.tl-axis { position: sticky; top: 0; z-index: 2; background: var(--bg-0, var(--bg-1)); border-bottom: 1px solid var(--border); margin-bottom: 4px; min-height: 26px; }
.tl-labelcol { flex: 0 0 200px; max-width: 200px; padding: 6px 12px 6px 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.tl-track { position: relative; flex: 1; min-width: 520px; border-left: 1px solid var(--border); }
.tl-row { border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.tl-row:hover { background: var(--bg-2); }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--border); padding-left: 4px; }
.tl-tick span { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.tl-today { position: absolute; top: 0; bottom: -1000px; width: 2px; background: var(--amber); opacity: .8; z-index: 1; }
.tl-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 22px; border-radius: 5px; display: flex; align-items: center; padding: 0 8px; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); overflow: hidden; }
.tl-bar span { font-size: 11px; font-weight: 600; white-space: nowrap; opacity: .95; }

/* ===== Workload (carga) ===== */
.workload { max-width: 720px; }
.wl-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.wl-name { flex: 0 0 150px; max-width: 150px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-bar-wrap { flex: 1; display: flex; height: 14px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.wl-bar { height: 100%; }
.wl-bar.wl-done { background: #16a34a; opacity: .55; }
.wl-count { flex: 0 0 auto; font-size: 12px; min-width: 130px; text-align: right; }

/* ===== Thread / approval ===== */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding-right: 6px; }
.msg { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.msg.portal { border-color: rgba(139,92,246,.3); background: rgba(139,92,246,.05); }
.msg.approve { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.05); }
.msg.reject, .msg.request_changes { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.05); }
.msg .who { font-size: 12px; font-weight: 600; }
.msg .when { font-size: 11px; color: var(--text-3); margin-left: 6px; }
.msg .body { font-size: 13px; line-height: 1.5; margin-top: 4px; white-space: pre-wrap; }

/* ===== Tag ===== */
.tag-mini { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; background: var(--bg-3); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }

/* ===== Activity feed ===== */
.feed { display: flex; flex-direction: column; gap: 6px; }
.feed-item { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; align-items: flex-start; transition: background .12s; }
.feed-item:hover { background: var(--bg-2); }
.feed-item .icon { width: 32px; height: 32px; flex-shrink: 0; background: var(--bg-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.feed-item .body { font-size: 13px; flex: 1; line-height: 1.4; }
.feed-item .body strong { color: var(--text-1); font-weight: 600; }
.feed-item .body .meta { color: var(--text-3); font-size: 11px; margin-top: 2px; }

/* ===== Social preview ===== */
.social-preview { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 0; overflow: hidden; max-width: 380px; margin: 0 auto; }
.social-preview .sp-head { padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.social-preview .sp-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--honey)); }
.social-preview .sp-user { font-size: 13px; font-weight: 600; }
.social-preview .sp-handle { font-size: 11px; color: var(--text-3); }
.social-preview .sp-img { width: 100%; aspect-ratio: 1/1; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 12px; overflow: hidden; }
.social-preview .sp-img img { width: 100%; height: 100%; object-fit: cover; }
.social-preview .sp-body { padding: 10px 14px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; max-height: 200px; overflow: auto; }
.social-preview .sp-body .hashtag { color: #3b82f6; }
.social-preview .sp-actions { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); display: flex; gap: 14px; }
.social-preview.ig .sp-handle::before { content: '@'; }
.social-preview.x { max-width: 420px; }
.social-preview.x .sp-img { aspect-ratio: 16/9; }
.social-preview.li .sp-img { aspect-ratio: 1.91/1; }
.social-preview.tt .sp-img { aspect-ratio: 9/16; max-height: 320px; }
.social-preview.fb .sp-img { aspect-ratio: 1.91/1; }

.platform-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.platform-tab { background: transparent; border: 0; padding: 7px 12px; border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.platform-tab.active { background: var(--bg-3); color: var(--text-1); font-weight: 600; }
.platform-tab:hover:not(.active) { color: var(--text-1); }

.char-count { font-size: 11px; color: var(--text-3); text-align: right; margin-top: 4px; }
.char-count.warn { color: var(--warning); }
.char-count.danger { color: var(--danger); }

/* ===== Search modal (cmd+K) ===== */
.search-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); z-index: 2000; padding: 80px 20px; display: flex; justify-content: center; align-items: flex-start; }
.search-modal { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 580px; max-height: 60vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); }
.search-modal input { border: 0; border-bottom: 1px solid var(--border); padding: 16px 20px; border-radius: 0; font-size: 15px; background: transparent; }
.search-modal input:focus { box-shadow: none; }
.search-results { overflow-y: auto; padding: 8px; }
.search-group { margin-bottom: 8px; }
.search-group-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 8px 12px 4px; font-weight: 600; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.search-item:hover, .search-item.active { background: var(--bg-2); }
.search-item .icon { width: 26px; text-align: center; }
.search-item .meta { color: var(--text-3); font-size: 11px; margin-left: auto; }
.search-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ===== Misc ===== */
.actions-inline { display: flex; gap: 6px; }
.actions-inline .btn { width: auto; padding: 6px 10px; font-size: 12px; }
.muted { color: var(--text-3); }

.color-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: middle; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.media-thumb { position: relative; aspect-ratio: 1/1; background: var(--bg-2); border-radius: 8px; overflow: hidden; cursor: pointer; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .label { position: absolute; bottom: 4px; left: 4px; right: 4px; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 4px; font-size: 10px; color: white; }
.media-thumb.selected { outline: 3px solid var(--amber); outline-offset: -3px; }
.media-thumb .remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; opacity: 0; transition: opacity .15s; border: 0; }
.media-thumb:hover .remove { opacity: 1; }

.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 24px; text-align: center; color: var(--text-3); cursor: pointer; transition: all .15s; }
.dropzone.drag-over { border-color: var(--amber); background: rgba(245,197,24,.05); color: var(--amber); }
.dropzone .emoji { font-size: 28px; margin-bottom: 6px; }

.workload-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.workload-row .name { flex: 1; font-size: 13px; }
.workload-row .bar { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; width: 100px; }
.workload-row .bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.workload-row .count { font-size: 12px; color: var(--text-2); min-width: 30px; text-align: right; }

.hint-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px; background: var(--bg-2); color: var(--text-3); margin-left: 6px; font-family: var(--font-mono); }

.client-header { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
.client-header .avatar { width: 64px; height: 64px; border-radius: 50%; font-size: 24px; }
.client-header h2 { font-size: 24px; }
.client-header .meta { color: var(--text-3); font-size: 13px; margin-top: 4px; }

/* Scrollbar moderno */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================================
   AdFlow — estilos específicos
   ============================================================ */
.adflow-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.adflow-header h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.adflow-header .sub { color: var(--text-3); font-size: 13px; margin-top: 4px; }

.adflow-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adflow-toolbar .group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adflow-toolbar select { min-width: 180px; padding: 10px 12px; font-size: 13px; }

.adflow-tabs { display: flex; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 2px; margin-bottom: 18px; overflow-x: auto; }
.adflow-tabs button { background: transparent; border: 0; padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: all .15s; }
.adflow-tabs button.active { background: var(--accent); color: white; font-weight: 600; }
.adflow-tabs button:hover:not(.active) { color: var(--text-1); }

.adflow-alert { background: linear-gradient(90deg, rgba(245,158,11,.10) 0%, rgba(245,158,11,.05) 100%); border: 1px solid rgba(245,158,11,.35); border-radius: var(--radius); padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.adflow-alert .left { display: flex; align-items: center; gap: 12px; }
.adflow-alert .left strong { color: #fcd34d; }
.adflow-alert .left .level { background: rgba(245,158,11,.3); color: #fcd34d; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.adflow-alert a { color: #fcd34d; font-size: 13px; }

.adflow-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.adflow-kpi { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; }
.adflow-kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.adflow-kpi.k1::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.adflow-kpi.k2::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.adflow-kpi.k3::before { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.adflow-kpi.k4::before { background: linear-gradient(90deg, #10b981, #22d3ee); }
.adflow-kpi .label { color: var(--text-3); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.adflow-kpi .value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.adflow-kpi .hint { color: var(--text-3); font-size: 12px; margin-top: 6px; }
.adflow-kpi.good .value { color: #10b981; }

.privacy-toggle { background: var(--bg-1); border: 1px solid var(--border); padding: 10px 16px; border-radius: 10px; color: var(--text-1); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.privacy-toggle:hover { border-color: var(--amber); }
body.privacy-mode .money { filter: blur(8px); user-select: none; }

.adflow-chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
@media (max-width: 1024px) { .adflow-chart-row { grid-template-columns: 1fr; } }
.adflow-chart-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1024px) { .adflow-chart-row.cols-3 { grid-template-columns: 1fr; } }

.adflow-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.adflow-card .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.adflow-card .head h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.adflow-card .head .sub { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* Score cards (Performance tab) */
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.score-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; transition: all .15s; }
.score-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.score-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.score-head h4 { font-size: 16px; font-weight: 700; }
.score-head .meta { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.score-circle { width: 64px; height: 64px; flex-shrink: 0; position: relative; }
.score-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-circle circle.bg { fill: none; stroke: var(--bg-3); stroke-width: 6; }
.score-circle circle.fg { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.score-circle .text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-circle .text .num { font-size: 18px; font-weight: 800; line-height: 1; }
.score-circle .text .lbl { font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.score-detail { display: grid; gap: 6px; }
.score-detail .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.score-detail .row .label { color: var(--text-2); }
.score-detail .row .val { font-weight: 600; }
.score-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.score-foot .pct.good { color: #10b981; }
.score-foot .pct.warn { color: #f59e0b; }
.score-foot .pct.danger { color: #ef4444; }

/* Listado AdFlow */
.adflow-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.adflow-table th { background: transparent; color: var(--text-3); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.adflow-table td { padding: 12px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.adflow-table tr:last-child td { border-bottom: none; }
.adflow-table tr:hover td { background: var(--bg-2); }
.adflow-table .tag { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.adflow-table .tag-status { padding: 5px 12px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.adflow-table .col-actions { white-space: nowrap; text-align: right; }
.adflow-table .icon-btn { background: var(--bg-2); border: 1px solid var(--border); width: 28px; height: 28px; padding: 0; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; font-size: 13px; }
.adflow-table .icon-btn:hover { border-color: var(--amber); }
.adflow-table .icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.adflow-table .icon-btn.good { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.4); color: #6ee7b7; }
.adflow-table .icon-btn.warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.4); color: #fcd34d; }

.budget-money { color: #10b981; font-weight: 600; }
.platform-cell { font-weight: 600; font-size: 12px; }

/* Status colors */
.tag-status.activa { background: rgba(16,185,129,.18); color: #6ee7b7; }
.tag-status.pausada { background: rgba(245,158,11,.18); color: #fcd34d; }
.tag-status.programada { background: rgba(59,130,246,.18); color: #93c5fd; }
.tag-status.finalizada { background: rgba(107,107,125,.18); color: #a8a8b8; }
.tag-status.borrador { background: rgba(107,107,125,.18); color: #a8a8b8; }
.tag-status.cancelada { background: rgba(239,68,68,.18); color: #fca5a5; }

/* Timeline */
.timeline-grid { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.timeline-month-row { display: grid; grid-template-columns: 180px repeat(12, 1fr); gap: 4px; align-items: center; margin-bottom: 8px; min-width: 1000px; }
.timeline-month-row.head { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 14px; }
.timeline-month-row .client { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-cell { height: 22px; background: var(--bg-2); border-radius: 4px; position: relative; }
.timeline-bar { position: absolute; inset: 2px 4px; border-radius: 3px; cursor: pointer; transition: transform .15s; }
.timeline-bar:hover { transform: scale(1.05); }

/* ============================================================
   AdFlow — Modal Nueva campaña con tabs
   ============================================================ */
.cf-modal .modal-head h3 + .sub { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.cf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; padding-bottom: 0; }
.cf-tabs button { background: transparent; border: 0; padding: 12px 18px; font-size: 14px; color: var(--text-2); cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 8px; border-bottom: 2px solid transparent; transition: color .12s; }
.cf-tabs button:hover { color: var(--text-1); }
.cf-tabs button.active { color: var(--text-1); border-bottom-color: var(--accent-2); font-weight: 600; }
.cf-tabs .badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; font-weight: 700; align-items: center; justify-content: center; }
.cf-pane { display: none; }
.cf-pane.active { display: block; }
.cf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .cf-grid2 { grid-template-columns: 1fr; } }
.cf-section { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.cf-section .section-title { color: var(--accent-2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 12px; }
.cf-validation { background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.4); border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; }
.cf-validation strong { color: #fca5a5; font-size: 14px; display: block; margin-bottom: 6px; }
.cf-validation ul { margin: 0; padding-left: 22px; }
.cf-validation li { color: #fca5a5; font-size: 13px; line-height: 1.6; }
.cf-footer-meta { color: var(--text-3); font-size: 12px; }

/* Workflow visual */
.wf-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-step { flex: 1; min-width: 110px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; text-align: center; cursor: pointer; transition: all .15s; }
.wf-step:hover { border-color: var(--accent-2); }
.wf-step.active { background: rgba(139,92,246,.12); border-color: var(--accent-2); color: var(--accent-2); font-weight: 600; }
.wf-step .ico { font-size: 18px; margin-bottom: 4px; display: block; }
.wf-step .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

/* ============================================================
   Notificaciones (campana topbar)
   ============================================================ */
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn-top { background: var(--bg-1); border: 1px solid var(--border); width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; font-size: 18px; color: var(--text-1); transition: all .12s; }
.icon-btn-top:hover { border-color: var(--amber); }
.icon-btn-top .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-0); }

.notif-dropdown { position: absolute; top: 50px; right: 16px; width: 380px; max-height: 540px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 500; display: flex; flex-direction: column; overflow: hidden; }
.notif-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.notif-head h4 { font-size: 14px; font-weight: 700; }
.notif-head a { font-size: 12px; color: var(--amber); cursor: pointer; }
.notif-list { overflow-y: auto; flex: 1; max-height: 460px; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; display: flex; gap: 10px; }
.notif-item:hover { background: var(--bg-2); }
.notif-item.unread { background: rgba(99,102,241,.06); border-left: 3px solid var(--accent); padding-left: 13px; }
.notif-item .title { font-size: 13px; font-weight: 600; }
.notif-item .body { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.notif-item .time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.notif-empty { padding: 30px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============================================================
   Chat (drawer lateral)
   ============================================================ */
.chat-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 100vw; background: var(--bg-1); border-left: 1px solid var(--border); display: grid; grid-template-columns: 260px 1fr; z-index: 600; box-shadow: -20px 0 60px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .25s ease; }
.chat-drawer.open { transform: translateX(0); }
@media (max-width: 800px) { .chat-drawer { grid-template-columns: 1fr; width: 100vw; } .chat-drawer.show-thread .chat-side { display: none; } .chat-drawer:not(.show-thread) .chat-main { display: none; } }

.chat-side { background: var(--bg-0); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-side .head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.chat-side .head h4 { font-size: 14px; font-weight: 700; }
.chat-side .new { background: linear-gradient(135deg, var(--amber), var(--honey)); color: #1a1100; border: 0; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 800; }
.chat-threads { flex: 1; overflow-y: auto; }
.chat-thread-item { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 10px; align-items: center; transition: background .12s; }
.chat-thread-item:hover { background: var(--bg-2); }
.chat-thread-item.active { background: rgba(245,197,24,.08); border-left: 3px solid var(--amber); padding-left: 11px; }
.chat-thread-item .avatar { width: 36px; height: 36px; font-size: 13px; flex-shrink: 0; }
.chat-thread-item .info { flex: 1; min-width: 0; }
.chat-thread-item .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread-item .preview { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-thread-item .time { font-size: 10px; color: var(--text-3); }
.chat-thread-item .unread-badge { background: var(--amber); color: #1a1100; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.chat-main { display: flex; flex-direction: column; background: var(--bg-1); }
.chat-main .head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.chat-main .head .title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.chat-main .head .subtitle { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.chat-main .close { background: var(--bg-2); border: 1px solid var(--border); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--text-1); font-size: 14px; }
.chat-main .back-to-list { display: none; }
@media (max-width: 800px) { .chat-main .back-to-list { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--text-1); margin-right: 6px; align-items: center; justify-content: center; } }

.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; gap: 10px; max-width: 80%; }
.chat-msg.mine { margin-left: auto; flex-direction: row-reverse; }
.chat-msg .avatar { width: 32px; height: 32px; font-size: 11px; flex-shrink: 0; }
.chat-msg .bubble { background: var(--bg-2); padding: 9px 13px; border-radius: 14px; }
.chat-msg.mine .bubble { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; border-bottom-right-radius: 4px; }
.chat-msg:not(.mine) .bubble { border-bottom-left-radius: 4px; }
.chat-msg .who { font-size: 11px; font-weight: 600; margin-bottom: 2px; opacity: .8; }
.chat-msg.mine .who { display: none; }
.chat-msg .body { font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-msg .time { font-size: 10px; color: var(--text-3); margin-top: 3px; }
.chat-msg.mine .time { color: rgba(255,255,255,.7); }
.chat-msg.system { max-width: 100%; justify-content: center; }
.chat-msg.system .bubble { background: transparent; color: var(--text-3); font-size: 11px; padding: 4px 10px; }

.chat-empty { text-align: center; padding: 40px 24px; color: var(--text-3); font-size: 13px; }

.chat-composer { padding: 12px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; background: var(--bg-1); }
.chat-composer textarea { flex: 1; resize: none; min-height: 38px; max-height: 120px; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.chat-composer .send-btn { background: linear-gradient(135deg, var(--amber), var(--honey)); color: #1a1100; border: 0; padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.chat-composer .send-btn:hover { box-shadow: 0 6px 18px rgba(245,197,24,.3); }

.chat-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 599; opacity: 0; pointer-events: none; transition: opacity .2s; }
.chat-overlay.show { opacity: 1; pointer-events: auto; }

/* ============================================================
   CHAT SLACK-STYLE (vista completa)
   ============================================================ */
.chat-app {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: calc(100vh - 56px);
    margin: -28px;
    background: var(--bg-0);
    border-top: 1px solid var(--border);
}
.chat-app.with-thread { grid-template-columns: 260px 1fr 380px; }
@media (max-width: 1024px) {
    .chat-app.with-thread { grid-template-columns: 260px 1fr; }
    .chat-app .chat-thread-panel { position: fixed; top: 56px; right: 0; bottom: 0; width: 380px; max-width: 100vw; z-index: 100; box-shadow: var(--shadow-lg); border-left: 1px solid var(--border); }
}
@media (max-width: 768px) {
    .chat-app { grid-template-columns: 1fr; }
    .chat-app .chat-app-sidebar { display: none; }
    .chat-app.show-sidebar .chat-app-sidebar { display: flex; position: fixed; top: 56px; left: 0; bottom: 0; width: 260px; z-index: 50; box-shadow: var(--shadow-lg); }
}

/* SIDEBAR */
.chat-app-sidebar { background: var(--bg-1); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }
.chat-app-sidebar .sb-section { padding: 14px 10px 6px; }
.chat-app-sidebar .sb-section h4 { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 600; display: flex; justify-content: space-between; align-items: center; padding: 0 6px 6px; }
.chat-app-sidebar .sb-section h4 button { background: transparent; border: 0; color: var(--text-2); cursor: pointer; padding: 2px; border-radius: 4px; display: inline-flex; }
.chat-app-sidebar .sb-section h4 button:hover { background: var(--bg-3); color: var(--text-1); }
.chat-app-sidebar .sb-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text-2); margin: 0 2px; position: relative; }
.chat-app-sidebar .sb-item:hover { background: var(--bg-2); color: var(--text-1); }
.chat-app-sidebar .sb-item.active { background: var(--text-1); color: var(--bg-0); }
.chat-app-sidebar .sb-item.active .material-symbols-outlined { color: var(--bg-0); }
.chat-app-sidebar .sb-item .material-symbols-outlined { font-size: 18px; color: var(--text-3); flex-shrink: 0; }
.chat-app-sidebar .sb-item.unread { font-weight: 700; color: var(--text-1); }
.chat-app-sidebar .sb-item .unread-dot { background: var(--danger); color: white; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-left: auto; }
.chat-app-sidebar .sb-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chat-app-sidebar .sb-item .presence { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.chat-app-sidebar .sb-item .presence.online { background: #16a34a; }

/* MAIN CHANNEL */
.chat-app-main { display: flex; flex-direction: column; background: var(--bg-0); min-width: 0; }
.chat-channel-head { border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chat-channel-head .title { display: flex; align-items: center; gap: 10px; }
.chat-channel-head .title h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.chat-channel-head .title .desc { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.chat-channel-head .actions { display: flex; gap: 4px; align-items: center; }
.chat-channel-head .actions button { background: transparent; border: 1px solid transparent; padding: 6px 10px; border-radius: 6px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.chat-channel-head .actions button:hover { background: var(--bg-2); color: var(--text-1); }
.chat-channel-head .members-stack { display: flex; align-items: center; }
.chat-channel-head .members-stack .avatar { width: 26px; height: 26px; font-size: 10px; margin-left: -8px; border: 2px solid var(--bg-0); }
.chat-channel-head .members-stack .more { margin-left: -8px; background: var(--bg-2); color: var(--text-2); border: 2px solid var(--bg-0); border-radius: 50%; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; }

.chat-tabs { display: flex; gap: 4px; padding: 8px 20px 0; border-bottom: 1px solid var(--border); background: var(--bg-0); }
.chat-tabs button { background: transparent; border: 0; padding: 8px 14px; font-size: 13px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.chat-tabs button.active { color: var(--text-1); border-bottom-color: var(--text-1); font-weight: 600; }
.chat-tabs button:hover:not(.active) { color: var(--text-1); }

.chat-feed { flex: 1; overflow-y: auto; padding: 12px 20px 20px; display: flex; flex-direction: column-reverse; }
.chat-feed-inner { display: flex; flex-direction: column; gap: 4px; }
.chat-date-divider { text-align: center; margin: 18px 0 10px; position: relative; }
.chat-date-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.chat-date-divider span { background: var(--bg-0); padding: 4px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; color: var(--text-2); position: relative; font-weight: 600; }

.chat-msg-slack { display: flex; gap: 10px; padding: 6px 8px; border-radius: 6px; position: relative; }
.chat-msg-slack:hover { background: var(--bg-1); }
.chat-msg-slack .avatar { width: 36px; height: 36px; font-size: 12px; flex-shrink: 0; border-radius: 8px; }
.chat-msg-slack .body { flex: 1; min-width: 0; }
.chat-msg-slack .head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.chat-msg-slack .head .who { font-weight: 700; font-size: 14px; color: var(--text-1); }
.chat-msg-slack .head .when { font-size: 11px; color: var(--text-3); }
.chat-msg-slack .text { font-size: 14px; line-height: 1.5; color: var(--text-1); white-space: pre-wrap; word-break: break-word; }
.chat-msg-slack .text .mention { background: rgba(0,0,0,.05); padding: 0 4px; border-radius: 4px; color: var(--text-1); font-weight: 500; }
.chat-msg-slack .text a { color: #2563eb; text-decoration: underline; }
.chat-msg-slack.system { padding: 4px 8px; }
.chat-msg-slack.system .body { font-size: 12px; color: var(--text-3); font-style: italic; padding-left: 46px; }
.chat-msg-slack.system .avatar { display: none; }
.chat-msg-slack.compact { padding-top: 2px; padding-bottom: 2px; }
.chat-msg-slack.compact .avatar, .chat-msg-slack.compact .head { display: none; }
.chat-msg-slack.compact .body { padding-left: 46px; }
.chat-msg-slack.compact .when-inline { display: none; position: absolute; left: 8px; top: 6px; font-size: 10px; color: var(--text-3); width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.chat-msg-slack.compact:hover .when-inline { display: block; }

.chat-msg-actions { position: absolute; top: -16px; right: 12px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 6px; display: none; padding: 2px; box-shadow: var(--shadow); }
.chat-msg-slack:hover .chat-msg-actions { display: flex; }
.chat-msg-actions button { background: transparent; border: 0; padding: 4px 6px; border-radius: 4px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; }
.chat-msg-actions button:hover { background: var(--bg-2); color: var(--text-1); }
.chat-msg-actions .material-symbols-outlined { font-size: 18px; }

.chat-reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chat-reaction { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 999px; font-size: 12px; cursor: pointer; transition: all .12s; }
.chat-reaction:hover { background: var(--bg-2); }
.chat-reaction.mine { background: rgba(0,0,0,.08); border-color: var(--text-1); }
.chat-reaction .emoji { font-size: 14px; }
.chat-reaction .count { font-weight: 600; color: var(--text-2); }
.chat-reaction-add { display: inline-flex; align-items: center; padding: 3px 8px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; color: var(--text-3); font-size: 12px; }
.chat-reaction-add:hover { background: var(--bg-2); color: var(--text-1); }

.chat-thread-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px; background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.2); border-radius: 6px; font-size: 12px; cursor: pointer; color: #2563eb; font-weight: 600; }
.chat-thread-link:hover { background: rgba(37,99,235,.14); }

.chat-composer-slack { padding: 16px 20px 20px; border-top: 1px solid var(--border); background: var(--bg-0); }
.composer-wrap { border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 12px 8px; background: var(--bg-0); transition: border-color .15s; }
.composer-wrap:focus-within { border-color: var(--text-1); box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.composer-wrap textarea { border: 0; resize: none; min-height: 38px; max-height: 200px; padding: 6px 0; font-size: 14px; box-shadow: none !important; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.composer-actions .left { display: flex; gap: 2px; }
.composer-actions button { background: transparent; border: 0; padding: 6px; border-radius: 4px; cursor: pointer; color: var(--text-3); display: inline-flex; }
.composer-actions button:hover { background: var(--bg-2); color: var(--text-1); }
.composer-actions .send-btn { background: var(--text-1); color: var(--bg-0); padding: 6px 12px; border-radius: 6px; }
.composer-actions .send-btn:hover { background: var(--accent-2); color: var(--bg-0); }

/* THREAD PANEL */
.chat-thread-panel { background: var(--bg-1); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.chat-thread-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.chat-thread-head h3 { font-size: 14px; font-weight: 700; }
.chat-thread-head .sub { color: var(--text-3); font-size: 12px; }
.chat-thread-body { flex: 1; overflow-y: auto; padding: 14px 14px 0; }
.chat-thread-parent { background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.chat-thread-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-size: 11px; color: var(--text-3); }
.chat-thread-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* PINS PANEL */
.chat-pins { padding: 16px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.chat-pin-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.chat-pin-card:hover { border-color: var(--text-1); }
.chat-pin-card .who { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.chat-pin-card .text { font-size: 13px; line-height: 1.5; }
.chat-pin-card .meta { font-size: 11px; color: var(--text-3); margin-top: 6px; display: flex; justify-content: space-between; }

/* EMOJI PICKER */
.emoji-picker { position: absolute; background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 1500; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-picker button { background: transparent; border: 0; padding: 4px; font-size: 18px; cursor: pointer; border-radius: 4px; }
.emoji-picker button:hover { background: var(--bg-2); }

/* ============================================================
   CALENDARIO SOCIAL — vistas Kontentino-like
   ============================================================ */
.social-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.social-toolbar .view-modes { display: inline-flex; background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.social-toolbar .view-modes button { background: transparent; border: 0; padding: 7px 12px; border-radius: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.social-toolbar .view-modes button.active { background: var(--text-1); color: var(--bg-0); font-weight: 600; }
.social-toolbar .view-modes button .material-symbols-outlined { font-size: 16px; }

.client-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 14px; }
.client-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 12px; color: var(--text-2); transition: all .12s; }
.client-chip:hover { border-color: var(--text-1); }
.client-chip.active { background: var(--text-1); color: var(--bg-0); border-color: var(--text-1); }
.client-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.client-chip .count { background: rgba(255,255,255,.2); padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.client-chip:not(.active) .count { background: var(--bg-2); color: var(--text-3); }

.bulk-bar { background: var(--text-1); color: var(--bg-0); padding: 10px 16px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.bulk-bar .count { font-weight: 700; }
.bulk-bar .actions { display: flex; gap: 6px; }
.bulk-bar button { background: rgba(255,255,255,.12); color: var(--bg-0); border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.bulk-bar button:hover { background: rgba(255,255,255,.22); }

/* === Vista calendario MES — mejorado === */
.cal-week-row { display: grid; grid-template-columns: 80px repeat(7, 1fr); gap: 4px; }
.cal-week-head { font-size: 11px; color: var(--text-3); text-align: center; padding: 6px 0; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.cal-week-head .num { font-size: 22px; color: var(--text-1); font-weight: 700; display: block; margin-top: 4px; }
.cal-week-head.today .num { color: var(--text-1); background: var(--text-1); color: var(--bg-0); width: 32px; height: 32px; border-radius: 50%; line-height: 32px; margin: 4px auto 0; }
.cal-time-col { font-size: 10px; color: var(--text-3); text-align: right; padding-right: 8px; padding-top: 4px; border-right: 1px solid var(--border); }
.cal-time-slot { height: 60px; border-bottom: 1px solid var(--border); position: relative; }
.cal-day-col { border-right: 1px solid var(--border); position: relative; min-height: 60px; }
.cal-day-col:last-child { border-right: 0; }
.cal-event-week { position: absolute; left: 4px; right: 4px; background: var(--bg-1); border: 1px solid var(--border); border-left: 3px solid; border-radius: 6px; padding: 4px 6px; font-size: 11px; cursor: pointer; overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-event-week:hover { box-shadow: var(--shadow); }
.cal-event-week .ev-title { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-event-week .ev-meta { font-size: 10px; color: var(--text-3); margin-top: 1px; display: flex; gap: 4px; align-items: center; }

/* === Día (calendario mes con más info por evento) === */
.cal-day-rich { background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; min-height: 130px; padding: 6px; display: flex; flex-direction: column; gap: 3px; transition: background .12s; }
.cal-day-rich.drag-over { background: var(--bg-2); border-color: var(--text-1); }
.cal-day-rich.other-month { opacity: .35; }
.cal-day-rich.today { border-color: var(--text-1); }
.cal-day-rich .date-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px; }
.cal-day-rich .date-head .num { font-size: 12px; color: var(--text-3); font-weight: 700; }
.cal-day-rich.today .date-head .num { background: var(--text-1); color: var(--bg-0); width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.cal-day-rich .add-here { background: transparent; border: 0; color: var(--text-3); padding: 2px; border-radius: 4px; cursor: pointer; display: none; }
.cal-day-rich:hover .add-here { display: inline-flex; }
.cal-day-rich .add-here:hover { background: var(--bg-2); color: var(--text-1); }
.cal-day-rich .add-here .material-symbols-outlined { font-size: 16px; }

.cal-post-card { background: var(--bg-1); border: 1px solid var(--border); border-left: 3px solid; border-radius: 6px; padding: 4px 6px; font-size: 11px; cursor: pointer; transition: all .12s; display: flex; align-items: center; gap: 6px; }
.cal-post-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.cal-post-card.dragging { opacity: .4; }
.cal-post-card .thumb { width: 22px; height: 22px; border-radius: 4px; background: var(--bg-3); flex-shrink: 0; overflow: hidden; }
.cal-post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cal-post-card .info { flex: 1; min-width: 0; }
.cal-post-card .title { font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-post-card .platforms { font-size: 9px; color: var(--text-3); margin-top: 1px; }
.cal-post-card .checkbox { width: 14px; height: 14px; opacity: 0; }
.cal-post-card:hover .checkbox { opacity: 1; }
.cal-post-card.selected { background: var(--text-1); color: var(--bg-0); border-color: var(--text-1); }
.cal-post-card.selected .platforms { color: rgba(255,255,255,.7); }
.cal-post-card.selected .checkbox { opacity: 1; }

/* === Kanban de contenido === */
.content-kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; min-height: 70vh; }
.content-kanban-col { min-width: 280px; max-width: 320px; flex: 0 0 280px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.content-kanban-col .col-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.content-kanban-col .col-head h4 { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.content-kanban-col .col-head .count { background: var(--bg-3); color: var(--text-2); font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.content-kanban-col .col-cards { padding: 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 100px; }

.kanban-content-card { background: var(--bg-0); border: 1px solid var(--border); border-left: 3px solid; border-radius: 8px; padding: 10px; cursor: pointer; transition: all .15s; }
.kanban-content-card:hover { transform: translateY(-1px); border-color: var(--text-1); box-shadow: var(--shadow); }
.kanban-content-card.dragging { opacity: .4; }
.kanban-content-card .top { display: flex; align-items: flex-start; gap: 8px; }
.kanban-content-card .top .thumb { width: 40px; height: 40px; border-radius: 6px; background: var(--bg-2); overflow: hidden; flex-shrink: 0; }
.kanban-content-card .top .thumb img { width: 100%; height: 100%; object-fit: cover; }
.kanban-content-card .title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.kanban-content-card .client { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.kanban-content-card .bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-3); }
.kanban-content-card .platforms-mini { display: flex; gap: 3px; }
.kanban-content-card .platforms-mini span { font-size: 12px; }

/* === Vista lista (mejorada con checkboxes) === */
.content-list-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.content-list-row:hover { background: var(--bg-1); }
.content-list-row.selected { background: rgba(0,0,0,.04); }
.content-list-row .check { width: 18px; height: 18px; }
.content-list-row .thumb { width: 44px; height: 44px; border-radius: 6px; background: var(--bg-2); overflow: hidden; flex-shrink: 0; }
.content-list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.content-list-row .info { flex: 1; min-width: 0; }
.content-list-row .info .title { font-weight: 600; font-size: 14px; }
.content-list-row .info .meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.content-list-row .platforms-cell { display: flex; gap: 3px; font-size: 14px; }

/* === Editor avanzado — tabs por plataforma === */
.editor-platforms-bar { display: flex; gap: 2px; padding: 2px; background: var(--bg-1); border-radius: 8px; margin-bottom: 14px; overflow-x: auto; }
.editor-platforms-bar button { background: transparent; border: 0; padding: 8px 12px; border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.editor-platforms-bar button.active { background: var(--bg-0); color: var(--text-1); font-weight: 600; box-shadow: var(--shadow-sm); }
.editor-platforms-bar button:hover:not(.active) { color: var(--text-1); }
.editor-platforms-bar .add-platform { color: var(--text-3); border: 1px dashed var(--border); }

.platform-pane { display: none; }
.platform-pane.active { display: block; }

/* Caption suggestions / AI */
.ai-suggestions { background: linear-gradient(135deg, rgba(0,0,0,.03), rgba(0,0,0,.01)); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-top: 10px; }
.ai-suggestions h5 { font-size: 12px; color: var(--text-3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.ai-suggestion { background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 6px; font-size: 13px; cursor: pointer; line-height: 1.5; white-space: pre-wrap; }
.ai-suggestion:hover { border-color: var(--text-1); background: var(--bg-1); }

/* Hashtag bank chips */
.hashtag-banks { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.hashtag-bank { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all .12s; }
.hashtag-bank:hover { border-color: var(--text-1); }
.hashtag-bank .bank-name { font-weight: 600; font-size: 13px; }
.hashtag-bank .bank-tags { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hashtag-bank .bank-action { background: var(--text-1); color: var(--bg-0); border: 0; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; flex-shrink: 0; }

/* Best time suggestion */
.best-time-card { background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.3); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #166534; display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.best-time-card.warn { background: rgba(202,138,4,.08); border-color: rgba(202,138,4,.3); color: #854d0e; }

/* Char count visual ring */
.char-ring { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--bg-1); border-radius: 999px; font-size: 11px; color: var(--text-3); margin-left: auto; }
.char-ring.warn { color: var(--warning); }
.char-ring.danger { color: var(--danger); font-weight: 600; }

/* Quick-create floating button */
.fab-quick { position: fixed; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 50%; background: var(--text-1); color: var(--bg-0); border: 0; cursor: pointer; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; z-index: 50; transition: transform .12s; }
.fab-quick:hover { transform: scale(1.05); }
.fab-quick .material-symbols-outlined { font-size: 24px; }

/* Platform preview frames más detallados */
.preview-frame { background: var(--bg-0); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-width: 360px; margin: 0 auto; box-shadow: var(--shadow-sm); }
.preview-frame.ig-feed .img-area { aspect-ratio: 1/1; }
.preview-frame.ig-reel .img-area { aspect-ratio: 9/16; max-height: 480px; }
.preview-frame.ig-story .img-area { aspect-ratio: 9/16; max-height: 480px; }
.preview-frame.fb .img-area { aspect-ratio: 1.91/1; }
.preview-frame.x .img-area { aspect-ratio: 16/9; }
.preview-frame.linkedin .img-area { aspect-ratio: 1.91/1; }
.preview-frame.tiktok .img-area { aspect-ratio: 9/16; max-height: 480px; }
.preview-frame .head { padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.preview-frame .head .avatar { width: 30px; height: 30px; }
.preview-frame .head .user { font-weight: 600; font-size: 13px; }
.preview-frame .head .handle { font-size: 11px; color: var(--text-3); }
.preview-frame .img-area { background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.preview-frame .img-area img { width: 100%; height: 100%; object-fit: cover; }
.preview-frame .actions-row { padding: 6px 12px; font-size: 13px; color: var(--text-3); display: flex; gap: 12px; }
.preview-frame .text-area { padding: 8px 12px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; max-height: 160px; overflow-y: auto; }
.preview-frame .text-area .hashtag { color: #2563eb; }
.preview-frame .text-area .mention { color: #2563eb; font-weight: 500; }

/* ============================================================
   CONTENT EDITOR (Calendario Social) — fixes de layout
   ============================================================ */
.modal-xwide { max-width: 1180px; }

.ce-modal { padding: 0; }
.ce-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .ce-grid { grid-template-columns: 1fr; } }

.ce-left { min-width: 0; }
.ce-right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; }
.ce-right-section { display: flex; flex-direction: column; gap: 8px; }

.ce-header { display: grid; grid-template-columns: 1fr 180px; gap: 8px; margin-bottom: 10px; }
.ce-header input { font-size: 15px; font-weight: 600; padding: 10px 12px; }
.ce-header select { padding: 10px 12px; }
@media (max-width: 600px) { .ce-header { grid-template-columns: 1fr; } }

.ce-meta-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 14px; align-items: stretch; }
.ce-meta-row > select, .ce-meta-row > input { height: 38px; padding: 0 10px; font-size: 13px; }
.ce-color-label { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; height: 38px; }
.ce-color-label input[type="color"] { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 4px; }
.ce-color-label input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.ce-color-label input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 4px; }
.ce-color-label span { font-size: 12px; color: var(--text-2); }
@media (max-width: 560px) { .ce-meta-row { grid-template-columns: 1fr; } }

.ce-section-label { font-size: 11px; color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.ce-section-label .hint { font-size: 10px; color: var(--text-3); font-weight: 400; text-transform: none; letter-spacing: 0; }
.ce-section-label strong { color: var(--text-1); font-weight: 700; }

/* Barra de plataformas — unificada (activación + selección) */
.editor-platforms-bar#platforms-bar { display: flex; gap: 4px; padding: 4px; background: var(--bg-1); border-radius: 10px; margin-bottom: 14px; overflow-x: auto; flex-wrap: wrap; }
.ce-plat-btn { background: transparent; border: 0; padding: 8px 12px; border-radius: 6px; font-size: 12px; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .12s; position: relative; }
.ce-plat-btn:hover { color: var(--text-1); background: var(--bg-2); }
.ce-plat-btn.enabled { color: var(--text-1); background: var(--bg-0); border: 1px solid var(--border); font-weight: 600; }
.ce-plat-btn.enabled.current { background: var(--bg-0); border-color: var(--border-strong); }
.ce-plat-btn.disabled { opacity: .55; }
.ce-plat-btn .ico { font-size: 14px; }
.ce-plat-btn .dot-on { width: 6px; height: 6px; border-radius: 50%; margin-left: 2px; }

/* Preview frame ajustado para el panel lateral */
.ce-right .preview-frame { max-width: 100%; }

/* Char ring counter */
.char-ring { background: var(--bg-1); border: 1px solid var(--border); }

/* AI suggest button + zone */
.ai-suggestions { margin-top: 12px; }

/* ============================================================
   Editor avanzado: post types, device toggle, labels, switch
   ============================================================ */
.posttype-tabs { display: flex; gap: 3px; padding: 3px; background: var(--bg-1); border-radius: 8px; margin-bottom: 12px; overflow-x: auto; }
.posttype-tab { background: transparent; border: 0; padding: 7px 11px; border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.posttype-tab.active { background: var(--text-1); color: var(--bg-0); font-weight: 600; }
.posttype-tab:hover:not(.active) { background: var(--bg-2); color: var(--text-1); }
.posttype-tab .material-symbols-outlined { font-size: 16px; }

.device-toggle { display: inline-flex; background: var(--bg-1); border: 1px solid var(--border); border-radius: 7px; padding: 2px; }
.device-toggle button { background: transparent; border: 0; padding: 5px 8px; border-radius: 5px; cursor: pointer; color: var(--text-3); display: inline-flex; align-items: center; }
.device-toggle button.active { background: var(--text-1); color: var(--bg-0); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--border-strong); border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--text-1); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* Label chip */
.label-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }

/* Preview device wrap */
.preview-wrap.device-mobile .preview-frame { max-width: 320px; }
.preview-wrap.device-desktop .preview-frame { max-width: 100%; border-radius: 8px; }
.preview-wrap.device-mobile { display: flex; justify-content: center; }
.preview-frame .img-area.link-card { aspect-ratio: 1.91/1; flex-direction: column; gap: 6px; position: relative; }
.preview-frame .img-area.link-card .link-meta { position: absolute; bottom: 0; left: 0; right: 0; background: var(--bg-2); padding: 6px 10px; font-size: 11px; color: var(--text-2); text-align: left; }

/* ============================================================
   Vista Approvals (cola central)
   ============================================================ */
.approval-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.approval-card { background: var(--bg-0); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .15s; }
.approval-card:hover { border-color: var(--text-1); box-shadow: var(--shadow); }
.approval-card .media { aspect-ratio: 4/3; background: var(--bg-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; overflow: hidden; }
.approval-card .media img { width: 100%; height: 100%; object-fit: cover; }
.approval-card .media video { width: 100%; height: 100%; object-fit: cover; }
.approval-card .info { padding: 14px; }
.approval-card .info .client { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.approval-card .info .client .dot { width: 8px; height: 8px; border-radius: 50%; }
.approval-card .info .title { font-weight: 600; font-size: 14px; margin: 4px 0; }
.approval-card .info .meta { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
.approval-card .actions { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 6px; }
.approval-card .actions .btn { flex: 1; padding: 8px 10px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; line-height: 1.2; text-align: center; white-space: nowrap; }
.approval-card .actions .btn .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
.approval-card .actions .btn-approve { background: var(--text-1); color: #fff; border-color: var(--text-1); }
.approval-card .actions .btn-approve:hover { background: #333; }
.approval-card .actions .btn-reject { color: var(--text-2); }
.approval-card .actions .btn-reject:hover { color: var(--text-1); }

/* ============================================================
   Vista Analytics
   ============================================================ */
.analytics-empty { text-align: center; padding: 60px 24px; }
.top-post-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; }
.top-post-row:hover { background: var(--bg-1); }
.top-post-row .rank { font-size: 18px; font-weight: 800; color: var(--text-3); width: 28px; text-align: center; }
.top-post-row .thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--bg-2); overflow: hidden; flex-shrink: 0; }
.top-post-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.top-post-row .info { flex: 1; min-width: 0; }
.top-post-row .info .title { font-weight: 600; font-size: 13px; }
.top-post-row .info .client { font-size: 11px; color: var(--text-3); }
.top-post-row .stats { text-align: right; }
.top-post-row .stats .big { font-weight: 700; font-size: 15px; }
.top-post-row .stats .lbl { font-size: 10px; color: var(--text-3); }

/* ============================================================
   Portal cliente — tarjetas de aprobación + servicios + badges
   ============================================================ */
.nav-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: auto;
    font-size: 11px; font-weight: 700; line-height: 1;
    background: var(--brand-accent, #c79a3b); color: #fff; border-radius: 9px;
}
.nav-item { display: flex; align-items: center; gap: 10px; }

/* Segmented control (filtros del portal) */
.seg { display: inline-flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.seg-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; background: transparent; color: var(--text-2);
    font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 7px; cursor: pointer;
}
.seg-btn.active { background: var(--bg-0); color: var(--text-1); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; background: var(--brand-accent, #c79a3b); color: #fff; border-radius: 8px; }

/* Grid de tarjetas de contenido para aprobar */
.approval-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.approval-card {
    background: var(--bg-0); border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s;
    display: flex; flex-direction: column;
}
.approval-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.10); transform: translateY(-2px); border-color: var(--text-3); }
.ac-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); }
.ac-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-media-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.ac-media-empty .material-symbols-outlined { font-size: 40px; }
.ac-status { position: absolute; top: 8px; left: 8px; font-size: 11px; backdrop-filter: blur(4px); }
.ac-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ac-title { font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--text-3); margin-top: auto; }
.ac-plats { display: inline-flex; gap: 2px; }
.material-symbols-outlined.xs { font-size: 14px; vertical-align: middle; }
.material-symbols-outlined.sm { font-size: 18px; vertical-align: middle; }
.ac-cta { width: 100%; }

/* Lista de servicios contratados */
.svc-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.svc-card {
    display: flex; align-items: flex-start; gap: 16px;
    background: var(--bg-0); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
}
.svc-card.svc-inactive { opacity: .62; }
.svc-icon {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-2); color: var(--text-1);
}
.svc-icon .material-symbols-outlined { font-size: 24px; }
.svc-main { flex: 1; min-width: 0; }
.svc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.svc-head strong { font-size: 15px; color: var(--text-1); }
.svc-desc { font-size: 13px; color: var(--text-2); margin: 6px 0 0; line-height: 1.5; }
.svc-attrs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.svc-attrs span { display: inline-flex; align-items: center; gap: 4px; }
.svc-notes { font-size: 12px; color: var(--text-3); margin: 10px 0 0; font-style: italic; }
.svc-price { flex: 0 0 auto; text-align: right; }
.svc-price .amount { font-size: 18px; font-weight: 700; color: var(--text-1); }
.svc-price .period { font-size: 11px; color: var(--text-3); }

/* === Logo de marca subido (reemplaza el wordmark) === */
.brand-logo-img { height: 20px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.app-side .logo-row .brand-logo-img { height: 19px; }
.auth-side .brand-logo-img, .super-side .logo .brand-logo-img { height: 24px; }

/* ============================================================
   CRM de Leads — pipeline, timeline, checklists
   ============================================================ */
.lead-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.lead-col { flex: 0 0 250px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.lead-col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); border-bottom: 1px solid var(--border); }
.lead-count { background: var(--bg-2); color: var(--text-2); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.lead-cards { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; flex: 1; }
.lead-card { background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: box-shadow .12s, transform .12s; }
.lead-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.lead-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lead-card-top strong { font-size: 13px; }
.lead-value { font-size: 12px; font-weight: 700; color: var(--text-1); white-space: nowrap; }
.lead-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.lead-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.lead-tag { font-size: 10px; background: var(--bg-2); color: var(--text-2); border-radius: 999px; padding: 2px 8px; }
.lead-owner { font-size: 10px; color: var(--text-3); margin-left: auto; }

.lead-timeline { display: flex; flex-direction: column; gap: 12px; max-height: 320px; overflow-y: auto; }
.tl-item { display: flex; gap: 10px; }
.tl-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); margin-top: 5px; }
.tl-dot.status_change { background: var(--brand-accent, #c79a3b); }
.tl-dot.call, .tl-dot.meeting { background: #3b82f6; }
.tl-dot.proposal { background: #10b981; }
.tl-dot.system { background: var(--border); }

.cl-block { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.cl-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cl-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.cl-item input[type=checkbox] { width: 15px; height: 15px; flex-shrink: 0; }
.cl-del { margin-left: auto; background: transparent; border: 0; color: var(--text-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.cl-del:hover { color: var(--danger, #ef4444); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* Leads — responsivo en móvil */
@media (max-width: 768px) {
    .lead-board { gap: 10px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .lead-col { flex: 0 0 82vw; max-width: 320px; max-height: none; scroll-snap-align: start; }
    .lead-board .lead-cards { max-height: 60vh; }
    .page-header .actions { width: 100%; flex-wrap: wrap; }
    .page-header .actions #lead-search { flex: 1 1 100%; width: auto; }
    .page-header .actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Aprobaciones — etiqueta de etapa */
.approval-card .media { position: relative; }
.ap-stage { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
.ap-stage-team { background: var(--text-1); color: #fff; }
.ap-stage-client { background: rgba(255,255,255,.85); color: var(--text-1); border: 1px solid var(--border); }
.approval-card .actions .ap-direct { width: 100%; margin-top: 4px; color: var(--text-3); }

.ap-waiting { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--bg-2); border-radius: 8px; padding: 7px; margin-bottom: 4px; }
.ap-waiting .material-symbols-outlined { font-size: 15px; }

/* Aprobaciones — acciones apiladas (tarjetas Esperando cliente) */
.approval-card .actions { flex-wrap: wrap; }
.approval-card .actions.ap-actions-col { flex-direction: column; align-items: stretch; }
.approval-card .actions.ap-actions-col .btn { flex: none; width: 100%; justify-content: center; }
.approval-card .actions.ap-actions-col .ap-waiting { width: 100%; }
.approval-card .actions .ap-direct { flex-basis: 100%; }

/* ============================================================
   Feed view — grid estilo Instagram
   ============================================================ */
.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 620px; }
.feed-cell { position: relative; aspect-ratio: 1; background: var(--bg-2); overflow: hidden; cursor: pointer; border-radius: 2px; }
.feed-cell img, .feed-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Proporción del grid según la red social */
.feed-grid.net-instagram .feed-cell { aspect-ratio: 1 / 1; }
.feed-grid.net-tiktok .feed-cell { aspect-ratio: 9 / 16; }
.feed-grid.net-tiktok { max-width: 540px; }
.feed-grid.net-facebook .feed-cell { aspect-ratio: 4 / 5; }
.feed-cell:hover img, .feed-cell:hover video { opacity: .85; }
.feed-cell.dragging { opacity: .4; }
.feed-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.feed-empty .material-symbols-outlined { font-size: 28px; }
.feed-badge { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.feed-badge .material-symbols-outlined { font-size: 18px; }
.feed-status { position: absolute; bottom: 6px; left: 6px; width: 12px; height: 12px; padding: 0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.feed-status .dot { display: none; }
@media (max-width: 600px) { .feed-grid { gap: 2px; } }

.item-badge { display:inline-flex; align-items:center; gap:2px; font-size:11px; color:var(--text-3); background:var(--bg-2); border-radius:6px; padding:1px 5px; }

/* ===== Pills de estado de soporte ===== */
.pill-sup-open { background:#fee2e2; color:#b91c1c; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; }
.pill-sup-in_progress { background:#fef3c7; color:#92400e; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; }
.pill-sup-resolved { background:#dcfce7; color:#166534; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; }
.pill-sup-closed { background:var(--bg-2); color:var(--text-3); padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; }

/* ===== Mockup de celular para el feed ===== */
.phone-wrap { display: flex; justify-content: center; padding: 6px 0 28px; }
.phone-frame { width: 384px; max-width: 100%; background: #0a0a0a; border-radius: 48px; padding: 13px; box-shadow: 0 26px 70px rgba(0,0,0,.28); position: relative; }
.phone-frame::before { content: ''; position: absolute; top: 21px; left: 50%; transform: translateX(-50%); width: 116px; height: 24px; background: #0a0a0a; border-radius: 0 0 16px 16px; z-index: 4; }
.phone-screen { background: #fff; border-radius: 36px; overflow: hidden; height: 730px; display: flex; flex-direction: column; position: relative; }
.phone-screen.dark { background: #000; color: #fff; }
.phone-status { display: flex; justify-content: space-between; align-items: center; padding: 13px 24px 4px; font-size: 13px; font-weight: 600; }
.phone-status .ps-r { display: flex; gap: 6px; align-items: center; }
.phone-status .material-symbols-outlined { font-size: 16px; }
.phone-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.phone-scroll .feed-grid { max-width: 100%; gap: 2px; }

.sm-av { border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }

/* Instagram */
.ig-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 4px; }
.ig-top .ig-user { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 4px; }
.ig-top .ig-ic { display: flex; gap: 16px; } .ig-top .ig-ic .material-symbols-outlined { font-size: 22px; }
.ig-prof { display: flex; align-items: center; gap: 20px; padding: 8px 16px; }
.ig-prof .sm-av { width: 80px; height: 80px; font-size: 26px; }
.ig-stats { display: flex; gap: 18px; flex: 1; justify-content: space-around; }
.ig-stat { text-align: center; } .ig-stat b { display: block; font-size: 16px; } .ig-stat span { font-size: 12px; color: #555; }
.ig-bio { padding: 0 16px 10px; font-size: 13px; line-height: 1.4; } .ig-bio .bn { font-weight: 600; }
.ig-btns { display: flex; gap: 6px; padding: 0 16px 12px; }
.ig-btns .b { flex: 1; text-align: center; background: #efefef; border-radius: 8px; padding: 6px; font-size: 13px; font-weight: 600; }
.ig-tabs { display: flex; border-top: 1px solid #dbdbdb; }
.ig-tabs .t { flex: 1; text-align: center; padding: 9px; color: #b0b0b0; border-bottom: 1px solid transparent; }
.ig-tabs .t .material-symbols-outlined { font-size: 24px; }
.ig-tabs .t.on { color: #0a0a0a; border-bottom: 1.5px solid #0a0a0a; }

/* TikTok */
.tt-prof { display: flex; flex-direction: column; align-items: center; padding: 8px 16px; }
.tt-prof .sm-av { width: 92px; height: 92px; font-size: 32px; }
.tt-user { font-weight: 700; margin-top: 8px; font-size: 15px; }
.tt-stats { display: flex; gap: 26px; margin: 12px 0; }
.tt-stat { text-align: center; } .tt-stat b { display: block; font-size: 16px; } .tt-stat span { font-size: 12px; color: #aaa; }
.tt-follow { background: #fe2c55; color: #fff; padding: 8px 44px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.tt-bio { font-size: 12px; color: #ddd; margin-top: 12px; text-align: center; }
.tt-tabs { display: flex; margin-top: 14px; border-top: 1px solid #222; }
.tt-tabs .t { flex: 1; text-align: center; padding: 9px; color: #777; }
.tt-tabs .t .material-symbols-outlined { font-size: 22px; }
.tt-tabs .t.on { color: #fff; border-bottom: 2px solid #fff; }

/* Facebook */
.fb-cover { height: 92px; background: linear-gradient(135deg, #1877f2, #5b7bd5); }
.fb-prof { padding: 0 16px 8px; margin-top: -36px; }
.fb-prof .sm-av { width: 86px; height: 86px; font-size: 28px; border: 4px solid #fff; }
.fb-name { font-size: 20px; font-weight: 700; margin-top: 6px; }
.fb-meta { font-size: 13px; color: #65676b; }
.fb-tabs { display: flex; border-top: 1px solid #e4e6eb; border-bottom: 1px solid #e4e6eb; margin-top: 8px; }
.fb-tabs .t { padding: 10px 14px; font-size: 13px; font-weight: 600; color: #65676b; }
.fb-tabs .t.on { color: #1877f2; border-bottom: 2px solid #1877f2; }
.fb-sec { padding: 10px 16px 4px; font-weight: 700; font-size: 15px; }

/* Editor — botón de portada en media */
.media-thumb { position: relative; }
.media-thumb.is-cover { outline: 2px solid var(--brand-accent, #c79a3b); outline-offset: -2px; }
.media-thumb .set-cover { position: absolute; bottom: 4px; left: 4px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 5px; padding: 2px 6px; cursor: pointer; }
.media-thumb.is-cover .set-cover { background: var(--brand-accent, #c79a3b); }
.cover-hint { font-size: 12px; color: var(--text-2); background: var(--bg-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.cover-block { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.cover-block .cover-info { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.cover-block .cover-preview { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
