:root { --sh-primary: #6c5ce7; --sh-sidebar: 250px; --bs-primary: #6c5ce7; --bs-primary-rgb: 108,92,231; --bs-link-color: #6c5ce7; --bs-link-color-rgb: 108,92,231; }
[data-bs-theme=dark] { --bs-body-bg: #14151a; --bs-tertiary-bg: #1b1c22; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bs-tertiary-bg); }
.btn-primary { --bs-btn-bg: #6c5ce7; --bs-btn-border-color: #6c5ce7; --bs-btn-hover-bg: #5a4bd1; --bs-btn-hover-border-color: #5a4bd1; --bs-btn-active-bg: #4d3fc0; --bs-btn-disabled-bg: #6c5ce7; --bs-btn-disabled-border-color: #6c5ce7; }
.btn-outline-primary { --bs-btn-color: #6c5ce7; --bs-btn-border-color: #6c5ce7; --bs-btn-hover-bg: #6c5ce7; --bs-btn-hover-border-color: #6c5ce7; --bs-btn-active-bg: #6c5ce7; --bs-btn-active-border-color: #6c5ce7; }
.text-bg-primary { background-color: #6c5ce7 !important; }
.btn-gradient { background: linear-gradient(135deg, #6c5ce7, #e84393); color: #fff; border: 0; }
.btn-gradient:hover, .btn-gradient:focus, .btn-gradient.show { color: #fff; filter: brightness(1.08); }

.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sh-sidebar); background: var(--bs-body-bg); border-right: 1px solid var(--bs-border-color); display: flex; flex-direction: column; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar-head { display: flex; align-items: center; padding: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--bs-body-color); text-decoration: none; font-size: 1.05rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6c5ce7, #e84393); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.sidebar .nav-link { color: var(--bs-secondary-color); display: flex; align-items: center; gap: .6rem; padding: .45rem 1rem; margin: 1px .5rem; border-radius: .5rem; font-size: .92rem; }
.sidebar .nav-link:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.sidebar .nav-link.active { background: rgba(108,92,231,.12); color: #6c5ce7; font-weight: 600; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); padding: 1rem 1.5rem .3rem; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; padding: .75rem 1.25rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 100; }
.content { padding: 1.25rem; max-width: 1500px; width: 100%; }
.card { border-color: var(--bs-border-color-translucent); border-radius: .75rem; }
.card-header { background: transparent; font-weight: 600; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, rgba(108,92,231,.15), rgba(232,67,147,.12)); }
.auth-card { width: 100%; max-width: 420px; }

.stat { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--bs-secondary-color); font-size: .8rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--bs-secondary-color); }
.empty-state > i { font-size: 2.6rem; opacity: .5; }

.acc-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: 2rem; padding: .1rem .55rem; font-size: .8rem; margin: 1px; white-space: nowrap; }
.acc-chip.sm { font-size: .72rem; padding: 0 .45rem; }
.net-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem; flex-shrink: 0; }

/* composer */
.acc-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.acc-pick { display: inline-flex; align-items: center; gap: .4rem; border: 2px solid var(--bs-border-color); background: var(--bs-body-bg); border-radius: 2rem; padding: .2rem .7rem .2rem .2rem; font-size: .85rem; opacity: .55; transition: .15s; color: var(--bs-body-color); }
.acc-pick:hover { opacity: .85; }
.acc-pick.on { opacity: 1; border-color: #6c5ce7; box-shadow: 0 0 0 3px rgba(108,92,231,.15); }
.acc-pick.warn .acc-ico { outline: 2px solid #e74c3c; }
.acc-ico { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; }
.acc-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#editor-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
#editor-tabs .nav-link { white-space: nowrap; padding: .4rem .7rem; font-size: .88rem; position: relative; }
.dot-custom { position: absolute; top: 6px; right: 4px; width: 7px; height: 7px; background: #e84393; border-radius: 50%; }
.post-text { font-size: .97rem; line-height: 1.5; }
.counter { font-size: .78rem; background: var(--bs-tertiary-bg); border-radius: 1rem; padding: .1rem .5rem; white-space: nowrap; }
.counter.near { background: #fff3cd; color: #856404; }
.counter.over { background: #f8d7da; color: #842029; font-weight: 600; }
.emoji-grid { width: 290px; }
.emoji-grid .emoji { font-size: 1.15rem; padding: .1rem .3rem; margin: 1px; }
.ai-menu .dropdown-item { font-size: .88rem; padding: .35rem .5rem; }
.ai-row { margin-bottom: 2px; }
.dropzone { display: block; text-align: center; border: 2px dashed var(--bs-border-color); border-radius: .75rem; padding: 1.2rem; cursor: pointer; color: var(--bs-secondary-color); transition: .15s; }
.dropzone.over, .dropzone:hover { border-color: #6c5ce7; background: rgba(108,92,231,.05); }
.media-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.media-item { position: relative; width: 110px; height: 110px; border-radius: .6rem; overflow: hidden; background: #000; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .vbadge { position: absolute; top: 4px; left: 4px; }
.media-tools { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; padding: 3px; background: rgba(0,0,0,.45); opacity: 0; transition: .15s; }
.media-item:hover .media-tools { opacity: 1; }
@media (hover: none) { .media-tools { opacity: 1; } }
.media-tools .btn { padding: 0 .35rem; font-size: .75rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.lib-item { border: 2px solid transparent; border-radius: .6rem; padding: 0; background: var(--bs-tertiary-bg); overflow: hidden; display: flex; flex-direction: column; text-align: left; color: var(--bs-body-color); }
.lib-item img, .lib-item video { width: 100%; aspect-ratio: 1; object-fit: cover; }
.lib-item span { padding: .2rem .4rem; display: block; }
.lib-item.on { border-color: #6c5ce7; box-shadow: 0 0 0 3px rgba(108,92,231,.25); }
.preview-sticky { position: sticky; top: 80px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 50; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.ai-text { white-space: normal; }

/* anteprima */
.pv { background: var(--bs-body-bg); border-radius: .75rem; border: 1px solid var(--bs-border-color); overflow: hidden; max-width: 520px; margin: 0 auto; }
.pv-head { display: flex; align-items: center; gap: .6rem; padding: .75rem; }
.pv-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.pv-text { padding: 0 .75rem .75rem; font-size: .92rem; word-wrap: break-word; }
.pv-title { padding: 0 .75rem .4rem; font-weight: 700; font-size: 1.05rem; }
.pv-instagram .pv-text, .pv-pinterest .pv-text, .pv-tiktok .pv-text, .pv-youtube .pv-text { padding-top: .6rem; }
.pv-link { color: #1d72d8; }
.pv-media { display: grid; gap: 2px; background: #000; }
.pv-media.n1 { grid-template-columns: 1fr; }
.pv-media.n2 { grid-template-columns: 1fr 1fr; }
.pv-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pv-media.n3 > :first-child { grid-row: span 2; }
.pv-media.n4 { grid-template-columns: 1fr 1fr; }
.pv-media > div, .pv-media video { aspect-ratio: 1; background-size: cover; background-position: center; width: 100%; position: relative; object-fit: cover; }
.pv-media.n1 > div { aspect-ratio: 4/3; }
.pv-media > div span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-size: 1.6rem; font-weight: 700; }
.pv-card { margin: 0 .75rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; overflow: hidden; }
.pv-card-img { aspect-ratio: 1.91; background-size: cover; background-position: center; }
.pv-actions { display: flex; gap: 1.4rem; padding: .5rem .75rem .75rem; color: var(--bs-secondary-color); }
.pv-over { margin: 0 .75rem .5rem; color: #dc3545; font-size: .8rem; font-weight: 600; }

/* calendario */
.fc { --fc-border-color: var(--bs-border-color); --fc-page-bg-color: var(--bs-body-bg); --fc-today-bg-color: rgba(108,92,231,.07); --fc-neutral-bg-color: var(--bs-tertiary-bg); font-size: .85rem; }
.fc .fc-button-primary { background: #6c5ce7; border-color: #6c5ce7; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:hover { background: #5a4bd1; border-color: #5a4bd1; }
.fc-event { cursor: pointer; border: 0; padding: 1px 3px; }
.fc-event .ev-icons i { font-size: .7rem; margin-right: 2px; }
.fc-daygrid-day:hover { background: rgba(108,92,231,.04); }

.post-row { border-left: 3px solid transparent; }
.post-row.st-failed, .post-row.st-partial { border-left-color: #e74c3c; }
.post-row.st-pending_approval { border-left-color: #f39c12; }
.post-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: .4rem; background: #000; }
.plan-card.border-primary { border-width: 2px; }
.slot-chip { display: inline-flex; align-items: center; gap: .2rem; background: rgba(108,92,231,.1); color: #6c5ce7; border-radius: 1rem; padding: .1rem .5rem; margin: 2px; font-size: .85rem; }
.slot-chip button { border: 0; background: none; color: inherit; padding: 0; line-height: 1; }
code.secret { user-select: all; }
.fc a { text-decoration: none; } .fc .fc-col-header-cell-cushion { color: var(--bs-body-color); text-transform: capitalize; } .fc .fc-daygrid-day-number { color: var(--bs-secondary-color); }
.card > .table-responsive > .table > :not(caption) > * > :first-child { padding-left: 1rem; } .card > .table-responsive > .table > :not(caption) > * > :last-child { padding-right: 1rem; }
