#flexsocial_dashboard .flexsocial_welcome {
    padding: 2rem 0;
}

#flexsocial_dashboard .flexsocial_welcome h4 {
    margin-bottom: 1rem;
}


#flexsocial_media_files {
    margin-top: 4px;
}

.flexsocial-media-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.flexsocial-media-thumb-item {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
    flex-shrink: 0;
}

.flexsocial-media-thumb-item:hover {
    border-color: #6690F4;
}

.flexsocial-media-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flexsocial-media-thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.flexsocial-media-thumb-item:hover .flexsocial-media-thumb-remove {
    opacity: 1;
}

.flexsocial-media-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.flexsocial-media-upload-btn:hover {
    border-color: #6690F4;
    color: #6690F4;
}

/* ── Media preview panel ── */

.flexsocial-preview-panel {
    position: sticky;
    top: 80px;
}

.flexsocial-media-preview-area {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 200px;
    overflow: hidden;
}

.flexsocial-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.flexsocial-preview-media {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
    background: #0f172a;
}

.flexsocial-preview-info {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
}

.flexsocial-preview-filename {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.flexsocial-preview-nav {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
    overflow-x: auto;
}

.flexsocial-preview-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.flexsocial-preview-thumb:hover,
.flexsocial-preview-thumb--active {
    border-color: #6690F4;
}

.flexsocial-preview-thumb-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flexsocial-preview-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px !important;
    height: 16px !important;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.flexsocial-platform-card {
    transition: box-shadow 0.2s ease;
    min-height: 80px;
}

.flexsocial-platform-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flexsocial-cal-event {
    padding: 4px 6px;
    line-height: 1.3;
    cursor: pointer;
}

.flexsocial-cal-event-title {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flexsocial-cal-event--month .flexsocial-cal-event-title {
    font-size: 11px;
    margin-bottom: 2px;
}

.flexsocial-cal-event--week .flexsocial-cal-event-title {
    font-size: 10px;
    margin-bottom: 1px;
}

.flexsocial-cal-event--day .flexsocial-cal-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.flexsocial-cal-accounts {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.flexsocial-cal-account {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
}

.flexsocial-cal-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e2e8f0;
}

.flexsocial-cal-account--icon {
    color: #fff;
}

.flexsocial-cal-platform-icon {
    width: 12px !important;
    height: 12px !important;
}

.flexsocial-cal-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px !important;
    height: 10px !important;
    background: #fff;
    border-radius: 50%;
}

.flexsocial-cal-account-more {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    padding-left: 2px;
}

.flexsocial-cal-files {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 1px 7px;
    flex-shrink: 0;
}

.flexsocial-cal-detail {
    min-width: 240px;
    font-size: 13px;
}

.flexsocial-cal-detail-body p {
    margin: 0 0 8px;
    color: #334155;
    word-break: break-word;
}

.flexsocial-cal-detail-files {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.flexsocial-cal-detail-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

.flexsocial-cal-detail-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.flexsocial-cal-detail-accounts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flexsocial-cal-detail-account {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flexsocial-cal-detail-platform-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.flexsocial-cal-detail-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.flexsocial-cal-detail-account-name {
    font-size: 13px;
    color: #334155;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flexsocial-cal-status-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.flexsocial-cal-status-badge--published {
    background: #dcfce7;
    color: #166534;
}

.flexsocial-cal-status-badge--failed {
    background: #fee2e2;
    color: #991b1b;
}

.flexsocial-cal-status-badge--pending {
    background: #fef3c7;
    color: #92400e;
}

.flexsocial-cal-event--allday {
    padding: 3px 8px;
    background: #f8fafc;
    border-radius: 4px;
}

.flexsocial-post-content-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
}

.flexsocial-post-text {
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
    margin: 0;
    white-space: pre-wrap;
}

.flexsocial-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.flexsocial-post-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.flexsocial-post-media-item {
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 16 / 10;
}

.flexsocial-post-media-item img,
.flexsocial-post-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flexsocial-post-accounts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flexsocial-post-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.flexsocial-post-account-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.flexsocial-post-account-platform {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.flexsocial-post-account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.flexsocial-post-account-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.flexsocial-post-account-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flexsocial-post-account-handle {
    font-size: 12px;
    color: #94a3b8;
}

.flexsocial-post-account-right {
    flex-shrink: 0;
}

.flexsocial-post-account-error {
    margin: -2px 0 2px 0;
    padding: 8px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    color: #991b1b;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    word-break: break-word;
}

.flexsocial-post-account-error + .flexsocial-post-account-row {
    margin-top: 2px;
}

.flexsocial-ai-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.flexsocial-ai-btn {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border-style: dashed;
}

.flexsocial-ai-btn:hover {
    border-style: solid;
}

.flexsocial-ai-prompt-wrap .input-group {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.flexsocial-ai-prompt-wrap .form-control {
    font-size: 13px;
}

.flexsocial-ai-prompt-wrap .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

#flexsocial_content {
    height: 200px;
    resize: none;
}

.flexsocial-schedule-toggle .btn-group {
    border-radius: 6px;
    overflow: hidden;
}

.flexsocial-schedule-toggle .btn {
    font-size: 13px;
    padding: 6px 14px;
}

.flexsocial-cal-event-time {
    font-size: 10px;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.flexsocial-cal-detail-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
}

.flexsocial-platform-preview-area {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 200px;
    overflow: hidden;
}

.flexsocial-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    list-style: none;
}

.flexsocial-tab:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.flexsocial-tab.flexsocial-tab-active {
    color: #1e293b;
    border-bottom-color: #6366f1;
    background: #fff;
}

.flexsocial-preview-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.flexsocial-preview-tab-content {
    padding: 12px;
    background: #f0f2f5;
    min-height: 300px;
}

/* ── Generic preview card ── */

.flexsocial-preview {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.flexsocial-fb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 0;
}

.flexsocial-fb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1877F2, #42a5f5);
    flex-shrink: 0;
}

.flexsocial-fb-meta {
    display: flex;
    flex-direction: column;
}

.flexsocial-fb-name {
    font-weight: 600;
    font-size: 13px;
    color: #050505;
}

.flexsocial-fb-time {
    font-size: 11px;
    color: #65676b;
}

.flexsocial-fb-body {
    padding: 8px 12px;
    color: #050505;
    word-break: break-word;
}

.flexsocial-fb-media {
    width: 100%;
    background: #f0f2f5;
}

.flexsocial-fb-media-img {
    width: 100%;
    display: block;
    max-height: 260px;
    object-fit: cover;
}

.flexsocial-fb-media-grid {
    display: grid;
    gap: 2px;
}

.flexsocial-fb-media-grid-2 { grid-template-columns: 1fr 1fr; }
.flexsocial-fb-media-grid-3 { grid-template-columns: 1fr 1fr; }
.flexsocial-fb-media-grid-3 .flexsocial-fb-grid-item:first-child { grid-column: span 2; }
.flexsocial-fb-media-grid-4 { grid-template-columns: 1fr 1fr; }

.flexsocial-fb-grid-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.flexsocial-fb-grid-item .flexsocial-fb-media-img {
    height: 100%;
    max-height: none;
}

.flexsocial-fb-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.flexsocial-fb-actions {
    display: flex;
    justify-content: space-around;
    padding: 6px 12px;
    border-top: 1px solid #e4e6eb;
    color: #65676b;
    font-size: 13px;
    font-weight: 500;
}

.flexsocial-fb-actions span {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.flexsocial-tw-header {
    display: flex;
    gap: 8px;
    padding: 10px 12px 0;
}

.flexsocial-tw-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1DA1F2, #0d8ecf);
    flex-shrink: 0;
}

.flexsocial-tw-meta {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.flexsocial-tw-name {
    font-weight: 700;
    font-size: 13px;
    color: #0f1419;
}

.flexsocial-tw-handle {
    font-size: 12px;
    color: #536471;
}

.flexsocial-tw-body {
    padding: 4px 12px 8px 56px;
    color: #0f1419;
    word-break: break-word;
}

.flexsocial-tw-media {
    margin: 0 12px 0 56px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f2f5;
}

.flexsocial-tw-media-img {
    width: 100%;
    display: block;
    max-height: 240px;
    object-fit: cover;
}

.flexsocial-tw-media-grid {
    display: grid;
    gap: 2px;
}

.flexsocial-tw-media-grid-2 { grid-template-columns: 1fr 1fr; }
.flexsocial-tw-media-grid-3 { grid-template-columns: 1fr 1fr; }
.flexsocial-tw-media-grid-3 .flexsocial-tw-grid-item:first-child { grid-column: span 2; }
.flexsocial-tw-media-grid-4 { grid-template-columns: 1fr 1fr; }

.flexsocial-tw-grid-item {
    overflow: hidden;
    aspect-ratio: 16/10;
}

.flexsocial-tw-grid-item .flexsocial-tw-media-img {
    height: 100%;
    max-height: none;
}

.flexsocial-tw-actions {
    display: flex;
    gap: 40px;
    padding: 8px 12px 10px 56px;
    color: #536471;
    font-size: 13px;
}

.flexsocial-tw-actions span {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: default;
}


.flexsocial-ig-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #efefef;
}

.flexsocial-ig-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    flex-shrink: 0;
}

.flexsocial-ig-name {
    font-weight: 600;
    font-size: 13px;
    color: #262626;
}

.flexsocial-ig-media {
    width: 100%;
    background: #000;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flexsocial-ig-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flexsocial-ig-media-empty {
    background: #fafafa;
}

.flexsocial-ig-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

.flexsocial-ig-actions-left {
    display: flex;
    gap: 12px;
}

.flexsocial-ig-actions i {
    color: #262626;
    cursor: default;
}

.flexsocial-ig-caption {
    padding: 0 12px 10px;
    font-size: 13px;
    color: #262626;
    word-break: break-word;
}

.flexsocial-ig-caption strong {
    font-weight: 600;
    margin-right: 4px;
}

/* ── LinkedIn preview ── */

.flexsocial-li-header {
    display: flex;
    gap: 8px;
    padding: 10px 12px 0;
}

.flexsocial-li-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0A66C2, #0d8ecf);
    flex-shrink: 0;
}

.flexsocial-li-meta {
    display: flex;
    flex-direction: column;
}

.flexsocial-li-name {
    font-weight: 600;
    font-size: 13px;
    color: rgba(0,0,0,0.9);
}

.flexsocial-li-headline {
    font-size: 11px;
    color: rgba(0,0,0,0.6);
}

.flexsocial-li-time {
    font-size: 11px;
    color: rgba(0,0,0,0.6);
}

.flexsocial-li-body {
    padding: 8px 12px;
    color: rgba(0,0,0,0.9);
    word-break: break-word;
}

.flexsocial-li-media {
    width: 100%;
    background: #f3f2ef;
}

.flexsocial-li-media-img {
    width: 100%;
    display: block;
    max-height: 260px;
    object-fit: cover;
}

.flexsocial-li-actions {
    display: flex;
    justify-content: space-around;
    padding: 6px 12px;
    border-top: 1px solid #e0e0e0;
    color: rgba(0,0,0,0.6);
    font-size: 12px;
    font-weight: 500;
}

.flexsocial-li-actions span {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: default;
}

/* ── TikTok preview ── */

.flexsocial-tiktok .flexsocial-tt-phone {
    position: relative;
    width: 100%;
    aspect-ratio: 9/14;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.flexsocial-tt-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.7));
}

.flexsocial-tt-sidebar {
    position: absolute;
    right: 8px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.flexsocial-tt-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 10px;
}

.flexsocial-tt-sidebar-item i {
    color: #fff;
}

.flexsocial-tt-bottom {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 50px;
    color: #fff;
}

.flexsocial-tt-name {
    font-weight: 700;
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

.flexsocial-tt-desc {
    font-size: 12px;
    margin: 0;
    opacity: 0.9;
    word-break: break-word;
}

/* ── YouTube preview ── */

.flexsocial-yt-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.flexsocial-yt-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flexsocial-yt-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.flexsocial-yt-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 34px;
    background: rgba(255,0,0,0.85);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.flexsocial-yt-info {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
}

.flexsocial-yt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF0000, #cc0000);
    flex-shrink: 0;
}

.flexsocial-yt-meta {
    display: flex;
    flex-direction: column;
}

.flexsocial-yt-title {
    font-weight: 600;
    font-size: 13px;
    color: #0f0f0f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flexsocial-yt-channel {
    font-size: 12px;
    color: #606060;
}

.flexsocial-yt-stats {
    font-size: 12px;
    color: #606060;
}

/* ── Scheduled status badge (calendar) ── */

.flexsocial-cal-status-badge--scheduled {
    background: #dbeafe;
    color: #1e40af;
}