/* Sociallitr — Looply-inspired theme */

:root {
    /* Looply design tokens */
    --color-bg: #f5f6fa;
    --color-surface: #ffffff;
    --color-sidebar: #ffffff;
    --color-border: #e8eaef;
    --color-border-strong: #d8dce5;
    --color-text: #1a1d26;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;
    --color-primary: #7c3aed;
    --color-primary-hover: #6d28d9;
    --color-primary-soft: #f3e8ff;
    --color-publish: #7c3aed;
    --color-monitor: #f59e0b;
    --color-monitor-soft: #fffbeb;
    --color-reports: #10b981;
    --color-reports-soft: #ecfdf5;
    --color-danger: #ef4444;
    --color-danger-soft: #fef2f2;
    --color-surface-muted: #f9fafb;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.8125rem;
    --font-size-base: 0.875rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.375rem;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --logo-word-color: #1a1d26;
    --logo-tagline-color: #6b7280;
    --logo-accent: #7c3aed;

    /* Legacy aliases (used throughout stylesheet) */
    --zoho-bg: var(--color-bg);
    --zoho-surface: var(--color-surface);
    --zoho-sidebar: var(--color-sidebar);
    --zoho-border: var(--color-border);
    --zoho-border-strong: var(--color-border-strong);
    --zoho-text: var(--color-text);
    --zoho-text-muted: var(--color-text-muted);
    --zoho-text-light: var(--color-text-light);
    --zoho-primary: var(--color-primary);
    --zoho-primary-hover: var(--color-primary-hover);
    --zoho-primary-soft: var(--color-primary-soft);
    --zoho-publish: var(--color-publish);
    --zoho-monitor: var(--color-monitor);
    --zoho-monitor-soft: var(--color-monitor-soft);
    --zoho-reports: var(--color-reports);
    --zoho-reports-soft: var(--color-reports-soft);
    --zoho-danger: var(--color-danger);
    --zoho-danger-soft: var(--color-danger-soft);
    --zoho-shadow: var(--shadow-md);
    --zoho-radius: var(--radius-sm);
    --zoho-radius-lg: var(--radius-md);
    color-scheme: light;
}

[data-theme="dark"] {
    --color-bg: #0f1117;
    --color-surface: #1a1d26;
    --color-sidebar: #14161c;
    --color-border: #2a2f3a;
    --color-border-strong: #363c4a;
    --color-text: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-text-light: #6b7280;
    --color-primary: #a78bfa;
    --color-primary-hover: #c4b5fd;
    --color-primary-soft: #2e1065;
    --color-publish: #a78bfa;
    --color-monitor: #fbbf24;
    --color-monitor-soft: #422006;
    --color-reports: #34d399;
    --color-reports-soft: #064e3b;
    --color-danger: #f87171;
    --color-danger-soft: #450a0a;
    --color-surface-muted: #14161c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
    --logo-word-color: #f9fafb;
    --logo-tagline-color: #9ca3af;
    --logo-accent: #a78bfa;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--zoho-primary);
    text-decoration: none;
}

a:hover {
    color: var(--zoho-primary-hover);
    text-decoration: underline;
}

/* Top bar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto;
    align-items: center;
    padding: 0 1.25rem 0 0;
    z-index: 200;
}

.topbar-brand-col {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1.25rem;
    border-right: 1px solid var(--zoho-border);
}

.topbar-space-col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1rem;
    min-width: 0;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar-right {
    justify-self: end;
    flex-shrink: 0;
    padding-right: 0.25rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.topbar-brand:hover {
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: auto;
}

.brand-logo-compact {
    width: 168px;
    max-width: 100%;
}

.brand-logo-full {
    width: min(100%, 360px);
    margin: 0 auto;
}

.brand-logo-word,
.brand-logo-tagline {
    fill: var(--logo-word-color);
}

.brand-logo-tagline {
    fill: var(--logo-tagline-color);
}

.brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--zoho-text);
}

.space-switcher {
    position: relative;
}

.space-switcher-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    max-width: 240px;
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: var(--zoho-radius);
    background: var(--zoho-bg);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.space-switcher-btn:hover {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
}

.space-switcher-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--zoho-text-light);
}

.space-switcher-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--zoho-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.space-switcher-empty {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: var(--zoho-radius);
    background: var(--zoho-primary-soft);
}

.chevron {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--zoho-text-muted);
    border-bottom: 2px solid var(--zoho-text-muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 220px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    z-index: 300;
}

.space-menu {
    left: 0;
    right: auto;
    min-width: 240px;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-header {
    padding: 0.65rem 0.75rem 0.5rem;
}

.dropdown-header strong {
    display: block;
    font-size: 0.9rem;
}

.dropdown-header span {
    display: block;
    font-size: 0.8rem;
    color: var(--zoho-text-muted);
    margin-top: 0.15rem;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: var(--zoho-radius);
    background: transparent;
    color: var(--zoho-text);
    font-size: 0.875rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}

.dropdown-item:hover,
.dropdown-item.active {
    background: var(--zoho-primary-soft);
    color: var(--zoho-primary);
    text-decoration: none;
}

.dropdown-item-danger {
    color: var(--zoho-danger);
}

.dropdown-item-danger:hover {
    background: var(--zoho-danger-soft);
    color: var(--zoho-danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--zoho-border);
    margin: 0.35rem 0;
}

.dropdown-form {
    margin: 0;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input {
    width: 220px;
    margin: 0;
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: 999px;
    background: var(--zoho-bg);
    font-size: 0.85rem;
}

.header-search input:focus {
    width: 280px;
    background: var(--zoho-surface);
}

.header-search .icon-search {
    position: absolute;
    left: 0.7rem;
    pointer-events: none;
}

.icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--zoho-radius);
    border: 1px solid transparent;
    color: var(--zoho-text-muted);
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--zoho-bg);
    border-color: var(--zoho-border);
    color: var(--zoho-primary);
    text-decoration: none;
}

.badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--zoho-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 1.5rem 0.2rem 0.2rem;
    border: 1px solid var(--zoho-border);
    border-radius: 999px;
    background: var(--zoho-surface);
    cursor: pointer;
    position: relative;
    font-family: inherit;
}

.profile-btn:hover {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #a855f7);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.icon-search {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
}

.icon-bell {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6V11a7 7 0 1 0-14 0v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6V11a7 7 0 1 0-14 0v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E");
}

.icon-envelope {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M22 6l-10 7L2 6'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M22 6l-10 7L2 6'/%3E%3C/svg%3E");
}

.topbar-brand strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--zoho-text);
    line-height: 1.2;
}

.topbar-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--zoho-text-muted);
    font-weight: 400;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-chip {
    font-size: 0.85rem;
    color: var(--zoho-text-muted);
    background: var(--zoho-bg);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--zoho-border);
}

.topbar-link {
    font-size: 0.85rem;
    font-weight: 600;
}

.brand-mark {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

.brand-mark-lg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

/* App shell */
.app-body {
    display: flex;
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--color-sidebar);
    border-right: 1px solid var(--color-border);
    overflow: hidden;
    padding: 1.25rem 1rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-nav-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.5rem;
}

.sidebar-nav-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--zoho-border);
    padding-top: 0.5rem;
    margin: 0 -0.25rem;
}

.sidebar-settings-dropdown {
    width: 100%;
}

.nav-item-dropdown {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.nav-item-dropdown .nav-item-label {
    flex: 1;
}

.nav-item-dropdown .chevron-up {
    position: static;
    margin-left: auto;
    transform: rotate(-135deg);
    transition: transform 0.15s ease;
}

.sidebar-settings-dropdown.open .nav-item-dropdown .chevron-up {
    transform: rotate(45deg);
}

.sidebar-settings-menu {
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(100% + 0.35rem);
    min-width: 100%;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.dropdown-group-label {
    margin: 0.15rem 0 0.25rem;
    padding: 0.35rem 0.75rem 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--zoho-text-light);
}

.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.5rem 1.75rem 2rem;
    min-width: 0;
}

/* Sidebar navigation */
.nav-section {
    margin-bottom: 1.25rem;
}

.nav-label {
    margin: 0 0 0.35rem;
    padding: 0 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--zoho-text-light);
}

.nav-publish .nav-label { color: var(--zoho-publish); }
.nav-monitor .nav-label { color: var(--zoho-monitor); }
.nav-reports .nav-label { color: var(--zoho-reports); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    margin: 0.125rem 0;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
    background: var(--color-surface-muted);
    color: var(--color-text);
    text-decoration: none;
}

.nav-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: currentColor;
    opacity: 0.55;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.nav-item.active .nav-icon {
    opacity: 1;
    color: var(--color-primary);
}

.nav-icon-home {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.nav-icon-admin {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 4v5c0 4.5-3 8.5-7 9-4-.5-7-4.5-7-9V7l7-4z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 4v5c0 4.5-3 8.5-7 9-4-.5-7-4.5-7-9V7l7-4z'/%3E%3C/svg%3E");
}

.nav-icon-compose {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

.nav-icon-calendar {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
}

.nav-icon-posts {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
}

.nav-icon-channels {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.7 13.5l6.6 3.9M8.7 10.5l6.6-3.9'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.7 13.5l6.6 3.9M8.7 10.5l6.6-3.9'/%3E%3C/svg%3E");
}

.nav-icon-inbox {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.nav-icon-monitor {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3C/svg%3E");
}

.nav-icon-analytics {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-8M22 20V8'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-8M22 20V8'/%3E%3C/svg%3E");
}

.nav-icon-billing {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
}

.nav-icon-campaigns {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' y1='22' x2='4' y2='15'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' y1='22' x2='4' y2='15'/%3E%3C/svg%3E");
}

.nav-icon-reports {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E");
}

.nav-icon-library {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.nav-icon-team {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.cc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.cc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.cc-card-header h2 { margin: 0; font-size: 1rem; }
.cc-card-header a { font-size: 0.85rem; }
.cc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.cc-list li { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; font-size: 0.9rem; }
.cc-action-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cc-quick-actions { margin-bottom: 1rem; }
.cc-meta { margin-top: 0.75rem; font-size: 0.85rem; }
.badge-warn { background: #f59e0b22; color: #b45309; }
.badge-error { background: #ef444422; color: #b91c1c; }
.composer-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr) minmax(240px, 0.85fr);
    gap: 0;
    align-items: stretch;
}
@media (max-width: 1100px) {
    .composer-workspace { grid-template-columns: 1fr; }
}
.composer-col {
    padding: 1.25rem 1.35rem;
    min-width: 0;
}
.composer-col-left {
    border-right: 1px solid var(--color-border);
}
.composer-col-centre {
    border-right: 1px solid var(--color-border);
    background: var(--color-surface-muted);
}
.composer-col-right {
    background: var(--color-surface-muted);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (max-width: 1100px) {
    .composer-col-left,
    .composer-col-centre { border-right: none; border-bottom: 1px solid var(--color-border); }
}
.composer-col-title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.composer-preview-head { margin-bottom: 0.75rem; }
.composer-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
}
@media (max-width: 640px) {
    .composer-field-grid { grid-template-columns: 1fr; }
}
.composer-brand-warning {
    margin: 0.35rem 0 0;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.82rem;
}
[data-theme="dark"] .composer-brand-warning {
    background: #78350f55;
    color: #fbbf24;
}
.composer-meta-input-wide {
    width: 100%;
    min-width: 0;
}
.field-hint-inline {
    font-weight: 400;
    color: var(--color-text-muted, #6b7280);
    font-size: 0.8rem;
}
.composer-platform-overrides,
.composer-sponsor-details {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    padding: 0.35rem 0.75rem 0.75rem;
}
.composer-platform-overrides-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.composer-platform-override textarea {
    width: 100%;
}
.platform-preview-stack { display: flex; flex-direction: column; gap: 0.75rem; max-height: 70vh; overflow: auto; }
.platform-preview-empty {
    padding: 1.5rem 0.75rem;
    text-align: center;
}
.platform-preview-frame {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem;
    background: var(--color-surface);
}
.platform-preview-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}
.platform-preview-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border-width: 2px;
    border-style: solid;
}
.platform-preview-meta { flex: 1; min-width: 0; }
.platform-preview-title { margin: 0; font-size: 0.85rem; }
.platform-preview-account {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.platform-preview-count {
    font-size: 0.72rem;
    color: var(--color-text-muted, #6b7280);
    font-variant-numeric: tabular-nums;
}
.platform-preview-count.is-over { color: #b91c1c; font-weight: 600; }
.platform-preview-caption {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.platform-preview-media {
    aspect-ratio: var(--preview-ratio, 1 / 1);
    max-height: 180px;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08)),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 6px,
            rgba(0, 0, 0, 0.03) 6px,
            rgba(0, 0, 0, 0.03) 12px
        );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.4rem;
}
.platform-preview-media.has-media {
    background:
        linear-gradient(160deg, #dbeafe, #e0e7ff 55%, #fce7f3);
}
.platform-preview-ratio-hint {
    font-size: 0.7rem;
    color: var(--color-text-muted, #6b7280);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
}
[data-theme="dark"] .platform-preview-ratio-hint {
    background: rgba(0, 0, 0, 0.45);
}
.preview-warnings {
    margin: 0.55rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.78rem;
}
.preview-warning-error { color: #b91c1c; }
.preview-warning-warning { color: #b45309; }
.preview-warning-info { color: #6b7280; }
.composer-form-preview .composer-actions,
.composer-form-preview .composer-actions-mockup { display: none; }
.calendar-modes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.calendar-modes a.active { font-weight: 600; }
.cal-heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 1rem; }
.cal-heat-cell { height: 28px; border-radius: 4px; background: var(--color-surface-muted); font-size: 0.7rem; display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.cal-heat-1 { background: #86efac66; }
.cal-heat-2 { background: #4ade8088; }
.cal-heat-3 { background: #22c55eaa; }
.cal-heat-4 { background: #16a34acc; color: #fff; }
.content-sheet { width: 100%; overflow-x: auto; }
.content-sheet table { min-width: 1100px; }
.content-caption-preview { max-width: 180px; font-size: 0.8rem; color: var(--color-text-muted, #6b7280); }
.calendar-filters { margin-bottom: 1rem; }
.calendar-filter-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.calendar-toolbar-actions { display: flex; gap: 0.5rem; align-items: center; }
.calendar-grid-week .calendar-day { min-height: 180px; }
.calendar-day-view { min-height: 280px; padding: 0.75rem; border: 1px solid var(--zoho-border); border-radius: var(--zoho-radius); }
.calendar-agenda-day { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--zoho-border); }
.calendar-agenda-day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.calendar-post-card { white-space: normal; cursor: grab; }
.calendar-post-card.is-dragging { opacity: 0.55; }
.calendar-day.is-drop-target,
.calendar-day-view.is-drop-target,
.calendar-agenda-day.is-drop-target { outline: 2px dashed var(--zoho-primary); outline-offset: -2px; }
.calendar-chip-main { display: flex; align-items: center; gap: 0.25rem; min-width: 0; }
.calendar-chip-main .channel-logo-stack { flex-shrink: 0; }
.calendar-chip-main a { overflow: hidden; text-overflow: ellipsis; }
.calendar-chip-meta { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.15rem; font-size: 0.62rem; }
.calendar-campaign { color: var(--zoho-text-muted); }
.badge-sm { font-size: 0.62rem; padding: 0.05rem 0.3rem; }
.approval-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.approval-bulk-bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding: 0.75rem 1rem; }
.approval-card { display: flex; flex-direction: column; gap: 0.65rem; }
.approval-card-select { font-size: 0.8rem; color: var(--color-text-muted); }
.approval-card-thumb { display: block; border-radius: var(--radius-md, 8px); overflow: hidden; border: 1px solid var(--color-border); }
.approval-card-thumb img { width: 100%; height: 140px; object-fit: cover; display: block; }
.approval-card-title { margin: 0; font-size: 1.05rem; }
.approval-card-title a { color: inherit; text-decoration: none; }
.approval-card-title a:hover { color: var(--zoho-primary, var(--color-primary)); }
.approval-card-snippet { margin: 0; font-size: 0.88rem; color: var(--color-text-muted); line-height: 1.4; }
.approval-card-platforms { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.approval-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 0.75rem; margin: 0; }
.approval-card-meta dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); margin: 0; }
.approval-card-meta dd { margin: 0.1rem 0 0; font-size: 0.85rem; }
.approval-card-comment textarea { width: 100%; }
.approval-card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.25rem; }
.approval-action-form { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.campaign-workspace { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .campaign-workspace { grid-template-columns: 1fr; } }
.campaign-workspace-main, .campaign-workspace-side { display: flex; flex-direction: column; gap: 1rem; }
.campaign-progress-grid { grid-template-columns: repeat(3, 1fr); }
.campaign-upcoming-list, .campaign-creator-list, .task-comment-list { list-style: none; padding: 0; margin: 0; }
.campaign-upcoming-list li, .campaign-creator-list li, .task-comment-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 0.15rem; }
.timeline-steps { list-style: none; padding: 0; margin: 0; }
.timeline-steps li { position: relative; padding: 0.5rem 0 0.5rem 1.25rem; border-left: 2px solid var(--color-border); color: var(--color-text-muted); }
.timeline-steps li::before { content: ''; position: absolute; left: -5px; top: 0.85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); }
.timeline-steps li.is-done { color: var(--color-text); }
.timeline-steps li.is-done::before { background: #16a34a; }
.timeline-steps li.is-current { color: var(--color-text); font-weight: 600; }
.timeline-steps li.is-current::before { background: var(--color-primary); }
.ideas-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; align-items: start; overflow-x: auto; }
.ideas-column { background: var(--color-surface-muted); border-radius: 10px; padding: 0.75rem; min-height: 160px; min-width: 200px; }
.ideas-column h3 { margin: 0 0 0.75rem; font-size: 0.9rem; display: flex; align-items: center; justify-content: space-between; gap: 0.35rem; }
.ideas-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 0.65rem; margin-bottom: 0.5rem; box-shadow: var(--shadow-sm, none); }
.ideas-card-move { margin-top: 0.5rem; }
.ideas-card-move select { width: 100%; font-size: 0.8rem; }
.tasks-filters { margin-bottom: 1rem; }
.tasks-filter-form { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: end; }
.tasks-card.is-overdue { border-color: #ef4444; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } .approval-card-meta { grid-template-columns: 1fr; } }
.is-hidden { display: none !important; }
.text-danger { color: #b91c1c; }
.inbox-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.account-health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tech-details { margin-top: 0.5rem; }
.tech-details summary { cursor: pointer; font-size: 0.85rem; color: var(--color-text-muted, #6b7280); }

.nav-icon-settings {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}

.nav-icon-integrations {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}

.nav-icon-organisations {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3Cpath d='M9 9v.01M9 12v.01M9 15v.01M9 18v.01'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3Cpath d='M9 9v.01M9 12v.01M9 15v.01M9 18v.01'/%3E%3C/svg%3E");
}

.nav-icon-users {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.nav-icon-spaces {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2 2 7l10 5 10-5-10-5z'/%3E%3Cpath d='M2 17l10 5 10-5'/%3E%3Cpath d='M2 12l10 5 10-5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2 2 7l10 5 10-5-10-5z'/%3E%3Cpath d='M2 17l10 5 10-5'/%3E%3Cpath d='M2 12l10 5 10-5'/%3E%3C/svg%3E");
}

/* Page structure */
.page-header {
    margin-bottom: 1.25rem;
}

.page-header h1 {
    margin: 0 0 0.35rem;
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.page-header p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.card h2,
.card h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--zoho-text);
}

.card > h1 {
    margin-top: 0;
}

/* Stat grid (dashboard) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--zoho-text-muted);
    margin-bottom: 0.35rem;
}

.stat-card .stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.stat-value-plan {
    font-size: 1.15rem;
}

.stat-card.stat-publish { border-left: 4px solid var(--zoho-publish); }
.stat-card.stat-monitor { border-left: 4px solid var(--zoho-monitor); }
.stat-card.stat-reports { border-left: 4px solid var(--zoho-reports); }
.stat-card.stat-neutral { border-left: 4px solid var(--zoho-border-strong); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--color-primary) 35%, transparent);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--color-surface-muted);
    color: var(--color-text);
    border-color: var(--color-border-strong);
    box-shadow: none;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
    box-shadow: none;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

/* Forms */
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--zoho-text);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    margin: 0 0 1rem;
    border-radius: var(--zoho-radius);
    border: 1px solid var(--zoho-border-strong);
    background: var(--zoho-surface);
    color: var(--zoho-text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--zoho-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    color: var(--zoho-danger);
    background: var(--zoho-danger-soft);
    border: 1px solid #f5c2c2;
}

.alert-success {
    color: #0d7a4d;
    background: var(--zoho-reports-soft);
    border: 1px solid #b8e6d0;
}

.alert-warning {
    color: #9a6700;
    background: var(--zoho-monitor-soft);
    border: 1px solid #f0d9a8;
}

.alert-warning a {
    color: inherit;
    font-weight: 600;
    margin-left: 0.35rem;
}

.integration-tiktok-panel {
    margin-bottom: 1.25rem;
}

.integration-tiktok-title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
}

.integration-tiktok-lead {
    margin: 0 0 1rem;
}

.integration-tiktok-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.85rem 1.25rem;
    margin: 0 0 1rem;
}

.integration-tiktok-meta dt {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, #6b7280);
    margin-bottom: 0.2rem;
}

.integration-tiktok-meta dd {
    margin: 0;
}

.integration-tiktok-uri {
    grid-column: 1 / -1;
}

.integration-copy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.integration-copy-value {
    flex: 1 1 16rem;
    word-break: break-all;
    padding: 0.45rem 0.6rem;
    background: var(--surface-muted, #f6f7f9);
    border-radius: 0.35rem;
}

.integration-tiktok-source {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
}

.integration-tiktok-warnings {
    margin-bottom: 1rem;
}

.integration-tiktok-warnings ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.integration-tiktok-checklist ol {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.25rem;
}

.integration-docs-card h2,
.integration-platform-panel + .integration-platform-panel {
    margin-top: 0;
}

.integration-docs-lead {
    margin-bottom: 1rem;
}

.integration-platform-panel {
    margin-bottom: 0.75rem;
}

.integration-platform-summary {
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-weight: 600;
}

.integration-platform-summary::-webkit-details-marker {
    display: none;
}

.integration-platform-body {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--zoho-border);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--zoho-text-muted);
    background: var(--zoho-bg);
    border-bottom: 1px solid var(--zoho-border);
}

tbody td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--zoho-border);
    color: var(--zoho-text);
    vertical-align: middle;
}

tbody tr:hover {
    background: var(--color-surface-muted);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.badge-blue { background: var(--zoho-primary-soft); color: var(--zoho-publish); }
.badge-green { background: var(--zoho-reports-soft); color: #0d7a4d; }
.badge-orange { background: var(--zoho-monitor-soft); color: #c05600; }
.badge-gray { background: var(--color-surface-muted); color: var(--color-text-muted); }
.badge-red { background: var(--zoho-danger-soft); color: var(--zoho-danger); }

/* Platform colors (calendar / social) */
.badge-facebook { background: #e7f0ff; color: #1877f2; }
.badge-tiktok { background: #f0f0f0; color: #010101; }
.badge-pinterest { background: #ffe8eb; color: #e60023; }
.badge-instagram { background: #fce7f3; color: #c13584; }
.badge-linkedin { background: #e8f4fc; color: #0a66c2; }
.badge-youtube { background: #ffe8e8; color: #ff0000; }
.badge-twitter { background: #eef0f2; color: #14171a; }
.badge-threads { background: #f0f0f0; color: #000000; }
.badge-rumble { background: #eef8e3; color: #5a9a24; }
.badge-twitch { background: #f3ebff; color: #9146ff; }
.badge-reddit { background: #fff0eb; color: #ff4500; }
.badge-patreon { background: #fff0ed; color: #f96854; }
.badge-snapchat { background: #fffde0; color: #665c00; }
.badge-bluesky { background: #e8f4ff; color: #0085ff; }
.badge-kick { background: #edffe8; color: #2d8a12; }
.badge-draft { background: var(--color-surface-muted); color: var(--color-text-muted); }
.badge-scheduled { background: var(--zoho-primary-soft); color: var(--zoho-publish); }
.badge-published { background: var(--zoho-reports-soft); color: #0d7a4d; }
.badge-failed { background: var(--zoho-danger-soft); color: var(--zoho-danger); }

/* Platform picker (compose / calendar) */
.field-hint {
    margin: -0.35rem 0 0.75rem;
    font-size: 0.85rem;
    color: var(--zoho-text-muted);
}

.platform-picker {
    margin-bottom: 1rem;
    padding: 0.25rem 0;
}

.channel-logo-stack {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow: visible;
}

.table-wrap td:has(.channel-logo-stack) {
    overflow: visible;
    white-space: nowrap;
    min-width: 5.5rem;
}

.channel-logo-stack-sm {
    --channel-logo-size: 32px;
    --channel-logo-overlap: 8px;
}

.channel-logo-stack-lg {
    --channel-logo-size: 48px;
    --channel-logo-overlap: 14px;
    padding: 2px 2px 6px 0;
}

/* Compose channel picker: show all selected logos side by side (no overlap) */
.channel-picker-stack {
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: 100%;
}

.channel-picker-stack > .channel-picker-chip,
.channel-picker-stack > .channel-picker-menu {
    margin-left: 0;
}

.channel-picker-stack > .channel-picker-menu {
    margin-left: 0;
}

/* Overlap on compact list stacks and compose channel picker */
.channel-logo-stack-sm > .platform-logo,
.channel-logo-stack-sm > .platform-account,
.channel-logo-stack-sm > .channel-logo-add,
.channel-logo-stack-sm > .platform-picker-add,
.channel-logo-stack-sm > .channel-logo-img,
.channel-logo-stack-lg > .channel-picker-chip,
.channel-logo-stack-lg > .channel-picker-menu {
    position: relative;
    flex-shrink: 0;
    margin-left: calc(-1 * var(--channel-logo-overlap));
}

.channel-logo-stack-sm > :first-child,
.channel-logo-stack-lg > :first-child {
    margin-left: 0;
}

.channel-logo-stack-lg > .platform-account,
.channel-logo-stack-lg > .channel-logo-add,
.channel-logo-stack-lg > .platform-picker-add {
    position: relative;
    flex-shrink: 0;
}

.channel-logo-stack .platform-logo,
.channel-logo-stack .channel-logo-img,
.platform-account .channel-logo-img {
    display: block;
    width: var(--channel-logo-size);
    height: var(--channel-logo-size);
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.channel-logo-mark {
    padding: 22%;
    box-sizing: border-box;
    background: #fff;
}

.channel-logo-stack-sm .channel-logo-mark {
    padding: 18%;
}

.channel-logo-stack-sm .channel-logo-img {
    box-shadow: 0 0 0 2px var(--zoho-surface), 0 1px 4px rgba(15, 23, 42, 0.12);
}

.channel-logo-stack-lg .channel-logo-img {
    box-shadow: 0 0 0 2px var(--zoho-surface);
    background: #fff;
}

.channel-picker {
    display: inline-block;
}

.channel-picker-menu {
    position: relative;
    z-index: 20;
}

.channel-picker-toggle {
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.channel-picker-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--channel-logo-size);
    height: var(--channel-logo-size);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px var(--zoho-surface);
    overflow: hidden;
}

.channel-picker-chip .channel-logo-img,
.channel-picker-chip .platform-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
}

.platform-border-facebook { border: 2px solid #1877f2; }
.platform-border-tiktok { border: 2px solid #010101; }
.platform-border-pinterest { border: 2px solid #e60023; }
.platform-border-instagram { border: 2px solid #e1306c; }
.platform-border-linkedin { border: 2px solid #0a66c2; }
.platform-border-youtube { border: 2px solid #ff0000; }
.platform-border-twitter { border: 2px solid #14171a; }
.platform-border-threads { border: 2px solid #000000; }
.platform-border-rumble { border: 2px solid #85c742; }
.platform-border-twitch { border: 2px solid #9146ff; }
.platform-border-reddit { border: 2px solid #ff4500; }
.platform-border-patreon { border: 2px solid #f96854; }
.platform-border-snapchat { border: 2px solid #fffc00; }
.platform-border-bluesky { border: 2px solid #0085ff; }
.platform-border-kick { border: 2px solid #53fc18; }

.channel-picker-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    min-width: 260px;
    border: 1px solid var(--zoho-border);
    border-radius: var(--zoho-radius);
    background: var(--zoho-surface);
    box-shadow: var(--zoho-shadow-md, 0 8px 24px rgba(15, 23, 42, 0.12));
    overflow: hidden;
}

.channel-picker-list {
    max-height: min(50vh, 360px);
    overflow-y: auto;
}

.channel-picker-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--zoho-border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.channel-picker-item:last-child {
    border-bottom: 0;
}

.channel-picker-item:hover {
    background: var(--zoho-primary-soft);
}

.channel-picker-option {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.channel-picker-item:has(.channel-picker-option:checked) {
    background: var(--zoho-primary-soft);
}

.channel-picker-item-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.channel-picker-item-avatar .channel-logo-img,
.channel-picker-item-avatar .platform-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
}

.channel-picker-item-avatar .channel-logo-mark {
    padding: 10%;
}

.channel-picker-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.channel-picker-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--zoho-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-picker-item-platform {
    font-size: 0.75rem;
    color: var(--zoho-text-muted);
}

.channel-picker-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid var(--zoho-border);
    background: var(--zoho-bg);
}

.channel-picker-connect {
    font-size: 0.8rem;
    color: var(--zoho-primary);
    text-decoration: none;
}

.channel-picker-connect:hover {
    text-decoration: underline;
}

.channel-picker-empty {
    margin: 0;
    padding: 0.75rem;
    font-size: 0.82rem;
    color: var(--zoho-text-muted);
}

.channel-picker-panel > .channel-picker-connect {
    display: block;
    padding: 0 0.75rem 0.75rem;
}

.channel-logo-add,
.platform-picker-add.channel-logo-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--channel-logo-size);
    height: var(--channel-logo-size);
    border: 1.5px solid var(--color-border-strong);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: calc(var(--channel-logo-size) * 0.42);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 0 0 2px var(--color-surface);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.channel-logo-add:hover,
.platform-picker-add.channel-logo-add:hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.platform-account {
    position: relative;
    display: inline-block;
    cursor: pointer;
    flex-shrink: 0;
    overflow: visible;
}

.platform-account-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.platform-account-avatar {
    position: relative;
    display: inline-block;
    width: var(--channel-logo-size, 48px);
    height: var(--channel-logo-size, 48px);
    border-radius: 50%;
    border: 0;
    background: transparent;
    transition: transform 0.15s ease;
    overflow: visible;
}

.platform-account-avatar .channel-logo-img,
.platform-account-avatar .platform-logo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
}

.platform-account-avatar .platform-logo {
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.platform-logo {
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.platform-logo-facebook {
    background-image: url('../img/platforms/facebook.svg');
}

.platform-logo-tiktok {
    background-image: url('../img/platforms/tiktok.svg');
}

.platform-logo-pinterest {
    background-image: url('../img/platforms/pinterest.svg');
}

.platform-logo-instagram {
    background-image: url('../img/platforms/instagram.svg');
}

.platform-logo-linkedin {
    background-image: url('../img/platforms/linkedin.svg');
}

.platform-logo-youtube {
    background-image: url('../img/platforms/youtube.svg');
}

.platform-logo-twitter {
    background-image: url('../img/platforms/twitter.png');
}

.platform-logo-threads {
    background-image: url('../img/platforms/threads.png');
}

.platform-logo-rumble {
    background-image: url('../img/platforms/rumble.png');
}

.platform-logo-twitch {
    background-image: url('../img/platforms/twitch.svg');
}

.platform-logo-reddit {
    background-image: url('../img/platforms/reddit.svg');
}

.platform-logo-patreon {
    background-image: url('../img/platforms/patreon.png');
}

.platform-logo-snapchat {
    background-image: url('../img/platforms/snapchat.svg');
}

.platform-logo-bluesky {
    background-image: url('../img/platforms/bluesky.svg');
}

.platform-logo-kick {
    background-image: url('../img/platforms/kick.svg');
}

.platform-account-avatar.platform-logo {
    border-color: transparent;
}

.platform-account:hover .platform-account-avatar {
    transform: scale(1.03);
}

.platform-account-check {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--zoho-surface);
    display: none;
    align-items: center;
    justify-content: center;
    background: #22a06b;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}

.platform-account:has(.platform-account-input:checked) .platform-account-check {
    display: flex;
}

.platform-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.platform-badge-facebook {
    background: #1877f2;
    color: #fff;
}

.platform-badge-tiktok {
    background: #010101;
    color: #fff;
}

.platform-badge-pinterest {
    background: #e60023;
    color: #fff;
}

.platform-badge-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
}

.platform-badge-linkedin {
    background: #0a66c2;
    color: #fff;
}

.platform-badge-youtube {
    background: #ff0000;
    color: #fff;
}

.platform-badge-twitter {
    background: #14171a;
    color: #fff;
}

.platform-badge-threads {
    background: #000000;
    color: #fff;
}

.platform-badge-rumble {
    background: #85c742;
    color: #fff;
}

.platform-badge-twitch {
    background: #9146ff;
    color: #fff;
}

.platform-badge-reddit {
    background: #ff4500;
    color: #fff;
}

.platform-badge-patreon {
    background: #f96854;
    color: #fff;
}

.platform-badge-snapchat {
    background: #fffc00;
    color: #14171a;
}

.platform-badge-bluesky {
    background: #0085ff;
    color: #fff;
}

.platform-badge-kick {
    background: #53fc18;
    color: #14171a;
}

.platform-icon-facebook,
.platform-icon-tiktok,
.platform-icon-pinterest {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.platform-icon-facebook {
    background-image: url('../img/platforms/facebook.svg');
}

.platform-icon-tiktok {
    background-image: url('../img/platforms/tiktok.svg');
}

.platform-icon-pinterest {
    background-image: url('../img/platforms/pinterest.svg');
}

.platform-icon-instagram {
    background-image: url('../img/platforms/instagram.svg');
}

.platform-icon-linkedin {
    background-image: url('../img/platforms/linkedin.svg');
}

.platform-icon-youtube {
    background-image: url('../img/platforms/youtube.svg');
}

.platform-icon-twitter {
    background-image: url('../img/platforms/twitter.png');
}

.platform-check-icon {
    display: block;
    width: 50%;
    height: 28%;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-10%);
}

.platform-picker-error {
    margin: -0.5rem 0 1rem;
    color: var(--zoho-danger);
    font-size: 0.85rem;
}

.platform-picker-empty {
    margin-top: -0.5rem;
}

/* Media upload */
.media-upload {
    margin-bottom: 1rem;
}

.media-upload-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--zoho-border-strong);
    border-radius: var(--zoho-radius);
    background: var(--zoho-bg);
    color: var(--zoho-text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.media-upload-trigger:hover {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
    color: var(--zoho-publish);
}

.media-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.media-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--zoho-primary);
    color: var(--zoho-primary);
    font-size: 1.35rem;
    line-height: 1;
    background: var(--zoho-surface);
}

.media-upload-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.media-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.media-upload-preview[hidden] {
    display: none !important;
}

.media-preview-item {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: var(--zoho-radius);
    overflow: hidden;
    border: 1px solid var(--zoho-border);
    background: var(--zoho-bg);
}

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

.media-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-preview-filename {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.2rem 0.35rem;
    font-size: 0.62rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-preview-video-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zoho-text-muted);
    background: var(--color-surface-muted);
}

.post-media-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.post-media-thumb {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--zoho-border);
    background: var(--zoho-bg);
    text-decoration: none;
}

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

.post-media-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted);
}

.post-media-video-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--zoho-text-muted);
    text-transform: uppercase;
}

.text-muted {
    color: var(--zoho-text-muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

h1 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Auth pages */
.auth-content {
    max-width: 420px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.auth-login-lead {
    margin: -0.35rem 0 1rem;
    color: var(--zoho-text-muted);
    font-size: 0.92rem;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.theme-setting {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.theme-setting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-setting-options .btn.active {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
    color: var(--zoho-primary);
}

.auth-brand h1 {
    margin: 0.75rem 0 0.25rem;
    font-size: 1.75rem;
}

.auth-brand p {
    margin: 0;
    color: var(--zoho-text-muted);
}

.auth-content .card {
    padding: 1.5rem;
}

.auth-content .card h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Inline forms */
.form-inline {
    display: inline;
}

/* Home dashboard */
.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1rem;
}

.home-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, var(--color-primary-soft) 0%, #faf5ff 100%);
    border-color: color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
}

.home-feed {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.home-feed-item {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--zoho-border);
}

.home-feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.home-feed-item h3 { margin: 0.35rem 0; font-size: 1rem; }
.home-feed-item p { margin: 0; color: var(--zoho-text-muted); font-size: 0.9rem; }
.home-feed-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.home-upcoming { list-style: none; margin: 0; padding: 0; }
.home-upcoming li { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.55rem 0; border-bottom: 1px solid var(--zoho-border); }
.home-upcoming li:last-child { border-bottom: none; }
.home-links { display: grid; gap: 0.45rem; }
.home-links a { font-weight: 600; }
.home-stats { grid-template-columns: 1fr; }
.home-empty { margin: 0; }
.card-header-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.card-header-row h2 { margin: 0; }

/* Dashboard overview (ZenSocial-style) */
.dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.dash-greeting {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dash-subtitle {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.dash-header-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.dash-filter-pill-sm {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
}

.dash-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-primary-soft) 0%, color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)) 100%);
}

.dash-platform-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-platform-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.dash-platform-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.dash-platform-logo {
    display: block;
    border-radius: 50%;
}

.dash-platform-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.dash-platform-metric {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.dash-platform-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

.dash-platform-growth {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #16a34a;
}

.dash-growth-up {
    margin-right: 0.15rem;
}

.dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    gap: 1rem;
    align-items: start;
}

.dash-main,
.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-widgets-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dash-widget h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.dash-widget-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-widget-header p {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
}

.dash-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dash-metric-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.dash-metric-item strong {
    font-size: 1.05rem;
}

.dash-metric-delta {
    font-size: 0.75rem;
    font-weight: 600;
}

.dash-metric-delta-up {
    color: #16a34a;
}

.dash-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 140px;
    padding-top: 0.5rem;
}

.dash-chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.dash-chart-bar {
    width: 100%;
    max-width: 36px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 70%, #6366f1) 100%);
    min-height: 8px;
}

.dash-chart-label {
    margin-top: 0.4rem;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.dash-reach-total {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.dash-chart-line {
    flex-direction: column;
    align-items: stretch;
    height: auto;
}

.dash-line-chart {
    width: 100%;
    height: 80px;
    color: var(--color-primary);
}

.dash-chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.dash-chart-labels span {
    flex: 1;
    text-align: center;
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

.dash-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.dash-quick-stat {
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
}

.dash-quick-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.dash-quick-stat strong {
    font-size: 1.2rem;
}

.dash-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.dash-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.45rem 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.dash-tab:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
}

.dash-tab.active {
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-weight: 600;
}

.dash-tab-count {
    opacity: 0.75;
}

.dash-tab-panel[hidden] {
    display: none;
}

.dash-empty {
    margin: 0;
    font-size: 0.9rem;
}

.dash-activity-list,
.dash-post-list,
.dash-schedule-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-activity-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 0.65rem;
    align-items: start;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
}

.dash-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.dash-activity-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.dash-activity-action {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.dash-activity-preview {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.dash-activity-platform {
    margin-top: 0.35rem;
}

.dash-post-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
}

.dash-post-item:last-child {
    border-bottom: none;
}

.dash-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.35rem;
    font-size: 0.8rem;
}

.dash-schedule-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.dash-schedule-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-schedule-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.dash-schedule-channel {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.dash-schedule-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.dash-schedule-scheduled {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.dash-schedule-published {
    background: #dcfce7;
    color: #16a34a;
}

.dash-schedule-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.dash-schedule-preview {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.dash-widget-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
}

.dash-inbox-summary {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

/* Composer */
.composer-card { padding: 0; overflow: hidden; border-radius: var(--radius-md); }
.composer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.composer-main { padding: 1.5rem; border-right: 1px solid var(--color-border); }
.composer-sidebar { padding: 1.5rem; background: var(--color-surface-muted); display: flex; flex-direction: column; gap: 1rem; }
.composer-sidebar h3 { margin: 0 0 1rem; font-size: var(--font-size-lg); font-weight: 600; }
.composer-card > .composer-form > .composer-workspace { min-height: 28rem; }

.composer-meta-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.composer-meta-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
}

.composer-meta-row-wrap {
    align-items: flex-start;
}

.composer-meta-label {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
}

.composer-meta-input {
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: inherit;
    text-align: right;
}

.composer-meta-input:focus {
    outline: none;
    background: var(--color-surface);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.composer-meta-value {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    min-width: 0;
}

.composer-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.composer-meta-pill-add:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-soft);
}

.composer-meta-pill-selected {
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.composer-meta-pill-muted {
    opacity: 0.7;
    cursor: not-allowed;
}

.composer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    justify-self: end;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.composer-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.composer-status-draft {
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
}

.composer-status-progress {
    background: #fff7ed;
    color: #ea580c;
}

.composer-status-scheduled {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.composer-status-published {
    background: var(--color-reports-soft);
    color: #059669;
}

.composer-status-failed {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

[data-theme="dark"] .composer-status-progress {
    background: #422006;
    color: #fdba74;
}

.composer-meta-divider {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 0.15rem 0;
}

.composer-meta-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.composer-meta-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.composer-meta-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.composer-meta-icon-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-soft);
    text-decoration: none;
}

.composer-meta-hint {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
}

.composer-approval-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.composer-approval-step {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.composer-approval-step-active {
    color: var(--color-primary);
    font-weight: 600;
}

.composer-notes {
    width: 100%;
    min-height: 88px;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    resize: vertical;
    font-size: var(--font-size-sm);
}

.composer-campaign-picker {
    position: relative;
    justify-content: flex-end;
}

.composer-campaign-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    min-width: 200px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.composer-campaign-list {
    max-height: 180px;
    overflow-y: auto;
}

.composer-campaign-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.composer-campaign-item:last-child {
    border-bottom: 0;
}

.composer-campaign-item:hover,
.composer-campaign-item.is-selected {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.composer-campaign-empty {
    margin: 0;
    padding: 0.75rem;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.composer-campaign-manage {
    display: block;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-decoration: none;
}

.composer-campaign-manage:hover {
    text-decoration: underline;
}

.composer-sponsor-details {
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
}

.composer-sponsor-summary {
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    list-style: none;
}

.composer-sponsor-summary::-webkit-details-marker {
    display: none;
}

.composer-sponsor-body {
    margin-top: 0.65rem;
}

.composer-actions-mockup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: auto;
}

.composer-actions-mockup .btn {
    width: 100%;
    justify-content: center;
    margin: 0;
}

.composer-actions-secondary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn-link {
    background: transparent;
    border: 0;
    color: var(--color-primary);
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    box-shadow: none;
    cursor: pointer;
}

.btn-link:hover {
    color: var(--color-primary-hover);
    background: transparent;
    text-decoration: underline;
    box-shadow: none;
}
.composer-toolbar { margin-bottom: 1rem; }
.composer-label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.composer-body { min-height: 180px; resize: vertical; }
.composer-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.composer-actions .btn { width: 100%; justify-content: center; }

.sponsor-fields-composer label {
    margin-bottom: 0.35rem;
}

.sponsor-picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sponsor-search-input {
    margin-bottom: 0;
}

.sponsor-picker-panel {
    border: 1px solid var(--zoho-border);
    border-radius: var(--zoho-radius);
    background: var(--zoho-surface);
    overflow: hidden;
}

.sponsor-picker-results {
    max-height: 180px;
    overflow-y: auto;
}

.sponsor-picker-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--zoho-border);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.sponsor-picker-item:last-child {
    border-bottom: 0;
}

.sponsor-picker-item:hover,
.sponsor-picker-item:focus {
    background: var(--zoho-primary-soft);
    outline: none;
}

.sponsor-picker-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--zoho-text);
}

.sponsor-picker-item-email {
    font-size: 0.78rem;
    color: var(--zoho-text-muted);
}

.sponsor-picker-empty {
    margin: 0;
    padding: 0.75rem;
    font-size: 0.82rem;
    color: var(--zoho-text-muted);
}

.sponsor-picker-add-new {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 0;
    border-top: 1px solid var(--zoho-border);
    background: var(--color-surface-muted);
    color: var(--zoho-primary);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.sponsor-picker-add-new:hover,
.sponsor-picker-add-new:focus {
    background: var(--zoho-primary-soft);
    outline: none;
}

.sponsor-picker-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: var(--zoho-radius);
    background: var(--zoho-primary-soft);
}

.sponsor-picker-selected-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--zoho-text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sponsor-picker-change {
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--zoho-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.sponsor-picker-new input {
    margin-bottom: 0.75rem;
}

.sponsor-picker-hint {
    margin: 0;
    color: #b45309;
}

.schedule-options { display: flex; flex-direction: column; gap: 0.4rem; }
.schedule-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    padding-left: 2.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--color-surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.schedule-option:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}
.schedule-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.schedule-option::before {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 0.65rem;
    width: 16px;
    height: 16px;
    border: 2px solid var(--zoho-border-strong);
    border-radius: 50%;
    background: var(--zoho-surface);
    box-sizing: border-box;
}
.schedule-option:has(input:checked)::before {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary);
    box-shadow: inset 0 0 0 3px var(--zoho-surface);
}
.schedule-option-body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.schedule-option-body strong { font-size: 0.85rem; line-height: 1.3; }
.schedule-option-body span { font-size: 0.75rem; color: var(--zoho-text-muted); line-height: 1.35; }
.schedule-datetime { margin-top: 0.85rem; }

/* Calendar grid */
.calendar-card { padding: 1rem; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.calendar-nav { display: flex; align-items: center; gap: 0.75rem; }
.calendar-nav h2 { margin: 0; font-size: 1.1rem; min-width: 160px; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--zoho-border); border-radius: var(--zoho-radius); overflow: hidden; }
.calendar-weekday { padding: 0.55rem; text-align: center; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--zoho-text-muted); background: #f4f6f8; border-bottom: 1px solid var(--zoho-border); }
.calendar-day { min-height: 110px; border-right: 1px solid var(--zoho-border); border-bottom: 1px solid var(--zoho-border); padding: 0.35rem; background: var(--zoho-surface); }
.calendar-day:nth-child(7n) { border-right: none; }
.calendar-day-muted { background: var(--color-surface-muted); color: var(--zoho-text-light); }
.calendar-day-today { background: var(--zoho-primary-soft); }
.calendar-day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; font-size: 0.8rem; font-weight: 700; }
.calendar-day-add { color: var(--zoho-primary); text-decoration: none; font-size: 0.95rem; line-height: 1; opacity: 0; }
.calendar-day:hover .calendar-day-add { opacity: 1; }
.calendar-day-posts { display: flex; flex-direction: column; gap: 0.2rem; }
.calendar-chip { font-size: 0.68rem; line-height: 1.2; padding: 0.2rem 0.35rem; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-chip-draft { background: var(--color-surface-muted); color: var(--zoho-text-muted); }
.calendar-chip-scheduled { background: var(--zoho-primary-soft); color: var(--zoho-publish); }
.calendar-chip-published { background: var(--zoho-reports-soft); color: #0d7a4d; }
.calendar-chip-failed { background: var(--zoho-danger-soft); color: var(--zoho-danger); }
.calendar-chip-more { background: transparent; color: var(--zoho-text-muted); }

/* Monitor */
.monitor-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.monitor-column { background: var(--zoho-surface); border: 1px solid var(--zoho-border); border-radius: var(--zoho-radius); min-height: 420px; display: flex; flex-direction: column; }
.monitor-column-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border-bottom: 1px solid var(--zoho-border); background: var(--color-surface-muted); }
.monitor-column-header h2 { margin: 0; font-size: 0.95rem; }
.monitor-feed { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.65rem; overflow-y: auto; }
.monitor-card { padding: 0.75rem; border: 1px solid var(--zoho-border); border-radius: var(--zoho-radius); background: var(--zoho-bg); }
.monitor-card-meta { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.monitor-card p { margin: 0 0 0.5rem; font-size: 0.88rem; }
.monitor-card-link { font-size: 0.82rem; font-weight: 600; }
.monitor-empty { margin: 0; color: var(--zoho-text-muted); font-size: 0.88rem; }

/* Inbox split view */
.inbox-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1rem; min-height: 520px; }
.inbox-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.inbox-list-header h2 { margin: 0; font-size: 1rem; }
.inbox-thread-list { display: flex; flex-direction: column; gap: 0.35rem; max-height: 640px; overflow-y: auto; }
.inbox-thread-item { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem; border-radius: var(--zoho-radius); border: 1px solid transparent; text-decoration: none; color: inherit; }
.inbox-thread-item:hover { background: #f4f6f8; text-decoration: none; }
.inbox-thread-item.active { background: var(--zoho-primary-soft); border-color: #c8e3f5; }
.inbox-thread-top { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.inbox-detail { display: flex; flex-direction: column; min-height: 520px; }
.inbox-detail-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.inbox-detail-header h2 { margin: 0 0 0.35rem; }
.inbox-detail-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; flex: 1; text-align: center; padding: 2rem; }
.inbox-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1rem; }
.inbox-message { padding: 0.85rem; border: 1px solid var(--zoho-border); border-radius: var(--zoho-radius); background: var(--color-surface-muted); }
.inbox-message-meta { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.inbox-message p { margin: 0; }
.inbox-reply-form { border-top: 1px solid var(--zoho-border); padding-top: 1rem; }
.inbox-empty { margin: 0; color: var(--zoho-text-muted); font-size: 0.9rem; }

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.page-header-meta {
    flex-shrink: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.card-header-row h2 {
    margin: 0;
}

.settings-nav {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 0.25rem;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.settings-nav-item {
    display: inline-block;
    padding: 0.55rem 0.95rem;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border-bottom: 0;
}

.settings-nav-item:hover {
    color: var(--color-text);
    background: var(--color-surface);
    text-decoration: none;
}

.settings-nav-item.active {
    color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.card-help {
    margin: 0 0 1rem;
    color: var(--zoho-text-muted);
}

.org-space-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.org-space-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.org-space-role-form,
.org-assign-form {
    margin-top: 0.5rem;
}

.member-actions-cell {
    min-width: 12rem;
    white-space: nowrap;
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

.member-remove-form {
    display: inline;
    margin: 0;
}

.org-member-modal {
    position: fixed;
    inset: 0;
    background: rgba(28, 39, 60, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 1rem;
}

.org-member-modal[hidden] {
    display: none;
}

.org-member-dialog {
    width: min(100%, 480px);
    margin: 0;
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.org-member-dialog-wide {
    width: min(100%, 640px);
}

.org-spaces-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.org-space-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--zoho-border);
}

.org-space-modal-row:last-child {
    border-bottom: 0;
}

.org-space-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.org-space-modal-meta strong {
    font-size: 0.92rem;
}

.org-space-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

.org-space-modal-form {
    margin: 0;
}

.team-member-add-form {
    margin-bottom: 1rem;
}

.team-members-empty {
    margin: 0;
}

.team-members-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.team-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--zoho-border);
}

.team-member-row:last-child {
    border-bottom: 0;
}

.team-member-row strong {
    display: block;
}

.team-member-row .text-muted {
    display: block;
    font-size: 0.85rem;
}

.table-wrap tr.is-selected td {
    background: var(--zoho-primary-soft);
}

.branding-form textarea {
    min-height: 96px;
    resize: vertical;
}

.branding-upload {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.brand-preview {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--zoho-border);
    border-radius: var(--zoho-radius-lg);
    background: #fff;
    padding: 0.35rem;
}

.brand-preview-empty,
.space-card-logo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px dashed var(--zoho-border-strong);
    border-radius: var(--zoho-radius-lg);
    background: #f8fafc;
    color: var(--zoho-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.form-hint {
    margin: -0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--zoho-text-muted);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.branding-remove-form {
    margin-top: 0.75rem;
}

.member-contact-details {
    margin-top: 0.5rem;
}

.member-contact-details summary {
    cursor: pointer;
    color: var(--zoho-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.member-contact-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--zoho-border);
}

.space-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.space-card-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid var(--zoho-border);
    border-radius: var(--zoho-radius-lg);
    background: #fff;
    padding: 0.25rem;
    flex-shrink: 0;
}

.space-card-logo-empty {
    width: 56px;
    height: 56px;
    font-size: 1.1rem;
}

.space-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}


.posts-filters {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.posts-status-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: 999px;
    background: var(--zoho-surface);
    color: var(--zoho-text);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.filter-badge span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--zoho-bg);
    font-size: 0.75rem;
}

.filter-badge.active {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
    color: var(--zoho-primary);
}

.filter-badge:hover {
    text-decoration: none;
    border-color: var(--zoho-primary);
}

.posts-date-range {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: auto;
}

.posts-date-range label {
    margin-bottom: 0.2rem;
    font-size: 0.76rem;
}

.posts-date-range input[type="date"] {
    width: 150px;
    margin: 0;
}

/* Toast alerts */
.toast-stack {
    position: fixed;
    top: calc(var(--topbar-height) + 0.75rem);
    right: 1rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: min(380px, calc(100vw - 2rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.25s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.1rem;
    background: currentColor;
    mask-size: 60%;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: 60%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.toast-content { flex: 1; min-width: 0; }
.toast-content strong { display: block; font-size: 0.9rem; margin-bottom: 0.15rem; }
.toast-content p { margin: 0; font-size: 0.82rem; color: var(--zoho-text-muted); line-height: 1.4; }

.toast-close {
    border: none;
    background: transparent;
    color: var(--zoho-text-light);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.toast-success { border-color: #b7e4c7; background: #f3fbf6; color: #1f7a4d; }
.toast-success .toast-icon {
    background: #22a06b;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
}
.toast-success .toast-content strong { color: #14532d; }

.toast-info { border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border)); background: var(--color-primary-soft); color: var(--color-primary); }
.toast-info .toast-icon {
    background: var(--color-primary);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 14h-2v-6h2v6Zm0-8h-2V6h2v2Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 14h-2v-6h2v6Zm0-8h-2V6h2v2Z'/%3E%3C/svg%3E");
}
.toast-info .toast-content strong { color: var(--color-primary-hover); }

.toast-warning { border-color: #f5d78e; background: #fffbeb; color: #b45309; }
.toast-warning .toast-icon {
    background: #f59e0b;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 3 1 21h22L12 3Zm0 6v6h0v-6Zm0 8v2h0v-2Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 3 1 21h22L12 3Zm0 6v6h0v-6Zm0 8v2h0v-2Z'/%3E%3C/svg%3E");
}
.toast-warning .toast-content strong { color: #92400e; }

.toast-error { border-color: #f5b5b5; background: #fef2f2; color: #b91c1c; }
.toast-error .toast-icon {
    background: #dc2626;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}
.toast-error .toast-content strong { color: #991b1b; }

/* Responsive */
@media (max-width: 1200px) and (min-width: 901px) {
    .post-detail-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .post-detail-preview {
        grid-column: 1 / -1;
    }

    .post-feed-card {
        max-width: none;
    }
}

@media (max-width: 900px) {
    .header-search input,
    .header-search input:focus {
        width: 140px;
    }

    .space-switcher-btn {
        min-width: 140px;
    }

    .brand-name {
        display: none;
    }

    .topbar {
        grid-template-columns: 72px minmax(0, 1fr) auto;
    }

    .topbar-brand-col {
        padding: 0 0.5rem;
        justify-content: center;
    }

    .sidebar {
        width: 72px;
        padding: 0.75rem 0.5rem;
    }

    .nav-label,
    .nav-item span:not(.nav-icon) {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 0.65rem;
    }

    .content {
        margin-left: 72px;
        padding: 1rem;
    }

    .app-footer {
        margin-left: 72px;
        width: calc(100% - 72px);
    }

    .home-grid,
    .dash-layout,
    .dash-widgets-row,
    .dash-quick-stats,
    .composer-layout,
    .post-detail-grid,
    .monitor-columns,
    .inbox-layout,
    .posts-filters {
        grid-template-columns: 1fr;
    }

    .posts-filters {
        display: grid;
    }

    .posts-date-range {
        flex-wrap: wrap;
        margin-left: 0;
    }

    .composer-main {
        border-right: none;
        border-bottom: 1px solid var(--zoho-border);
    }

    .topbar-sub {
        display: none;
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.kanban-column h3 {
    margin-top: 0;
    font-size: 0.95rem;
}

.kanban-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    box-shadow: var(--shadow-sm);
}

.view-toggle {
    display: inline-flex;
    gap: 0.35rem;
    margin-right: 0.35rem;
}

.view-toggle .btn.active {
    background: var(--zoho-primary-soft);
    color: var(--zoho-primary);
    border-color: var(--zoho-primary);
}

.post-kanban-board-wrap {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.post-kanban-board {
    display: flex;
    gap: 1rem;
    min-width: min-content;
    padding-bottom: 0.25rem;
}

.post-kanban-column {
    flex: 0 0 260px;
    min-height: 320px;
}

.post-kanban-column h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.kanban-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zoho-text-muted);
    background: var(--color-surface-muted);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.kanban-column-body {
    min-height: 120px;
}

.kanban-column-body.is-drop-target {
    background: var(--zoho-primary-soft);
    border-radius: var(--zoho-radius);
    outline: 2px dashed var(--zoho-primary);
    outline-offset: -2px;
}

.post-kanban-card {
    cursor: grab;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.post-kanban-card.is-dragging {
    opacity: 0.55;
}

.post-kanban-card.is-saving {
    opacity: 0.65;
    pointer-events: none;
}

.post-kanban-thumb {
    display: block;
    margin-bottom: 0.5rem;
}

.post-kanban-thumb img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: var(--zoho-radius);
    border: 1px solid var(--zoho-border);
}

.post-kanban-title {
    display: block;
    font-weight: 700;
    color: var(--zoho-text);
    text-decoration: none;
    margin-bottom: 0.45rem;
}

.post-kanban-title:hover {
    color: var(--zoho-primary);
    text-decoration: none;
}

.post-kanban-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.post-kanban-meta {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--zoho-text-muted);
}

.post-kanban-schedule-modal {
    position: fixed;
    inset: 0;
    background: rgba(28, 39, 60, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 1rem;
}

.post-kanban-schedule-modal[hidden] {
    display: none;
}

.post-kanban-schedule-dialog {
    width: min(100%, 420px);
    margin: 0;
}

.sponsored-panel-body,
.post-sponsor-card-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.sponsor-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--zoho-border);
    flex-shrink: 0;
}

.sponsor-logo-sm {
    width: 48px;
    height: 48px;
}

.post-sidebar-card-channels .channel-logo-stack {
    margin-top: 0.35rem;
}

.post-sponsor-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.post-sponsor-card-details strong {
    font-size: 0.92rem;
}

.post-sponsor-contact,
.post-sponsor-email,
.post-sponsor-meta {
    display: block;
    font-size: 0.82rem;
}

.post-sponsor-empty {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
}

.post-sponsor-add-form label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

.post-sponsor-add-form input {
    width: 100%;
    margin-top: 0.25rem;
}

.post-sponsor-add-form .btn {
    margin-top: 0.75rem;
}

.post-sponsor-add-details {
    margin-top: 0.25rem;
}

.post-sponsor-add-details summary {
    list-style: none;
    cursor: pointer;
    display: inline-block;
}

.post-sponsor-add-details summary::-webkit-details-marker {
    display: none;
}

.post-sponsor-add-details[open] summary {
    margin-bottom: 0.75rem;
}

.workflow-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.workflow-timeline-tracked {
    position: relative;
    padding-left: 0.15rem;
}

.workflow-step {
    position: relative;
    display: flex;
    gap: 0.85rem;
    padding: 0.65rem 0 0.85rem 0;
}

.workflow-timeline-tracked .workflow-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0.72rem;
    top: 1.85rem;
    bottom: -0.15rem;
    width: 2px;
    background: var(--zoho-border);
    transform: translateX(-50%);
}

.workflow-step-approved:not(:last-child)::before,
.workflow-step-active:not(:last-child)::before {
    background: var(--zoho-primary);
    opacity: 0.35;
}

.workflow-step-marker {
    flex-shrink: 0;
    width: 1.45rem;
    height: 1.45rem;
    margin-top: 0.1rem;
    border-radius: 50%;
    border: 2px solid var(--zoho-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--zoho-text-muted);
    z-index: 1;
}

.workflow-step-marker svg {
    width: 0.7rem;
    height: 0.7rem;
}

.workflow-step-marker-dash {
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 700;
}

.workflow-step-marker-pulse {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--zoho-primary);
    box-shadow: 0 0 0 4px var(--zoho-primary-soft);
}

.workflow-step-approved .workflow-step-marker {
    border-color: #0d7a4d;
    background: var(--zoho-reports-soft);
    color: #0d7a4d;
}

.workflow-step-active .workflow-step-marker {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
}

.workflow-step-rejected .workflow-step-marker {
    border-color: var(--zoho-danger);
    background: var(--zoho-danger-soft);
    color: var(--zoho-danger);
}

.workflow-step-skipped .workflow-step-marker {
    border-style: dashed;
    background: var(--zoho-bg);
}

.workflow-step-body {
    flex: 1;
    min-width: 0;
}

.workflow-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.workflow-step-header strong {
    font-size: 0.95rem;
}

.workflow-step-assignee {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.workflow-step-assignee-text {
    font-size: 0.84rem;
    color: var(--zoho-text-muted);
}

.workflow-step-assignee-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--zoho-text-muted);
    opacity: 0.85;
}

.workflow-step-meta {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
}

.avatar-sm {
    width: 26px;
    height: 26px;
    font-size: 0.68rem;
}

.workflow-step-active .workflow-step-body {
    border-left: 3px solid var(--zoho-primary);
    padding-left: 0.65rem;
    margin-left: -0.15rem;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-header-action-form {
    display: inline-flex;
    margin: 0;
}

.post-action-dialog {
    position: fixed;
    inset: 0;
    z-index: 400;
    pointer-events: none;
}

.post-action-dialog[hidden] {
    display: none;
}

.post-action-dialog-card {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(calc(100vw - 2rem), 420px);
    margin: 0;
    pointer-events: auto;
    box-shadow: 0 16px 48px rgba(28, 39, 60, 0.28);
    z-index: 401;
}

.post-action-dialog-card.is-dragging {
    user-select: none;
}

.post-action-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: -1.25rem -1.35rem 1rem;
    padding: 0.75rem 1.35rem;
    border-bottom: 1px solid var(--zoho-border);
    cursor: grab;
    background: var(--zoho-bg);
    border-radius: var(--zoho-radius-lg) var(--zoho-radius-lg) 0 0;
}

.post-action-dialog-header:active,
.post-action-dialog-card.is-dragging .post-action-dialog-header {
    cursor: grabbing;
}

.post-action-dialog-header h2 {
    margin: 0;
    font-size: 1rem;
}

.post-action-dialog-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.post-action-dialog-form textarea {
    width: 100%;
    margin-bottom: 0.75rem;
}

.post-action-dialog-form .form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}

.post-detail-preview,
.post-detail-workflow,
.post-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.post-detail-workflow {
    align-self: stretch;
}

.post-workflow-card {
    margin-bottom: 0;
    height: 100%;
}

.post-workflow-card-empty {
    display: flex;
    flex-direction: column;
}

.post-workflow-card-empty p {
    margin: 0;
}

.workflow-step-active {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
}

.post-feed-card {
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.post-feed-media-wrap {
    position: relative;
    background: var(--color-surface-muted);
}

.post-feed-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    aspect-ratio: 1 / 1;
    color: var(--zoho-text-muted);
    font-size: 0.88rem;
}

.post-feed-media-placeholder svg {
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0.55;
}

.post-feed-status-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 14px rgba(28, 39, 60, 0.18);
}

.post-feed-status-badge svg {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
}

.post-feed-status-scheduled {
    background: var(--color-primary);
}

.post-feed-status-published {
    background: #059669;
}

.post-feed-status-draft {
    background: rgba(28, 39, 60, 0.78);
}

.post-feed-status-failed {
    background: #dc2626;
}

.post-feed-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.1rem 0.35rem;
}

.post-feed-actions-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.post-feed-actions-channels {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-left: auto;
}

.post-feed-channel-stack {
    justify-content: flex-end;
}

.post-feed-channel .platform-account-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-feed-channel-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.post-feed-channel-link:hover {
    transform: translateY(-1px);
}

.post-feed-channel-link:focus-visible {
    outline: 2px solid var(--zoho-primary);
    outline-offset: 2px;
    border-radius: 50%;
}

.post-feed-channel .platform-account-avatar {
    position: relative;
    display: block;
}

.post-feed-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--zoho-text-muted);
    cursor: pointer;
}

.post-feed-action:disabled {
    cursor: default;
    opacity: 1;
}

.post-feed-action-like {
    color: #e0245e;
}

.post-feed-action svg {
    width: 1.45rem;
    height: 1.45rem;
}

.post-feed-action-comment:hover {
    color: var(--zoho-primary);
}

.post-feed-body {
    padding: 0 1.1rem 1.2rem;
}

.post-feed-account {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
}

.post-feed-caption {
    margin: 0 0 0.45rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--zoho-text);
}

.post-feed-caption-empty {
    font-style: italic;
}

.post-feed-time {
    display: block;
    font-size: 0.72rem;
    color: var(--zoho-text-muted);
}

.post-feed-card .post-media-carousel {
    margin: 0;
}

.post-feed-card .post-media-carousel-viewport {
    aspect-ratio: 1 / 1;
    min-height: 0;
    border-bottom: 0;
}

.post-feed-card .post-media-carousel-thumbs {
    border-bottom: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

.post-feed-card .post-media-carousel-slide {
    padding: 0;
}

.post-feed-card .post-media-carousel-slide img,
.post-feed-card .post-media-carousel-slide video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

.post-detail-content-card {
    overflow: hidden;
    padding-top: 0;
}

.post-detail-body {
    padding-top: 0;
}

.post-detail-content-card:not(:has(.post-media-carousel)) {
    padding-top: 1.25rem;
}

.post-media-carousel {
    margin-left: -1.35rem;
    margin-right: -1.35rem;
}

.post-media-carousel-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    background: var(--color-surface-muted);
    border-bottom: 1px solid var(--zoho-border);
}

.post-media-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.post-media-carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1rem;
}

.post-media-carousel-slide img,
.post-media-carousel-slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.post-media-carousel-slide video {
    width: 100%;
    background: #000;
}

.post-media-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--zoho-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--zoho-text);
    box-shadow: 0 4px 16px rgba(28, 39, 60, 0.12);
    cursor: pointer;
}

.post-media-carousel-arrow:hover {
    background: #fff;
    border-color: #c8d0dc;
}

.post-media-carousel-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
}

.post-media-carousel-prev {
    left: 0.85rem;
}

.post-media-carousel-next {
    right: 0.85rem;
}

.post-media-carousel-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--zoho-border);
    background: var(--zoho-surface);
}

.post-media-carousel-thumb {
    flex: 0 0 auto;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0.2rem;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--color-surface-muted);
    cursor: pointer;
}

.post-media-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.post-media-carousel-thumb.is-active {
    border-color: var(--zoho-primary);
    background: var(--zoho-primary-soft);
}

.post-media-carousel-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--zoho-text-muted);
}

.post-media-carousel-thumb-video svg {
    width: 1.5rem;
    height: 1.5rem;
}

.post-people-list,
.post-channel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-person,
.post-channel-list li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--zoho-border);
}

.post-person:last-child,
.post-channel-list li:last-child {
    border-bottom: 0;
}

.post-person strong,
.post-channel-list li {
    display: block;
    font-size: 0.88rem;
}

.post-person-role {
    display: block;
    font-size: 0.78rem;
    color: var(--zoho-primary);
    font-weight: 600;
}

.post-person-detail {
    display: block;
    font-size: 0.78rem;
    color: var(--zoho-text-muted);
}

.post-activity-card {
    margin-top: 1rem;
}

.post-activity-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.post-activity-summary::-webkit-details-marker {
    display: none;
}

.post-activity-summary-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.post-activity-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--zoho-text);
}

.post-activity-count {
    font-size: 0.72rem;
}

.post-activity-chevron {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    background: currentColor;
    color: var(--zoho-text-muted);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: transform 0.2s ease;
}

.post-activity-card[open] .post-activity-chevron {
    transform: rotate(180deg);
}

.post-activity-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--zoho-border);
}

.post-note-form {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--zoho-border);
}

.post-note-form textarea {
    margin-bottom: 0.5rem;
}

.post-activity-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-activity-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--zoho-border);
}

.post-activity-item:last-child {
    border-bottom: 0;
}

.post-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--zoho-primary-soft);
    position: relative;
}

.post-activity-icon::after {
    content: '';
    position: absolute;
    inset: 10px;
    background: var(--zoho-primary);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.activity-icon-default::after {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

.activity-icon-approve::after { background: #16a34a; }
.activity-icon-reject::after { background: #dc2626; }
.activity-icon-changes::after { background: #f59e0b; }
.activity-icon-workflow::after { background: var(--zoho-primary); }
.activity-icon-task::after { background: #7c3aed; }
.activity-icon-attachment::after { background: #0891b2; }
.activity-icon-note::after { background: #64748b; }

.post-activity-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.post-activity-header strong {
    font-size: 0.9rem;
}

.post-activity-header time {
    font-size: 0.75rem;
    color: var(--zoho-text-muted);
    white-space: nowrap;
}

.post-activity-actor {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--zoho-text-muted);
}

.post-activity-comment {
    margin-top: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.post-activity-attachment img {
    margin-top: 0.5rem;
    max-width: 120px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.post-activity-empty {
    margin: 0;
}

.composer-existing-media {
    margin-bottom: 0.75rem;
}

.post-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.calendar-production {
    display: block;
    font-size: 0.7rem;
    opacity: 0.85;
}

.calendar-chip a {
    color: inherit;
    text-decoration: none;
}

/* Looply utility classes */
.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-block-spaced {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
}

.auth-footer {
    margin: 1rem 0 0;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.auth-footer-sep {
    margin: 0 0.35rem;
    opacity: 0.55;
}

.auth-brand-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.auth-brand-link:hover {
    text-decoration: none;
}

.connect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.connect-actions .btn {
    margin: 0;
}

.connect-platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.connect-platform-icon {
    flex-shrink: 0;
    display: block;
}

.form-actions-spaced {
    margin-top: 1rem;
}

.stat-value-sub {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.empty-state-text {
    margin: 0;
    color: var(--color-text-muted);
}

.workflow-step-form-bordered {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.topbar-new-post {
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.95rem;
}

[data-theme="dark"] .toast-success {
    border-color: #166534;
    background: #052e16;
    color: #86efac;
}

[data-theme="dark"] .toast-info {
    border-color: #5b21b6;
    background: #2e1065;
    color: #c4b5fd;
}

[data-theme="dark"] .toast-warning {
    border-color: #92400e;
    background: #422006;
    color: #fcd34d;
}

[data-theme="dark"] .toast-error {
    border-color: #991b1b;
    background: #450a0a;
    color: #fca5a5;
}

[data-theme="dark"] .home-banner {
    background: linear-gradient(135deg, var(--color-primary-soft) 0%, #1a1d26 100%);
}

/* Platform admin portal */
.admin-shell {
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
}

.admin-portal-context {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    max-width: 240px;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: var(--zoho-radius);
    background: var(--zoho-bg);
}

.nav-admin-platform .nav-label { color: var(--color-primary); }
.nav-admin-directory .nav-label { color: var(--zoho-monitor); }
.nav-admin-content .nav-label { color: var(--zoho-publish); }

.admin-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.admin-table-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    flex: 0 1 auto;
    margin: 0;
    border: none;
    padding: 0;
    background: transparent;
}

.admin-filter-field select {
    min-width: 10rem;
    height: 2.375rem;
    color: var(--color-text-muted);
}

.admin-filter-field select.has-value {
    color: var(--color-text);
}

.admin-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-table-search-wrap {
    flex: 1 1 16rem;
    min-width: 14rem;
    max-width: none;
}

.admin-table-search-wrap input[type="search"] {
    width: 100%;
    height: 2.375rem;
}

.admin-table-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
}

.admin-table-toolbar .form-actions {
    margin: 0;
}

/* User profile */
.profile-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-hero {
    overflow: hidden;
    padding: 0;
}

.profile-cover {
    height: 7rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6b4ce6 55%, #3b82f6 100%);
}

.profile-hero-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem 1.5rem;
    align-items: end;
    padding: 0 1.5rem 1rem;
    margin-top: -2.5rem;
}

.profile-avatar-wrap {
    align-self: end;
}

.profile-avatar,
.profile-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 999px;
    border: 4px solid var(--color-surface);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.35rem;
    font-weight: 700;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.profile-identity h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.profile-subtitle {
    margin: 0 0 0.5rem;
    color: var(--color-text-muted);
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
    align-self: end;
}

.profile-stat {
    text-align: center;
    min-width: 4rem;
}

.profile-stat strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.2;
}

.profile-stat span {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.profile-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0 1rem 0.75rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.profile-nav-item {
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
}

.profile-nav-item:hover {
    background: var(--color-surface-muted);
    color: var(--color-text);
    text-decoration: none;
}

.profile-nav-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 600;
}

.profile-section {
    padding: 1.25rem 1.5rem 1.5rem;
}

.profile-section h2 {
    margin: 0 0 0.35rem;
}

.profile-edit-layout {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.profile-photo-card {
    text-align: center;
}

.profile-photo-preview img,
.profile-avatar-initials-lg {
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.profile-upload-btn {
    display: inline-flex;
    cursor: pointer;
}

.profile-photo-remove {
    margin-top: 0.5rem;
}

.profile-preferences-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    max-width: 36rem;
}

.profile-preference-row {
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.profile-preference-row small {
    display: block;
    margin-top: 0.2rem;
    color: var(--color-text-muted);
}

.profile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-activity-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

.profile-activity-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: var(--color-primary-soft);
}

.profile-activity-icon-notification {
    background: #fff4e5;
}

.profile-activity-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}

.profile-activity-head time {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.profile-activity-content p {
    margin: 0.35rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.profile-membership-block {
    margin-top: 1.25rem;
}

.profile-membership-block h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.profile-membership-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.profile-security-block {
    margin-top: 1.25rem;
    max-width: 28rem;
}

.profile-security-block h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.profile-danger-zone {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    max-width: 32rem;
}

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    color: var(--color-text);
    background: var(--color-surface-muted);
}

@media (max-width: 900px) {
    .profile-hero-body {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar-wrap,
    .profile-stats {
        justify-self: center;
    }

    .profile-badges {
        justify-content: center;
    }

    .profile-edit-layout {
        grid-template-columns: 1fr;
    }
}

/* ——— Marketing landing (creators) ——— */

body.marketing-page {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
}

.marketing-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.marketing-nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.marketing-nav-brand:hover {
    text-decoration: none;
}

.marketing-nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem 1.15rem;
}

.marketing-nav-links a {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
}

.marketing-nav-links a:hover {
    color: var(--color-text);
    text-decoration: none;
}

.marketing-nav-links .btn {
    text-decoration: none;
    color: white;
}

.marketing-main {
    overflow-x: clip;
}

.marketing-hero {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: stretch;
    isolation: isolate;
}

.marketing-hero-atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, color-mix(in srgb, #7c3aed 28%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 30%, color-mix(in srgb, #ec4899 22%, transparent), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, color-mix(in srgb, #a855f7 16%, transparent), transparent 45%),
        var(--color-bg);
}

[data-theme="dark"] .marketing-hero-atmosphere {
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, color-mix(in srgb, #7c3aed 40%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 30%, color-mix(in srgb, #ec4899 28%, transparent), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, color-mix(in srgb, #a855f7 20%, transparent), transparent 45%),
        var(--color-bg);
}

.marketing-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: clamp(2rem, 5vh, 4rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2.5rem, 6vh, 4.5rem);
}

.marketing-hero-brand {
    margin-bottom: 1.25rem;
}

.marketing-hero-brand .brand-logo-full {
    width: min(100%, 360px);
    height: auto;
}

.marketing-hero-copy h1 {
    margin: 0 0 0.85rem;
    font-size: clamp(2.15rem, 4.5vw, 3.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    max-width: 14ch;
}

.marketing-hero-lead {
    margin: 0 0 1.5rem;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.55;
    color: var(--color-text-muted);
    max-width: 36ch;
}

.marketing-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.marketing-cta-primary {
    padding: 0.7rem 1.35rem;
    font-size: var(--font-size-base);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.15s ease;
}

.marketing-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.marketing-cta-secondary {
    padding: 0.7rem 1.35rem;
    font-size: var(--font-size-base);
    background: color-mix(in srgb, var(--color-surface) 75%, transparent);
    color: var(--color-text);
    border-color: var(--color-border-strong);
    box-shadow: none;
    transition: transform 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}

.marketing-cta-secondary:hover {
    transform: translateY(-2px);
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.marketing-hero-visual {
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.marketing-shot {
    margin: 0;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    background: var(--color-surface);
}

.marketing-shot img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.marketing-shot-hero {
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
}

@media (min-width: 901px) {
    .marketing-hero-visual {
        margin-right: calc(-1 * clamp(1.25rem, 4vw, 2.5rem));
        align-self: stretch;
    }

    .marketing-shot-hero {
        min-height: min(520px, 70vh);
        height: 100%;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg);
        border-right: none;
        box-shadow: var(--shadow-lg);
        display: flex;
    }

    .marketing-shot-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: left center;
    }
}

.marketing-platforms {
    padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 2.75rem;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.marketing-platforms-label {
    margin: 0 auto 1.25rem;
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.marketing-platforms-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.25rem;
    max-width: 920px;
}

.marketing-platforms-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
}

.marketing-platforms-list img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.marketing-features {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: clamp(3rem, 8vh, 5rem) clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: clamp(3.5rem, 10vh, 5.5rem);
}

.marketing-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.marketing-feature-reverse .marketing-feature-copy {
    order: 2;
}

.marketing-feature-reverse .marketing-feature-visual {
    order: 1;
}

.marketing-feature-copy h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.marketing-feature-copy p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 38ch;
}

.marketing-feature-visual .marketing-shot {
    width: 100%;
}

.marketing-closing {
    text-align: center;
    padding: clamp(3rem, 8vh, 5rem) clamp(1.25rem, 4vw, 2.5rem);
    background:
        radial-gradient(ellipse 70% 80% at 50% 0%, color-mix(in srgb, #7c3aed 18%, transparent), transparent 60%),
        var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.marketing-closing h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.marketing-closing > p {
    margin: 0 auto 1.35rem;
    max-width: 40ch;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

.marketing-closing .marketing-cta-group {
    justify-content: center;
}

.marketing-closing-note {
    margin: 1.35rem 0 0 !important;
    font-size: var(--font-size-sm) !important;
    color: var(--color-text-light) !important;
}

.site-footer {
    padding: 2.5rem clamp(1.25rem, 4vw, 2.75rem) 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.site-footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem 3rem;
    width: min(1100px, 100%);
    margin: 0 auto;
}

.site-footer-brand-col {
    flex: 0 1 220px;
}

.site-footer-brand {
    display: inline-flex;
    text-decoration: none;
    color: inherit;
}

.site-footer-brand:hover {
    text-decoration: none;
}

.site-footer-tag {
    margin: 0.85rem 0 0;
    font-size: var(--font-size-sm);
    line-height: 1.45;
    max-width: 18ch;
    color: var(--color-text-muted);
}

.site-footer-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem 3rem;
    margin-left: auto;
}

.site-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-width: 7.5rem;
}

.site-footer-col a,
.site-footer-text-btn {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    line-height: 1.35;
}

.site-footer-col a:hover,
.site-footer-text-btn:hover,
.site-footer-legal a:hover,
.site-footer-legal .site-footer-text-btn:hover {
    color: var(--color-text);
}

.site-footer-rule {
    width: min(1100px, 100%);
    margin: 2rem auto 1.15rem;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.5rem;
    width: min(1100px, 100%);
    margin: 0 auto;
}

.site-footer-compact .site-footer-bottom {
    padding-top: 0;
}

.site-footer-compact {
    padding-top: 1.35rem;
}

.site-footer-copy {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem 1.35rem;
    margin-left: auto;
}

.site-footer-legal a,
.site-footer-legal .site-footer-text-btn {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
}

.site-footer-bottom-app {
    width: 100%;
}

.app-footer {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    box-sizing: border-box;
}

@media (max-width: 800px) {
    .site-footer-top {
        flex-direction: column;
    }

    .site-footer-cols {
        margin-left: 0;
        width: 100%;
        gap: 1.5rem 2.5rem;
    }

    .site-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer-legal {
        margin-left: 0;
        justify-content: flex-start;
    }
}


@keyframes marketing-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.marketing-hero-copy.marketing-reveal {
    animation: marketing-fade-up 0.75s ease both;
}

.marketing-hero-visual.marketing-reveal-delay {
    animation: marketing-fade-up 0.85s ease 0.15s both;
}

@supports (animation-timeline: view()) {
    .marketing-features .marketing-reveal,
    .marketing-closing.marketing-reveal {
        animation: marketing-fade-up 0.7s ease both;
        animation-timeline: view();
        animation-range: entry 5% cover 28%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marketing-hero-copy.marketing-reveal,
    .marketing-hero-visual.marketing-reveal-delay,
    .marketing-features .marketing-reveal,
    .marketing-closing.marketing-reveal,
    .marketing-cta-primary,
    .marketing-cta-secondary {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@media (max-width: 900px) {
    .marketing-hero {
        min-height: 0;
    }

    .marketing-hero-inner {
        grid-template-columns: 1fr;
        padding-bottom: 2rem;
    }

    .marketing-hero-copy h1 {
        max-width: none;
    }

    .marketing-hero-visual {
        margin: 0 -1.25rem;
    }

    .marketing-shot-hero {
        border-radius: 0;
    }

    .marketing-feature,
    .marketing-feature-reverse {
        grid-template-columns: 1fr;
    }

    .marketing-feature-reverse .marketing-feature-copy,
    .marketing-feature-reverse .marketing-feature-visual {
        order: unset;
    }

    .marketing-nav-links a:not(.btn) {
        display: none;
    }
}

/* ——— Legal pages ——— */

.legal-main {
    width: min(820px, 100%);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.legal-page {
    padding-bottom: 2rem;
}

.legal-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.legal-subnav a {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
}

.legal-subnav a:hover,
.legal-subnav a.active {
    color: var(--color-primary);
}

.legal-header h1 {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.legal-kicker {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
}

.legal-updated {
    margin: 0 0 0.75rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.legal-intro {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.legal-entity {
    margin: 1.25rem 0 1.75rem;
    padding: 1rem 1.15rem;
}

.legal-entity p {
    margin: 0.35rem 0;
    font-size: var(--font-size-sm);
}

.legal-body {
    line-height: 1.65;
    color: var(--color-text);
}

.legal-body h2 {
    margin: 1.75rem 0 0.65rem;
    font-size: 1.15rem;
}

.legal-body ul,
.legal-body ol {
    padding-left: 1.25rem;
}

.legal-body li {
    margin: 0.35rem 0;
}

.legal-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding: 0.75rem 1rem;
    background: var(--color-surface-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1rem 0 1.5rem;
}

.legal-inline-btn {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    margin: 1rem 0;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--color-border);
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--color-surface-muted);
}

.auth-legal-agree,
.auth-legal-mini {
    margin: 0.85rem 0 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.45;
    text-align: center;
}

.auth-legal-agree a,
.auth-legal-mini a {
    font-weight: 600;
}

/* ——— Cookie consent banner ——— */

.consent-banner {
    position: fixed;
    z-index: 10000;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background: color-mix(in srgb, var(--color-surface) 94%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
}

.consent-banner-inner {
    width: min(960px, 100%);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
}

.consent-banner-copy {
    flex: 1 1 280px;
}

.consent-banner-copy strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.consent-banner-copy p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
}

.consent-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.consent-modal[hidden],
.consent-banner[hidden] {
    display: none !important;
}

.consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.consent-modal-panel {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(90vh, 640px);
    overflow: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.35rem 1.35rem 1.15rem;
}

.consent-modal-panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.consent-modal-lead {
    margin: 0 0 1rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
}

.consent-gpc-note {
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.7rem;
    font-size: var(--font-size-sm);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
}

.consent-toggle {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0.65rem 0;
    font-size: var(--font-size-sm);
    line-height: 1.4;
    cursor: pointer;
}

.consent-toggle input {
    margin-top: 0.2rem;
}

.consent-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.15rem;
}

.consent-modal-links {
    margin: 1rem 0 0;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-align: center;
}

@media (max-width: 640px) {
    .consent-banner-actions {
        width: 100%;
    }

    .consent-banner-actions .btn {
        flex: 1 1 auto;
    }
}

