/* Social Distribution — futuristic panel (extends AT Media design system) */

.sd-hero {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.92) 45%, rgba(249, 115, 22, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-premium), 0 0 60px rgba(249, 115, 22, 0.06);
}

.sd-hero::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.15) 0%, transparent 65%);
    pointer-events: none;
}

.sd-hero h1,
.sd-hero p {
    position: relative;
    z-index: 1;
}

.sd-hero h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.sd-hero .sd-hero-sub {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    max-width: 52ch;
}

.sd-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

.sd-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.sd-platform-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.25rem;
    background: linear-gradient(165deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.sd-platform-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.25);
}

.sd-platform-card .sd-p-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.sd-p-fb { background: linear-gradient(135deg, #1877f2, #0d47a1); color: #fff; }
.sd-p-ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.sd-p-x { background: linear-gradient(135deg, #000, #334155); color: #fff; }
.sd-p-yt { background: linear-gradient(135deg, #ff0000, #990000); color: #fff; }
.sd-p-li { background: linear-gradient(135deg, #0a66c2, #004182); color: #fff; }

.sd-client-pick-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    border-radius: var(--radius-lg);
}
.sd-client-pick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Social channels — ForClient cards (ss2-style: 4+1 grid, compact buttons, logos not clipped) */
.sd-network-grid {
    --sd-network-icon-size: 44px;
}

.sd-network-col {
    overflow: visible;
    min-width: 0;
}

.sd-network-chip {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: linear-gradient(165deg, var(--surface-elevated) 0%, var(--surface-2) 100%);
    padding: 1rem 0.85rem 0.95rem;
    box-shadow: var(--shadow-md);
    min-width: 0;
    overflow: visible;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.sd-network-chip:hover {
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(249, 115, 22, 0.08);
}

.sd-network-icon-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 6px 0;
    overflow: visible;
    flex-shrink: 0;
}

.sd-network-icon {
    width: var(--sd-network-icon-size);
    height: var(--sd-network-icon-size);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.sd-network-hint {
    font-size: 0.7rem;
    line-height: 1.35;
}

.sd-network-status {
    font-size: 0.72rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
}

.sd-network-badge {
    font-size: 0.65rem;
    font-weight: 600;
}

.sd-network-action-btn {
    font-size: 0.75rem !important;
    font-weight: 600;
    padding: 0.32rem 0.5rem !important;
    line-height: 1.25 !important;
    border-radius: 8px !important;
}

.sd-network-account {
    max-width: min(320px, 55vw);
}

.sd-network-row__action .btn {
    white-space: nowrap;
}

/* Legacy tile grid (unused on ForClient; kept for other references) */
.sd-channel-tile {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    padding: 1rem 1rem 0.85rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sd-channel-tile:hover {
    border-color: rgba(249, 115, 22, 0.22);
    box-shadow: var(--shadow-sm);
}

.sd-channel-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

a.sd-client-channel-row:hover {
    background: var(--surface-3);
}

.sd-badge-live {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.sd-badge-off {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--text-muted);
}

.sd-compose {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .sd-compose {
        grid-template-columns: 1fr 360px;
        align-items: start;
    }
}

.sd-preview-phone {
    border-radius: 28px;
    padding: 1rem 0.85rem 1.25rem;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border: 3px solid #334155;
    box-shadow: var(--shadow-premium), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    min-height: 420px;
}

.sd-preview-phone .sd-ph-notch {
    width: 36%;
    height: 22px;
    background: #020617;
    border-radius: 0 0 12px 12px;
    margin: 0 auto 1rem;
}

.sd-preview-screen {
    background: #0f172a;
    border-radius: 12px;
    padding: 1rem;
    min-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sd-preview-caption {
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.45;
    min-height: 4.5em;
    white-space: pre-wrap;
    word-break: break-word;
}

.sd-preview-media {
    margin-top: 0.75rem;
    aspect-ratio: 4/3;
    border-radius: 10px;
    background: linear-gradient(145deg, #334155, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 2rem;
    overflow: hidden;
}

.sd-preview-media img,
.sd-preview-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.sd-timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--brand-primary), transparent);
    border-radius: 2px;
    opacity: 0.35;
}

.sd-timeline-item {
    position: relative;
    padding-bottom: 1.35rem;
    padding-left: 0.5rem;
}

.sd-timeline-item::before {
    content: "";
    position: absolute;
    left: -1.15rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
}

.sd-warn-banner {
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.15), rgba(250, 204, 21, 0.05));
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #854d0e;
    font-size: 0.9rem;
}

.sd-btn-glow {
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.sd-form-glow .form-control:focus,
.sd-form-glow .form-select:focus {
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

/* ========== Create post — matches site.css (card-premium, surfaces) ========== */
.sd-create-page {
    max-width: 1320px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.sd-preview-card .card-body.sd-preview-card-body {
    background: var(--surface-2);
    border-top: 1px solid var(--border-light);
}

.sd-preview-card .card-header {
    border-bottom: 1px solid var(--border-light);
}

@media (min-width: 992px) {
    .sd-preview-card {
        position: sticky;
        top: 88px;
    }
}

.sd-view-toggle--light {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--surface-3);
    border: 1px solid var(--border-light);
}

.sd-view-toggle--light button {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sd-view-toggle--light button.active {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.sd-plat-tabs--light {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sd-plat-tabs--light button {
    border: 1px solid var(--border-light);
    background: var(--surface-elevated);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.sd-plat-tabs--light button:hover {
    border-color: rgba(249, 115, 22, 0.45);
    color: var(--brand-primary);
}

.sd-plat-tabs--light button.active {
    border-color: var(--brand-primary);
    background: rgba(249, 115, 22, 0.1);
    color: var(--brand-primary);
}

/* Legacy composer panel (if used elsewhere) */
.sd-form-panel {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.15rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.sd-form-section {
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.sd-form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0.75rem;
    padding-bottom: 0;
}

.sd-channel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.sd-channel-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--surface-2);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.sd-channel-pill:hover {
    border-color: rgba(249, 115, 22, 0.35);
    background: #fff;
}

.sd-channel-pill .form-check-input {
    margin-top: 0;
}

.sd-plat-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sd-plat-strip-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    width: 100%;
}

.sd-plat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 1.15rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.sd-plat-link:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.sd-plat-link--fb { background: linear-gradient(135deg, #1877f2, #0d47a1); }
.sd-plat-link--ig { background: linear-gradient(135deg, #f09433, #bc1888); }
.sd-plat-link--x { background: linear-gradient(135deg, #0f1419, #334155); }
.sd-plat-link--li { background: linear-gradient(135deg, #0a66c2, #004182); }

.sd-preview-shell {
    border-radius: var(--radius-lg);
    padding: 0.65rem 0.75rem 0.85rem;
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 76px;
}

.sd-prev-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.sd-prev-hint {
    font-size: 0.68rem;
    color: rgba(226, 232, 240, 0.45);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

.sd-prev-hint a {
    color: rgba(251, 146, 60, 0.95);
    text-decoration: none;
}

.sd-prev-hint a:hover {
    text-decoration: underline;
}

.sd-view-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.sd-view-toggle button {
    border: 0;
    background: transparent;
    color: rgba(226, 232, 240, 0.65);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sd-view-toggle button.active {
    background: rgba(249, 115, 22, 0.95);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.sd-plat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sd-plat-tabs button {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.5);
    color: rgba(226, 232, 240, 0.85);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.sd-plat-tabs button:hover {
    border-color: rgba(249, 115, 22, 0.45);
    transform: scale(1.05);
}

.sd-plat-tabs button.active {
    border-color: rgba(249, 115, 22, 0.7);
    background: rgba(249, 115, 22, 0.2);
    color: #fff;
}

.sd-prev-stage {
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0 0;
}

.sd-prev-block {
    width: 100%;
    max-width: 100%;
}

.sd-prev-block.d-none {
    display: none !important;
}

/* ——— Real smartphone frame (no inner scroll) ——— */
.sd-phone-real {
    width: 272px;
    max-width: 100%;
    margin: 0 auto;
}

.sd-phone-real__outer {
    padding: 11px;
    border-radius: 46px;
    background: linear-gradient(155deg, #5c6474 0%, #2d323c 35%, #15181e 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14) inset,
        0 2px 8px rgba(0, 0, 0, 0.35) inset,
        0 20px 48px rgba(0, 0, 0, 0.5);
}

.sd-phone-real__inner {
    display: flex;
    flex-direction: column;
    height: 524px;
    max-height: min(70vh, 560px);
    min-height: 0;
    overflow: hidden;
    border-radius: 38px;
    background: #000;
    border: 1px solid rgba(0, 0, 0, 0.65);
}

.sd-phone-real__topbar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 4px;
    background: #000;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.sd-phone-real__time {
    justify-self: start;
}

.sd-phone-real__island {
    width: 86px;
    height: 27px;
    border-radius: 999px;
    background: #0a0a0a;
    border: 1px solid #222;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.sd-phone-real__icons {
    justify-self: end;
    font-size: 0.65rem;
    opacity: 0.92;
    letter-spacing: 0.06em;
}

.sd-phone-real__viewport {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #000;
}

.sd-phone-real__home {
    flex-shrink: 0;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
    background: #000;
}

.sd-phone-real__home::after {
    content: "";
    width: 118px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
}

/* Phone feed: column layout, clip long text — no scrollbars */
.sd-m-in-phone {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sd-m-in-phone .sd-m-fb-text,
.sd-m-in-phone .sd-m-x-text,
.sd-m-in-phone .sd-m-li-text {
    flex-shrink: 0;
    max-height: 3.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    white-space: normal;
}

.sd-m-in-phone .sd-m-ig-cap {
    flex-shrink: 0;
    max-height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sd-m-in-phone .sd-m-fb-media,
.sd-m-in-phone .sd-m-ig-media,
.sd-m-in-phone .sd-m-x-media,
.sd-m-in-phone .sd-m-li-media {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: unset;
}

.sd-m-in-phone .sd-m-fb-media img,
.sd-m-in-phone .sd-m-fb-media video,
.sd-m-in-phone .sd-m-ig-media img,
.sd-m-in-phone .sd-m-ig-media video,
.sd-m-in-phone .sd-m-x-media img,
.sd-m-in-phone .sd-m-x-media video,
.sd-m-in-phone .sd-m-li-media img,
.sd-m-in-phone .sd-m-li-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-m-in-phone .sd-m-fb-actions {
    flex-shrink: 0;
}

.sd-m-in-phone .sd-m-li-bar {
    flex-shrink: 0;
}

.sd-m-in-phone .sd-m-ig-top {
    flex-shrink: 0;
}

.sd-m-x.sd-m-in-phone .sd-m-x-h {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
}

.sd-m-x.sd-m-in-phone .sd-m-x-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sd-m-in-phone .sd-m-x-media {
    flex: 1 1 auto;
    min-height: 72px;
}

.sd-m-ig.sd-m-in-phone .sd-m-ig-media {
    flex: 1 1 auto;
    min-height: 0;
}

/* Desktop frame — fixed height, no scroll */
.sd-device-desktop {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    background: #e4e6eb;
}

.sd-desk-chrome {
    height: 30px;
    background: linear-gradient(180deg, #3d4856, #252b34);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 5px;
}

.sd-desk-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
}

.sd-desk-url {
    flex: 1;
    height: 18px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 5px;
    font-size: 0.58rem;
    color: rgba(226, 232, 240, 0.45);
    display: flex;
    align-items: center;
    padding: 0 7px;
}

.sd-desk-body {
    padding: 8px;
    height: 340px;
    min-height: 340px;
    max-height: 340px;
    overflow: hidden;
    background: #f0f2f5;
}

.sd-desk-body--x {
    background: #000;
}

.sd-desk-body--li {
    background: #f3f2ef;
}

.sd-desk-inner {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.sd-desk-inner .sd-m-fb,
.sd-desk-inner .sd-m-ig,
.sd-desk-inner .sd-m-x,
.sd-desk-inner .sd-m-li {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sd-desk-inner .sd-m-fb-text,
.sd-desk-inner .sd-m-li-text,
.sd-desk-inner .sd-m-x-text {
    max-height: 3.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.sd-desk-inner .sd-m-fb-media,
.sd-desk-inner .sd-m-ig-media,
.sd-desk-inner .sd-m-li-media {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: unset;
}

.sd-desk-inner .sd-m-ig-media {
    max-height: 180px;
}

.sd-desk-inner .sd-m-x-media {
    flex: 1 1 auto;
    min-height: 100px;
}

.sd-desk-body--x .sd-desk-inner .sd-m-x {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sd-desk-body--x .sd-desk-inner .sd-m-x-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sd-desk-body--x .sd-desk-inner .sd-m-x-media {
    flex: 1 1 auto;
    min-height: 80px;
}

.sd-prev-video {
    max-height: 100%;
    background: #000;
}

/* Facebook mock */
.sd-m-fb {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.sd-m-fb.sd-m-in-phone,
.sd-m-ig.sd-m-in-phone,
.sd-m-li.sd-m-in-phone {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
}

.sd-m-x.sd-m-in-phone {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px 10px;
    border-radius: 0;
}

.sd-m-in-phone .sd-m-fb-text,
.sd-m-in-phone .sd-m-x-text,
.sd-m-in-phone .sd-m-li-text {
    white-space: normal;
}

.sd-m-fb-h {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.sd-m-fb-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    flex-shrink: 0;
}

.sd-m-fb-meta {
    flex: 1;
    min-width: 0;
}

.sd-m-fb-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #050505;
}

.sd-m-fb-sub {
    font-size: 0.7rem;
    color: #65676b;
}

.sd-m-fb-text {
    padding: 0 12px 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #050505;
    white-space: pre-wrap;
    word-break: break-word;
}

.sd-m-fb-media {
    aspect-ratio: 1.91/1;
    background: #e4e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bcc0c4;
    font-size: 2rem;
    overflow: hidden;
}

.sd-m-fb-media img,
.sd-m-fb-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-m-fb-actions {
    display: flex;
    border-top: 1px solid #e4e6eb;
    padding: 6px 8px;
    font-size: 0.75rem;
    color: #65676b;
    justify-content: space-around;
}

/* Instagram mock mobile */
.sd-m-ig {
    background: #000;
    color: #fff;
}

.sd-m-ig-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #262626;
}

.sd-m-ig-av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
}

.sd-m-ig-av-in {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #262626;
}

.sd-m-ig-user {
    font-weight: 600;
    font-size: 0.82rem;
}

.sd-m-ig-media {
    aspect-ratio: 1;
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sd-m-ig-media img,
.sd-m-ig-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-m-ig-cap {
    padding: 10px 12px;
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.sd-m-ig-cap strong {
    margin-right: 6px;
}

/* X mock */
.sd-m-x {
    background: #000;
    color: #e7e9ea;
    padding: 12px;
    border-radius: 0;
}

.sd-m-x-h {
    display: flex;
    gap: 10px;
}

.sd-m-x-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #536471;
    flex-shrink: 0;
}

.sd-m-x-body {
    flex: 1;
    min-width: 0;
}

.sd-m-x-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
    margin-bottom: 4px;
}

.sd-m-x-name {
    font-weight: 700;
    font-size: 0.88rem;
}

.sd-m-x-handle {
    color: #71767b;
    font-size: 0.82rem;
}

.sd-m-x-text {
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
}

.sd-m-x-media {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2f3336;
    aspect-ratio: 16/9;
    background: #202327;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-m-x-media img,
.sd-m-x-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* LinkedIn mock */
.sd-m-li {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.sd-m-li-h {
    padding: 12px;
    display: flex;
    gap: 8px;
}

.sd-m-li-av {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: #0a66c2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.sd-m-li-meta {
    flex: 1;
}

.sd-m-li-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: rgba(0, 0, 0, 0.9);
}

.sd-m-li-sub {
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.6);
}

.sd-m-li-text {
    padding: 0 12px 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.9);
    white-space: pre-wrap;
    word-break: break-word;
}

.sd-m-li-media {
    aspect-ratio: 1.91/1;
    background: #eef3f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sd-m-li-media img,
.sd-m-li-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-m-li-bar {
    padding: 8px 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    gap: 1rem;
}

.sd-prev-d-none {
    display: none !important;
}

/* ========== Preview: per-platform + mobile/desktop frame sizes (approx. real UIs) ========== */

/* —— Phone chrome: width & viewport height scale by platform —— */
.sd-prev-block[data-plat="fb"] .sd-phone-real {
    width: min(286px, 92vw);
}

.sd-prev-block[data-plat="fb"] .sd-phone-real__inner {
    height: min(520px, 58vh);
    max-height: min(560px, 58vh);
}

.sd-prev-block[data-plat="ig"] .sd-phone-real {
    width: min(268px, 88vw);
}

.sd-prev-block[data-plat="ig"] .sd-phone-real__inner {
    height: min(588px, 64vh);
    max-height: min(640px, 64vh);
}

.sd-prev-block[data-plat="x"] .sd-phone-real {
    width: min(292px, 92vw);
}

.sd-prev-block[data-plat="x"] .sd-phone-real__inner {
    height: min(512px, 56vh);
    max-height: min(560px, 56vh);
}

.sd-prev-block[data-plat="li"] .sd-phone-real {
    width: min(282px, 90vw);
}

.sd-prev-block[data-plat="li"] .sd-phone-real__inner {
    height: min(536px, 59vh);
    max-height: min(580px, 59vh);
}

.sd-prev-block[data-plat="yt"] .sd-phone-real {
    width: min(300px, 94vw);
}

.sd-prev-block[data-plat="yt"] .sd-phone-real__inner {
    height: min(528px, 58vh);
    max-height: min(580px, 58vh);
}

/* —— Desktop browser: feed column width ~ real breakpoints —— */
.sd-prev-block[data-plat="fb"] .sd-device-desktop {
    max-width: min(520px, 100%);
}

.sd-prev-block[data-plat="ig"] .sd-device-desktop {
    max-width: min(420px, 100%);
}

.sd-prev-block[data-plat="x"] .sd-device-desktop {
    max-width: min(598px, 100%);
}

.sd-prev-block[data-plat="li"] .sd-device-desktop {
    max-width: min(556px, 100%);
}

.sd-prev-block[data-plat="yt"] .sd-device-desktop {
    max-width: min(720px, 100%);
}

/* —— Desktop canvas height: room for caption + media ratio —— */
.sd-prev-block[data-plat="fb"] .sd-desk-body {
    height: auto;
    min-height: 280px;
    max-height: min(400px, 44vh);
}

.sd-prev-block[data-plat="ig"] .sd-desk-body {
    height: auto;
    min-height: 360px;
    max-height: min(520px, 54vh);
}

.sd-prev-block[data-plat="x"] .sd-desk-body {
    height: auto;
    min-height: 260px;
    max-height: min(380px, 42vh);
}

.sd-prev-block[data-plat="li"] .sd-desk-body {
    height: auto;
    min-height: 300px;
    max-height: min(420px, 46vh);
}

.sd-prev-block[data-plat="yt"] .sd-desk-body {
    height: auto;
    min-height: 320px;
    max-height: min(480px, 52vh);
}

.sd-desk-body--yt {
    background: #0f0f0f;
    padding: 10px;
}

/* Instagram feed: portrait 4:5 (common mobile feed) — overrides global 1:1 */
.sd-prev-block[data-plat="ig"] .sd-m-ig-media {
    aspect-ratio: 4 / 5;
}

.sd-prev-block[data-plat="ig"] .sd-m-in-phone .sd-m-ig-media {
    aspect-ratio: 4 / 5;
}

.sd-prev-block[data-plat="ig"] .sd-desk-inner .sd-m-ig-media {
    aspect-ratio: 4 / 5;
    max-height: none;
}

/* Facebook link share image ~1.91:1 already on .sd-m-fb-media; tighten desktop */
.sd-prev-block[data-plat="fb"] .sd-desk-inner .sd-m-fb-media {
    aspect-ratio: 1.91 / 1;
}

/* LinkedIn link preview ~1.91:1 — desktop card */
.sd-prev-block[data-plat="li"] .sd-desk-inner .sd-m-li-media {
    aspect-ratio: 1.91 / 1;
}

/* YouTube — 16:9 player */
.sd-m-yt,
.sd-m-yt-desk {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    color: #f1f1f1;
    font-size: 0.82rem;
}

.sd-m-yt.sd-m-in-phone {
    padding: 8px;
    gap: 8px;
}

.sd-m-yt-meta,
.sd-m-yt-desk .sd-m-yt-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sd-m-yt-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0000, #900);
    flex-shrink: 0;
}

.sd-m-yt-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.sd-m-yt-sub {
    font-size: 0.68rem;
    opacity: 0.65;
}

.sd-m-yt-media {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    background: #272727;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sd-m-yt-media img,
.sd-m-yt-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-m-yt-title {
    flex-shrink: 0;
    font-size: 0.8rem;
    line-height: 1.35;
    padding: 4px 2px 0;
    color: #e5e5e5;
}

.sd-m-yt-desk {
    width: 100%;
    max-width: 100%;
    gap: 10px;
    padding: 4px;
}

.sd-m-yt-desk .sd-m-yt-media {
    border-radius: 12px;
}

.sd-m-in-phone .sd-m-yt-media {
    min-height: 0;
}

.sd-desk-body--yt .sd-desk-inner {
    align-items: stretch;
}

.sd-desk-body--yt .sd-m-yt-desk {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Posts manager — Meta-style layout (matches AT Media shell + reference mockup) */
.sd-posts-page {
    max-width: 1120px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.sd-posts-top {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
    .sd-posts-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
    }
}

.sd-posts-hero {
    position: relative;
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-xl);
    padding: 1.65rem 1.6rem 1.45rem;
    overflow: hidden;
    background: linear-gradient(
        105deg,
        #1a1d23 0%,
        #252a32 38%,
        #4a4540 72%,
        #dcc7b6 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-premium), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.sd-posts-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 120% at 100% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 52%);
    pointer-events: none;
}

.sd-posts-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
}

.sd-posts-hero-inner {
    position: relative;
    z-index: 1;
}

.sd-posts-hero h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    margin-bottom: 0.4rem;
}

.sd-posts-hero .sd-posts-sub {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.94rem;
    max-width: 48ch;
    margin: 0;
    line-height: 1.5;
}

.sd-posts-new-btn {
    flex-shrink: 0;
    align-self: flex-start;
    border-radius: var(--radius-lg);
    padding: 0.65rem 1.35rem;
    font-weight: 700;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(249, 115, 22, 0.2);
}

@media (min-width: 992px) {
    .sd-posts-new-btn {
        align-self: center;
    }
}

.sd-posts-page .sd-posts-tabs {
    margin-bottom: 1.25rem;
}

.sd-posts-page .sd-posts-tabs .nav-link {
    border-radius: var(--radius-full);
    padding: 0.5rem 1.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--surface-3);
    border: 1px solid var(--border-light);
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sd-posts-page .sd-posts-tabs .nav-link:hover {
    color: var(--text-primary);
    background: #e8ecf1;
    border-color: var(--border-medium);
}

.sd-posts-page .sd-posts-tabs .nav-link.active {
    color: #fff;
    background: linear-gradient(145deg, #1a1d23 0%, #2d3748 55%, #1e293b 100%);
    border-color: rgba(26, 29, 35, 0.65);
    box-shadow: var(--shadow-sm);
}

.sd-posts-panel {
    background: var(--surface-elevated);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.sd-posts-panel--empty {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-posts-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.sd-posts-empty .bi {
    font-size: 2.75rem;
    opacity: 0.38;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.sd-posts-empty p {
    font-size: 0.98rem;
    color: var(--text-secondary);
}

.sd-posts-table thead th {
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    border-bottom: 1px solid var(--border-light);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.sd-posts-table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-color: var(--border-light);
}

.sd-posts-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.85);
}

.sd-posts-pagination .page-link {
    border-radius: var(--radius-md);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.sd-posts-pagination .page-item.active .page-link {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
