:root {
    --bg-primary: #0A0B10;
    --bg-secondary: #12141D;
    --bg-card: rgba(18, 20, 29, 0.8);
    --bg-card-hover: rgba(26, 29, 41, 0.9);
    --bg-glass: rgba(18, 20, 29, 0.75);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #FFFFFF;
    --text-secondary: #9BA1A6;
    --text-muted: #687076;
    --accent: #EA5332;
    --accent-light: #FF6D4A;
    --accent-glow: rgba(250, 107, 74, 0.25);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Light Theme Override ── */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #e4e6eb;
    --bg-card: #ffffff;
    --bg-card-hover: #fcfcfc;
    --bg-glass: #ffffff;
    --border: #e4e6eb;
    --border-hover: #ccd0d5;
    --text-primary: #050505;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    --accent: #EA5332;
    --accent-light: #FF6D4A;
    --accent-glow: rgba(234, 83, 50, 0.18);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] body {
    background-image: none;
}

[data-theme="light"] .navbar {
    background: rgba(248, 249, 252, 0.90);
    border-bottom-color: rgba(0, 20, 50, 0.06);
}

[data-theme="light"] .card:hover,
[data-theme="light"] .hub-card:hover,
[data-theme="light"] .home-feature-card:hover,
[data-theme="light"] .home-showcase-card:hover,
[data-theme="light"] .home-usecase-card:hover,
[data-theme="light"] .home-dev-card:hover,
[data-theme="light"] .home-hub-card:hover {
    box-shadow: 0 12px 40px rgba(0, 20, 50, 0.08);
}

[data-theme="light"] .home-stats-bar {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 32px rgba(0, 20, 50, 0.06);
}

[data-theme="light"] .lightbox-overlay {
    background: rgba(0, 20, 50, 0.85);
}

[data-theme="light"] .empty-state {
    box-shadow: 0 8px 32px rgba(0, 20, 50, 0.04);
}

[data-theme="light"] .hub-card-icon {
    box-shadow: 0 6px 20px rgba(0, 20, 50, 0.10);
}

[data-theme="light"] .feature-hero-icon {
    box-shadow: 0 8px 28px rgba(0, 20, 50, 0.10);
}

[data-theme="light"] .home-feature-icon {
    box-shadow: 0 4px 14px rgba(0, 20, 50, 0.08);
}

/* Light mobile menu (bottom sheet) */
[data-theme="light"] .mobile-menu-inner {
    background: #fff;
    box-shadow: 0 -8px 40px rgba(0, 20, 50, 0.12);
}

[data-theme="light"] .mobile-menu-overlay {
    background: rgba(10, 20, 40, 0.35);
}

[data-theme="light"] .mobile-shortcut-item {
    background: #f5f6fa;
    border-color: rgba(0, 20, 50, 0.06);
}

/* Light bottom tab bar */
[data-theme="light"] .fb-bottom-tabs {
    background: #fff;
    border-top-color: rgba(0, 20, 50, 0.06);
    box-shadow: 0 -2px 12px rgba(0, 20, 50, 0.06);
}

[data-theme="light"] .fb-more-sheet {
    background: #fff;
    box-shadow: 0 -8px 40px rgba(0, 20, 50, 0.12);
}

[data-theme="light"] .fb-more-item {
    background: #f5f6fa;
    border-color: rgba(0, 20, 50, 0.06);
}

/* Light social navbar buttons */
[data-theme="light"] .social-action-btn {
    background: #eef0f5;
}

[data-theme="light"] .social-action-btn:hover {
    background: rgba(234, 83, 50, 0.08);
}

[data-theme="light"] .navbar-social {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 20, 50, 0.06);
}

/* Light nav dropdown */
@media (max-width: 768px) {
    [data-theme="light"] .nav-links {
        background: rgba(248, 249, 252, 0.98);
        box-shadow: 0 8px 24px rgba(0, 20, 50, 0.06);
    }
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    background: rgba(0, 20, 50, 0.04);
}

/* ── Light Theme: Profile Hero ── */
[data-theme="light"] .profile-hero-bg {
    background: linear-gradient(135deg,
        #f5ebe0 0%,
        #f5e8d8 25%,
        #f5e3d5 50%,
        #f2e4d4 75%,
        #f5ebe0 100%);
}

[data-theme="light"] .profile-hero-bg::after {
    background:
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(234, 83, 50, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 80% 20%, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .profile-hero-name {
    color: #1a1d2e;
    text-shadow: none;
}

[data-theme="light"] .profile-hero-tagline {
    color: rgba(26, 29, 46, 0.6);
}

[data-theme="light"] .profile-hero-role {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.15), rgba(234, 83, 50, 0.1));
    color: #EA5332;
    border-color: rgba(234, 83, 50, 0.2);
}

[data-theme="light"] .profile-hero-status {
    border-color: #f5ebe0;
}

[data-theme="light"] .profile-hero-credits {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(26, 29, 46, 0.9);
}

[data-theme="light"] .profile-hero-credits:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 12px rgba(234, 83, 50, 0.15);
}

[data-theme="light"] .profile-hero-credits .hero-credit-label {
    color: rgba(26, 29, 46, 0.6);
}

[data-theme="light"] .profile-hero-credits .hero-credit-val {
    color: #1a1d2e;
}

[data-theme="light"] .profile-hero-credits .hero-credit-divider {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-hero-actions {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .profile-hero-actions .action-icon-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(26, 29, 46, 0.8);
}

[data-theme="light"] .profile-hero-actions .action-icon-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 12px rgba(234, 83, 50, 0.15);
}

/* Gallery overlay in light mode */
[data-theme="light"] .gallery-item::after {
    background: linear-gradient(to top,
            rgba(0, 20, 50, 0.15) 0%,
            rgba(0, 20, 50, 0) 50%);
}

/* ── Theme Toggle Switch ── */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(136, 146, 176, 0.15);
    border: 1px solid var(--border);
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.08);
}

.theme-toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px var(--accent-glow);
    line-height: 1;
}

[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(234, 83, 50, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(234, 83, 50, 0.04) 0%, transparent 70%);
    background-attachment: fixed;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
    width: 100%;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

/* ── Layout ── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ── Skip to Content (Accessibility) ── */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none;
}

.skip-to-content:focus {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    overflow: visible;
}

/* ── Nav ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(136, 146, 176, 0.08);
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo span {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(136, 146, 176, 0.08);
    color: var(--text-primary);
}

/* ── Page Header ── */
.page-header {
    padding: 28px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
    color: white;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* ── User Dropdown ── */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-btn:hover,
.user-profile-btn[aria-expanded="true"] {
    background: var(--bg-card-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.user-name-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-chevron {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.user-profile-btn[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 8px 0;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.dropdown-user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

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

.dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.05);
    color: var(--danger);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ── Cards Grid ── */

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dashboard-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.sort-box select {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.sort-box select:focus {
    outline: none;
    border-color: var(--accent);
}

.tag-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 42px; /* Roughly 1 row of tags + padding */
    margin-bottom: 12px;
    padding-bottom: 4px;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-filter-bar.expanded {
    max-height: 1000px;
}

/* ── Type Filter (People / Services segmented control) ── */
.type-filter-bar {
    display: inline-flex;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.type-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.type-filter-btn svg {
    flex-shrink: 0;
    transition: inherit;
}

.type-filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.type-filter-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.type-filter-btn.active svg {
    stroke: #fff;
}

.tag-filter-container {
    margin-bottom: 24px;
}

.toggle-tags-btn {
    font-weight: 600;
    border-style: dashed !important;
    background: transparent !important;
    opacity: 0.8;
}

.toggle-tags-btn:hover {
    opacity: 1;
    border-style: solid !important;
}

.tag-filter-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tag-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.tag-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tag-pill.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border-color: transparent;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding-bottom: 48px;
}

.card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #EA5332, #FF6D4A, #f97316, #3b82f6, #10b981);
    background-size: 200% auto;
    opacity: 0.6;
    transition: opacity 0.4s ease;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 16px 40px rgba(0, 20, 50, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    flex-shrink: 0;
}

.card-name {
    font-size: 1.02rem;
    font-weight: 600;
}

.card-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-tagline {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-pill-card {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

[data-theme="light"] .tag-pill-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.card:hover .tag-pill-card {
    border-color: rgba(255, 255, 255, 0.2);
}

.tag-pill-card:nth-child(1) { background: rgba(234, 83, 50, 0.15); color: #FF6D4A; border-color: rgba(234, 83, 50, 0.2); }
.tag-pill-card:nth-child(2) { background: rgba(236, 72, 153, 0.15); color: #f472b6; border-color: rgba(236, 72, 153, 0.2); }
.tag-pill-card:nth-child(3) { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.tag-pill-card:nth-child(4) { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }
.tag-pill-card:nth-child(5) { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border-color: rgba(14, 165, 233, 0.2); }

[data-theme="light"] .tag-pill-card:nth-child(1) { background: rgba(234, 83, 50, 0.1); color: #EA5332; border-color: rgba(234, 83, 50, 0.2); }
[data-theme="light"] .tag-pill-card:nth-child(2) { background: rgba(236, 72, 153, 0.1); color: #db2777; border-color: rgba(236, 72, 153, 0.2); }
[data-theme="light"] .tag-pill-card:nth-child(3) { background: rgba(16, 185, 129, 0.1); color: #059669; border-color: rgba(16, 185, 129, 0.2); }
[data-theme="light"] .tag-pill-card:nth-child(4) { background: rgba(245, 158, 11, 0.1); color: #d97706; border-color: rgba(245, 158, 11, 0.2); }
[data-theme="light"] .tag-pill-card:nth-child(5) { background: rgba(14, 165, 233, 0.1); color: #0284c7; border-color: rgba(14, 165, 233, 0.2); }

.tag-pill-card-more {
    display: inline-block;
    padding: 6px 14px;
    background: transparent;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Detail Page ── */
.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 0 20px;
}

.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

img.detail-avatar {
    background: none;
}

.detail-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-info .role {
    color: var(--accent-light);
    font-size: 1rem;
    font-weight: 500;
}

.detail-info .tagline {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 6px;
}

.detail-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* ── Sections ── */
.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1.2rem;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.field-group {
    margin-bottom: 14px;
}

.field-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.field-value {
    font-size: 0.92rem;
    color: var(--text-primary);
}

.field-value.muted {
    color: var(--text-muted);
    font-style: italic;
}

/* ── Timeline ── */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
}

.timeline-item:first-child::before {
    background: var(--accent-light);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-company {
    font-weight: 600;
    font-size: 0.95rem;
}

.timeline-role {
    color: var(--accent-light);
    font-size: 0.85rem;
}

.timeline-period {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.5;
}

/* ── Pills / Traits list ── */
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 6px 14px;
    background: rgba(234, 83, 50, 0.1);
    border: 1px solid rgba(234, 83, 50, 0.2);
    color: var(--accent-light);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── Form ── */
.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── AI Generate All Banner ── */
.ai-generate-all-banner {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.06), rgba(236, 72, 153, 0.04), rgba(234, 83, 50, 0.04));
    border: 1px solid rgba(234, 83, 50, 0.15);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 28px;
}

.ai-generate-all-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ai-generate-all-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-generate-all-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-generate-all-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-generate-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #EA5332, #ec4899);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(234, 83, 50, 0.3);
}

.ai-generate-all-btn .ai-sparkle-icon {
    width: 18px;
    height: 18px;
    stroke: white;
}

.ai-generate-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(234, 83, 50, 0.45);
}

.ai-generate-all-btn:active {
    transform: translateY(0);
}

.ai-generate-all-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.ai-generate-all-btn.loading .ai-sparkle-icon {
    animation: sparkle-spin 0.8s linear infinite;
}

.ai-generate-all-progress {
    margin-top: 16px;
}

.ai-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(234, 83, 50, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.ai-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #EA5332, #ec4899);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.ai-progress-label {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #EA5332;
    font-weight: 500;
}

@media (max-width: 768px) {
    .ai-generate-all-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ── AI Generation Buttons ── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.label-with-ai {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.label-with-ai label {
    margin-bottom: 0;
}

.ai-sparkle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.12), rgba(236, 72, 153, 0.12));
    color: #EA5332;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.ai-sparkle-btn svg {
    width: 12px;
    height: 12px;
    stroke: #EA5332;
    transition: all 0.3s ease;
}

.ai-sparkle-btn:hover {
    background: linear-gradient(135deg, #EA5332, #ec4899);
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(234, 83, 50, 0.4);
}

.ai-sparkle-btn:hover svg {
    stroke: white;
}

.ai-sparkle-btn.loading {
    pointer-events: none;
    animation: sparkle-spin 0.8s linear infinite;
}

.ai-sparkle-btn.loading svg {
    stroke: #EA5332;
}

.ai-section-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid rgba(234, 83, 50, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.06), rgba(236, 72, 153, 0.06));
    color: #EA5332;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.ai-section-btn .ai-sparkle-icon {
    width: 14px;
    height: 14px;
    stroke: #EA5332;
    transition: all 0.3s ease;
}

.ai-section-btn:hover {
    background: linear-gradient(135deg, #EA5332, #ec4899);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(234, 83, 50, 0.35);
}

.ai-section-btn:hover .ai-sparkle-icon {
    stroke: white;
}

.ai-section-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.15), rgba(236, 72, 153, 0.15));
}

.ai-section-btn.loading .ai-sparkle-icon {
    animation: sparkle-spin 0.8s linear infinite;
}

@keyframes sparkle-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes ai-shimmer {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 83, 50, 0.3);
    }

    50% {
        box-shadow: 0 0 8px 2px rgba(234, 83, 50, 0.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 83, 50, 0.3);
    }
}

.ai-field-highlight {
    animation: ai-shimmer 0.6s ease-out;
    border-color: #EA5332 !important;
}

/* ── Hub Cards (Character Profile) ── */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding-bottom: 36px;
}

.hub-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px 20px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: var(--transition);
}

.hub-card:nth-child(1)::before {
    background: linear-gradient(90deg, #EA5332, #FF6D4A);
}

.hub-card:nth-child(2)::before {
    background: linear-gradient(90deg, #EA5332, #FF6D4A);
}

.hub-card:nth-child(3)::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.hub-card:nth-child(4)::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.hub-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.hub-card-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.hub-card-body p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.hub-card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.hub-card-stat {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(234, 83, 50, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.hub-card-arrow {
    position: absolute;
    top: 28px;
    right: 24px;
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.hub-card:hover .hub-card-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

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

/* ── Premium Profile Hero ── */
@keyframes hero-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes avatar-glow-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(234, 83, 50, 0.4), 0 0 20px rgba(234, 83, 50, 0.15); }
    50%      { box-shadow: 0 0 0 4px rgba(234, 83, 50, 0.5), 0 0 28px rgba(234, 83, 50, 0.25); }
}

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

.profile-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
    animation: hero-fade-in 0.4s ease-out;
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        #1a0c08 0%,
        #0f172a 25%,
        #2a0f08 50%,
        #0c1220 75%,
        #1a0c08 100%);
    background-size: 300% 300%;
    animation: hero-gradient-shift 12s ease infinite;
    z-index: 0;
}

.profile-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(234, 83, 50, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
}

.profile-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
}

.profile-hero-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-hero-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    animation: avatar-glow-pulse 3s ease-in-out infinite;
}

.profile-hero-avatar-placeholder {
    background: linear-gradient(135deg, #EA5332, #FF6D4A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    letter-spacing: 0.05em;
}

.profile-hero-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #1a0c08;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.profile-hero-info {
    flex: 1;
    min-width: 0;
}

.profile-hero-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.profile-hero-role {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.3), rgba(234, 83, 50, 0.2));
    color: #FF6D4A;
    border-radius: 20px;
    border: 1px solid rgba(234, 83, 50, 0.25);
    backdrop-filter: blur(4px);
}

.profile-hero-tagline {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 340px;
}

.profile-hero-credits {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.profile-hero-credits:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.hero-credit-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero-credit-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-credit-val {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.hero-credit-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .profile-hero-content {
        flex-wrap: wrap;
    }
    .profile-hero-credits {
        margin-left: auto;
    }
}

.profile-hero-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.profile-hero-actions .action-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.profile-hero-actions .action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 16px rgba(234, 83, 50, 0.3);
}

.profile-hero-actions .action-icon-danger {
    border-color: rgba(239, 68, 68, 0.25);
}

.profile-hero-actions .action-icon-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 2px 16px rgba(239, 68, 68, 0.25);
}

/* ── Icon-Only Action Buttons ── */
.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    padding: 0;
    line-height: 1;
}

.action-icon-btn:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.action-icon-danger {
    border-color: rgba(239, 68, 68, 0.2);
}

.action-icon-danger:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

/* ── Compact Visibility Bar ── */
.vis-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 12px;
}

.vis-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.vis-bar-label {
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

.vis-bar-separator {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
}

.vis-bar-btns {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

/* ── Inline Details (desktop: in-row summary, dropdown body) ── */
.vis-details-inline {
    position: relative;
    flex-shrink: 0;
}

.vis-details-summary {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 10px;
    list-style: none;
    user-select: none;
    border-radius: 6px;
    background: rgba(234, 83, 50, 0.08);
    border: 1px solid rgba(234, 83, 50, 0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.vis-details-summary:hover {
    color: var(--accent);
    background: rgba(234, 83, 50, 0.15);
    border-color: rgba(234, 83, 50, 0.3);
}

.vis-details-inline[open] .vis-details-summary {
    color: #FF6D4A;
    background: rgba(234, 83, 50, 0.18);
    border-color: rgba(234, 83, 50, 0.35);
}

.vis-details-body {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(234, 83, 50, 0.1);
    z-index: 50;
    animation: vis-dropdown-in 0.2s ease-out;
}

@keyframes vis-dropdown-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.vis-details-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vis-details-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Toggles Row ── */
.vis-toggles-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.vis-toggles-row .toggle-row {
    flex: 0 0 auto;
}

.vis-toggles-row .toggle-hint {
    display: none;
}

/* ── Toggle Switch ── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 24px;
    transition: background 0.25s, border-color 0.25s;
}

.toggle-thumb {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}

.toggle-switch input:checked ~ .toggle-track {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked ~ .toggle-thumb {
    transform: translateX(20px);
    background: #fff;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ── Agent Dashboard ── */
@keyframes dash-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.agent-dashboard {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Row 1: Key Metrics */
.dash-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.dash-metric-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    animation: dash-fade-up 0.4s ease-out both;
    position: relative;
    overflow: hidden;
}

.dash-metric-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color, var(--accent));
    opacity: 0.5;
    transition: opacity 0.25s;
}

.dash-metric-card:nth-child(2) { animation-delay: 0.05s; }
.dash-metric-card:nth-child(3) { animation-delay: 0.1s; }
.dash-metric-card:nth-child(4) { animation-delay: 0.15s; }

.dash-metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.dash-metric-card:hover::before {
    opacity: 1;
}

.dash-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.dash-metric-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.dash-metric-of {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.dash-metric-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 1px;
}

/* Row 2 & 3: Panel Cards */
.dash-panels-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.dash-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    animation: dash-fade-up 0.45s ease-out both;
    animation-delay: 0.1s;
    min-width: 0;
}

.dash-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dash-panel-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.dash-panel-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.dash-panel-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.dash-panel-link:hover {
    color: var(--accent-light);
}

/* Config Panel */
.dash-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dash-config-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.dash-config-key {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dash-config-val {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-vis-public { color: var(--success); }
.dash-vis-unlisted { color: var(--warning); }
.dash-vis-private { color: var(--text-muted); }

/* Connection pills in config */
.conn-pill {
    display: inline-block;
    padding: 1px 7px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.10);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: #38bdf8;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
    margin: 1px 2px 1px 0;
}
.conn-pill:hover {
    background: rgba(14, 165, 233, 0.20);
    border-color: rgba(14, 165, 233, 0.45);
    color: #7dd3fc;
}
[data-theme="light"] .conn-pill {
    background: rgba(14, 165, 233, 0.08);
    color: #0284c7;
}
[data-theme="light"] .conn-pill:hover {
    background: rgba(14, 165, 233, 0.15);
    color: #0369a1;
}
/* Allow wrapping when config-val contains pills */
.dash-config-item:has(.conn-pill) .dash-config-val {
    white-space: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* Gauge (CSS conic-gradient ring) */
.dash-gauge-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
}

.dash-gauge {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.dash-gauge-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--success) 0deg,
        var(--success) calc(var(--rate, 0) * 3.6deg),
        rgba(255, 255, 255, 0.06) calc(var(--rate, 0) * 3.6deg),
        rgba(255, 255, 255, 0.06) 360deg
    );
    mask: radial-gradient(circle, transparent 55%, black 56%);
    -webkit-mask: radial-gradient(circle, transparent 55%, black 56%);
    animation: dash-ring-in 0.8s ease-out both;
    animation-delay: 0.3s;
}

@keyframes dash-ring-in {
    from { transform: rotate(-90deg) scale(0.8); opacity: 0; }
    to   { transform: rotate(-90deg) scale(1); opacity: 1; }
}

.dash-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dash-gauge-pct {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.dash-gauge-sub {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dash-gauge-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-gauge-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dash-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-stat-success .dash-stat-dot { background: var(--success); }
.dash-stat-fail .dash-stat-dot { background: var(--danger); }
.dash-stat-other .dash-stat-dot { background: var(--text-muted); }

/* Activity List */
.dash-activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.dash-activity-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dash-run-status,
.dash-sched-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.dash-activity-name {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-activity-time {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* Dashboard Empty State */
.dash-empty-state {
    text-align: center;
    padding: 16px 12px;
    color: var(--text-muted);
}

.dash-empty-state span {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 4px;
    opacity: 0.6;
}

.dash-empty-state p {
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .dash-metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-panels-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .dash-gauge-wrap {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .dash-metrics-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .dash-metric-card {
        padding: 10px 8px;
    }
    .dash-metric-value {
        font-size: 1.1rem;
    }
}

/* ── Earnings Summary Card ── */
.dash-earnings-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    animation: dash-fade-up 0.45s ease-out both;
    animation-delay: 0.15s;
}

.dash-earnings-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #f97316, #ef4444);
    opacity: 0.7;
}

.dash-earnings-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 180px;
}

.dash-earnings-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(249, 115, 22, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.dash-earnings-info {
    display: flex;
    flex-direction: column;
}

.dash-earnings-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-earnings-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.dash-earnings-usd {
    font-size: 0.75rem;
    font-weight: 500;
    color: #f59e0b;
}

.dash-earnings-breakdown {
    display: flex;
    gap: 16px;
    align-items: center;
}

.dash-earnings-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dash-earnings-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-earnings-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-earnings-link {
    font-size: 0.72rem;
    font-weight: 600;
    color: #f59e0b;
    text-decoration: none;
    transition: color 0.2s;
    margin-left: auto;
    white-space: nowrap;
}

.dash-earnings-link:hover {
    color: #f97316;
}

/* ── Light Theme: Earnings ── */
[data-theme="light"] .dash-earnings-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(249, 115, 22, 0.08));
}

/* ── Module Cards Grid ── */
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 0 24px;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: dash-fade-up 0.4s ease-out both;
}

.module-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--module-color, var(--accent));
    opacity: 0.5;
    transition: opacity 0.25s, width 0.25s;
}

.module-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.module-card:hover::before {
    opacity: 1;
    width: 4px;
}

[data-theme="light"] .module-card:hover {
    box-shadow: 0 6px 24px rgba(0, 20, 50, 0.08);
}

.module-card:active {
    transform: scale(0.98);
}

/* Stagger animation for module cards */
.module-card:nth-child(1) { animation-delay: 0.02s; }
.module-card:nth-child(2) { animation-delay: 0.04s; }
.module-card:nth-child(3) { animation-delay: 0.06s; }
.module-card:nth-child(4) { animation-delay: 0.08s; }
.module-card:nth-child(5) { animation-delay: 0.10s; }
.module-card:nth-child(6) { animation-delay: 0.12s; }
.module-card:nth-child(7) { animation-delay: 0.14s; }
.module-card:nth-child(8) { animation-delay: 0.16s; }
.module-card:nth-child(9) { animation-delay: 0.18s; }
.module-card:nth-child(10) { animation-delay: 0.20s; }
.module-card:nth-child(11) { animation-delay: 0.22s; }
.module-card:nth-child(12) { animation-delay: 0.24s; }
.module-card:nth-child(13) { animation-delay: 0.26s; }
.module-card:nth-child(14) { animation-delay: 0.28s; }
.module-card:nth-child(15) { animation-delay: 0.30s; }

.module-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--module-color, var(--accent)) 20%, transparent), color-mix(in srgb, var(--module-color, var(--accent)) 8%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--module-color, var(--accent)) 25%, transparent);
    transition: transform 0.2s ease;
}

.module-card:hover .module-card-icon {
    transform: scale(1.08);
}

.module-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.module-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.module-card-desc {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
    line-height: 1.3;
}

[data-theme="light"] .module-card-badge {
    background: rgba(0, 20, 50, 0.04);
}

.module-card-cta {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1;
}

.module-card-cta:hover {
    background: var(--module-color, var(--accent));
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

[data-theme="light"] .module-card-cta {
    background: rgba(0, 20, 50, 0.04);
}

[data-theme="light"] .module-card-cta:hover {
    background: var(--module-color, var(--accent));
    color: white;
}

/* ── Module Grid Responsive ── */
@media (max-width: 768px) {
    .profile-hero-content {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas: 
            "avatar info"
            "credits credits"
            "actions actions";
        padding: 20px 16px 12px;
        gap: 16px 14px;
        text-align: left;
        align-items: center;
    }
    .profile-hero-avatar-wrap {
        grid-area: avatar;
        margin: 0;
    }
    .profile-hero-avatar {
        width: 72px;
        height: 72px;
        border-width: 2px;
    }
    .profile-hero-info {
        grid-area: info;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }
    .profile-hero-name {
        font-size: 1.25rem;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }
    .profile-hero-role {
        font-size: 0.85rem;
        margin-bottom: 4px;
        opacity: 0.9;
    }
    .profile-hero-tagline {
        max-width: 100%;
        margin: 0;
        font-size: 0.8rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4;
    }
    .profile-hero-credits {
        grid-area: credits;
        width: 100%;
        justify-content: space-between;
        background: var(--bg-glass);
        border: 1px solid var(--border);
        padding: 12px 20px;
        margin: 0;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    .profile-hero-actions {
        grid-area: actions;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .profile-hero-actions::-webkit-scrollbar {
        display: none;
    }
    .profile-hero-actions .action-icon-btn {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
    }
    .vis-bar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .visibility-toggle-group {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .vis-bar-btns {
        justify-content: center;
        width: 100%;
        margin-top: 4px;
    }
    .vis-bar-separator {
        display: none;
    }
    .vis-details-inline {
        flex-basis: 100%;
        order: 10;
    }
    .vis-details-body {
        position: static;
        transform: none;
        min-width: 0;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
        border: 1px solid var(--border);
        animation: none;
    }
    .vis-details-columns {
        grid-template-columns: 1fr;
    }
    .vis-toggles-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .module-card {
        padding: 10px 12px;
    }
    .module-card-desc {
        display: none;
    }
    .dash-earnings-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .dash-earnings-link {
        margin-left: 0;
    }
}

@media (max-width: 400px) {
    .module-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .module-card-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-secondary);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius);
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.empty-state .icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.8;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 24px;
    font-weight: 500;
}

/* ── Gallery ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.gallery-item {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0) 50%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.gallery-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(234, 83, 50, 0.15);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: all 0.25s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-delete-btn:hover {
    background: rgba(239, 68, 68, 1);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

.gallery-profile-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(234, 83, 50, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: all 0.25s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-profile-btn:hover {
    background: rgba(234, 83, 50, 1);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(234, 83, 50, 0.5);
}

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 11, 16, 0.92);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease;
}

.lightbox-overlay.active .lightbox-content img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
    backdrop-filter: blur(8px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
    backdrop-filter: blur(8px);
}

.lightbox-nav:hover {
    background: rgba(234, 83, 50, 0.35);
    border-color: var(--accent-light);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.1em;
    z-index: 10001;
}

/* ── Image Viewer (card modal with social sharing) ── */
.img-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.img-viewer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.img-viewer-card {
    background: #1c1e2a;
    border-radius: 20px;
    width: 520px;
    max-width: 94vw;
    padding: 24px 28px 28px;
    position: relative;
    transform: scale(0.93) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.img-viewer-overlay.active .img-viewer-card {
    transform: scale(1) translateY(0);
}
.img-viewer-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.img-viewer-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.img-viewer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.img-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}
.img-viewer-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}
.img-viewer-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    margin-bottom: 24px;
}
.img-viewer-body img {
    max-width: 100%;
    max-height: 52vh;
    border-radius: 14px;
    object-fit: contain;
    display: block;
}
.img-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}
.img-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.24);
}
.img-viewer-prev { left: -14px; }
.img-viewer-next { right: -14px; }
.img-viewer-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.img-viewer-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.img-viewer-action span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}
.img-viewer-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.img-viewer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

/* ── Collapsible Form Sections ── */
.form-section {
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-section.collapsed .form-group,
.form-section.collapsed .form-row,
.form-section.collapsed .label-with-ai {
    display: none;
}

.form-section.collapsed {
    padding-bottom: 0;
}

.section-chevron {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    display: inline-block;
}

.form-section.collapsed .section-chevron {
    transform: rotate(-90deg);
}

.form-section .section-title {
    user-select: none;
}

/* ── Collapsible View Sections (Personal Data) ── */
.section.collapsible .section-title {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.section.collapsible .section-title .section-chevron {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    display: inline-block;
}

.section.collapsible.collapsed .section-title .section-chevron {
    transform: rotate(-90deg);
}

.section.collapsible.collapsed .section-body {
    display: none;
}

.section.collapsible.collapsed {
    padding-bottom: 0;
}

/* ── Detail Actions Wrap ── */
.detail-actions {
    flex-wrap: wrap;
}

/* ── Mobile Menu Overlay (hidden on desktop) ── */
.mobile-menu-overlay {
    display: none;
}

/* ── Bottom Tab Bar (hidden on desktop) ── */
.fb-bottom-tabs {
    display: none;
}

.fb-more-overlay {
    display: none;
}

.fb-create-popup {
    display: none;
}

/* ── Responsive ── */
/* ── Hamburger Toggle (hidden on desktop) ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 11, 16, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 4px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 14px;
        width: 100%;
    }

    /* Hide desktop nav-links on mobile for guests when overlay is used */
    body:has(.mobile-menu-overlay) .nav-links {
        display: none !important;
    }

    /* ══════════════════════════════════════════
       Guest Mobile Menu — Bottom Sheet
       ══════════════════════════════════════════ */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-menu-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-inner {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        background: var(--bg-primary);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .mobile-menu-overlay.open .mobile-menu-inner {
        transform: translateY(0);
    }

    /* ── Header ── */
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px 12px;
        position: relative;
    }

    .mobile-menu-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 4px;
    }

    .mobile-menu-logo {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.01em;
    }

    .mobile-menu-close {
        width: 36px;
        height: 36px;
        border: none;
        background: var(--bg-secondary);
        border-radius: 50%;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .mobile-menu-close:hover {
        background: rgba(234, 83, 50, 0.12);
        color: var(--accent);
    }

    /* ── Shortcuts Grid (Facebook-style) ── */
    .mobile-menu-nav {
        flex: 1;
        padding: 8px 16px;
    }

    .mobile-shortcuts-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mobile-shortcut-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 20px 12px;
        border-radius: 14px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        text-decoration: none;
        color: inherit;
        transition: all 0.2s ease;
        /* Stagger animation */
        opacity: 0;
        transform: translateY(16px);
    }

    .mobile-menu-overlay.open .mobile-shortcut-item {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-menu-overlay.open .mobile-shortcut-item:nth-child(1) { transition: opacity 0.35s ease 0.08s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.08s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
    .mobile-menu-overlay.open .mobile-shortcut-item:nth-child(2) { transition: opacity 0.35s ease 0.12s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.12s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
    .mobile-menu-overlay.open .mobile-shortcut-item:nth-child(3) { transition: opacity 0.35s ease 0.16s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.16s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
    .mobile-menu-overlay.open .mobile-shortcut-item:nth-child(4) { transition: opacity 0.35s ease 0.20s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.20s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
    .mobile-menu-overlay.open .mobile-shortcut-item:nth-child(5) { transition: opacity 0.35s ease 0.24s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.24s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
    .mobile-menu-overlay.open .mobile-shortcut-item:nth-child(6) { transition: opacity 0.35s ease 0.28s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.28s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }

    .mobile-shortcut-item:active {
        transform: scale(0.97) !important;
        background: var(--bg-card-hover);
        border-color: var(--accent);
        box-shadow: 0 0 0 1px rgba(234, 83, 50, 0.15);
    }

    .mobile-shortcut-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(234, 83, 50, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
    }

    .mobile-shortcut-label {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--text-primary);
        text-align: center;
        line-height: 1.2;
    }

    /* ── Footer CTA ── */
    .mobile-menu-footer {
        padding: 16px 20px 28px;
        border-top: 1px solid var(--border);
        opacity: 0;
        transform: translateY(12px);
    }

    .mobile-menu-overlay.open .mobile-menu-footer {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.35s ease 0.34s, transform 0.35s cubic-bezier(0.32,0.72,0,1) 0.34s;
    }

    .mobile-menu-cta {
        display: block;
        width: 100%;
        padding: 14px 0;
        text-align: center;
        font-size: 1rem;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(135deg, #EA5332, #FF6D4A);
        border-radius: 12px;
        text-decoration: none;
        letter-spacing: 0.01em;
        box-shadow: 0 4px 16px rgba(234, 83, 50, 0.25);
        transition: all 0.25s ease;
    }

    .mobile-menu-cta:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(234, 83, 50, 0.35);
    }

    .mobile-menu-trust {
        text-align: center;
        font-size: 0.73rem;
        color: var(--text-muted);
        margin: 10px 0 0;
        font-weight: 500;
    }

    /* ══════════════════════════════════════════
       Logged-In Bottom Tab Bar (Facebook-style)
       ══════════════════════════════════════════ */
    .fb-bottom-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9990;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--bg-primary);
        border-top: 1px solid var(--border);
        align-items: center;
        justify-content: space-around;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    }

    .fb-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        gap: 2px;
        padding: 6px 0;
        text-decoration: none;
        color: var(--text-secondary);
        border: none;
        background: none;
        cursor: pointer;
        transition: color 0.15s;
        position: relative;
        font-family: inherit;
        -webkit-tap-highlight-color: transparent;
    }

    .fb-tab:active {
        opacity: 0.7;
    }

    .fb-tab.active {
        color: var(--accent);
    }

    .fb-tab.active svg {
        stroke: var(--accent);
    }

    .fb-tab.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 2.5px;
        background: var(--accent);
        border-radius: 0 0 3px 3px;
    }

    .fb-tab-label {
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

    /* Create button — accent circle */
    .fb-tab-create-icon {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: linear-gradient(135deg, #EA5332, #FF6D4A);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(234, 83, 50, 0.3);
        margin-top: -6px;
    }

    .fb-tab-create .fb-tab-label {
        margin-top: 0;
    }

    /* ── Create Popup ── */
    .fb-create-popup {
        display: none;
        position: fixed;
        bottom: calc(60px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%) scale(0.9);
        z-index: 9992;
        background: var(--bg-primary);
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
        padding: 8px;
        flex-direction: column;
        gap: 4px;
        min-width: 180px;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .fb-create-popup.open {
        display: flex;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }

    .fb-create-option {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 12px;
        text-decoration: none;
        color: var(--text-primary);
        font-size: 0.92rem;
        font-weight: 600;
        transition: background 0.15s;
    }

    .fb-create-option:active {
        background: var(--bg-secondary);
    }

    .fb-create-option-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        flex-shrink: 0;
    }

    /* Offset main content so it doesn't hide behind bottom tabs */
    body:has(.fb-bottom-tabs) main.container {
        padding-bottom: 70px;
    }

    body:has(.fb-bottom-tabs) .site-footer {
        padding-bottom: 70px;
    }

    /* ══════════════════════════════════════════
       More Sheet (slides up from bottom)
       ══════════════════════════════════════════ */
    .fb-more-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9995;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .fb-more-overlay.open {
        display: block;
        opacity: 1;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .fb-more-sheet {
        position: absolute;
        bottom: calc(56px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        max-height: 70vh;
        background: var(--bg-primary);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        padding-bottom: 8px;
    }

    .fb-more-overlay.open .fb-more-sheet {
        transform: translateY(0);
    }

    .fb-more-handle {
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 4px;
        margin: 10px auto 4px;
    }

    /* User row */
    .fb-more-user-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px 14px;
    }

    .fb-more-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .fb-more-avatar-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--accent), #FF6D4A);
        color: #fff;
        font-weight: 700;
        font-size: 1rem;
    }

    .fb-more-user-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: hidden;
    }

    .fb-more-user-name {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fb-more-user-email {
        font-size: 0.78rem;
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fb-more-divider {
        height: 1px;
        background: var(--border);
        margin: 4px 16px;
    }

    /* Shortcuts grid inside More sheet */
    .fb-more-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 12px 16px;
    }

    .fb-more-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 16px 8px;
        border-radius: 12px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        text-decoration: none;
        color: var(--text-primary);
        font-size: 0.82rem;
        font-weight: 600;
        transition: all 0.2s ease;
    }

    .fb-more-item:active {
        transform: scale(0.97);
        border-color: var(--accent);
    }

    .fb-more-item-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(234, 83, 50, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
    }

    /* List items */
    .fb-more-list {
        padding: 4px 16px 8px;
    }

    .fb-more-list-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 12px;
        border-radius: 10px;
        text-decoration: none;
        color: var(--text-primary);
        font-size: 0.92rem;
        font-weight: 500;
        border: none;
        background: none;
        width: 100%;
        cursor: pointer;
        font-family: inherit;
        transition: background 0.15s;
    }

    .fb-more-list-item:active {
        background: var(--bg-secondary);
    }

    .fb-more-list-icon {
        font-size: 1.1rem;
        width: 24px;
        text-align: center;
    }

    .fb-more-logout {
        color: var(--danger);
    }

    /* Override base .theme-toggle pill dimensions when used as a list item */
    .fb-more-list-item.theme-toggle {
        width: 100%;
        height: auto;
        border-radius: 10px;
        background: none;
        border: none;
        padding: 14px 12px;
    }

    .fb-more-list-item.theme-toggle:hover {
        background: var(--bg-secondary);
        border: none;
    }

    .fb-more-list-item .theme-toggle-thumb {
        width: auto;
        height: auto;
        border-radius: 0;
        background: none;
        box-shadow: none;
        transform: none;
        font-size: 1.1rem;
    }

    [data-theme="light"] .fb-more-list-item .theme-toggle-thumb {
        transform: none;
    }

    /* Body scroll lock */
    body.menu-open,
    body.more-open {
        overflow: hidden;
    }

    .nav-divider {
        display: none !important;
    }

    .navbar .container {
        position: relative;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        text-align: center;
    }

    .detail-actions {
        margin-left: 0;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ══════════════════════════════════════════════════
   HOME PAGE — Landing / Marketing
   ══════════════════════════════════════════════════ */

/* ── Scroll Reveal Animation ── */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-section,
.home-cta {
    animation: fade-in-up 0.7s ease-out both;
}

/* ── Hero ── */
.home-hero {
    position: relative;
    padding: 64px 24px 48px;
    text-align: center;
    overflow: hidden;
    margin: -24px -24px 0;
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(234, 83, 50, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(234, 83, 50, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 109, 74, 0.06) 0%, transparent 70%);
    animation: hero-shift 12s ease-in-out infinite alternate;
    z-index: 0;
}

.home-hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

@keyframes hero-shift {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes particle-float {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0.8;
    }
}

.home-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.home-hero-badge {
    display: inline-block;
    padding: 7px 20px;
    background: rgba(234, 83, 50, 0.08);
    border: 1px solid rgba(234, 83, 50, 0.20);
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 18px;
    letter-spacing: 0.03em;
    animation: fade-in-up 0.5s ease-out 0.1s both;
}

.home-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.12;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: -0.035em;
    animation: fade-in-up 0.6s ease-out 0.2s both;
}

.home-gradient-text {
    background: linear-gradient(135deg, #EF4444, #EA5332, #F97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-hero-sub {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.7;
    animation: fade-in-up 0.6s ease-out 0.3s both;
}

.home-hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    animation: fade-in-up 0.6s ease-out 0.4s both;
}

.btn-lg {
    padding: 12px 26px;
    font-size: 0.95rem;
    border-radius: 12px;
}

.home-hero-note {
    margin-top: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
    animation: fade-in-up 0.5s ease-out 0.5s both;
}

/* ── Dashboard Mockup Reveal ── */
.home-hero-mockup-wrapper {
    margin-top: 32px;
    margin-bottom: 24px;
    perspective: 1000px;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
    position: relative;
    z-index: 5;
}

.home-hero-mockup {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(234, 83, 50, 0.2);
    transform: rotateX(5deg) scale(0.98);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    will-change: transform, box-shadow;
}

.home-hero-mockup:hover {
    transform: rotateX(0deg) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(234, 83, 50, 0.4);
}

/* ── Product Demo Video Wrapper ── */
.home-video-wrapper {
    margin: 40px auto 24px;
    max-width: 800px;
    width: 100%;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
    position: relative;
    z-index: 5;
    background: rgba(18, 20, 29, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(234, 83, 50, 0.15);
}

.home-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.home-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Stats Bar (Glassmorphism) ── */
.home-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding: 14px 32px;
    background: rgba(18, 20, 29, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(234, 83, 50, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fade-in-up 0.7s ease-out 0.6s both;
}

.home-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.home-stat-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.home-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.home-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ── Shared section ── */
.home-section {
    padding: 48px 0;
}

.home-section-alt {
    background: var(--bg-secondary);
    margin: 0 -24px;
    padding: 48px 24px;
    border-radius: 0;
    border-top: 1px solid rgba(136, 146, 176, 0.06);
    border-bottom: 1px solid rgba(136, 146, 176, 0.06);
}

.home-section-header {
    text-align: center;
    margin-bottom: 32px;
}

.home-section-header h2 {
    font-size: 1.7rem;
    font-weight: 700;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.home-section-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Integrations Pills ── */
.home-integrations-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}

.home-integration-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.home-integration-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(234, 83, 50, 0.1);
}

.home-integration-hidden {
    display: none;
}

.home-integration-hidden.home-integration-revealed {
    display: inline-flex;
}

/* ── Features ── */
.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.home-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.home-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: var(--transition);
}

.home-feature-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(234, 83, 50, 0.15);
    border-color: var(--border-hover);
}

.home-feature-card:hover::before {
    opacity: 1;
}

.home-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 14px;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.home-feature-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.home-feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

a.home-feature-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.home-feature-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 0.7;
    transition: var(--transition);
}

.home-feature-card:hover .home-feature-link {
    opacity: 1;
}

/* ── Steps ── */
.home-steps {
    display: flex;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 0;
    position: relative;
    padding-top: 20px;
}

.home-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpStep 0.6s ease forwards;
}

.home-step:nth-child(1) { animation-delay: 0.2s; }
.home-step:nth-child(2) { animation-delay: 0.5s; }
.home-step:nth-child(3) { animation-delay: 0.8s; }

.home-step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.home-step:hover .home-step-number {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.1);
}

.home-step-line {
    position: absolute;
    top: 24px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.home-step:last-child .home-step-line {
    display: none;
}

.home-step:hover + .home-step .home-step-line,
.home-step:hover .home-step-line {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    box-shadow: 0 0 10px var(--accent-glow);
}

.home-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.home-step:hover h3 {
    color: var(--accent-light);
}

.home-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@keyframes fadeInUpStep {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hub Showcase ── */
.home-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.home-hub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: var(--transition);
}

.home-hub-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(234, 83, 50, 0.1);
    border-color: var(--border-hover);
}

.home-hub-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.home-hub-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.home-hub-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ── Showcase (Your Agents Come Alive) ── */
.home-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
}

.home-showcase-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.home-showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #EA5332, #ec4899);
    opacity: 0;
    transition: var(--transition);
}

.home-showcase-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(234, 83, 50, 0.2);
    border-color: var(--border-hover);
    z-index: 2;
}

.home-showcase-card:hover::before {
    opacity: 1;
}

.home-showcase-icon {
    font-size: 2rem;
    margin-bottom: 14px;
    display: block;
}

.home-showcase-image-wrap {
    margin: -24px -20px 24px;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
    background: #000;
}

.home-showcase-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-showcase-card:hover .home-showcase-image {
    transform: scale(1.08);
}

.showcase-chat-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-showcase-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.home-showcase-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 18px;
}

.home-showcase-tag {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(234, 83, 50, 0.08);
    border: 1px solid rgba(234, 83, 50, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .home-showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Use Case Category Filter ── */
.home-category-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 auto 32px;
    max-width: 900px;
}

.home-filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.home-filter-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.home-filter-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── Use Case Grid ── */
.home-usecase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.home-usecase-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.home-usecase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.home-usecase-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--border-hover);
}

.home-usecase-card:hover::before {
    opacity: 1;
}

.home-usecase-hidden {
    display: none;
}

.home-usecase-hidden.home-usecase-revealed {
    display: block;
    animation: fadeInUpStep 0.45s ease-out forwards;
}

.home-usecase-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: block;
}

.home-usecase-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.home-usecase-card>p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 16px;
}

.home-usecase-example {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

.home-usecase-label {
    font-style: normal;
    font-weight: 600;
    color: var(--card-accent, var(--accent));
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.home-usecase-cta {
    text-align: center;
    margin-top: 48px;
}

.home-usecase-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.home-list-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.home-list-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.home-list-expand-btn:hover {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
    transform: translateY(-2px);
}

.home-list-expand-btn .expand-arrow {
    transition: transform 0.25s ease;
}

.home-list-expand-btn.expanded .expand-arrow {
    transform: rotate(180deg);
}

.home-list-link {
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.home-list-link:hover {
    color: var(--accent-light);
}

@media (max-width: 768px) {
    .home-usecase-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Developer Cards ── */
.home-dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.home-dev-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
}

.home-dev-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    border-color: var(--border-hover);
}

.home-dev-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: block;
}

.home-dev-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.home-dev-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.home-dev-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: var(--transition);
}

.home-dev-link:hover {
    color: var(--accent-light);
}

/* ── Final CTA ── */
.home-cta {
    padding: 56px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.home-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.07), rgba(234, 83, 50, 0.06), rgba(255, 109, 74, 0.04));
    z-index: 0;
    animation: hero-shift 14s ease-in-out infinite alternate;
}

.home-cta-content {
    position: relative;
    z-index: 1;
}

.home-cta h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.home-cta p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ── Home Responsive ── */
@media (max-width: 768px) {
    .home-hero {
        padding: 64px 16px 56px;
    }

    .home-hero-title {
        font-size: 2.2rem;
    }

    .home-hero-sub {
        font-size: 1rem;
    }

    .home-stats-bar {
        flex-direction: column;
        gap: 16px;
        padding: 20px 28px;
    }

    .home-stat-divider {
        width: 48px;
        height: 1px;
    }

    .home-steps {
        flex-direction: column;
        gap: 32px;
        padding-top: 0;
    }

    .home-step {
        transform: translateY(15px);
    }

    .home-step-line {
        display: none;
    }

    .home-features-grid {
        grid-template-columns: 1fr;
    }

    .home-hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-dev-grid {
        grid-template-columns: 1fr;
    }

    .home-integrations-grid {
        gap: 8px;
    }

    .home-integration-pill {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .home-section-header h2 {
        font-size: 1.6rem;
    }

    .home-cta h2 {
        font-size: 1.6rem;
    }
}

/* ── Home Extra-Small (iPhone SE / mini ≤480px) ── */
@media (max-width: 480px) {
    .home-hero {
        padding: 40px 8px 36px;
    }

    .home-hero-title {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    .home-hero-sub {
        font-size: 0.88rem;
        line-height: 1.5;
        padding: 0 4px;
    }

    .home-hero-badge {
        font-size: 0.76rem;
        padding: 5px 14px;
    }

    .home-hero-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .home-hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .home-hero-note {
        font-size: 0.72rem;
    }

    .home-stats-bar {
        padding: 14px 16px;
        gap: 10px;
    }

    .home-stat-number {
        font-size: 1.3rem;
    }

    .home-stat-label {
        font-size: 0.7rem;
    }

    /* Sections */
    .home-section {
        padding: 36px 0;
    }

    .home-section-alt {
        padding: 36px 0;
    }

    .home-section-header h2 {
        font-size: 1.3rem;
    }

    .home-section-header p {
        font-size: 0.85rem;
        padding: 0 4px;
    }

    /* Feature Cards */
    .home-feature-card {
        padding: 20px 16px;
    }

    .home-feature-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-radius: 10px;
        margin-bottom: 14px;
    }

    .home-feature-card h3 {
        font-size: 0.95rem;
    }

    .home-feature-card p {
        font-size: 0.82rem;
    }

    .home-feature-link {
        font-size: 0.8rem;
    }

    /* Hub Grid (2→1 col) */
    .home-hub-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .home-hub-card {
        padding: 12px 14px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .home-hub-icon {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .home-hub-card h4 {
        font-size: 0.88rem;
        margin-bottom: 2px;
    }

    .home-hub-card p {
        font-size: 0.75rem;
    }

    /* Showcase */
    .home-showcase-card {
        padding: 22px 16px;
    }

    .home-showcase-icon {
        font-size: 1.8rem;
    }

    .home-showcase-card h3 {
        font-size: 1rem;
    }

    .home-showcase-card p {
        font-size: 0.82rem;
    }

    .home-showcase-tag {
        font-size: 0.7rem;
    }

    /* Steps */
    .home-step {
        padding: 18px 14px;
    }

    .home-step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .home-step h3 {
        font-size: 1rem;
    }

    .home-step p {
        font-size: 0.82rem;
    }

    /* Use Cases */
    .home-usecase-card {
        padding: 22px 16px;
    }

    .home-usecase-icon {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .home-usecase-card h3 {
        font-size: 1rem;
    }

    .home-usecase-card>p {
        font-size: 0.82rem;
    }

    .home-usecase-example {
        padding: 10px 12px;
        font-size: 0.78rem;
    }

    .home-usecase-label {
        font-size: 0.68rem;
    }

    .home-usecase-cta p {
        font-size: 0.9rem;
    }

    .home-list-actions {
        flex-direction: column;
        gap: 10px;
    }

    .home-list-expand-btn,
    .home-list-link {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        text-align: center;
    }

    /* Integrations */
    .home-integrations-grid {
        gap: 6px;
    }

    .home-integration-pill {
        padding: 4px 10px;
        font-size: 0.72rem;
    }

    /* Developer Cards */
    .home-dev-card {
        padding: 22px 16px;
    }

    .home-dev-icon {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .home-dev-card h4 {
        font-size: 0.95rem;
    }

    .home-dev-card p {
        font-size: 0.82rem;
    }

    /* CTA */
    .home-cta {
        padding: 48px 12px;
    }

    .home-cta h2 {
        font-size: 1.35rem;
    }

    .home-cta p {
        font-size: 0.88rem;
    }
}

/* ══════════════════════════════════════════════════
   USE-CASE LANDING PAGES
   ══════════════════════════════════════════════════ */

.usecase-lp {
    width: 100%;
}

/* ── Use-Case Hero ── */
.usecase-hero {
    position: relative;
    padding: 64px 24px 48px;
    text-align: center;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.usecase-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    z-index: 0;
}

.usecase-hero-particles {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.usecase-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.usecase-hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

.usecase-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.03em;
}

.usecase-hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 32px;
}

.usecase-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.usecase-hero-note {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── Use-Case Sections ── */
.usecase-section {
    padding: 48px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.usecase-section-alt {
    background: var(--bg-secondary);
    max-width: 100%;
    padding: 48px 24px;
}

.usecase-section-alt>.usecase-section-header,
.usecase-section-alt>.usecase-benefits-grid,
.usecase-section-alt>.usecase-example-card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.usecase-section-header {
    text-align: center;
    margin-bottom: 32px;
}

.usecase-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.usecase-section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Pain Points ── */
.usecase-pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.usecase-pain-card {
    background: var(--bg-card);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius);
    padding: 22px 20px;
    position: relative;
    transition: var(--transition);
}

.usecase-pain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: var(--radius) var(--radius) 0 0;
    opacity: 0.6;
}

.usecase-pain-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.usecase-pain-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.usecase-pain-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.usecase-pain-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Benefits Grid ── */
.usecase-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.usecase-benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.usecase-benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #EA5332);
    opacity: 0;
    transition: var(--transition);
}

.usecase-benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border-color: var(--border-hover);
}

.usecase-benefit-card:hover::before {
    opacity: 1;
}

.usecase-benefit-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.usecase-benefit-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.usecase-benefit-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* ── User Journey Steps ── */
.usecase-journey-steps {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.usecase-journey-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
    padding-bottom: 36px;
}

.usecase-journey-num {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px var(--accent-glow);
    position: relative;
    z-index: 2;
}

.usecase-journey-line {
    position: absolute;
    left: 25px;
    top: 52px;
    width: 2px;
    bottom: 0;
    background: linear-gradient(180deg, var(--accent), rgba(234, 83, 50, 0.1));
    z-index: 1;
}

.usecase-journey-body {
    flex: 1;
    padding-top: 6px;
}

.usecase-journey-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.usecase-journey-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* ── Example Agent Card ── */
.usecase-example-card {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    gap: 28px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px;
    transition: var(--transition);
}

.usecase-example-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border-color: var(--border-hover);
}

.usecase-example-icon {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: white;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.usecase-example-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.usecase-example-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

/* ── Use-Case CTA ── */
.usecase-cta {
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.usecase-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.07), rgba(234, 83, 50, 0.06), rgba(255, 109, 74, 0.04));
    z-index: 0;
    animation: hero-shift 14s ease-in-out infinite alternate;
}

.usecase-cta-content {
    position: relative;
    z-index: 1;
}

.usecase-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.usecase-cta p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.usecase-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Use-Case Cross Nav ── */
.usecase-nav {
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding: 40px 24px 60px;
}

.usecase-nav h4 {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.usecase-nav-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.usecase-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.usecase-nav-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
}

.usecase-nav-link.active {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.1);
    color: var(--accent);
    font-weight: 600;
}

.usecase-nav-icon {
    font-size: 1rem;
}

/* ── Use-Case Responsive ── */
@media (max-width: 768px) {
    .usecase-hero {
        padding: 64px 16px 56px;
        min-height: auto;
    }

    .usecase-hero-title {
        font-size: 2rem;
    }

    .usecase-hero-sub {
        font-size: 1rem;
    }

    .usecase-section {
        padding: 48px 16px;
    }

    .usecase-section-alt {
        padding: 48px 16px;
    }

    .usecase-section-header h2 {
        font-size: 1.5rem;
    }

    .usecase-pain-grid,
    .usecase-benefits-grid {
        grid-template-columns: 1fr;
    }

    .usecase-example-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .usecase-journey-step {
        gap: 16px;
    }

    .usecase-journey-num {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1rem;
    }

    .usecase-journey-line {
        left: 20px;
        top: 42px;
    }

    .usecase-nav-grid {
        gap: 8px;
    }

    .usecase-nav-link {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    .usecase-cta h2 {
        font-size: 1.5rem;
    }
}

/* ══════════════════════════════════════════════════
   COMPARISON LANDING PAGES
   ══════════════════════════════════════════════════ */

.compare-lp {
    width: 100%;
}

/* ── Compare Hero ── */
.compare-hero {
    position: relative;
    padding: 64px 24px 48px;
    text-align: center;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    z-index: 0;
}

.compare-hero-particles {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.compare-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.compare-hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

.compare-hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.03em;
}

.compare-hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 32px;
}

.compare-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.compare-hero-note {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── Compare Sections ── */
.compare-section {
    padding: 48px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.compare-section-alt {
    background: var(--bg-secondary);
    max-width: 100%;
    padding: 48px 24px;
}

.compare-section-alt > .compare-section-header,
.compare-section-alt > .compare-table-wrapper,
.compare-section-alt > .compare-migration-steps {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.compare-section-header {
    text-align: center;
    margin-bottom: 32px;
}

.compare-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.compare-section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Side-by-Side Identity ── */
.compare-identity-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}

.compare-identity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.compare-identity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: var(--transition);
}

.compare-identity-us::before {
    background: linear-gradient(90deg, #EA5332, #FF6D4A);
}

.compare-identity-them::before {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

.compare-identity-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border-color: var(--border-hover);
}

.compare-identity-logo {
    font-size: 3rem;
    margin-bottom: 16px;
}

.compare-identity-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.compare-identity-badge-us {
    background: rgba(234, 83, 50, 0.12);
    color: var(--accent);
}

.compare-identity-badge-them {
    background: rgba(107, 114, 128, 0.12);
    color: var(--text-muted);
}

.compare-identity-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.compare-identity-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 18px;
}

.compare-identity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.compare-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.compare-tag-us {
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent-light);
    border: 1px solid rgba(234, 83, 50, 0.15);
}

.compare-tag-them {
    background: rgba(107, 114, 128, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(107, 114, 128, 0.12);
}

.compare-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-vs-divider span {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #EA5332);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50%;
    box-shadow: 0 6px 24px var(--accent-glow);
    letter-spacing: 0.04em;
}

/* ── Feature Comparison Table ── */
.compare-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.compare-table thead tr {
    background: rgba(234, 83, 50, 0.04);
}

.compare-table th {
    padding: 18px 20px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}

.compare-th-feature {
    width: 28%;
}

.compare-th-us,
.compare-th-them {
    width: 36%;
}

.compare-th-us {
    color: var(--accent) !important;
}

.compare-th-them {
    color: var(--text-muted) !important;
}

.compare-row td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.compare-row:last-child td {
    border-bottom: none;
}

.compare-row:hover td {
    background: rgba(234, 83, 50, 0.02);
}

.compare-cell-feature strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.compare-cell-check {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.compare-cell-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.compare-cell-us .compare-cell-desc {
    color: var(--text-secondary);
}

.compare-cell-them .compare-cell-desc {
    color: var(--text-muted);
}

/* ── Unique Advantages ── */
.compare-advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.compare-advantage-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.compare-advantage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #EA5332);
    opacity: 0;
    transition: var(--transition);
}

.compare-advantage-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    border-color: var(--border-hover);
}

.compare-advantage-card:hover::before {
    opacity: 1;
}

.compare-advantage-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.compare-advantage-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.compare-advantage-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* ── Migration Steps ── */
.compare-migration-steps {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.compare-migration-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
    padding-bottom: 36px;
}

.compare-migration-num {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px var(--accent-glow);
    position: relative;
    z-index: 2;
}

.compare-migration-line {
    position: absolute;
    left: 25px;
    top: 52px;
    width: 2px;
    bottom: 0;
    background: linear-gradient(180deg, var(--accent), rgba(234, 83, 50, 0.1));
    z-index: 1;
}

.compare-migration-body {
    flex: 1;
    padding-top: 6px;
}

.compare-migration-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.compare-migration-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* ── Compare CTA ── */
.compare-cta {
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.compare-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.07), rgba(234, 83, 50, 0.06), rgba(255, 109, 74, 0.04));
    z-index: 0;
    animation: hero-shift 14s ease-in-out infinite alternate;
}

.compare-cta-content {
    position: relative;
    z-index: 1;
}

.compare-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.compare-cta p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.compare-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Compare Responsive ── */
@media (max-width: 768px) {
    .compare-hero {
        padding: 64px 16px 56px;
        min-height: auto;
    }

    .compare-hero-title {
        font-size: 2rem;
    }

    .compare-hero-sub {
        font-size: 1rem;
    }

    .compare-section {
        padding: 48px 16px;
    }

    .compare-section-alt {
        padding: 48px 16px;
    }

    .compare-section-header h2 {
        font-size: 1.5rem;
    }

    .compare-identity-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .compare-vs-divider {
        justify-content: center;
    }

    .compare-vs-divider span {
        width: 44px;
        height: 44px;
        font-size: 0.85rem;
    }

    .compare-table th,
    .compare-row td {
        padding: 12px 14px;
    }

    .compare-table th {
        font-size: 0.82rem;
    }

    .compare-cell-feature strong {
        font-size: 0.85rem;
    }

    .compare-cell-desc {
        font-size: 0.78rem;
    }

    .compare-advantages-grid {
        grid-template-columns: 1fr;
    }

    .compare-migration-step {
        gap: 16px;
    }

    .compare-migration-num {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1rem;
    }

    .compare-migration-line {
        left: 20px;
        top: 42px;
    }

    .compare-cta h2 {
        font-size: 1.5rem;
    }
}

/* ══════════════════════════════════════════════════
   FEATURE DETAIL PAGES
   ══════════════════════════════════════════════════ */

.feature-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* ── Feature Hero ── */
.feature-hero {
    text-align: center;
    padding: 60px 0 48px;
}

.feature-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
    color: white;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.feature-hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.025em;
}

.feature-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Feature Sections ── */
.feature-section {
    padding: 48px 0;
}

.feature-section-alt {
    background: var(--bg-secondary);
    margin: 0 -24px;
    padding: 48px 24px;
    border-radius: var(--radius);
}

.feature-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-align: center;
}

.feature-section-copy {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
}

.feature-section-copy p {
    margin: -12px auto 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Capabilities Grid ── */
.feature-caps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.feature-cap-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    transition: var(--transition);
}

.feature-cap-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    border-color: var(--border-hover);
}

.feature-cap-icon {
    font-size: 1.6rem;
    margin-bottom: 12px;
    display: block;
}

.feature-cap-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-cap-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Feature Steps ── */
.feature-steps-list {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-step-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-step-num {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.feature-step-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feature-step-body p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Feature Deep-Dive Blocks ── */
.feature-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.feature-extra-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.feature-extra-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.feature-extra-icon {
    font-size: 1.45rem;
    margin-bottom: 12px;
    display: block;
}

.feature-extra-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-extra-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.feature-extra-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
}

.feature-pill-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.feature-pill:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
}

/* ── Feature CTA ── */
.feature-cta {
    text-align: center;
    padding: 56px 0 32px;
}

.feature-cta h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.feature-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Feature Nav ── */
.feature-nav {
    border-top: 1px solid var(--border);
    padding-top: 32px;
    margin-top: 16px;
}

.feature-nav h4 {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.feature-nav-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.feature-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.feature-nav-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
}

.feature-nav-link.active {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.1);
    color: var(--accent);
    font-weight: 600;
}

.feature-nav-icon {
    font-size: 1rem;
}

/* ── Feature Responsive ── */
@media (max-width: 768px) {
    .feature-hero-title {
        font-size: 1.8rem;
    }

    .feature-caps-grid {
        grid-template-columns: 1fr;
    }

    .feature-extra-grid {
        grid-template-columns: 1fr;
    }

    .feature-nav-grid {
        gap: 8px;
    }

    .feature-nav-link {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

/* ══════════════════════ Site Footer ══════════════════════ */
.site-footer {
    margin-top: 80px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 340px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-cta {
    display: inline-block;
    padding: 8px 22px;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 28px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.footer-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
    filter: brightness(1.08);
}

.footer-trust {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    opacity: 0.8;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.footer-col a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--accent);
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 960px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }
}

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

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ══════════════════════ Compliance Pages ══════════════════════ */
.compliance-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    padding: 48px 0 80px;
    align-items: start;
}

.compliance-sidebar {
    position: sticky;
    top: 90px;
}

.compliance-nav {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.compliance-nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.compliance-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 2px;
}

.compliance-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.compliance-nav-link.active {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.1), rgba(255, 109, 74, 0.08));
    color: var(--accent);
    font-weight: 600;
}

.compliance-nav-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Compliance Content */
.compliance-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 48px;
}

.compliance-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.compliance-icon {
    font-size: 2.5rem;
}

.compliance-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.compliance-effective {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.compliance-section {
    margin-bottom: 36px;
}

.compliance-section:last-child {
    margin-bottom: 0;
}

.compliance-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.compliance-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

.compliance-section p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.compliance-section ul,
.compliance-section ol {
    margin: 12px 0;
    padding-left: 24px;
}

.compliance-section li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 6px;
}

.compliance-section blockquote {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.compliance-section a {
    color: var(--accent);
    font-weight: 500;
}

.compliance-section a:hover {
    text-decoration: underline;
}

/* Compliance Table */
.compliance-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.88rem;
}

.compliance-table thead {
    background: var(--bg-secondary);
}

.compliance-table th {
    padding: 10px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compliance-table td {
    padding: 10px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.compliance-table tbody tr:hover {
    background: rgba(234, 83, 50, 0.03);
}

/* Contact Cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.contact-card p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .compliance-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 0 60px;
    }

    .compliance-sidebar {
        position: static;
    }

    .compliance-nav {
        display: flex;
        overflow-x: auto;
        gap: 4px;
        padding: 12px;
    }

    .compliance-nav-title {
        display: none;
    }

    .compliance-nav-link {
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .compliance-content {
        padding: 24px 20px;
    }

    .compliance-header h1 {
        font-size: 1.4rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════ Clone Modal ══════════════════════ */
.clone-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.clone-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    padding: 32px 36px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.25s ease;
}

.clone-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.clone-modal-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.15), rgba(234, 83, 50, 0.15));
}

.clone-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.clone-modal-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
}

.clone-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Delete Modal danger button ── */
.clone-modal-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.clone-modal-actions .btn-danger:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ══════════════════════ Card Context Menu ══════════════════════ */
.card-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.card:hover .card-menu,
.card-menu:focus-within {
    opacity: 1;
}

.card-menu-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: var(--transition);
}

.card-menu-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.card-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    min-width: 170px;
    overflow: hidden;
    z-index: 100;
}

.card-menu-dropdown.show {
    display: block;
}

.card-menu-dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.card-menu-dropdown button:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.card-menu-dropdown button.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Ensure card has position relative for the absolute menu */
.card {
    position: relative;
}

/* ══════════════════════════════════════════════════════════════ */
/* ── EXTRACTED COMPONENT STYLES (from inline template CSS) ──── */
/* ══════════════════════════════════════════════════════════════ */

/* ── EXTRACTED COMPONENT STYLES (from inline template CSS) ──── */

/* ══════════════════════════════════════════════════════════════ */

/* ── Shared Animations ── */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Run Detail ── */

.run-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.run-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.run-header-content {
    flex: 1;
}

.run-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.run-header-actions {
    display: flex;
    gap: 0.75rem;
}

.status-banner {
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
}

.status-banner.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.status-banner.failed {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.status-banner.running {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: pulse 2s ease-in-out infinite;
}

.status-banner.queued {
    background: linear-gradient(135deg, #64748b, #475569);
}

.status-icon {
    font-size: 1.5rem;
}

.status-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.status-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metadata-card {
    padding: 1.25rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.metadata-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metadata-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-agent {
    background: rgba(234, 83, 50, 0.2);
    color: #FF6D4A;
}

.badge-software {
    background: rgba(236, 72, 153, 0.2);
    color: #f9a8d4;
}

.badge-docker {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.badge-api {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.badge-workflow {
    background: rgba(234, 83, 50, 0.2);
    color: #FF6D4A;
}

.memory-indicators {
    display: flex;
    gap: 1rem;
}

.memory-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.memory-indicator.active {
    color: #22c55e;
}

.memory-indicator.inactive {
    color: var(--text-muted);
}

.output-section {
    margin-bottom: 2rem;
}

.section-card {
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-inline {
    background: var(--bg-card-hover);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #FF6D4A;
}

.collapsible {
    margin-top: 1rem;
}

.collapsible-header {
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.collapsible-header:hover {
    background: var(--bg-card-hover);
}

.collapsible-content {
    display: none;
    margin-top: 0.5rem;
}

.collapsible-content.open {
    display: block;
}

.exit-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.exit-code-badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.exit-code-badge.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.error-panel {
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #dc2626;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.error-panel h3 {
    margin: 0 0 1rem 0;
    color: #fca5a5;
    font-size: 1.25rem;
}

.error-panel pre {
    margin: 0;
    color: #fecaca;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.actions-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.json-viewer {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.json-viewer pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.json-key {
    color: #93c5fd;
}

.json-string {
    color: #86efac;
}

.json-number {
    color: #fbbf24;
}

.json-boolean {
    color: #f472b6;
}

.json-null {
    color: #94a3b8;
}

@media (max-width: 768px) {
    .visibility-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Knowledge ── */

.detail-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.detail-header .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detail-header-content {
    flex: 1;
}

.detail-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.detail-header .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.back-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
}

.hub-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), #667eea);
    color: white;
    flex-shrink: 0;
}

.stat-card:nth-child(2) .hub-card-icon {
    background: linear-gradient(135deg, #FF6D4A, #f5576c);
}

.stat-card:nth-child(3) .hub-card-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-card:nth-child(4) .hub-card-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabs-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.tab-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    position: relative;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    animation: slideIn 0.3s ease;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.knowledge-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.knowledge-table th,
.knowledge-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.knowledge-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.knowledge-table td {
    color: var(--text-primary);
}

.knowledge-table tbody tr:hover {
    background: var(--bg-primary);
}

.task-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid rgba(234, 83, 50, 0.4);
    border-radius: 14px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
}

.task-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left-color: rgba(234, 83, 50, 0.7);
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.03), transparent);
}

.task-card-header input[type="text"],
.task-card-header select {
    flex: 1;
}

.sub-row {
    display: grid;
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    animation: fadeIn 0.2s ease;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.add-sub-btn {
    background: none;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.add-sub-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.04);
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(156, 163, 175, 0.3);
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 1px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(18px);
}

.badge-success {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.badge-error {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.badge-pending {
    background: rgba(128, 128, 128, 0.2);
    color: #888;
}

.badge-url {
    background: rgba(74, 172, 254, 0.2);
    color: #4facfe;
}

.badge-rss {
    background: rgba(255, 109, 74, 0.2);
    color: #FF6D4A;
}

.badge-website {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.badge-webhook {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.headers-container {
    margin-top: 1rem;
}

.header-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.header-row input {
    flex: 1;
}

.routine-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

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

.routine-title {
    font-weight: 600;
    color: var(--text-primary);
}

.routine-details {
    display: grid;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cron-display {
    font-family: monospace;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.learn-container {
    max-width: 600px;
}

.learn-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.learn-result.success {
    border-color: #43e97b;
    background: rgba(67, 233, 123, 0.05);
}

.learn-result.error {
    border-color: #f5576c;
    background: rgba(245, 87, 108, 0.05);
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

to {
    transform: rotate(360deg);
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    max-width: 400px;
}

.toast.success {
    border-left: 4px solid #43e97b;
}

.toast.error {
    border-left: 4px solid #f5576c;
}

/* ── Task Cards ── */

/* ── Stats Row ── */

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-value.success {
    color: #4ade80;
}

/* ── Add Task Button ── */

.btn-add-task {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.08), rgba(var(--primary-rgb, 99, 102, 241), 0.04));
    border: 2px dashed var(--primary);
    border-radius: 12px;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-add-task:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.15), rgba(var(--primary-rgb, 99, 102, 241), 0.08));
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.btn-add-task-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

/* ── Task Card ── */

.task-card.expanded {
    border-color: var(--primary);
    box-shadow: 0 4px 24px rgba(var(--primary-rgb, 99, 102, 241), 0.08);
}

/* ── Drag & Drop ── */

.task-card.dragging {
    opacity: 0.4;
    border-style: dashed;
}

.task-card.drag-over {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 32px;
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.1rem;
    letter-spacing: 2px;
    opacity: 0.4;
    transition: opacity 0.2s, color 0.2s;
    flex-shrink: 0;
    user-select: none;
}

.drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

.drag-handle:active {
    cursor: grabbing;
}

.task-card.expanded .task-card-header {
    border-bottom-color: var(--border);
}

/* ── Redesigned Task Card Header Layout ── */

.task-header-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-header-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.toggle-labeled {
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
}

.task-prompt-preview {
    display: none;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 2px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-style: italic;
    opacity: 0.75;
}

.task-card:not(.expanded) .task-prompt-preview {
    display: block;
}

.task-card.expanded .task-prompt-preview {
    display: none !important;
}

.task-clone-btn {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.15);
    border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.4);
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(var(--primary-rgb, 99, 102, 241), 0.05);
}

.task-clone-btn:hover {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.25);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.task-edit-btn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 6px;
    color: #f59e0b;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.05);
}

.task-edit-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #d97706;
    color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.15);
}

.task-card.expanded .task-edit-btn {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.3);
    color: var(--text-secondary);
}

.task-card-header input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.task-card:not(.expanded) .task-card-header input {
    border-color: transparent;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 10px;
    letter-spacing: -0.01em;
}

.task-card:not(.expanded) .task-card-header input:hover {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.04);
    border-color: var(--border);
}

.task-card-header input:focus {
    border-color: var(--primary) !important;
    background: var(--bg-primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.1);
}

/* ── Task Badges (collapsed summary) ── */

.task-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.task-card.expanded .task-badges {
    display: none;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.3;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.task-badge-emoji {
    font-size: 0.8rem;
}

.task-badge-runtime {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.12), rgba(234, 83, 50, 0.06));
    color: #EA5332;
    border-color: rgba(234, 83, 50, 0.2);
}

.task-badge-trigger {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.2);
}

.task-badge-model {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(234, 83, 50, 0.06));
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
}

.task-badge-free {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 2px;
    line-height: 1.4;
}

.task-badge-tools {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.06));
    color: #047857;
    border-color: rgba(16, 185, 129, 0.2);
}

.task-badge-disabled {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.15);
}

@media (max-width: 768px) {
    .task-badges {
        display: none !important;
    }

    /* ── Mobile Task Card Header ── */
    .task-card-header {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .task-card-header .drag-handle {
        display: none;
    }

    .task-header-main {
        order: 1;
        flex: 1 1 100%;
    }

    .task-card-header .task-name {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .task-prompt-preview {
        font-size: 0.75rem;
    }

    .task-header-controls {
        order: 2;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .toggle-label {
        font-size: 0.68rem;
    }

    .task-card-header .task-run-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .task-clone-btn,
    .task-edit-btn {
        font-size: 0.72rem;
        padding: 4px 8px;
    }

    .task-card-header .remove-btn {
        margin-left: auto;
    }

    /* ── Mobile Prompt Variables Bar ── */
    .prompt-variables-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    /* ── Mobile Variables Dropdown ── */
    .var-dropdown-wrapper {
        position: static !important;
        width: 100%;
    }

    .var-dropdown {
        position: relative !important;
        right: auto !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px !important;
        max-height: 240px !important;
    }

    /* ── Mobile Variable Rows ── */
    .variable-row {
        flex-wrap: wrap;
    }

    .variable-row .var-key-input,
    .variable-row .var-value-input {
        flex: 1 1 100%;
        min-width: 0;
    }

    .variable-row .var-eq {
        display: none;
    }

    /* ── Mobile Task Card Body ── */
    .task-card-body {
        padding: 14px 12px !important;
    }

    .task-section-hint {
        font-size: 0.78rem;
    }

    /* ── Mobile Schedule Controls ── */
    .schedule-freq-pills {
        flex-wrap: wrap;
        gap: 6px !important;
    }

    .schedule-freq-pill {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .schedule-sub-controls {
        flex-wrap: wrap;
        gap: 6px !important;
    }

    .schedule-sub-controls input[type="number"],
    .schedule-sub-controls input[type="time"] {
        min-width: 60px;
        flex: 0 1 auto;
    }

    /* ── Mobile Trigger Config ── */
    .trigger-top-row {
        flex-wrap: wrap;
    }

    .trigger-type-select {
        flex: 1 1 100%;
        min-width: 0;
    }

    /* ── Mobile Runtime Mode Tabs ── */
    .runtime-mode-tabs {
        flex-wrap: wrap;
    }

    .runtime-mode-tab {
        min-width: 0;
        flex: 1 1 45%;
    }

    /* ── Mobile Runtime Cards ── */
    .runtime-cards {
        flex-wrap: wrap;
    }

    .runtime-card {
        min-width: 0;
        flex: 1 1 100%;
    }

    /* ── Mobile Secrets Picker ── */
    .secrets-picker {
        flex-wrap: wrap;
    }

    /* ── Mobile Output Sharing ── */
    .output-sharing-fields .runtime-field-group {
        width: 100%;
    }

    /* ── Mobile Memory Section ── */
    .memory-toggle-row {
        flex-wrap: wrap;
    }
}

.task-card-body {
    display: none;
    padding: 20px 24px;
}

.task-card.expanded .task-card-body {
    display: block;
}

/* ── Sections ── */

.task-section {
    margin-bottom: 24px;
}

.task-section:last-child {
    margin-bottom: 0;
}

.task-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-section-title .section-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
}

.section-icon-prompt {
    background: rgba(59, 130, 246, 0.12);
}

.section-icon-trigger {
    background: rgba(245, 158, 11, 0.12);
}

.section-icon-docker {
    background: rgba(59, 130, 246, 0.12);
}

.section-icon-vars {
    background: rgba(234, 83, 50, 0.12);
}

.task-section-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 10px 0;
    font-style: italic;
}

.variable-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.variable-row .var-key-input {
    flex: 1;
    font-family: monospace;
    font-size: 0.85rem;
}

.variable-row .var-eq {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.variable-row .var-value-input {
    flex: 2;
    font-size: 0.85rem;
}

.section-icon-storage {
    background: rgba(236, 72, 153, 0.12);
}

.section-icon-memory {
    background: rgba(6, 182, 212, 0.12);
}

/* ── Prompt Area ── */

.task-prompt {
    width: 100%;
    font-size: 0.92rem;
    resize: none;
    overflow: hidden;
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    padding: 14px !important;
    line-height: 1.6;
    transition: border-color 0.2s, height 0.15s ease;
    min-height: 90px;
}

.task-prompt:focus {
    border-color: var(--primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.1);
}

.prompt-helper {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0;
    font-style: italic;
}

/* ── Prompt Variable Dropdown ── */

.var-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.82rem;
}

.var-item:hover {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.1);
}

.var-item code {
    font-size: 0.75rem;
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.12);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
}

.var-item span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ── Sub-rows ── */

.sub-row:hover {
    border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.25);
}

.sub-row-trigger {
    grid-template-columns: 1fr;
}

.sub-row-artifact {
    grid-template-columns: 1fr;
}

/* ── Software Context Fields ── */

.software-context-fields .runtime-field-group {
    animation: fadeIn 0.2s ease;
}

.sub-row input,
.sub-row select,
.sub-row textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.sub-row input:focus,
.sub-row select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.08);
}

.sub-row .remove-btn,
.task-card-header .remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
    opacity: 0.6;
}

.sub-row .remove-btn:hover,
.task-card-header .remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
}

/* ── Run Button ── */

.task-run-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.task-run-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.3);
}

.task-run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.task-run-btn.running {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: pulse-run 1.5s infinite;
}

@keyframes pulse-run {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ── Run Confirmation Modal ── */

.run-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.run-confirm-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease;
}

.run-confirm-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.run-confirm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.run-confirm-msg {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.run-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.run-confirm-cancel {
    padding: 10px 24px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.run-confirm-cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.run-confirm-ok {
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.run-confirm-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

/* ── Run Status Panel ── */

.task-run-panel {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    display: none;
}

.task-run-panel.visible {
    display: block;
}

.task-run-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.task-run-panel-title {
    font-weight: 600;
    color: var(--text-primary);
}

.run-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.run-status-pill.queued {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.run-status-pill.running {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    animation: pulse-run 1.5s infinite;
}

.run-status-pill.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.run-status-pill.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.run-detail-row {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

.run-output-preview {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.run-history-list {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

.run-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 6px;
    transition: background 0.15s;
}

.run-history-item:hover {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.08);
    color: var(--text-primary);
}

.view-all-runs-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    margin-top: 8px;
    padding: 4px 0;
    transition: opacity 0.2s;
}

.view-all-runs-link:hover {
    opacity: 0.8;
}

/* ── Trigger Row Layout ── */

.trigger-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trigger-type-select {
    min-width: 180px;
}

.trigger-config-area {
    margin-top: 10px;
}

/* ── Schedule Builder ── */

.schedule-builder {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.schedule-builder label.sched-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
    display: block;
}

.schedule-freq-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.schedule-freq-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.schedule-freq-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.06);
}

.schedule-freq-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb, 99, 102, 241), 0.3);
}

.schedule-sub-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.2s ease;
}

.schedule-sub-controls .sched-inline-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.schedule-sub-controls input[type="time"],
.schedule-sub-controls input[type="number"],
.schedule-sub-controls input[type="text"],
.schedule-sub-controls select {
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    min-width: 70px;
}

.schedule-sub-controls input[type="number"] {
    width: 64px;
}

.schedule-sub-controls input:focus,
.schedule-sub-controls select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.schedule-day-toggles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.schedule-day-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-day-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.schedule-day-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.schedule-preview {
    margin-top: 4px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.08), rgba(var(--primary-rgb, 99, 102, 241), 0.03));
    border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.15);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.schedule-preview .preview-icon {
    font-size: 1.1rem;
}

.schedule-preview .preview-text {
    flex: 1;
    font-weight: 500;
}

.schedule-preview code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--primary);
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ── Webhook/Event/Manual config ── */

.config-info-box {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.04);
    border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.1);
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Runtime Mode Tabs ── */

.runtime-mode-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-primary);
}

.runtime-mode-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-right: 1px solid var(--border);
    position: relative;
    text-align: center;
}

.runtime-mode-tab:last-child {
    border-right: none;
}

.runtime-mode-tab:hover {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.04);
}

.runtime-mode-tab.active {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.1), rgba(var(--primary-rgb, 99, 102, 241), 0.04));
}

.runtime-mode-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.runtime-mode-tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.runtime-mode-tab.active .runtime-mode-tab-icon {
    transform: scale(1.1);
}

.runtime-mode-tab-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.runtime-mode-tab-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.runtime-mode-tab-icon-agent {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.15), rgba(234, 83, 50, 0.05));
}

.runtime-mode-tab-icon-workflow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
}

.runtime-mode-tab-icon-software {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
}

.runtime-mode-tab-icon-docker {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
}

/* ── Runtime Mode Panels ── */

.runtime-mode-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.runtime-mode-panel.active {
    display: block;
}

/* ── Runtime Agent Cards (inside AI Agent panel) ── */

.runtime-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.runtime-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-primary);
    text-align: center;
}

.runtime-card:hover {
    border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.runtime-card.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.06);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.1);
}

.runtime-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.runtime-card-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.runtime-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.runtime-icon-claude {
    background: linear-gradient(135deg, #d4a574, #c48b5c);
}

.runtime-icon-gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.runtime-icon-codex {
    background: linear-gradient(135deg, #10a37f, #0d8c6c);
}

.runtime-icon-workflow {
    background: linear-gradient(135deg, #3b82f6, #EA5332);
}

.runtime-icon-software {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.runtime-icon-api {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ── Shell / Docker fields inside panels ── */

.runtime-field-group {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.runtime-field-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.runtime-field-group input,
.runtime-field-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    transition: border-color 0.2s;
}

.runtime-field-group input:focus,
.runtime-field-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.08);
}

.runtime-field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

/* ── Advanced toggle ── */

.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.advanced-toggle:hover {
    color: var(--text-primary);
}

.advanced-toggle-chevron {
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.advanced-toggle.open .advanced-toggle-chevron {
    transform: rotate(90deg);
}

.advanced-content {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.advanced-toggle.open+.advanced-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ── Tool Row Layout ── */

.tool-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tool-config-field {
    margin-top: 8px;
}

/* ── Artifact Store ── */

.artifact-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ── Memory ── */

.memory-section-content {
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.memory-toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.memory-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
}

.memory-toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.memory-ns-field {
    margin-top: 10px;
}

.memory-ns-field label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(18px);
}



@media (max-width: 768px) {
    .runtime-mode-tabs {
        flex-direction: column;
    }

    .runtime-mode-tab {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .runtime-mode-tab:last-child {
        border-bottom: none;
    }

    .runtime-cards {
        grid-template-columns: 1fr;
    }

    .schedule-freq-pills {
        flex-direction: column;
    }

    .schedule-sub-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .tool-row-grid {
        grid-template-columns: 1fr;
    }

    .artifact-row-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Brain Config ── */

.brain-agent-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.brain-agent-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.brain-agent-active {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.06), rgba(234, 83, 50, 0.04));
    box-shadow: 0 0 0 3px rgba(234, 83, 50, 0.12);
}

.brain-agent-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.brain-agent-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.brain-agent-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.skill-card-active {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.08), rgba(234, 83, 50, 0.04));
    box-shadow: 0 0 0 3px rgba(234, 83, 50, 0.12);
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-card-icon {
    font-size: 1.1rem;
}

.skill-card-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.skill-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.skill-card-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(234, 83, 50, 0.1);
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.custom-skill-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    animation: fadeIn 0.2s ease;
}

.custom-skill-row .skill-url-text {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-skill-row .skill-url-link {
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
}

.custom-skill-row .skill-url-link:hover {
    text-decoration: underline;
}

.featured-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.featured-skill-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.featured-skill-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.featured-skill-info {
    flex: 1;
    min-width: 0;
}

.featured-skill-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-skill-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-skill-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    flex-shrink: 0;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}

.featured-skill-link:hover {
    color: var(--primary);
}

.skills-empty-state {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    margin-top: 16px;
}

.config-row {
    display: grid;
    gap: 12px;
    align-items: start;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    animation: fadeIn 0.2s ease;
}

.config-row-mcp {
    grid-template-columns: 1fr 1.5fr auto auto;
}

.config-row-plugin {
    grid-template-columns: 1fr 0.6fr auto auto;
}

.config-row-hook {
    grid-template-columns: 1fr 1.5fr 1fr auto auto;
}

.config-row input,
.config-row select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.config-row .remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.config-row .remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ── Run Cards ── */

.runs-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.detail-info {
    flex: 1;
}

.detail-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-info .role {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-pill {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.runs-filter-pill {
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
    font-family: inherit;
}

.runs-filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.runs-filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.task-filter {
    position: relative;
}

.task-filter select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    appearance: none;
    min-width: 180px;
}

.task-filter select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.task-filter::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.stat-value .unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: normal;
}

/* ── Runs Page Specific Mockup Styles ── */

.runs-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.runs-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: none;
    backdrop-filter: none;
    transition: all 0.2s;
}

.runs-stat-card:hover { border-color: #cbd5e1; }

.runs-stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.runs-stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.runs-stat-card .stat-value .unit {
    font-size: 1rem;
    color: #64748b;
    font-weight: 600;
}

.runs-stat-card .stat-value.success {
    color: #22c55e;
}

.runs-table-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
}

.runs-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.runs-table thead tr {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
}

.runs-table th {
    padding: 1rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
    user-select: none;
}

/* Column widths */
.rt-col-status { width: 140px; }
.rt-col-task   { width: 25%; }
.rt-col-tags   { width: auto; }
.rt-col-duration { width: 100px; text-align: right; }
.rt-col-time   { width: 130px; text-align: right; }
.rt-col-id     { width: 110px; text-align: right; }

/* ── Run Rows ── */

.run-row {
    cursor: pointer;
    background: transparent;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.run-row:hover {
    background: #f1f5f9;
}

.runs-table tbody tr:last-child {
    border-bottom: none;
}

.run-row.status-success { border-left-color: #22c55e; }
.run-row.status-failed  { border-left-color: #ef4444; }
.run-row.status-running { border-left-color: #3b82f6; }
.run-row.status-queued  { border-left-color: #eab308; }

.run-row td {
    padding: 0.8rem 1.25rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.run-row td.rt-col-duration,
.run-row td.rt-col-time {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.run-row td.rt-col-id {
    text-align: right;
}

.run-row td.rt-col-id code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    background: transparent;
    padding: 0;
}

/* ── Status Dot + Label ── */

.run-row td.rt-col-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.run-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    background: #94a3b8;
}

.run-status-dot.status-success { background: #22c55e; box-shadow: none; }
.run-status-dot.status-failed  { background: #ef4444; box-shadow: none; }
.run-status-dot.status-running { background: #3b82f6; box-shadow: none; animation: pulse 2s infinite; }
.run-status-dot.status-queued  { background: #eab308; box-shadow: none; }

.run-status-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.run-status-label.status-success { color: #22c55e; }
.run-status-label.status-failed  { color: #ef4444; }
.run-status-label.status-running { color: #3b82f6; }
.run-status-label.status-queued  { color: #eab308; }

/* ── Task Name ── */

.run-task-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Tags ── */

.run-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.run-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.4;
}

/* ── Error Sub-Row ── */

.run-error-row {
    cursor: pointer;
    background: transparent;
}

.run-error-row td {
    padding: 0 1.25rem 0.8rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.run-error-inline {
    padding: 0.5rem 0.75rem;
    background: #fee2e2;
    border-left: 3px solid #ef4444;
    border-radius: 0 6px 6px 0;
    color: #ef4444;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .rt-col-id { display: none; }
    .runs-table th.rt-col-id { display: none; }
    .rt-col-duration { width: 70px; }
    .rt-col-time { width: 80px; }
    .rt-col-status { width: 110px; }
    .run-tag { font-size: 0.6rem; padding: 2px 6px; }
}

@media (max-width: 480px) {
    .rt-col-tags { display: none; }
    .runs-table th.rt-col-tags { display: none; }
    .rt-col-time { display: none; }
    .runs-table th.rt-col-time { display: none; }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auto-refresh-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

.auto-refresh-indicator.active {
    opacity: 1;
}

.refresh-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ── Post Cards ── */

.composer-section {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03), rgba(234, 83, 50, 0.03));
    border: 1px solid rgba(14, 165, 233, 0.12);
}

.composer-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.composer-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.composer-options {
    display: flex;
    align-items: center;
    gap: 16px;
}

.composer-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-generate-content-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.ai-generate-content-btn .ai-sparkle-icon {
    width: 16px;
    height: 16px;
    stroke: white;
}

.ai-generate-content-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.ai-generate-content-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.ai-generate-content-btn.loading .ai-sparkle-icon {
    animation: sparkle-spin 0.8s linear infinite;
}

.composer-editor-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    overflow: hidden;
    transition: var(--transition);
}

.composer-editor-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.composer-textarea {
    width: 100%;
    border: none;
    background: transparent;
    padding: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}

.composer-textarea:focus {
    outline: none;
}

.composer-textarea::placeholder {
    color: var(--text-muted);
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.02);
}

.char-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.composer-format-hints {
    display: flex;
    gap: 6px;
}

.hint-pill {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(14, 165, 233, 0.08);
    color: var(--accent);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.hint-pill:hover {
    background: var(--accent);
    color: white;
}

/* ─── Post Cards ─── */

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.post-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0, 20, 50, 0.06);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.post-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.post-timestamp {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-visibility-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 8px;
}

.post-visibility-public {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.post-visibility-friends {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.post-visibility-private {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.post-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    text-align: start;
    unicode-bidi: plaintext;
}

/* ─── Post Truncation ─── */

.post-content-wrap {
    position: relative;
}

.post-content-wrap.truncated .post-content,
.post-content-wrap.truncated .feed-post-content {
    max-height: 150px;
    overflow: hidden;
}

.post-content-wrap.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, var(--bg-card, #fff));
    pointer-events: none;
}

.post-content-wrap.expanded .post-content,
.post-content-wrap.expanded .feed-post-content {
    max-height: none;
}

.post-content-wrap.expanded::after {
    display: none;
}

/* ─── Post CTA Row ─── */

.post-cta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding-top: 0;
}

.post-read-more {
    display: inline;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: none;
    white-space: nowrap;
}

.post-read-more .cta-arrow {
    display: none;
}

.post-read-more:hover {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
    filter: none;
}

.post-read-more:active {
    transform: none;
    box-shadow: none;
}

.post-read-more.expanded {
    background: none;
    color: var(--text-secondary);
    box-shadow: none;
}

.post-read-more.expanded:hover {
    background: none;
    box-shadow: none;
    filter: none;
    text-decoration: underline;
}

.post-view-link {
    display: none;
}

.post-image {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    border: 1px solid var(--border);
}

.post-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.post-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, 0.04);
}

.post-action-btn.liked {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

.post-delete-btn {
    margin-left: auto;
    color: var(--text-muted);
    border-color: transparent;
}

.post-delete-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.04);
}

/* ─── Comments ─── */

.post-comments {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.02);
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.comment-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.comment-input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ── Shares & Image Upload ── */

/* ─── Composer Section ─── */

.knowledge-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
    user-select: none;
}

.knowledge-toggle:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.knowledge-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.toggle-label {
    font-weight: 500;
}

.ai-generate-content-btn:active {
    transform: translateY(0);
}

/* ─── Editor ─── */
.composer-editor-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    overflow: hidden;
    transition: var(--transition);
}

/* ─── Share Cards (existing) ─── */

.share-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
}

.share-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 20, 50, 0.08);
}

.share-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.share-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 20, 50, 0.10);
}

.share-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.share-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.share-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.share-card:hover .share-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* ─── Share Tailor Modal ─── */

.share-tailor-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    max-width: 560px;
    width: 94%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: slideUp 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.share-tailor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.share-tailor-platform {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-tailor-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.share-tailor-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.share-tailor-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s;
}

.share-tailor-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.share-tailor-original {
    margin: 16px 24px 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.share-tailor-original summary {
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s;
    user-select: none;
}

.share-tailor-original summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.share-tailor-original-text {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px solid var(--border);
    max-height: 150px;
    overflow-y: auto;
}

.share-tailor-extra {
    margin: 12px 24px 0;
}

.share-tailor-extra label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.share-tailor-content-wrap {
    margin: 16px 24px 0;
}

.share-tailor-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.share-tailor-char-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.share-tailor-skeleton {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-tailor-skeleton .skeleton-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.share-tailor-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

.share-tailor-textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99, 102, 241), 0.1);
}

.share-tailor-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

@media (max-width: 600px) {
    .share-tailor-box {
        max-width: 100%;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .share-tailor-actions {
        flex-wrap: wrap;
    }

    .share-tailor-actions button {
        flex: 1;
        min-width: 0;
    }
}
/* ─── Image Attachments ─── */

.image-attachments-section {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.image-attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.image-attachments-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.image-attachments-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.generate-prompt-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    animation: slideDown 0.2s ease-out;
}

.image-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    position: relative;
}

.image-drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(14, 165, 233, 0.05);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.image-drop-zone.has-images {
    align-items: flex-start;
    justify-content: flex-start;
}

.drop-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    user-select: none;
}

.image-preview-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.image-thumb-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 20, 50, 0.06);
    transition: var(--transition);
    flex-shrink: 0;
}

.image-thumb-wrap:hover {
    border-color: var(--accent);
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 20, 50, 0.12);
}

.image-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.image-thumb-wrap:hover .image-thumb-remove {
    opacity: 1;
}

.image-thumb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.75rem;
}

.image-thumb-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: sparkle-spin 0.7s linear infinite;
}

/* ── Account Cards ── */

.acct-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    transition: var(--transition);
}

.acct-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 20, 50, 0.08);
}

.acct-card--connected {
    border-color: rgba(0, 184, 148, 0.25);
    background: rgba(0, 184, 148, 0.04);
    flex-wrap: wrap;
    gap: 10px;
}

.acct-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.acct-card--connected .acct-card-left {
    flex: 1 1 100%;
}

.acct-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.acct-card--connected .acct-card-right {
    width: 100%;
    justify-content: flex-end;
    padding-top: 2px;
    border-top: 1px solid rgba(0, 184, 148, 0.12);
}

.acct-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 20, 50, 0.10);
}

.acct-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.acct-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ── Profile display ── */

.acct-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.acct-profile-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.acct-profile-name {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* ── Badges ── */

.acct-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.acct-badge--on {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.25);
}

.acct-badge--warn {
    background: rgba(255, 193, 7, 0.12);
    color: #e6a800;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.acct-badge--expired {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.25);
}

/* ── Actions dropdown ── */

.acct-actions-wrap {
    position: relative;
}

.acct-actions-toggle {
    cursor: pointer;
}

.acct-actions-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 20, 50, 0.12);
    padding: 4px;
    z-index: 100;
}

.acct-actions-menu.show {
    display: block;
}

.acct-action-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
}

.acct-action-btn:hover {
    background: var(--bg-secondary);
}

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

.btn-accent:hover {
    filter: brightness(1.1);
}

/* ── Modal ── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 20, 50, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ── Coming Soon Modal ── */

.coming-soon-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 24px 64px rgba(0, 20, 50, 0.25);
    text-align: center;
    position: relative;
    animation: csSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes csSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.coming-soon-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.coming-soon-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 20, 50, 0.15);
    transition: transform 0.3s;
}

.coming-soon-icon:hover {
    transform: rotate(-8deg) scale(1.08);
}

.coming-soon-rocket {
    font-size: 2rem;
    animation: csFloat 2s ease-in-out infinite;
}

@keyframes csFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.coming-soon-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 6px;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coming-soon-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 20px;
}

.coming-soon-subtitle #cs-provider-name {
    font-weight: 700;
    color: var(--text-primary);
}

.coming-soon-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.cs-star {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-star:hover {
    transform: translateY(-4px) scale(1.15);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
}

.cs-star.selected {
    border-color: var(--accent);
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

.cs-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.coming-soon-thanks {
    animation: csFadeIn 0.4s ease;
}

@keyframes csFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cs-check {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b894, #55efc4);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto 12px;
}

.coming-soon-thanks p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* ── Feed ── */

/* ── Schedule Cards ── */

/* ── Schedule Overview Cards ── */

.schedule-card {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.03), rgba(var(--primary-rgb, 99, 102, 241), 0.01));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.schedule-card:hover {
    border-color: rgba(var(--primary-rgb, 99, 102, 241), 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.schedule-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.schedule-task-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.08);
    border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.2);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.schedule-edit-link:hover {
    background: rgba(var(--primary-rgb, 99, 102, 241), 0.15);
    border-color: var(--primary);
    transform: translateX(2px);
}

.schedule-triggers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-trigger-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.schedule-trigger-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.schedule-trigger-desc {
    flex: 1;
    font-weight: 500;
}

.schedule-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.schedule-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.schedule-empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.schedule-empty-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.schedule-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.1), rgba(var(--primary-rgb, 99, 102, 241), 0.05));
    border: 2px solid var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.schedule-empty-cta:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.2), rgba(var(--primary-rgb, 99, 102, 241), 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

/* ── Quick Links ── */

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.04), rgba(var(--primary-rgb, 99, 102, 241), 0.01));
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-link-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 24px rgba(var(--primary-rgb, 99, 102, 241), 0.12);
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.08), rgba(var(--primary-rgb, 99, 102, 241), 0.03));
}

.quick-link-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.quick-link-content {
    flex: 1;
}

.quick-link-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.quick-link-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.quick-link-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.quick-link-card:hover .quick-link-arrow {
    transform: translateX(4px);
}

/* ── Responsive ── */

/* ── Visibility Controls ── */

.visibility-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.visibility-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.visibility-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visibility-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
}

.visibility-badge-private {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.visibility-badge-unlisted {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.visibility-badge-public {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.visibility-toggle-group {
    display: flex;
    gap: 4px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.visibility-radio {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 4px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.visibility-radio input {
    display: none;
}

.visibility-radio:has(input:checked) {
    background: var(--primary);
    color: #fff;
}

.visibility-sections {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.visibility-sections-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.visibility-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.visibility-section-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    background: var(--bg-primary, #fff);
}

.visibility-section-check:hover {
    border-color: var(--primary);
}

.visibility-section-check:has(input:checked) {
    border-color: var(--primary);
    background: rgba(234, 83, 50, 0.06);
}

.visibility-section-check input[type="checkbox"] {
    accent-color: var(--primary);
    width: 14px;
    height: 14px;
}

/* ── Secret Cards ── */

.secret-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.secret-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 20, 50, 0.06);
}

.secret-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.secret-service-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #EA5332, #FF6D4A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: white;
    font-weight: 700;
}

.secret-service-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.secret-username {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.secret-password-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

.secret-notes-display {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}

.secret-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.secret-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all 0.15s;
}

.secret-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.secret-btn-danger:hover {
    color: #ef4444;
}

.secrets-count-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(234, 83, 50, 0.1);
    color: #EA5332;
    margin-left: 8px;
}

/* ─────────────────────── Blog ─────────────────────── */

/* Blog Hero */
.blog-hero {
    text-align: center;
    padding: 60px 0 32px;
}

.blog-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.blog-hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(234, 83, 50, 0.08);
    border: 1px solid rgba(234, 83, 50, 0.15);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.blog-hero-title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
}

.blog-hero-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 16px;
}

.blog-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.blog-hero-stat-dot {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ── Featured Post ── */
.blog-featured-section {
    margin-bottom: 32px;
}

.blog-featured-card {
    display: flex;
    gap: 32px;
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    overflow: hidden;
}

.blog-featured-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 16px 48px rgba(234, 83, 50, 0.1);
    color: inherit;
}

.blog-featured-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.blog-featured-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.blog-featured-badge {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.12), rgba(234, 83, 50, 0.12));
    border: 1px solid rgba(234, 83, 50, 0.2);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-featured-title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blog-featured-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.blog-meta-reading {
    color: var(--accent-light);
    font-weight: 500;
}

.blog-featured-cta {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent);
    transition: color 0.2s;
}

.blog-featured-visual {
    width: 280px;
    min-height: 240px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-featured-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-featured-visual-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.06), rgba(234, 83, 50, 0.1));
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* ── Categories ── */
.blog-categories-section {
    margin-bottom: 28px;
}

.blog-categories-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.blog-category-pill {
    padding: 6px 18px;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.blog-category-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(234, 83, 50, 0.05);
}

.blog-category-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Blog Two-Column Layout ── */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.blog-main {
    min-width: 0;
}

/* Blog Grid */
.blog-grid-section {
    padding-bottom: 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    color: inherit;
}

.blog-card-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary);
}

.blog-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.06), rgba(234, 83, 50, 0.08));
}

.blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tags-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.blog-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.blog-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent-light);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-tag-lg {
    padding: 4px 14px;
    font-size: 0.78rem;
}

.blog-tag-sm {
    padding: 2px 8px;
    font-size: 0.68rem;
}

.blog-card-reading {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.blog-meta-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-meta-avatar-lg {
    width: 44px;
    height: 44px;
}

.blog-meta-avatar-placeholder {
    background: linear-gradient(135deg, #EA5332, #ec4899);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.blog-meta-dot {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ── Sidebar ── */
.blog-sidebar {
    position: sticky;
    top: 88px;
}

.blog-sidebar-section {
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.blog-sidebar-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.blog-sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-sidebar-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
}

.blog-sidebar-post:hover {
    background: var(--bg-secondary);
    color: inherit;
}

.blog-sidebar-post-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 8px;
}

.blog-sidebar-post-info {
    min-width: 0;
}

.blog-sidebar-post-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-sidebar-post-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.blog-sidebar-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-sidebar-cat {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.blog-sidebar-cat:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.blog-sidebar-cta {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.06), rgba(234, 83, 50, 0.06));
    border-color: rgba(234, 83, 50, 0.2);
}

.blog-sidebar-cta-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.blog-sidebar-newsletter {
    display: flex;
    gap: 6px;
}

.blog-sidebar-newsletter input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Blog Empty State */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.blog-empty h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* ── Reading Progress Bar ── */
.blog-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #EA5332);
    z-index: 10000;
    transition: width 0.05s linear;
    border-radius: 0 2px 2px 0;
}

/* ── Blog Article (Single Post) ── */
.blog-article {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 0 60px;
}

.blog-article-header {
    margin-bottom: 32px;
}

.blog-article-header-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.blog-article-title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-article-author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-meta-info {
    display: flex;
    flex-direction: column;
}

.blog-meta-info .blog-meta-author {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.blog-meta-details {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta-info .blog-meta-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.blog-article-share-top {
    display: flex;
    gap: 6px;
}

.blog-share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: inherit;
}

.blog-share-btn:hover {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.08);
    color: inherit;
}

.blog-article-hero-image {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
}

.blog-article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
}

.blog-article-body h2 {
    font-size: 1.5rem;
    margin: 40px 0 14px;
    font-weight: 700;
    scroll-margin-top: 80px;
}

.blog-article-body h3 {
    font-size: 1.2rem;
    margin: 32px 0 10px;
    font-weight: 600;
}

.blog-article-body p {
    margin-bottom: 20px;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 20px 20px;
}

.blog-article-body li {
    margin-bottom: 8px;
}

.blog-article-body code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-light);
}

.blog-article-body pre {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.blog-article-body pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.blog-article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 14px 22px;
    margin: 0 0 20px;
    color: var(--text-secondary);
    background: rgba(234, 83, 50, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

.blog-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.blog-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.92rem;
}

.blog-article-body th,
.blog-article-body td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.blog-article-body th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.blog-article-body strong {
    font-weight: 700;
    color: var(--text-primary);
}

.blog-article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 36px 0;
}

/* ── Tags Bottom ── */
.blog-article-tags-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

/* ── Share Bottom ── */
.blog-article-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.blog-share-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.blog-share-buttons {
    display: flex;
    gap: 8px;
}

/* ── Author Bio ── */
.blog-author-bio {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-top: 32px;
}

.blog-author-bio-avatar img,
.blog-author-bio-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-author-bio-avatar-placeholder {
    background: linear-gradient(135deg, #EA5332, #ec4899);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.blog-author-bio-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.blog-author-bio-info p {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.blog-author-bio-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.blog-author-bio-link:hover {
    text-decoration: underline;
}

/* ── Related Posts ── */
.blog-related {
    margin-top: 48px;
}

.blog-related-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.blog-related-card {
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.blog-related-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.blog-related-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.blog-related-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-related-card-excerpt {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Bottom CTA ── */
.blog-bottom-cta {
    max-width: 680px;
    margin: 0 auto 48px;
}

.blog-bottom-cta-inner {
    padding: 48px;
    text-align: center;
    border-radius: 16px;
    background: rgba(234, 83, 50, 0.04);
    border: 1px solid rgba(234, 83, 50, 0.1);
}

.blog-bottom-cta-inner h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blog-bottom-cta-inner p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.blog-post-cta {
    margin-top: 48px;
    padding: 40px;
    text-align: center;
    border-radius: 16px;
    background: rgba(234, 83, 50, 0.04);
    border: 1px solid rgba(234, 83, 50, 0.1);
}

.blog-post-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blog-post-cta p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.blog-article-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ── Blog Admin ── */
.blog-admin {
    padding: 32px 0 60px;
}

.blog-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-admin-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.blog-admin-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.blog-editor {
    margin-bottom: 28px;
}

.blog-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.blog-editor-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.blog-editor-textarea {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
}

.blog-editor-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Blog Admin Table */
.blog-admin-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    gap: 16px;
    flex-wrap: wrap;
}

.blog-admin-row:hover {
    border-color: var(--border-hover);
}

.blog-admin-row-main {
    flex: 1;
    min-width: 0;
}

.blog-admin-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.blog-admin-row-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.blog-admin-tags {
    color: var(--accent-light);
}

.blog-admin-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.blog-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.blog-status-published {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.btn-danger-text {
    color: var(--danger) !important;
}

.btn-danger-text:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Blog Responsive */
@media (max-width: 768px) {
    .blog-hero-title {
        font-size: 1.8rem;
    }

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

    .blog-sidebar {
        position: static;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-featured-card {
        flex-direction: column;
        padding: 24px;
    }

    .blog-featured-visual {
        width: 100%;
        min-height: 180px;
    }

    .blog-featured-title {
        font-size: 1.4rem;
    }

    .blog-article-title {
        font-size: 1.6rem;
    }

    .blog-related-grid {
        grid-template-columns: 1fr;
    }

    .blog-article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .blog-admin-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-admin-row-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .blog-categories-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .blog-categories-bar::-webkit-scrollbar {
        display: none;
    }
}


/* ─────────────────────── Breadcrumbs ─────────────────────── */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding: 0;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent, var(--primary));
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.6;
    user-select: none;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }

    .breadcrumb-current {
        max-width: 180px;
    }
}

/* Blog Article (Single Post) */
.blog-article {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 0 60px;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.blog-breadcrumb a {
    color: var(--text-secondary);
}

.blog-breadcrumb a:hover {
    color: var(--accent);
}

.blog-breadcrumb-sep {
    color: var(--text-muted);
}

.blog-article-header {
    margin-bottom: 32px;
}

.blog-article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.blog-article-title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-meta-info {
    display: flex;
    flex-direction: column;
}

.blog-meta-info .blog-meta-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.blog-meta-info .blog-meta-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-article-hero-image {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
}

.blog-article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-article-body h2 {
    font-size: 1.5rem;
    margin: 36px 0 14px;
    font-weight: 700;
}

.blog-article-body h3 {
    font-size: 1.2rem;
    margin: 28px 0 10px;
    font-weight: 600;
}

.blog-article-body p {
    margin-bottom: 18px;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 18px 20px;
}

.blog-article-body li {
    margin-bottom: 6px;
}

.blog-article-body code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-light);
}

.blog-article-body pre {
    background: var(--bg-secondary);
    padding: 18px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.blog-article-body pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.blog-article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 0 0 18px;
    color: var(--text-secondary);
    background: rgba(234, 83, 50, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.blog-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 18px 0;
}

.blog-article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Blog Admin */
.blog-admin {
    padding: 32px 0 60px;
}

.blog-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-admin-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.blog-admin-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.blog-editor {
    margin-bottom: 28px;
}

.blog-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.blog-editor-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.blog-editor-textarea {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
}

.blog-editor-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Blog Admin Table */
.blog-admin-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    gap: 16px;
    flex-wrap: wrap;
}

.blog-admin-row:hover {
    border-color: var(--border-hover);
}

.blog-admin-row-main {
    flex: 1;
    min-width: 0;
}

.blog-admin-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.blog-admin-row-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.blog-admin-tags {
    color: var(--accent-light);
}

.blog-admin-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.blog-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.blog-status-published {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.btn-danger-text {
    color: var(--danger) !important;
}

.btn-danger-text:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Blog Responsive */
@media (max-width: 768px) {
    .blog-hero-title {
        font-size: 1.8rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-article-title {
        font-size: 1.6rem;
    }

    .blog-admin-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-admin-row-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ══════════════════════════════════════════════════
   GLOBAL EXTRA-SMALL MOBILE (iPhone SE / mini ≤480px)
   Covers all non-home pages: dashboard, detail, forms,
   footer, blog, usecase LPs, feature pages, public pages.
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* ── Global Layout ── */
    .container {
        padding: 0 12px;
    }

    /* ── Navbar ── */
    .navbar {
        padding: 10px 0;
    }

    /* ── Page Headers ── */
    .page-header {
        padding: 20px 0 14px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header .subtitle {
        font-size: 0.85rem;
    }

    /* ── Buttons ── */
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 0.88rem;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.78rem;
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ── Dashboard Cards Grid ── */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 32px;
    }

    .card {
        padding: 18px;
    }

    .card-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .card-avatar {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
    }

    .card-name {
        font-size: 1rem;
    }

    .card-role {
        font-size: 0.8rem;
    }

    .card-tagline {
        font-size: 0.82rem;
    }

    .tag {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    /* ── Search / Sort ── */
    .search-box input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .sort-box select {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .tag-filter-bar {
        gap: 5px;
    }

    .tag-pill {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* ── Character Detail Header ── */
    .detail-header {
        padding: 1rem;
        gap: 12px;
    }

    .detail-avatar,
    .detail-header .avatar {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
    }

    .detail-info h1,
    .detail-header h1 {
        font-size: 1.3rem;
    }

    .detail-info .role {
        font-size: 0.88rem;
    }

    .detail-info .tagline {
        font-size: 0.82rem;
    }

    .detail-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .detail-actions .btn,
    .detail-actions a.btn {
        padding: 6px 12px;
        font-size: 0.78rem;
        margin-left: 0 !important;
    }

    /* ── Visibility Panel ── */
    .visibility-panel {
        padding: 14px;
    }

    .visibility-title {
        font-size: 0.9rem;
    }

    .visibility-checkboxes {
        gap: 4px;
    }

    .visibility-section-check {
        font-size: 0.82rem;
        padding: 4px 8px;
    }

    /* ── Hub Cards (Agent Profile Sub-Pages) ── */
    .hub-grid {
        gap: 10px;
    }

    .hub-card {
        padding: 18px 14px;
    }

    .hub-card-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 10px;
        margin-bottom: 14px;
    }

    .hub-card-body h3 {
        font-size: 1rem;
    }

    .hub-card-body p {
        font-size: 0.82rem;
    }

    .hub-card-meta {
        margin-top: 14px;
        padding-top: 10px;
    }

    .hub-card-stat {
        font-size: 0.72rem;
        padding: 3px 10px;
    }

    .hub-card-arrow {
        top: 16px;
        right: 14px;
        font-size: 1rem;
    }

    /* ── Sections ── */
    .section {
        padding: 18px 14px;
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* ── Forms ── */
    .form-section {
        padding: 18px 14px;
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    /* ── AI Generate All Banner ── */
    .ai-generate-all-banner {
        padding: 16px 14px;
    }

    .ai-generate-all-title {
        font-size: 0.95rem;
    }

    .ai-generate-all-desc {
        font-size: 0.8rem;
    }

    .ai-generate-all-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    /* ── Gallery ── */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    /* ── Empty State ── */
    .empty-state {
        padding: 48px 16px;
    }

    .empty-state .icon {
        font-size: 2.5rem;
        margin-bottom: 14px;
    }

    .empty-state p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* ── Timeline ── */
    .timeline-company {
        font-size: 0.88rem;
    }

    .timeline-desc {
        font-size: 0.8rem;
    }

    /* ── Stats Grid ── */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    /* ── Task Cards ── */
    .task-card-header {
        padding: 12px 14px;
    }

    .task-card-body {
        padding: 14px;
    }

    /* ── Footer ── */
    .site-footer {
        margin-top: 40px;
        padding: 32px 0 14px;
    }

    .footer-logo {
        font-size: 1rem;
    }

    .footer-tagline {
        font-size: 0.8rem;
    }

    .footer-cta {
        padding: 7px 18px;
        font-size: 0.82rem;
    }

    .footer-trust {
        font-size: 0.7rem;
    }

    .footer-col h4 {
        font-size: 0.72rem;
    }

    .footer-col a {
        font-size: 0.82rem;
    }

    .footer-bottom {
        font-size: 0.72rem;
    }

    /* ── Use-Case Landing Pages ── */
    .usecase-hero {
        padding: 40px 12px 36px;
    }

    .usecase-hero-title {
        font-size: 1.6rem;
    }

    .usecase-hero-sub {
        font-size: 0.88rem;
    }

    .usecase-section,
    .usecase-section-alt {
        padding: 36px 12px;
    }

    .usecase-section-header h2 {
        font-size: 1.3rem;
    }

    .usecase-example-card {
        padding: 22px 16px;
    }

    .usecase-cta h2 {
        font-size: 1.3rem;
    }

    /* ── Feature Detail Pages ── */
    .feature-hero {
        padding: 36px 0 28px;
    }

    .feature-hero-icon {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
        border-radius: 14px;
    }

    .feature-hero-title {
        font-size: 1.5rem;
    }

    .feature-hero-subtitle {
        font-size: 0.92rem;
    }

    /* ── Blog ── */
    .blog-article {
        padding: 20px 0 40px;
    }

    .blog-article-title {
        font-size: 1.35rem;
    }

    .blog-article-body {
        font-size: 0.95rem;
    }

    .blog-article-body h2 {
        font-size: 1.25rem;
    }

    .blog-article-body h3 {
        font-size: 1.05rem;
    }

    .blog-hero-title {
        font-size: 1.5rem;
    }

    .blog-admin-header h1 {
        font-size: 1.4rem;
    }

    /* ── Compliance ── */
    .compliance-content {
        padding: 18px 14px;
    }

    .compliance-header h1 {
        font-size: 1.25rem;
    }

    /* ── Clone / Delete Modals ── */
    .clone-modal-box {
        padding: 22px 20px;
    }

    .clone-modal-header h3 {
        font-size: 1.1rem;
    }

    .clone-modal-desc {
        font-size: 0.85rem;
    }

    /* ── Toast ── */
    .toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        text-align: center;
    }

    /* ── Cookie Banner ── */
    .cookie-banner {
        padding: 0.5rem 0.75rem;
    }

    .cookie-banner-inner {
        gap: 0.5rem;
    }

    .cookie-banner-text {
        font-size: 0.8rem;
    }

    .cookie-btn {
        padding: 0.35rem 0.9rem;
        font-size: 0.8rem;
    }

    /* ── Breadcrumbs ── */
    .breadcrumb {
        font-size: 0.75rem;
    }

    .breadcrumb-current {
        max-width: 140px;
    }
}

/* ══════════════════════════════════════════════════════════════
   Feed Home — Facebook-style Social Network Layout
   ══════════════════════════════════════════════════════════════ */

/* ── 3-Column Grid Layout ── */
.feed-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 300px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    min-height: calc(100vh - 60px);
}

/* ── Sidebars ── */
.feed-sidebar {
    position: sticky;
    top: 72px;
    height: fit-content;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.feed-sidebar-section {
    margin-bottom: 16px;
}

.feed-sidebar-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── User Card ── */
.feed-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md, 8px);
    background: transparent;
    border: none;
    margin-bottom: 4px;
    transition: background 0.15s;
    cursor: pointer;
}

.feed-user-card:hover {
    background: rgba(0, 0, 0, 0.05);
}

.feed-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-user-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Navigation Items ── */
.feed-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.feed-nav-item:hover {
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent);
}

.feed-nav-item.active {
    background: rgba(234, 83, 50, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.feed-nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.feed-nav-badge {
    margin-left: auto;
    background: rgba(234, 83, 50, 0.15);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ── Agent Shortcuts ── */
.feed-agent-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.feed-agent-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.feed-agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-agent-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-see-all {
    font-size: 0.82rem;
    color: var(--accent);
    padding-left: 12px;
}

/* ── Subscription Tier Badge ── */
.feed-tier-badge-section {
    padding: 0 4px;
}

.feed-tier-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.feed-tier-badge:hover { opacity: 0.8; }
.feed-tier-starter { background: rgba(255, 255, 255, 0.03); }
.feed-tier-pro { background: rgba(234, 83, 50, 0.08); color: var(--accent); border-color: rgba(234, 83, 50, 0.2); }
.feed-tier-factory { background: rgba(234, 83, 50, 0.08); color: #FF6D4A; border-color: rgba(234, 83, 50, 0.2); }

.feed-tier-icon { font-size: 1rem; }

/* ── Avatar Placeholder ── */
.feed-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
}

/* ══════════════════════════════════════════════════════════════
   Feed Center Column
   ══════════════════════════════════════════════════════════════ */

.feed-center {
    padding-top: 16px;
    padding-bottom: 40px;
    min-width: 0;
    max-width: 100%;
    width: 680px;
    margin: 0 auto;
}

/* ── Post Composer ── */
.feed-composer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.feed-composer-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-composer-avatar-wrapper {
    flex-shrink: 0;
}

.feed-composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.feed-composer-textarea {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    box-sizing: border-box;
    cursor: text;
}

.feed-composer-textarea:focus {
    outline: none;
}

.feed-composer-textarea:hover {
    background: #dde0e4;
}

.feed-composer-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

.feed-composer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.feed-composer-options {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

.feed-composer-action-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm, 8px);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-composer-action-btn:hover {
    background: var(--bg-secondary);
}

/* ── Custom Agent Picker ── */
.agent-picker {
    position: relative;
    flex-shrink: 0;
}

.agent-picker-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    background: var(--bg-secondary, #f0f2f5);
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
    max-width: 200px;
}

.agent-picker-trigger:hover {
    background: #e4e6eb;
    border-color: var(--border);
}

.agent-picker.open .agent-picker-trigger {
    border-color: var(--accent, #EA5332);
    box-shadow: 0 0 0 2px rgba(234, 83, 50, 0.15);
}

.agent-picker-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.agent-picker-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent, #EA5332), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 0.6rem;
    border-radius: 50%;
}

.agent-picker-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.agent-picker-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}

.agent-picker.open .agent-picker-chevron {
    transform: rotate(180deg);
}

/* Dropdown Panel */
.agent-picker-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    max-width: 300px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    overflow: hidden;
}

.agent-picker.open .agent-picker-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.agent-picker-search-wrap {
    padding: 8px;
    border-bottom: 1px solid var(--border, #eee);
}

.agent-picker-search {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    background: var(--bg-secondary, #f0f2f5);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.agent-picker-search:focus {
    outline: none;
    border-color: var(--accent, #EA5332);
}

.agent-picker-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
}

.agent-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: left;
    transition: background 0.12s;
}

.agent-picker-option:hover {
    background: rgba(234, 83, 50, 0.06);
}

.agent-picker-option.selected {
    background: rgba(234, 83, 50, 0.1);
    font-weight: 600;
}

.agent-picker-option-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.agent-picker-option-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Composer Topic Input ── */
.feed-composer-topic-input {
    flex: 1;
    min-width: 80px;
    max-width: 160px;
    padding: 7px 12px;
    background: var(--bg-secondary, #f0f2f5);
    border: 1px solid transparent;
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.feed-composer-topic-input:focus {
    outline: none;
    border-color: var(--accent, #EA5332);
    background: var(--bg-card, #fff);
}

.feed-composer-topic-input:hover {
    background: #e4e6eb;
}

/* ── Composer Selects ── */
.feed-composer-select {
    padding: 7px 10px;
    background: var(--bg-secondary, #f0f2f5);
    border: 1px solid transparent;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='%2365676b' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2365676b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.feed-composer-select:hover {
    background-color: #e4e6eb;
}

.feed-composer-select:focus {
    outline: none;
    border-color: var(--accent, #EA5332);
}

.feed-composer-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.feed-btn {
    padding: 7px 16px;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
}

.feed-btn-ai {
    background: rgba(234, 83, 50, 0.1);
    color: var(--accent);
    border: 1px solid rgba(234, 83, 50, 0.2);
}

.feed-btn-ai:hover {
    background: rgba(234, 83, 50, 0.2);
}

.feed-btn-publish {
    background: linear-gradient(135deg, #EA5332, #FF6D4A);
    color: #fff;
}

.feed-btn-publish:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Feed Post Cards ── */
.feed-post-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md, 8px);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}



.feed-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.feed-post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-post-author-info {
    flex: 1;
    min-width: 0;
}

.feed-post-author-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.feed-post-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.feed-post-content {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 10px;
    text-align: start;
    unicode-bidi: plaintext;
}

.feed-post-image {
    width: 100%;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 10px;
    max-height: 500px;
    object-fit: cover;
}

.feed-post-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.feed-stats-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-icons {
    display: flex;
    align-items: center;
}

.reaction-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

.reaction-icon.bg-blue { background: #1877f2; z-index: 2; margin-right: -4px; }
.reaction-icon.bg-red { background: #f33e58; z-index: 1; margin-right: 4px; }

.reaction-count {
    color: var(--text-secondary);
}

/* ── Post Actions (Like / Comment / Share) ── */
.feed-post-actions {
    display: flex;
    gap: 2px;
    padding: 4px 0;
    border-top: 1px solid var(--border);
    margin-bottom: 8px;
}

.feed-action-btn {
    flex: 1;
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm, 6px);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feed-action-btn:hover {
    background: var(--bg-secondary);
}

.feed-action-btn.liked {
    color: var(--accent);
}

.fb-svg-icon {
    width: 20px;
    height: 20px;
}

.feed-action-btn.liked {
    color: var(--accent);
}

/* ── Comments ── */
.feed-comments-section {
    padding-top: 6px;
}

.feed-comment-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.feed-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    font-size: 0.6rem;
}

.feed-comment-body {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 6px 12px;
    flex: 1;
    min-width: 0;
}

.feed-comment-author {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-right: 4px;
}

/* ── Clickable Profile Links (Avatar + Name) ── */
.feed-post-avatar-link,
.feed-comment-avatar-link {
    display: flex;
    flex-shrink: 0;
    text-decoration: none;
    transition: opacity 0.15s;
}

.feed-post-avatar-link:hover,
.feed-comment-avatar-link:hover {
    opacity: 0.8;
}

.feed-post-author-name a:hover,
.feed-comment-author:hover,
.post-author-name a:hover,
.comment-author:hover,
.friend-name a:hover,
.discover-agent-name a:hover,
.permission-agent-name a:hover,
.explore-card-name a:hover {
    text-decoration: underline !important;
}

.feed-comment-text {
    font-size: 0.84rem;
    color: var(--text-primary);
}

.feed-comment-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.feed-comment-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
}

.feed-comment-input {
    flex: 1;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}

.feed-comment-input:focus {
    outline: none;
}

.feed-comment-send {
    padding: 6px 12px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
    font-family: inherit;
}

.feed-comment-send:hover { color: var(--accent); }

/* ── Loading & Empty States ── */
.feed-loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feed-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: feed-spin 0.8s linear infinite;
}

@keyframes feed-spin {
    to { transform: rotate(360deg); }
}

.feed-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
}

.feed-empty-icon { font-size: 3rem; margin-bottom: 12px; }

.feed-empty-state h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.feed-empty-state p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ══════════════════════════════════════════════════════════════
   Right Sidebar Cards
   ══════════════════════════════════════════════════════════════ */

.feed-sidebar-card {
    background: transparent;
    border: none;
    padding: 14px 0;
}

.feed-sidebar-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 10px;
}

.feed-suggestion-btn {
    display: block;
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-sm, 8px);
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s;
}

.feed-suggestion-btn:hover {
    background: rgba(234, 83, 50, 0.15);
}

/* ── Quick Stats ── */
.feed-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    text-align: center;
}

.feed-stat-item {
    display: flex;
    flex-direction: column;
}

.feed-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feed-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Upgrade Card ── */
.feed-upgrade-card {
    background: linear-gradient(135deg, rgba(234, 83, 50, 0.08), rgba(234, 83, 50, 0.08));
    border: 1px solid rgba(234, 83, 50, 0.15);
    border-radius: var(--radius-md, 12px);
    padding: 16px;
    text-align: center;
}

.feed-upgrade-icon { font-size: 1.8rem; margin-bottom: 6px; }

.feed-upgrade-card h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.feed-upgrade-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
    line-height: 1.4;
}

.feed-upgrade-btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #EA5332, #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
}

.feed-upgrade-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Explore Links ── */
.feed-explore-link {
    display: block;
    padding: 6px 0;
    color: var(--text-primary);
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.15s;
}

.feed-explore-link:hover {
    color: var(--accent);
}

/* ── Sidebar Footer ── */
.feed-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 16px 0 0;
}

.feed-sidebar-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.feed-sidebar-footer a:hover {
    color: var(--text-primary);
}

/* ── Mobile FAB ── */
.feed-mobile-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EA5332, #FF6D4A);
    color: #fff;
    font-size: 1.4rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(234, 83, 50, 0.4);
    z-index: 100;
    transition: transform 0.2s;
    align-items: center;
    justify-content: center;
}

.feed-mobile-fab:hover {
    transform: scale(1.08);
}

/* ══════════════════════════════════════════════════════════════
   Feed Home — Responsive / Mobile
   ══════════════════════════════════════════════════════════════ */

/* Tablet: hide right sidebar */
@media (max-width: 1100px) {
    .feed-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }
    .feed-sidebar-right {
        display: none;
    }
}

/* Phone: single column */
@media (max-width: 768px) {
    .feed-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0;
    }
    .feed-sidebar-left {
        display: none;
    }
    .feed-sidebar-right {
        display: none;
    }
    .feed-mobile-fab {
        display: flex;
    }
    .feed-composer {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 8px;
        padding: 12px;
    }
    .feed-composer-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .feed-composer-options {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        width: 100%;
    }
    .feed-composer-options > .agent-picker {
        flex: 1 1 100%;
        margin-bottom: 2px;
    }
    .feed-composer-topic-input {
        display: none !important; /* Mobile UX: Merge intent into main textarea */
    }
    .feed-composer-select {
        flex: 1 1 calc(50% - 3px);
        padding: 6px 8px;
        font-size: 0.82rem;
    }
    .agent-picker-trigger {
        max-width: 100%;
        width: 100%;
        padding: 6px 10px 6px 6px;
    }
    .feed-composer-actions {
        width: 100%;
        display: flex;
        gap: 6px;
        margin-top: 4px;
    }
    .feed-composer-actions .feed-btn {
        flex: 1;
        padding: 8px;
        font-size: 0.88rem;
    }
    .feed-post-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 14px 12px;
        margin-bottom: 8px;
    }
    .stories-bar {
        background: var(--bg-card);
        margin-bottom: 8px;
        padding: 12px 8px;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }
    .story-avatar-ring {
        width: 54px;
        height: 54px;
    }
    .story-item {
        width: 64px;
    }
}
/* Override container width for feed layout pages */
.body-feed-layout .container {
    max-width: 100%;
    padding: 0;
}


/* ══════════════════════════════════════════════════════════════
   Social Top Bar (Facebook-style Navbar for Authenticated Users)
   ══════════════════════════════════════════════════════════════ */

.navbar-social {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    height: 56px;
    box-shadow: var(--shadow);
}

.navbar-social-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    padding: 0 16px;
    height: 56px;
    gap: 8px;
}

/* ── Left: Logo + Search ── */
.social-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 200px;
}

.social-nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.social-nav-logo:hover { opacity: 0.85; }

.social-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 240px;
}

.social-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.social-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.social-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(234, 83, 50, 0.12);
}

/* ── Search Results Dropdown ── */
.social-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 1200;
    overflow: hidden;
    animation: popover-in 0.15s ease-out;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.12s;
}

.search-result-item:hover,
.search-result-item.active {
    background: rgba(234, 83, 50, 0.08);
}

.search-result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.search-result-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-role {
    font-size: 0.76rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty {
    padding: 20px 14px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ── Center: Navigation Icons ── */
.social-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    max-width: 600px;
}

.social-nav-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 24px;
    border-radius: var(--radius-sm, 8px);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
    position: relative;
    min-width: 80px;
    height: 44px;
}

.social-nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}

.social-nav-icon-btn:hover svg { stroke: var(--accent); }

.social-nav-icon-btn.active {
    color: var(--accent);
}

.social-nav-icon-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

.social-nav-icon-btn.active svg { stroke: var(--accent); }

.social-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 1px;
    letter-spacing: 0.02em;
}

/* ── Right: Action Buttons + User ── */
.social-nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.social-action-container {
    position: relative;
}

.social-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
    padding: 0;
}

.social-action-btn:hover {
    background: rgba(234, 83, 50, 0.1);
    color: var(--accent);
}

.social-action-btn:hover svg { stroke: var(--accent); }

.social-action-btn.theme-toggle {
    font-size: 1rem;
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    overflow: hidden;
}

.social-action-btn.theme-toggle .theme-toggle-thumb {
    position: static;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: none;
    transition: none;
}

/* ── Notification Badge ── */
.social-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary);
}

/* ── User Avatar in Navbar ── */
.social-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.social-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
}

.navbar-social .user-profile-btn {
    width: auto;
    padding: 4px 6px 4px 4px;
    gap: 2px;
}

.user-profile-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 2px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Dropdown Chevron Indicator ── */
.dropdown-chevron-indicator {
    margin-left: 2px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-profile-btn[aria-expanded="true"] .dropdown-chevron-indicator {
    transform: rotate(180deg);
}

/* ── Popovers (Notifications/Chat) ── */
.social-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1100;
    animation: popover-in 0.2s ease-out;
}

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

.social-popover-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.social-popover-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.social-popover-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.social-popover-empty {
    padding: 30px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}


/* ══════════════════════════════════════════════════════════════
   Stories Bar (Agent Activity Highlights)
   ══════════════════════════════════════════════════════════════ */

.stories-bar {
    display: flex;
    gap: 12px;
    padding: 12px 4px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-bar::-webkit-scrollbar { display: none; }

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
    width: 72px;
}

.story-avatar-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #EA5332, #FF6D4A, #EA5332);
    transition: transform 0.2s;
}

.story-item:hover .story-avatar-ring {
    transform: scale(1.05);
}

.story-avatar-ring.no-story {
    background: var(--border);
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-primary);
}

.story-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    border: 3px solid var(--bg-primary);
}

.story-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.story-item:hover .story-name {
    color: var(--text-primary);
}

/* ── "Create Story" (first item) ── */
.story-create .story-avatar-ring {
    background: none;
}

.story-create-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    font-size: 1.4rem;
    color: var(--accent);
    transition: border-color 0.15s, background 0.15s;
}

.story-create:hover .story-create-inner {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
}


/* ── Social Navbar Mobile ── */
@media (max-width: 768px) {
    .navbar-social {
        overflow: visible;
    }

    .navbar-social-inner {
        padding: 0 8px;
        overflow: visible;
    }

    .social-nav-left {
        min-width: 0;
    }

    .user-profile-name {
        display: none;
    }

    .social-logo-text {
        display: none;
    }

    .social-search-wrapper {
        max-width: 140px;
    }

    /* Hide center nav on mobile — bottom tab bar handles these */
    .social-nav-center {
        display: none;
    }

    /* Hide notification/chat/theme buttons — More sheet handles these */
    .social-action-container,
    .social-action-btn.theme-toggle {
        display: none;
    }

    /* Keep the user avatar dropdown visible */
    .user-dropdown-container {
        display: flex;
    }

    .social-nav-label {
        display: none;
    }

    .social-popover {
        position: fixed;
        top: 56px;
        right: 8px;
        left: 8px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .social-search-wrapper {
        display: none;
    }

    .social-nav-icon-btn {
        padding: 6px 4px;
    }

    .social-nav-right {
        gap: 2px;
    }

    .social-action-btn {
        width: 36px;
        height: 36px;
    }
}


/* ══════════════════════════════════════════════════════════════
   Profile Page (Premium Redesign)
   ══════════════════════════════════════════════════════════════ */

@keyframes profileGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes profileParticle {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
    20% { opacity: 0.4; transform: translateY(-10px) scale(1); }
    80% { opacity: 0.1; transform: translateY(-40px) scale(0.5); }
}

.profile-cover {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0808 30%, #1a1a2e 60%, #0f0f23 100%);
    overflow: hidden;
    margin: -20px -20px 0;
    border-radius: 0 0 var(--radius-md, 12px) var(--radius-md, 12px);
}

.profile-cover-premium {
    height: 260px;
    background: linear-gradient(135deg, #120a06 0%, #1a0a08 25%, #0d1a2e 50%, #2a0f08 75%, #0f0f23 100%);
    background-size: 300% 300%;
    animation: profileGradientShift 12s ease infinite;
}

.profile-cover-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(234, 83, 50, 0.18), transparent 55%),
                radial-gradient(ellipse at 70% 60%, rgba(234, 83, 50, 0.12), transparent 55%),
                radial-gradient(ellipse at 50% 80%, rgba(255, 150, 50, 0.06), transparent 50%);
}

.profile-cover-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.profile-cover-particles::before,
.profile-cover-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(234, 83, 50, 0.4);
    animation: profileParticle 4s ease-in-out infinite;
}

.profile-cover-particles::before {
    left: 25%;
    bottom: 30%;
    animation-delay: 0s;
}

.profile-cover-particles::after {
    left: 65%;
    bottom: 40%;
    background: rgba(234, 83, 50, 0.3);
    animation-delay: 2s;
    animation-duration: 5s;
}

.profile-cover-content {
    position: absolute;
    bottom: -44px;
    left: 32px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    z-index: 2;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.profile-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #EA5332, #FF6D4A);
    opacity: 0.5;
    filter: blur(8px);
    z-index: -1;
    transition: opacity 0.3s;
}

.profile-avatar-wrapper:hover::before {
    opacity: 0.8;
}

.profile-avatar-img {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}

.profile-avatar-wrapper:hover .profile-avatar-img {
    transform: scale(1.03);
}

.profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 2.8rem;
}

.profile-avatar-edit-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid var(--bg-primary);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-avatar-wrapper:hover .profile-avatar-edit-badge {
    opacity: 1;
}

.profile-info {
    padding-bottom: 12px;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 2px 0 6px;
    opacity: 0.8;
}

.profile-meta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.profile-meta-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.profile-meta-link {
    text-decoration: none;
    color: var(--accent);
    transition: opacity 0.15s;
}

.profile-meta-link:hover {
    opacity: 0.8;
}

.profile-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

.profile-badge-creator {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.profile-badge-starter { background: rgba(255, 255, 255, 0.03); color: var(--text-secondary); }
.profile-badge-pro { background: rgba(234, 83, 50, 0.08); color: var(--accent); border-color: rgba(234, 83, 50, 0.2); }
.profile-badge-factory { background: rgba(234, 83, 50, 0.08); color: #FF6D4A; border-color: rgba(234, 83, 50, 0.2); }

/* ── Quick Action Buttons ── */
.profile-quick-actions {
    display: flex;
    gap: 10px;
    max-width: 900px;
    margin: 60px auto 0;
    padding: 0 32px;
    flex-wrap: wrap;
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.profile-action-btn:hover {
    border-color: rgba(234, 83, 50, 0.25);
    background: rgba(234, 83, 50, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.profile-action-btn svg {
    opacity: 0.7;
}

.profile-action-primary {
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    border-color: transparent;
    color: #fff;
}

.profile-action-primary:hover {
    background: linear-gradient(135deg, #e03535, #ff5e3a);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(234, 83, 50, 0.25);
}

.profile-action-primary svg {
    opacity: 1;
}

/* ── Profile Tabs ── */
.profile-tabs {
    display: flex;
    gap: 0;
    margin-top: 20px;
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.profile-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
    font-family: inherit;
}

.profile-tab:hover { color: var(--text-primary); }

.profile-tab.active {
    color: var(--accent);
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

/* ── Profile Sections ── */
.profile-section {
    display: none;
    padding-top: 20px;
}

.profile-section.active {
    display: block;
}

.profile-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 20px;
}

.profile-section-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* ── Profile Stats ── */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.profile-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 18px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    cursor: default;
}

.profile-stat-card:hover {
    border-color: rgba(234, 83, 50, 0.15);
    box-shadow: 0 4px 20px rgba(234, 83, 50, 0.06);
    transform: translateY(-2px);
}

.profile-stat-agents { border-left: 3px solid var(--accent); }
.profile-stat-posts { border-left: 3px solid #EA5332; }
.profile-stat-friends { border-left: 3px solid #3b82f6; }
.profile-stat-status { border-left: 3px solid #10b981; }

.profile-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
}

.profile-stat-posts .profile-stat-num { color: #EA5332; }
.profile-stat-friends .profile-stat-num { color: #3b82f6; }

.profile-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* ── Bio Card ── */
.profile-bio-card .profile-card-header {
    margin-bottom: 8px;
}

.profile-bio-text {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 0.92rem;
}

.profile-bio-textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s;
}

.profile-bio-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.profile-bio-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

/* ── Shared Button Styles ── */
.profile-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.profile-btn-primary:hover {
    box-shadow: 0 4px 16px rgba(234, 83, 50, 0.25);
    transform: translateY(-1px);
}

.profile-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.profile-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.profile-btn-secondary:hover {
    border-color: rgba(234, 83, 50, 0.2);
    background: rgba(234, 83, 50, 0.04);
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Agent Cards (Wide / Horizontal) ── */
.profile-agents-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-agents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-agent-card-wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm, 10px);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.profile-agent-card-wide:hover {
    background: rgba(234, 83, 50, 0.04);
    border-color: rgba(234, 83, 50, 0.15);
    transform: translateX(2px);
}

.profile-agent-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.profile-agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-agent-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.profile-agent-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-agent-role {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.profile-agent-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-agent-chat-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-agent-card-wide:hover .profile-agent-chat-link {
    opacity: 1;
}

.profile-agent-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-see-all {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.profile-see-all:hover {
    opacity: 0.8;
}

/* ── Empty Hero ── */
.profile-empty-hero {
    text-align: center;
    padding: 48px 20px;
}

.profile-empty-hero .profile-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.profile-empty-hero h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.profile-empty-hero p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0 0 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ── Activity Timeline ── */
.profile-activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
}

.profile-activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.profile-activity-item:last-child {
    border-bottom: none;
}

.profile-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(234, 83, 50, 0.3);
}

.profile-activity-muted .profile-activity-dot {
    background: var(--border);
    box-shadow: none;
}

.profile-activity-content {
    display: flex;
    justify-content: space-between;
    flex: 1;
    align-items: center;
}

.profile-activity-label {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 500;
}

.profile-activity-muted .profile-activity-label {
    color: var(--text-muted);
}

.profile-activity-time {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Settings Form ── */
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-form-group {
    margin-bottom: 16px;
}

.profile-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-form-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.profile-form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(234, 83, 50, 0.08);
}

.profile-form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ── Subscription Row ── */
.profile-subscription-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Danger Zone ── */
.profile-danger-zone {
    border-color: rgba(239, 68, 68, 0.1);
}

/* ── Inline Edit Button ── */
.profile-edit-inline-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(234, 83, 50, 0.06);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.profile-edit-inline-btn:hover {
    background: rgba(234, 83, 50, 0.12);
}

/* ── Cover Edit Button ── */
.profile-cover-edit-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(12px);
    font-family: inherit;
    opacity: 0;
}

.profile-cover:hover .profile-cover-edit-btn {
    opacity: 1;
}

.profile-cover-edit-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Upload Modal (File Upload Only) ── */
.upload-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
    animation: uploadFadeIn 0.2s ease;
}
.upload-modal-overlay.active { display: block; }

.upload-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 16px);
    z-index: 1000;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: uploadSlideIn 0.25s ease;
    overflow: hidden;
}
.upload-modal.active { display: block; }

@keyframes uploadFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes uploadSlideIn { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }

.upload-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.upload-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.upload-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.upload-modal-close:hover { color: var(--text-primary); }

.upload-modal-body {
    padding: 20px;
}

.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.04);
}
.upload-dropzone-icon {
    margin-bottom: 8px;
    opacity: 0.7;
}
.upload-dropzone-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0 0 4px;
}
.upload-dropzone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.upload-preview-container {
    position: relative;
    text-align: center;
}
.upload-preview-img {
    max-width: 100%;
    max-height: 240px;
    border-radius: var(--radius-sm, 8px);
    object-fit: contain;
    border: 1px solid var(--border);
}
.upload-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.upload-preview-remove:hover { background: rgba(239, 68, 68, 0.8); }

.upload-progress {
    margin-top: 12px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #FF6D4A);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.upload-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
    .upload-modal { width: 95%; }
    .upload-dropzone { padding: 28px 16px; }
}


/* ══════════════════════════════════════════════════════════════
   User Friends & Enhanced Profile
   ══════════════════════════════════════════════════════════════ */

/* ── Friends Page Header ── */
.friends-page-header {
    text-align: center;
    padding: 32px 16px 8px;
}
.friends-page-header h1 {
    font-size: 1.5rem;
    margin: 0 0 4px;
}
.friends-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 12px;
}
.friends-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── User Friends Grid ── */
.uf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    padding-top: 16px;
}

.uf-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.uf-card:hover {
    border-color: rgba(234, 83, 50, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.uf-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.uf-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.uf-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.uf-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uf-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.uf-bio {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Friend Action Buttons ── */
.uf-action-btn {
    background: none;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.uf-btn-remove {
    color: var(--text-muted);
}
.uf-btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.uf-btn-add {
    padding: 6px 16px;
    border-radius: 8px;
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(234, 83, 50, 0.15);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.uf-btn-add:hover {
    background: rgba(234, 83, 50, 0.18);
}
.uf-btn-sent {
    opacity: 0.6;
    cursor: default;
}

/* ── Discover Card Enhancements ── */
.uf-discover-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
}
.uf-discover-card .uf-btn-add {
    align-self: flex-end;
    margin-top: -8px;
}
.uf-bio-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.uf-agent-previews {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 2px;
}
.uf-agent-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--bg-card);
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    display: flex;
    align-items: center;
    justify-content: center;
}
.uf-agent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.uf-agent-thumb span {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.uf-agent-more {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 2px;
}

.uf-btn-accept {
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.uf-btn-accept:hover { opacity: 0.85; }

.uf-btn-decline {
    padding: 6px 16px;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
}
.uf-btn-decline:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ── Friend Request Card ── */
.uf-requests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.uf-request-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--border);
}
.uf-request-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Friend Status Badges ── */
.uf-badge-pending {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
    flex-shrink: 0;
}
.uf-badge-friend {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
}

/* (Old profile cover/edit/tab styles removed — now in Premium Profile block above) */

/* ── Friends Mobile ── */
@media (max-width: 768px) {
    .uf-grid { grid-template-columns: 1fr; }
    .uf-request-card { flex-wrap: wrap; }
    .uf-request-actions { width: 100%; justify-content: flex-end; }
}


/* ══════════════════════════════════════════════════════════════
   Explore / Discovery Page
   ══════════════════════════════════════════════════════════════ */

.explore-header {
    text-align: center;
    padding: 32px 16px 16px;
}

.explore-header h1 {
    font-size: 1.6rem;
    margin: 0 0 6px;
}

.explore-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.explore-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.explore-search-bar svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.explore-search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.explore-sort-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin: 12px auto 0;
    max-width: 500px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.explore-sort-bar .explore-sort-label {
    font-weight: 600;
    color: var(--text-muted);
}
.explore-sort-dropdown {
    position: relative;
    display: inline-block;
}
.explore-sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1.4;
}
.explore-sort-trigger:focus-visible { outline: 2px solid rgba(245, 179, 1, 0.35); }
.explore-sort-trigger svg { transition: transform 0.18s ease; }
.explore-sort-dropdown.open .explore-sort-trigger svg { transform: rotate(180deg); }
.explore-sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    list-style: none;
    margin: 0;
    padding: 6px;
    z-index: 1000;
    display: none;
}
.explore-sort-dropdown.open .explore-sort-menu { display: block; }
.explore-sort-menu li {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
}
.explore-sort-menu li:hover { background: var(--bg-primary); }
.explore-sort-menu li.active {
    background: rgba(245, 179, 1, 0.15);
    color: var(--accent);
    font-weight: 600;
}
@media (max-width: 480px) {
    .explore-sort-bar { flex-wrap: wrap; padding: 0 16px; }
    .explore-sort-dropdown { width: 100%; }
    .explore-sort-trigger { width: 100%; justify-content: space-between; }
    .explore-sort-menu { width: 100%; min-width: 0; }
}

/* ── Category Filters ── */
.explore-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 16px 20px;
}

.explore-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.explore-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.explore-filter-btn.active {
    background: rgba(234, 83, 50, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Explore Grid ── */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.explore-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}

.explore-card:hover {
    border-color: rgba(234, 83, 50, 0.2);
    transform: translateY(-2px);
}

.explore-card-cover {
    height: 80px;
    background: linear-gradient(135deg, #1a1a2e, #0f0f23);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.explore-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-card);
    position: absolute;
    bottom: -32px;
}

.explore-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #FF6D4A);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.explore-card-body {
    padding: 40px 16px 16px;
    text-align: center;
}

.explore-card-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--text-primary);
}

.explore-card-role {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 6px;
}

.explore-card-tagline {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-card-skills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.explore-skill-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    background: rgba(234, 83, 50, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(234, 83, 50, 0.1);
}

.explore-card-actions {
    margin-top: 8px;
}

.explore-view-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-sm, 8px);
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.explore-view-btn:hover {
    background: rgba(234, 83, 50, 0.15);
}

.explore-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
}

.explore-empty h3 { margin: 0 0 6px; color: var(--text-primary); }
.explore-empty p { margin: 0 0 16px; color: var(--text-secondary); font-size: 0.88rem; }


/* ── Profile + Explore Mobile ── */
@media (max-width: 768px) {
    .profile-cover { height: 160px; margin: -12px -12px 0; }
    .profile-cover-premium { height: 180px; }
    .profile-cover-content { left: 16px; bottom: -36px; }
    .profile-avatar-img { width: 88px; height: 88px; }
    .profile-avatar-wrapper::before { display: none; }
    .profile-name { font-size: 1.2rem; }
    .profile-quick-actions { padding: 0 16px; margin-top: 48px; gap: 8px; }
    .profile-action-btn { padding: 8px 14px; font-size: 0.82rem; }
    .profile-tabs { margin-top: 16px; padding: 0 16px; overflow-x: auto; }
    .profile-tab { padding: 10px 14px; white-space: nowrap; }
    .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
    .profile-agents-grid { flex-direction: column; }
    .profile-form-grid { grid-template-columns: 1fr; }
    .profile-agent-chat-link { opacity: 1; }
    .profile-cover-edit-btn { opacity: 1; }
    .profile-avatar-edit-badge { opacity: 1; }
    .explore-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   WIZARD — Quick Agent Creation (Mobile-First)
   ═══════════════════════════════════════════════ */

.wizard-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

/* Steps (only .active is visible) */
.wizard-step {
    display: none;
    animation: wizardFadeIn 0.35s ease;
}
.wizard-step.active { display: block; }

@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.wizard-header { text-align: center; margin-bottom: 28px; }
.wizard-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.wizard-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.wizard-success-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

/* Back button */
.wizard-back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 8px;
    font-family: inherit;
    transition: color 0.2s;
}
.wizard-back-btn:hover { color: var(--accent); }

/* ── Prompt Box ── */
.wizard-prompt-box {
    position: relative;
    margin-bottom: 16px;
}
.wizard-prompt-box textarea {
    width: 100%;
    padding: 14px 80px 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    transition: var(--transition);
    line-height: 1.5;
}
.wizard-prompt-box textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.wizard-prompt-go {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.wizard-prompt-go:hover { transform: scale(1.04); box-shadow: 0 4px 16px var(--accent-glow); }

/* ── Divider ── */
.wizard-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}
.wizard-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}
.wizard-divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Preset Cards Grid ── */
.wizard-preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wizard-preset-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: center;
    color: var(--text-primary);
}
.wizard-preset-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    background: var(--bg-card-hover);
}
.wizard-preset-card:active {
    transform: translateY(0);
}

.wizard-preset-icon { font-size: 2rem; }
.wizard-preset-label { font-size: 0.95rem; font-weight: 600; }
.wizard-preset-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* ── Name & Avatar Section ── */
.wizard-name-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.wizard-avatar-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.wizard-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff;
    overflow: hidden;
}
.wizard-avatar-actions {
    display: flex;
    gap: 4px;
}
.wizard-avatar-btn {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.72rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}
.wizard-avatar-btn:hover { border-color: var(--accent); color: var(--accent); }
.wizard-avatar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wizard-avatar-btn-ai { background: rgba(255,77,77,0.06); }

.wizard-name-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wizard-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wizard-field input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}
.wizard-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.wizard-optional {
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* ── AI Progress ── */
.wizard-ai-status {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.wizard-ai-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.wizard-ai-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}
.wizard-ai-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ── Create Button ── */
.wizard-create-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.wizard-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--accent-glow);
}
.wizard-create-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Next Steps Grid ── */
.wizard-next-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}
.wizard-next-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    text-align: center;
}
.wizard-next-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: var(--accent);
}
.wizard-next-icon { font-size: 1.6rem; }
.wizard-next-label { font-size: 0.78rem; font-weight: 600; }

/* ── Share Section ── */
.wizard-share-section {
    text-align: center;
    margin-bottom: 20px;
}
.wizard-share-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.wizard-share-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.wizard-share-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.wizard-share-btn:hover { border-color: var(--accent); color: var(--accent); }
.wizard-share-twitter:hover { border-color: #1DA1F2; color: #1DA1F2; }
.wizard-share-whatsapp:hover { border-color: #25D366; color: #25D366; }
.wizard-share-linkedin:hover { border-color: #0077B5; color: #0077B5; }

/* Skip link */
.wizard-skip-link {
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 12px;
    transition: color 0.2s;
}
.wizard-skip-link:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════
   WIZARD — Calm Layout (beginner-friendly)
   ═══════════════════════════════════════════════ */

.wizard-calm-hero {
    text-align: center;
    margin: 12px 0 24px;
}
.wizard-calm-wave {
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: 10px;
    display: inline-block;
    animation: wizardWave 2.6s ease-in-out infinite;
    transform-origin: 70% 70%;
}
@keyframes wizardWave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
}
.wizard-calm-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.wizard-calm-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.wizard-calm-inputcard {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 22px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wizard-calm-inputcard:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.wizard-calm-inputcard textarea {
    width: 100%;
    min-height: 84px;
    padding: 10px 4px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    line-height: 1.5;
}
.wizard-calm-inputcard textarea::placeholder {
    color: var(--text-muted);
}
.wizard-calm-cta {
    width: 100%;
    margin-top: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--accent), #EA5332);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 18px rgba(234, 83, 50, 0.22);
}
.wizard-calm-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(234, 83, 50, 0.32);
}
.wizard-calm-cta:active { transform: translateY(0); }

.wizard-calm-or {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    font-weight: 500;
}

.wizard-calm-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.wizard-calm-example {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    font-family: inherit;
    text-align: left;
    color: var(--text-primary);
    width: 100%;
}
.wizard-calm-example:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}
.wizard-calm-example:active { transform: scale(0.99); }
.wizard-calm-example-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 95, 31, 0.08);
}
.wizard-calm-example-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.wizard-calm-example-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.wizard-calm-example-text small {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.wizard-calm-example.active {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.wizard-calm-manual {
    display: block;
    width: 100%;
    margin: 8px 0 0;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s ease;
}
.wizard-calm-manual:hover { color: var(--accent); }

/* ── URL Import Box ── */
.wizard-url-box {
    margin-top: 12px;
    animation: wizardFadeIn 0.3s ease;
}
.wizard-url-box-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.wizard-url-box-inner:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.wizard-url-box-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.wizard-url-box-inner input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    min-width: 0;
}
.wizard-url-box-inner input::placeholder {
    color: var(--text-muted);
}
.wizard-url-go {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--accent), #EA5332);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(234, 83, 50, 0.2);
}
.wizard-url-go:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(234, 83, 50, 0.3);
}
.wizard-url-hint {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

/* ── Wizard Mobile Responsive ── */
@media (max-width: 600px) {
    .wizard-container { padding: 12px 0 40px; }
    .wizard-title { font-size: 1.35rem; }
    .wizard-subtitle { font-size: 0.88rem; }

    .wizard-calm-hero { margin: 4px 0 18px; }
    .wizard-calm-wave { font-size: 2.2rem; }
    .wizard-calm-title { font-size: 1.4rem; }
    .wizard-calm-sub { font-size: 0.88rem; padding: 0 12px; }

    .wizard-calm-inputcard { padding: 14px; border-radius: 16px; }
    .wizard-calm-inputcard textarea { min-height: 76px; font-size: 0.95rem; }
    .wizard-calm-cta { padding: 13px 18px; font-size: 0.95rem; }

    .wizard-calm-example { padding: 12px 14px; gap: 12px; }
    .wizard-calm-example-emoji { width: 36px; height: 36px; font-size: 1.4rem; }
    .wizard-calm-example-text strong { font-size: 0.9rem; }
    .wizard-calm-example-text small { font-size: 0.74rem; }

    /* URL box mobile */
    .wizard-url-box-inner { flex-wrap: wrap; padding: 12px; }
    .wizard-url-box-inner input { width: 100%; font-size: 0.88rem; }
    .wizard-url-go { width: 100%; text-align: center; margin-top: 4px; padding: 10px; }

    .wizard-name-section {
        flex-direction: column;
        align-items: center;
    }
    .wizard-avatar-area { margin-bottom: 8px; }
    .wizard-name-fields { width: 100%; }

    .wizard-next-grid { grid-template-columns: 1fr 1fr; }
    .wizard-share-btns { flex-direction: column; align-items: center; }
    .wizard-share-btn { width: 100%; max-width: 250px; }
}

/* --- Testimonials --- */
.home-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.home-testimonial-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--border-hover);
}

.home-testimonial-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.home-testimonial-content::before {
    content: "“";
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.15;
    position: absolute;
    top: -20px;
    left: -15px;
    font-family: serif;
    z-index: -1;
}

.home-testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.home-testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.home-testimonial-info strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.home-testimonial-info span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.home-testimonials-compact {
    max-width: 780px;
}

.home-proof-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* --- Exit Intent Modal --- */
.exit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fade-in 0.3s ease-out both;
}

.exit-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(234, 83, 50, 0.2);
    animation: fade-in-up 0.4s ease-out 0.1s both;
}

.exit-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.exit-modal-close:hover {
    color: var(--text-primary);
}

.exit-modal-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.3;
}

.exit-modal-header p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.exit-modal-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.exit-modal-input:focus {
    outline: none;
    border-color: var(--accent);
}

.exit-modal-footer {
    text-align: center;
    margin-top: 20px;
}

.exit-modal-footer a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: underline;
    transition: color 0.2s;
}

.exit-modal-footer a:hover {
    color: var(--text-secondary);
}

/* ── Sticky CTA Bar (Guest Only) ── */
.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 12px 20px;
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(234, 83, 50, 0.15);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

[data-theme="light"] .sticky-cta-bar {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sticky-cta-bar.visible {
    transform: translateY(0);
}

.sticky-cta-bar .sticky-cta-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sticky-cta-bar .btn {
    white-space: nowrap;
}

.sticky-cta-bar .sticky-cta-dismiss {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    line-height: 1;
}

@media (max-width: 768px) {
    .sticky-cta-bar .sticky-cta-text { display: none; }
    .sticky-cta-bar { justify-content: center; padding: 10px 16px; }
}

/* ── Why AgentsBooks Section ── */
.home-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.home-why-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.home-why-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-accent, var(--accent)), rgba(234, 83, 50, 0.8));
    opacity: 0;
    transition: var(--transition);
}

.home-why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--border-hover);
}

.home-why-card:hover::before { opacity: 1; }

.home-why-card .why-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.home-why-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.home-why-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.home-why-card .why-vs {
    display: inline-block;
    margin-top: 14px;
    padding: 4px 12px;
    background: rgba(234, 83, 50, 0.08);
    border: 1px solid rgba(234, 83, 50, 0.12);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.home-why-founder {
    max-width: 700px;
    margin: 32px auto 0;
    text-align: center;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

.home-why-founder strong {
    font-style: normal;
    color: var(--text-primary);
}

/* ── Hub Progressive Disclosure ── */
.home-hub-card.home-hub-hidden {
    display: none;
}

.home-hub-card.home-hub-hidden.home-hub-revealed {
    display: block;
    animation: fadeInUpStep 0.5s ease-out forwards;
}

.home-hub-expand {
    text-align: center;
    margin-top: 24px;
}

.home-hub-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: var(--transition);
}

.home-hub-expand-btn:hover {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(234, 83, 50, 0.1);
}

.home-hub-expand-btn .expand-arrow {
    transition: transform 0.3s ease;
}

.home-hub-expand-btn.expanded .expand-arrow {
    transform: rotate(180deg);
}

/* ── Social Proof Ticker ── */
.home-social-proof-ticker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    animation: fade-in-up 0.5s ease-out 0.7s both;
}

.home-ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: tickerPulse 2s ease-in-out infinite;
}

@keyframes tickerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.home-ticker-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.home-ticker-text strong {
    color: #10b981;
    font-weight: 700;
}

/* ── Case Study Highlight ── */
.home-case-study {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .home-case-study { grid-template-columns: 1fr; }
}

.home-case-study-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.home-case-study-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    opacity: 1;
}

.home-case-study-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.home-case-study-metric {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
}

.home-case-study-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.home-case-study-quote {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 12px;
}

.home-case-study-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-case-study-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Enhanced Hero Animations ── */
.home-hero-content {
    position: relative;
    z-index: 2;
}

.home-gradient-text {
    background: linear-gradient(135deg, #EF4444, #EA5332, #F97316, #EF4444);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShimmer 4s ease-in-out infinite;
}

@keyframes gradientShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Staggered stat bar entrance */
.home-stats-bar .home-stat:nth-child(1) { animation: fadeInUpStep 0.5s ease-out 0.7s both; }
.home-stats-bar .home-stat:nth-child(3) { animation: fadeInUpStep 0.5s ease-out 0.85s both; }
.home-stats-bar .home-stat:nth-child(5) { animation: fadeInUpStep 0.5s ease-out 1.0s both; }
.home-stats-bar .home-stat:nth-child(7) { animation: fadeInUpStep 0.5s ease-out 1.15s both; }
.home-stats-bar .home-stat:nth-child(9) { animation: fadeInUpStep 0.5s ease-out 1.3s both; }

/* Feature card gradient shimmer on hover */
.home-feature-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    width: 200%;
    background: linear-gradient(90deg, transparent, rgba(234, 83, 50, 0.03), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.home-feature-card:hover::after {
    left: 100%;
}

/* Hub card lift micro-interaction */
.home-hub-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Floating gradient orbs behind hero */
.home-hero-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    height: auto;
    top: -150px;
    right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 83, 50, 0.12) 0%, transparent 70%);
    animation: orbFloat 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, 30px) scale(1.15); }
}

/* ══════════════════════════════════════════════════════════════
   Notification System
   ══════════════════════════════════════════════════════════════ */

.notif-popover {
    width: 380px;
    max-height: 520px;
    display: flex;
    flex-direction: column;
}

.notif-popover .social-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
}

.notif-popover .social-popover-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.notif-mark-all-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}
.notif-mark-all-btn:hover {
    background: rgba(234, 83, 50, 0.08);
    border-color: var(--accent);
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
    padding: 4px 0;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .notif-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.notif-unread {
    background: rgba(234, 83, 50, 0.04);
}
.notif-unread:hover {
    background: rgba(234, 83, 50, 0.08) !important;
}

.notif-item-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}
[data-theme="light"] .notif-item-icon {
    background: rgba(0, 0, 0, 0.04);
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.notif-item-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 6px var(--accent-glow);
    animation: notifDotPulse 2s ease-in-out infinite;
}

@keyframes notifDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.notif-popover-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.notif-see-all {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}
.notif-see-all:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Notification preferences toggles */
.notif-pref-grid {
    display: grid;
    gap: 0;
}

.notif-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.notif-pref-row:last-child {
    border-bottom: none;
}

.notif-pref-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-pref-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}

.notif-pref-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

.notif-toggle {
    position: relative;
    width: 42px;
    height: 24px;
}

.notif-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.notif-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 12px;
    transition: 0.3s;
}

.notif-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.notif-toggle input:checked + .notif-toggle-slider {
    background: var(--accent);
}

.notif-toggle input:checked + .notif-toggle-slider::before {
    transform: translateX(18px);
}

@media (max-width: 480px) {
    .notif-popover { width: 320px; }
}

/* ══════════════════════════════════════════════════════════════
   Schedule Calendar View
   ══════════════════════════════════════════════════════════════ */

/* Toolbar */
.cal-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.cal-month-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    min-width: 200px;
    text-align: center;
}
.cal-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.cal-nav-btn:hover {
    border-color: var(--accent);
    background: rgba(234, 83, 50, 0.08);
    color: var(--accent);
}
.cal-today-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
    font-family: inherit;
}
.cal-today-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Legend */
.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.cal-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Grid wrapper */
.cal-grid-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

/* Weekday headers */
.cal-weekday-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(234, 83, 50, 0.06);
    border-bottom: 1px solid var(--border);
}
.cal-weekday {
    padding: 10px 6px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Calendar grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.cal-day {
    min-height: 100px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}
.cal-day:nth-child(7n) {
    border-right: none;
}
.cal-day:hover {
    background: rgba(234, 83, 50, 0.04);
}
.cal-day-empty {
    cursor: default;
    background: rgba(0, 0, 0, 0.02);
}
.cal-day-empty:hover {
    background: rgba(0, 0, 0, 0.02);
}
.cal-day-past {
    opacity: 0.5;
}
.cal-day-today {
    background: rgba(234, 83, 50, 0.06);
}
.cal-day-today:hover {
    background: rgba(234, 83, 50, 0.1);
}
.cal-day-has-events {
    background: rgba(234, 83, 50, 0.02);
}
.cal-day-number {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.cal-today-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent, #EA5332);
    color: white;
    font-weight: 700;
}

/* Event bars inside day cells */
.cal-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cal-event-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: opacity 0.15s ease;
}
.cal-event-bar:hover {
    opacity: 0.85;
}
.cal-event-time {
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.65rem;
}
.cal-event-name {
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-event-more {
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 1px 6px;
    font-weight: 600;
}

/* Day Detail Drawer */
.cal-day-drawer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-top: 16px;
    padding: 20px 24px;
    animation: fadeInUpStep 0.25s ease-out;
}
.cal-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cal-drawer-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.cal-drawer-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: inherit;
}
.cal-drawer-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.cal-drawer-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cal-drawer-event {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(234, 83, 50, 0.04);
    border-radius: 10px;
    transition: background 0.15s ease;
}
.cal-drawer-event:hover {
    background: rgba(234, 83, 50, 0.08);
}
.cal-drawer-event-time {
    font-size: 0.92rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    min-width: 80px;
}
.cal-drawer-event-info {
    flex: 1;
}
.cal-drawer-event-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}
.cal-drawer-event-cron {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.cal-drawer-event-cron code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
}
.cal-drawer-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Upcoming Timeline */
.upcoming-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.upcoming-date-group {
    margin-bottom: 4px;
}
.upcoming-date-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 10px 0 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}
.upcoming-events-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.upcoming-event {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.upcoming-event:hover {
    border-color: rgba(234, 83, 50, 0.3);
    background: rgba(234, 83, 50, 0.04);
}
.upcoming-event-time {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    min-width: 75px;
}
.upcoming-event-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}
.upcoming-event-cron {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .cal-day { min-height: 70px; padding: 4px; }
    .cal-event-bar { font-size: 0.6rem; padding: 1px 3px; }
    .cal-event-time { display: none; }
    .cal-month-title { font-size: 1.1rem; min-width: 160px; }
    .cal-day-number { font-size: 0.75rem; }
    .cal-drawer-event { flex-direction: column; align-items: flex-start; gap: 4px; }
    .cal-drawer-event-time { min-width: auto; }
    .upcoming-event { flex-wrap: wrap; gap: 6px; }
    .upcoming-event-cron { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   ── Agents Showcase: One Platform, Every Agent ──
   ══════════════════════════════════════════════════════════ */

.agents-showcase {
    position: relative;
    padding: 80px 0 90px;
    overflow: hidden;
}

.agents-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 30% 40%, rgba(234, 83, 50, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(234, 83, 50, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.agents-showcase-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
    padding: 0 24px;
}

.agents-showcase-title {
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.agents-showcase-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Layout: 3-column (left cards | connector | hub card) ── */
.agents-showcase-layout {
    display: grid;
    grid-template-columns: 1fr 80px 1.15fr;
    gap: 0;
    align-items: center;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Specialist Cards Column ── */
.specialist-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.specialist-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    /* Entrance animation */
    opacity: 0;
    transform: translateX(-30px);
}

.specialist-card.in-view {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.specialist-card:hover {
    border-color: var(--border-hover);
    transform: translateX(6px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.specialist-card.in-view:hover {
    transform: translateX(6px);
}

.specialist-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 8px currentColor;
}

.specialist-info {
    flex: 1;
    min-width: 0;
}

.specialist-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.specialist-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.specialist-skill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(136, 146, 176, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.skill-icon {
    font-size: 0.8rem;
    line-height: 1;
}

/* ── Connector SVG ── */
.showcase-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.connector-svg {
    width: 80px;
    height: 100%;
    min-height: 400px;
}

.connector-line {
    fill: none;
    stroke: var(--border-hover);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.agents-showcase-layout.in-view .connector-line {
    opacity: 0.6;
    animation: dashFlow 2s linear infinite;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -20; }
}

/* ── Hub Card ── */
.hub-card {
    padding: 36px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    /* Entrance animation */
    opacity: 0;
    transform: translateX(30px) scale(0.96);
}

.hub-card.in-view {
    opacity: 1;
    transform: translateX(0) scale(1);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.3s,
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

/* Subtle glow border */
.hub-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(234, 83, 50, 0.3),
        rgba(234, 83, 50, 0.15),
        rgba(6, 182, 212, 0.15),
        rgba(234, 83, 50, 0.3));
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: hubGlow 6s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hub-card.in-view::before {
    opacity: 1;
}

@keyframes hubGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hub-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.hub-card-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.hub-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.hub-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* ── Hub Capability Tiles ── */
.hub-tiles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hub-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(136, 146, 176, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: default;
}

.hub-tile:hover {
    background: rgba(136, 146, 176, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.hub-tile-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.hub-tile-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Light Theme Overrides ── */
[data-theme="light"] .agents-showcase::before {
    background:
        radial-gradient(ellipse 70% 50% at 30% 40%, rgba(234, 83, 50, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(234, 83, 50, 0.02) 0%, transparent 70%);
}

[data-theme="light"] .specialist-card:hover {
    box-shadow: 0 8px 28px rgba(0, 20, 50, 0.08);
}

[data-theme="light"] .specialist-skill {
    background: rgba(0, 20, 50, 0.04);
}

[data-theme="light"] .hub-tile {
    background: rgba(0, 20, 50, 0.03);
}

[data-theme="light"] .hub-tile:hover {
    background: rgba(0, 20, 50, 0.06);
}

[data-theme="light"] .hub-card {
    box-shadow: 0 12px 40px rgba(0, 20, 50, 0.06);
}

/* ── Responsive: Tablet ── */
@media (max-width: 900px) {
    .agents-showcase-layout {
        grid-template-columns: 1fr 60px 1fr;
        max-width: 900px;
    }
    .agents-showcase-title {
        font-size: 1.8rem;
    }
    .hub-card {
        padding: 28px 24px;
    }
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
    .agents-showcase {
        padding: 56px 0 60px;
    }
    .agents-showcase-header {
        margin-bottom: 36px;
    }
    .agents-showcase-title {
        font-size: 1.5rem;
    }
    .agents-showcase-subtitle {
        font-size: 0.92rem;
    }
    .agents-showcase-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        max-width: 100%;
        padding: 0 16px;
    }
    .showcase-connector {
        display: none;
    }
    .specialist-column {
        gap: 10px;
        min-width: 0;
        width: 100%;
    }
    .specialist-card {
        padding: 14px 16px;
        width: 100%;
    }
    .hub-card {
        padding: 24px 20px;
    }
}

/* ══════════════════════════════════════════════════
   HOME — How AgentsBooks Works
   ══════════════════════════════════════════════════ */

.home-how-works {
    padding: 56px 0;
}

.home-how-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.how-works-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.how-works-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #F97316);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.how-works-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 20px rgba(234,83,50,0.1);
    border-color: rgba(234,83,50,0.25);
}

.how-works-card:hover::before {
    opacity: 1;
}

.how-works-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    display: block;
    animation: float-icon 3s ease-in-out infinite;
}

.how-works-card:nth-child(2) .how-works-icon { animation-delay: 1s; }
.how-works-card:nth-child(3) .how-works-icon { animation-delay: 2s; }

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.how-works-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    letter-spacing: -0.01em;
}

.how-works-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* ══════════════════════════════════════════════════
   HOME — Marketplace Section
   ══════════════════════════════════════════════════ */

.home-marketplace {
    padding: 56px 24px;
}

.home-marketplace-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.marketplace-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.marketplace-action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.3), 0 0 18px rgba(234,83,50,0.12);
    border-color: rgba(234,83,50,0.3);
}

.marketplace-action-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.marketplace-action-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-family: 'Clash Display', 'Satoshi', sans-serif;
}

.marketplace-action-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* ══════════════════════════════════════════════════
   HOME — Runtime / Execution Section
   ══════════════════════════════════════════════════ */

.home-runtime {
    padding: 56px 0;
}

.home-runtime-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.runtime-card {
    background: var(--bg-card);
    border: 1px solid rgba(234,83,50,0.15);
    border-radius: 16px;
    padding: 28px 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.runtime-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(ellipse 120% 60% at 50% 0%, rgba(234,83,50,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.runtime-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 24px rgba(234,83,50,0.15);
    border-color: rgba(234,83,50,0.35);
}

.runtime-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.runtime-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(234,83,50,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.runtime-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Clash Display', 'Satoshi', sans-serif;
    margin: 0;
}

.runtime-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 16px;
}

.runtime-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(234,83,50,0.1);
    border: 1px solid rgba(234,83,50,0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════
   HOME — Hero runtime trust note
   ══════════════════════════════════════════════════ */

.home-hero-runtime-note {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    animation: fade-in-up 0.5s ease-out 0.55s both;
    opacity: 0.75;
    font-style: italic;
}

/* ══════════════════════════════════════════════════
   HOME — Mobile Responsive: New Sections
   ══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .home-how-works-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
    .how-works-card {
        padding: 24px 20px;
    }
    .home-marketplace-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0 16px;
    }
    .marketplace-action-card {
        padding: 20px 16px;
    }
    .home-runtime-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
    .runtime-card {
        padding: 22px 18px;
    }
    .home-how-works,
    .home-marketplace,
    .home-runtime {
        padding: 40px 0;
    }
}

/* ─────────────────────── Star Ratings ─────────────────────── */
.stars {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    line-height: 1;
    color: #f5b301;
    white-space: nowrap;
}
.stars-track {
    position: relative;
    display: inline-block;
    font-size: 0;
    letter-spacing: 0;
}
.stars-track::before {
    content: "★★★★★";
    display: inline-block;
    color: rgba(148, 163, 184, 0.35);
    font-size: 1em;
    letter-spacing: 1px;
    font-family: system-ui, sans-serif;
}
.stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f5b301;
    font-size: 1em;
    letter-spacing: 1px;
    font-family: system-ui, sans-serif;
    pointer-events: none;
}
.stars-fill::before {
    content: "★★★★★";
}
.stars-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82em;
    color: var(--text-secondary, #94a3b8);
    font-weight: 500;
}
.stars-avg { color: var(--text-primary, #e2e8f0); font-weight: 600; }
.stars-count { color: var(--text-muted, #64748b); }
.stars-empty-label { color: var(--text-muted, #64748b); font-style: italic; }

.stars-sm .stars-track { font-size: 0.95rem; }
.stars-md .stars-track { font-size: 1.15rem; }
.stars-lg .stars-track { font-size: 1.45rem; }

/* ── Interactive widget ── */
.stars-widget {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(245, 179, 1, 0.06);
    border: 1px solid rgba(245, 179, 1, 0.18);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.stars-widget:hover {
    background: rgba(245, 179, 1, 0.1);
    border-color: rgba(245, 179, 1, 0.32);
}
.stars-widget-track {
    display: inline-flex;
    gap: 2px;
}
.stars-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgba(148, 163, 184, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
    transition: color 0.1s ease, transform 0.1s ease, background 0.1s ease;
}
.stars-btn .stars-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}
.stars-btn:hover,
.stars-btn:focus-visible {
    outline: none;
    background: rgba(245, 179, 1, 0.12);
    transform: scale(1.08);
}
.stars-btn-on,
.stars-btn-hover {
    color: #f5b301;
}
.stars-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(245, 179, 1, 0.4);
}
.stars-widget-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary, #94a3b8);
}
.stars-widget-avg {
    color: var(--text-primary, #e2e8f0);
    font-weight: 700;
    font-size: 0.92rem;
}
.stars-widget-count { color: var(--text-muted, #64748b); }
.stars-widget-hint {
    width: 100%;
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    min-height: 1em;
}
.stars-widget-hint.is-error { color: #ef4444; }
.stars-widget-hint.is-ok { color: #22c55e; }
.stars-widget.stars-widget-pending .stars-btn { pointer-events: none; opacity: 0.7; }

.stars-widget.stars-sm .stars-btn { min-width: 26px; min-height: 26px; padding: 3px; }
.stars-widget.stars-sm .stars-btn .stars-icon { width: 16px; height: 16px; }
.stars-widget.stars-md .stars-btn .stars-icon { width: 20px; height: 20px; }
.stars-widget.stars-lg .stars-btn { min-width: 36px; min-height: 36px; }
.stars-widget.stars-lg .stars-btn .stars-icon { width: 26px; height: 26px; }

/* ── Embedded on card layouts ── */
.card-stars {
    margin-top: 4px;
    display: inline-flex;
}
.profile-hero .stars,
.profile-hero .stars-widget {
    margin-top: 10px;
}
.ap-hero .stars,
.ap-hero .stars-widget {
    margin-top: 12px;
}
.explore-card-stars {
    display: inline-flex;
    margin: 4px 0;
}

/* ── Mobile ≤ 480px ── */
@media (max-width: 480px) {
    .stars-sm .stars-track { font-size: 0.9rem; }
    .stars-md .stars-track { font-size: 1rem; }
    .stars-lg .stars-track { font-size: 1.25rem; }
    .stars-meta { font-size: 0.75em; gap: 3px; }
    .stars-widget {
        width: 100%;
        justify-content: center;
    }
    .stars-widget-track { gap: 4px; }
    .stars-btn {
        min-width: 32px;
        min-height: 32px;
    }
    .stars-btn .stars-icon { width: 22px; height: 22px; }
    .stars-widget-hint { text-align: center; }
    .card-stars { width: 100%; }
}

/* ── PWA Update Banner ── */
.pwa-update-banner {
    position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%);
    z-index: 10000; display: flex; align-items: center; gap: 12px;
    background: var(--card-bg, #fff); color: var(--text, #1e293b);
    padding: 12px 20px; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    transition: bottom 0.3s ease; font-size: 0.9rem;
}
.pwa-update-banner.pwa-update-show { bottom: 24px; }
.pwa-update-banner button { border: none; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
#pwa-update-btn { background: var(--accent, #0ea5e9); color: #fff; padding: 6px 16px; border-radius: 6px; }
#pwa-update-btn:hover { opacity: 0.9; }
#pwa-dismiss-btn { background: transparent; color: var(--text-muted, #64748b); font-size: 1.2rem; padding: 4px 8px; }

/* ── PWA Install Button (dropdown item) ── */
#pwa-install-btn { display: none; }

/* ═══════════════════════════════════════
   VIRAL SHARING COMPONENTS
   ═══════════════════════════════════════ */

/* ── Viral Share Bar ── */
.viral-bar {
    display: inline-flex; align-items: center; gap: 6px;
    flex-wrap: wrap;
}
.viral-bar-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
    margin-right: 2px;
}
.vb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--border); cursor: pointer;
    font-size: 0.85rem; font-weight: 700;
    transition: all 0.15s; background: var(--bg-secondary);
    color: var(--text-primary); text-decoration: none;
}
.vb-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.vb-twitter:hover  { background: #000; color: #fff; border-color: #000; }
.vb-whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.vb-linkedin:hover { background: #0077b5; color: #fff; border-color: #0077b5; }
.vb-telegram:hover { background: #2ca5e0; color: #fff; border-color: #2ca5e0; }
.vb-copy:hover     { background: var(--primary-color, #EA5332); color: #fff; border-color: var(--primary-color, #EA5332); }

.viral-bar.vb-sm .vb-btn { width: 28px; height: 28px; font-size: 0.75rem; }
.viral-bar.vb-sm .viral-bar-label { font-size: 0.75rem; }

/* ── Viral Share Card (share your agent / team) ── */
.viral-share-card {
    background: linear-gradient(135deg, rgba(234,83,50,0.08) 0%, rgba(234,83,50,0.08) 100%);
    border: 1px solid rgba(234,83,50,0.25);
    border-radius: 14px; padding: 18px 22px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.viral-share-card-text { min-width: 0; }
.viral-share-card-title {
    font-weight: 700; font-size: 0.95rem; margin: 0 0 3px;
    color: var(--text-primary);
}
.viral-share-card-sub {
    font-size: 0.82rem; color: var(--text-secondary); margin: 0;
}
.viral-share-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viral-share-card-actions .vb-btn { width: 38px; height: 38px; font-size: 0.9rem; }

/* ── Floating Share Button (public agent page) ── */
.viral-float-bar {
    position: fixed; bottom: 24px; right: 24px; z-index: 900;
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.viral-float-toggle {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary-color, #EA5332); color: #fff;
    border: none; cursor: pointer; font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(234,83,50,0.4);
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.viral-float-toggle:hover { transform: scale(1.08); }
.viral-float-buttons {
    display: flex; flex-direction: column; gap: 8px;
    opacity: 0; transform: translateY(10px);
    transition: all 0.2s; pointer-events: none;
}
.viral-float-buttons.open {
    opacity: 1; transform: translateY(0); pointer-events: auto;
}
.viral-float-buttons .vb-btn {
    width: 42px; height: 42px; border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

/* ── Social Proof Ticker (homepage) ── */
.viral-activity-bar {
    background: var(--bg-secondary); border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 0; overflow: hidden; position: relative;
}
.viral-activity-track {
    display: flex; gap: 48px; animation: viralScroll 28s linear infinite;
    white-space: nowrap; width: max-content;
}
.viral-activity-track:hover { animation-play-state: paused; }
.viral-activity-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: var(--text-secondary);
}
.viral-activity-item strong { color: var(--text-primary); }
.viral-activity-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
    flex-shrink: 0; animation: viralPulse 2s ease-in-out infinite;
}
@keyframes viralScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes viralPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

/* ── Invite Friends Banner ── */
.viral-invite-banner {
    background: linear-gradient(135deg, #EA5332 0%, #FF6D4A 50%, #ec4899 100%);
    border-radius: 16px; padding: 28px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; color: #fff;
    margin: 40px 0;
}
.viral-invite-text h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; }
.viral-invite-text p  { margin: 0; font-size: 0.88rem; opacity: 0.88; }
.viral-invite-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.2); color: #fff;
    border: 1.5px solid rgba(255,255,255,0.5);
    padding: 10px 22px; border-radius: 10px;
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    text-decoration: none; transition: all 0.15s; white-space: nowrap;
}
.viral-invite-cta:hover { background: rgba(255,255,255,0.35); transform: translateY(-1px); }

/* ── Milestone Share Prompt ── */
.viral-milestone {
    background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.3);
    border-radius: 12px; padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin: 16px 0;
}
.viral-milestone-text { font-size: 0.88rem; color: var(--text-secondary); }
.viral-milestone-text strong { color: var(--text-primary); }
.viral-milestone-btns { display: flex; gap: 6px; }

@media (max-width: 640px) {
    .viral-invite-banner { padding: 20px; }
    .viral-float-bar { bottom: 16px; right: 16px; }
    .viral-share-card { flex-direction: column; align-items: flex-start; }
}

/* ── Wizard First-Task Hero (Step 3) ── */
.wizard-first-task-hero {
    background: linear-gradient(135deg, rgba(234,83,50,0.1) 0%, rgba(234,83,50,0.1) 100%);
    border: 1.5px solid rgba(234,83,50,0.3);
    border-radius: 16px; padding: 22px 24px 20px;
    margin-bottom: 20px; text-align: center;
}
.wizard-fth-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--primary-color, #EA5332); margin-bottom: 10px;
    background: rgba(234,83,50,0.12); padding: 3px 10px; border-radius: 20px;
}
.wizard-fth-label {
    font-size: 1.05rem; font-weight: 700; color: var(--text-primary);
    margin: 0 0 6px; line-height: 1.3;
}
.wizard-fth-sub {
    font-size: 0.84rem; color: var(--text-secondary); margin: 0 0 16px;
}
.wizard-fth-cta {
    display: inline-block;
    background: var(--primary-color, #EA5332); color: #fff;
    padding: 12px 28px; border-radius: 10px; font-weight: 700;
    font-size: 0.95rem; text-decoration: none;
    box-shadow: 0 4px 14px rgba(234,83,50,0.35);
    transition: all 0.15s;
}
.wizard-fth-cta:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(234,83,50,0.45); }
.wizard-other-label {
    font-size: 0.82rem; color: var(--text-muted); text-align: center;
    margin: 4px 0 12px; font-weight: 500;
}
.wizard-next-grid-sm { grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 480px) {
    .wizard-next-grid-sm { grid-template-columns: repeat(2, 1fr); }
    .wizard-first-task-hero { padding: 18px 16px; }
}
