:root {
    --bg-primary: #050810;
    --bg-secondary: #0a0f1a;
    --bg-card: rgba(10, 15, 30, 0.8);
    --bg-card-hover: rgba(18, 24, 42, 0.9);
    --bg-glass: rgba(10, 15, 26, 0.75);
    --border: rgba(136, 146, 176, 0.12);
    --border-hover: rgba(136, 146, 176, 0.25);
    --text-primary: #F0F4FF;
    --text-secondary: #8892B0;
    --text-muted: #5A6382;
    --accent: #FF4D4D;
    --accent-light: #FF6B4A;
    --accent-glow: rgba(255, 77, 77, 0.25);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Light Theme Override ── */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #f0f2f7;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(245, 246, 250, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.80);
    --border: rgba(0, 20, 50, 0.08);
    --border-hover: rgba(0, 20, 50, 0.15);
    --text-primary: #1a1d2e;
    --text-secondary: #5f6880;
    --text-muted: #9aa3b8;
    --accent: #FF4D4D;
    --accent-light: #FF6B4A;
    --accent-glow: rgba(255, 77, 77, 0.18);
    --shadow: 0 4px 24px rgba(0, 20, 50, 0.06);
}

[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 77, 77, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(100, 60, 180, 0.03) 0%, transparent 70%);
}

[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(255, 77, 77, 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);
}

/* 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(255, 77, 77, 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(255, 77, 77, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(100, 60, 180, 0.04) 0%, transparent 70%);
    background-attachment: fixed;
}

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;
}

/* ── 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(5, 8, 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;
    margin-bottom: 20px;
}

.tag-pill {
    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-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.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);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.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 {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 77, 77, 0.1);
    color: var(--accent-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ── 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;
}

.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(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 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(168, 85, 247, 0.06), rgba(236, 72, 153, 0.04), rgba(255, 77, 77, 0.04));
    border: 1px solid rgba(168, 85, 247, 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, #a855f7, #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(168, 85, 247, 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(168, 85, 247, 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(168, 85, 247, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

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

.ai-progress-label {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #a855f7;
    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(168, 85, 247, 0.12), rgba(236, 72, 153, 0.12));
    color: #a855f7;
    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: #a855f7;
    transition: all 0.3s ease;
}

.ai-sparkle-btn:hover {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(168, 85, 247, 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: #a855f7;
}

.ai-section-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(236, 72, 153, 0.06));
    color: #a855f7;
    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: #a855f7;
    transition: all 0.3s ease;
}

.ai-section-btn:hover {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 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(168, 85, 247, 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(168, 85, 247, 0.3);
    }

    50% {
        box-shadow: 0 0 8px 2px rgba(168, 85, 247, 0.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.3);
    }
}

.ai-field-highlight {
    animation: ai-shimmer 0.6s ease-out;
    border-color: #a855f7 !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, #6366f1, #8b5cf6);
}

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

.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(255, 77, 77, 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(99, 102, 241, 0.4), 0 0 20px rgba(99, 102, 241, 0.15); }
    50%      { box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.5), 0 0 28px rgba(139, 92, 246, 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,
        #1a1033 0%,
        #0f172a 25%,
        #1e1b4b 50%,
        #0c1220 75%,
        #1a1033 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(99, 102, 241, 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, #6366f1, #a855f7);
    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 #1a1033;
    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(99, 102, 241, 0.3), rgba(139, 92, 246, 0.2));
    color: #c4b5fd;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 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-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(99, 102, 241, 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: 8px 14px;
    margin-bottom: 12px;
}

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

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

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

.vis-details {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.vis-details-summary {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 0;
    list-style: none;
    user-select: none;
}

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

.vis-details-summary:hover {
    color: var(--accent);
}

.vis-details-body {
    padding-top: 8px;
}

/* ── App-Icon Grid (iPhone Home Screen Style) ── */
.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 6px;
    padding: 12px 0 24px;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px 8px;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.app-icon:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.app-icon:active {
    transform: scale(0.92);
}

.app-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.app-icon:hover .app-icon-img {
    transform: scale(1.08);
}

.app-icon-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .profile-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 16px 14px;
        gap: 10px;
    }

    .profile-hero-avatar {
        width: 50px;
        height: 50px;
    }

    .profile-hero-name {
        font-size: 1.05rem;
    }

    .profile-hero-tagline {
        max-width: 240px;
        margin-left: auto;
        margin-right: auto;
    }

    .profile-hero-actions {
        justify-content: center;
    }

    .vis-bar-row {
        gap: 6px;
    }

    .app-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px 4px;
    }

    .app-icon-img {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.25rem;
    }

    .app-icon-label {
        font-size: 0.68rem;
    }
}

@media (max-width: 400px) {
    .app-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── 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(255, 77, 77, 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(99, 102, 241, 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(99, 102, 241, 1);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

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

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

.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(255, 77, 77, 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;
}

/* ── 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(5, 8, 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;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

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

    .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(255, 77, 77, 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(255, 77, 77, 0.15);
    }

    .mobile-shortcut-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(255, 77, 77, 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, #FF4D4D, #FF6B4A);
        border-radius: 12px;
        text-decoration: none;
        letter-spacing: 0.01em;
        box-shadow: 0 4px 16px rgba(255, 77, 77, 0.25);
        transition: all 0.25s ease;
    }

    .mobile-menu-cta:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(255, 77, 77, 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, #FF4D4D, #FF6B4A);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(255, 77, 77, 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: block;
        position: fixed;
        inset: 0;
        z-index: 9995;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .fb-more-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .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), #ff6b4a);
        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(255, 77, 77, 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(255, 77, 77, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(100, 60, 180, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 107, 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(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 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, var(--accent), #FF6B4A, #FF8E53);
    -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;
}

/* ── Stats Bar (Glassmorphism) ── */
.home-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding: 14px 32px;
    background: rgba(10, 15, 26, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 77, 77, 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(255, 77, 77, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 77, 77, 0.1);
}

/* ── 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(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    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;
    gap: 0;
    max-width: 860px;
    margin: 0 auto;
}

.home-step {
    flex: 1;
    text-align: center;
    padding: 0 28px;
    position: relative;
}

.home-step-number {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px var(--accent-glow);
    position: relative;
    z-index: 1;
}

.home-step-line {
    position: absolute;
    top: 28px;
    left: calc(50% + 28px);
    width: calc(100% - 56px);
    height: 2px;
    background: linear-gradient(90deg, var(--accent-light), var(--border));
    z-index: 0;
}

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

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

/* ── 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(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    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), #8b5cf6, #ec4899);
    opacity: 0;
    transition: var(--transition);
}

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

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

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

.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(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 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 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-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;
}

@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(255, 77, 77, 0.07), rgba(139, 92, 246, 0.06), rgba(255, 107, 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;
    }

    .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;
    }

    /* 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), #8b5cf6);
    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(255, 77, 77, 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(255, 77, 77, 0.07), rgba(139, 92, 246, 0.06), rgba(255, 107, 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(255, 77, 77, 0.06);
}

.usecase-nav-link.active {
    border-color: var(--accent);
    background: rgba(255, 77, 77, 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, #FF4D4D, #8b5cf6);
}

.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(255, 77, 77, 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(255, 77, 77, 0.08);
    color: var(--accent-light);
    border: 1px solid rgba(255, 77, 77, 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), #8b5cf6);
    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(255, 77, 77, 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(255, 77, 77, 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), #8b5cf6);
    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(255, 77, 77, 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(255, 77, 77, 0.07), rgba(139, 92, 246, 0.06), rgba(255, 107, 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;
}

/* ── 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 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(255, 77, 77, 0.06);
}

.feature-nav-link.active {
    border-color: var(--accent);
    background: rgba(255, 77, 77, 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-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), #FF6B4A);
    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(255, 77, 77, 0.1), rgba(255, 107, 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(255, 77, 77, 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(99, 102, 241, 0.15), rgba(168, 85, 247, 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(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.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(168, 85, 247, 0.2);
    color: #d8b4fe;
}

.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: #a5b4fc;
}

.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, #f093fb, #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-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.06);
}

.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: var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.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(240, 147, 251, 0.2);
    color: #f093fb;
}

.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);
}

.task-chevron-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.2s, border-color 0.2s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.task-chevron-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
    color: var(--primary);
}

.task-card.expanded .task-chevron-btn {
    transform: rotate(90deg);
}

.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;
}

.task-card-header input:focus {
    border-color: var(--primary);
    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: 5px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.task-card.expanded .task-badges {
    display: none;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.3;
    border: 1px solid transparent;
}

.task-badge-emoji {
    font-size: 0.8rem;
}

.task-badge-runtime {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.15);
}

.task-badge-trigger {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.15);
}

.task-badge-tools {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.15);
}

.task-badge-disabled {
    background: rgba(239, 68, 68, 0.1);
    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-card-header .task-name {
        order: 1;
        flex: 1 1 100%;
        min-width: 0;
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .task-chevron-btn {
        order: 0;
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1rem;
    }

    /* Controls go into a second row */
    .task-card-header .toggle-switch {
        order: 3;
    }

    .task-card-header .share-toggle {
        order: 4;
    }

    .task-card-header .task-run-btn {
        order: 5;
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .task-card-header .remove-btn {
        order: 6;
    }

    /* ── Mobile Prompt Variables Bar ── */
    .prompt-variables-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
}

.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(168, 85, 247, 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(139, 92, 246, 0.15), rgba(139, 92, 246, 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, #6366f1);
}

.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(99, 102, 241, 0.06), rgba(139, 92, 246, 0.04));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 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(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 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(99, 102, 241, 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);
}

.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-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.run-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;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.run-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border);
    transition: all 0.3s;
}

.run-card.status-success::before {
    background: #4ade80;
}

.run-card.status-failed::before {
    background: #f87171;
}

.run-card.status-running::before {
    background: #60a5fa;
    animation: pulse 2s ease-in-out infinite;
}

.run-card.status-queued::before {
    background: #fbbf24;
}

.run-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
}

.run-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill.success {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-pill.failed {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.status-pill.running {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    animation: pulse 2s ease-in-out infinite;
}

.status-pill.queued {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.run-id {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.run-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.run-task-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.run-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.run-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.runtime-badge {
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.run-error {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(248, 113, 113, 0.1);
    border-left: 3px solid #f87171;
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.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(168, 85, 247, 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;
}

.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);
}

/* ─── 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);
}

.acct-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.acct-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.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: 2px;
}

.acct-profile-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.acct-profile-name {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
}

/* ── 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(99, 102, 241, 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, #6366f1, #a855f7);
    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(99, 102, 241, 0.1);
    color: #6366f1;
    margin-left: 8px;
}

/* ─────────────────────── Blog ─────────────────────── */

/* Blog Hero */
.blog-hero {
    text-align: center;
    padding: 60px 0 40px;
}

.blog-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.blog-hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 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: 540px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid-section {
    padding-bottom: 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    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.3);
    color: inherit;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    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: 3rem;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.08), rgba(139, 92, 246, 0.08));
}

.blog-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.blog-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 77, 77, 0.08);
    color: var(--accent-light);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-meta-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-meta-dot {
    color: var(--text-muted);
}

/* 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);
}

/* ─────────────────────── 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(255, 77, 77, 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: 12px;
    border-radius: var(--radius-md, 12px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 4px;
}

.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(255, 77, 77, 0.08);
    color: var(--accent);
}

.feed-nav-item.active {
    background: rgba(255, 77, 77, 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(255, 77, 77, 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(255, 77, 77, 0.08); color: var(--accent); border-color: rgba(255, 77, 77, 0.2); }
.feed-tier-factory { background: rgba(139, 92, 246, 0.08); color: #a78bfa; border-color: rgba(139, 92, 246, 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), #ff6b4a);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
}

/* ══════════════════════════════════════════════════════════════
   Feed Center Column
   ══════════════════════════════════════════════════════════════ */

.feed-center {
    padding-top: 4px;
    padding-bottom: 40px;
    min-width: 0;
}

/* ── Post Composer ── */
.feed-composer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
}

.feed-composer-header {
    margin-bottom: 10px;
}

.feed-composer-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
}

.feed-composer-body {
    margin-bottom: 10px;
}

.feed-composer-textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
}

.feed-composer-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.15);
}

.feed-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.feed-composer-options {
    flex: 1;
    min-width: 200px;
}

.feed-composer-option-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.feed-composer-topic-input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
}

.feed-composer-mini-select {
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
}

.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(255, 77, 77, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.feed-btn-ai:hover {
    background: rgba(255, 77, 77, 0.2);
}

.feed-btn-publish {
    background: linear-gradient(135deg, #FF4D4D, #FF6B4A);
    color: #fff;
}

.feed-btn-publish:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Feed Post Cards ── */
.feed-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 16px;
    margin-bottom: 12px;
    backdrop-filter: blur(12px);
    transition: border-color 0.15s;
}

.feed-post-card:hover {
    border-color: rgba(255, 77, 77, 0.15);
}

.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;
}

.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;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ── Post Actions (Like / Comment / Share) ── */
.feed-post-actions {
    display: flex;
    gap: 2px;
    padding: 4px 0;
}

.feed-action-btn {
    flex: 1;
    padding: 8px;
    background: none;
    border: none;
    border-radius: var(--radius-sm, 8px);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    text-align: center;
}

.feed-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.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 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-family: inherit;
}

.feed-comment-input:focus {
    outline: none;
    border-color: var(--accent);
}

.feed-comment-send {
    padding: 6px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}

.feed-comment-send:hover { opacity: 0.85; }

/* ── 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: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 14px;
    backdrop-filter: blur(12px);
}

.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(255, 77, 77, 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(255, 77, 77, 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(255, 77, 77, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(255, 77, 77, 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, #FF4D4D, #FF6B4A);
    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, #FF4D4D, #FF6B4A);
    color: #fff;
    font-size: 1.4rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 77, 77, 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: 1fr;
        gap: 8px;
        padding: 0 8px;
    }
    .feed-sidebar-left {
        display: none;
    }
    .feed-sidebar-right {
        display: none;
    }
    .feed-mobile-fab {
        display: flex;
    }
    .feed-composer-footer {
        flex-direction: column;
    }
    .feed-composer-actions {
        width: 100%;
        justify-content: stretch;
    }
    .feed-composer-actions .feed-btn {
        flex: 1;
    }
}

/* 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-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0;
    height: 56px;
}

.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(255, 77, 77, 0.12);
}

/* ── 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(255, 77, 77, 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), #ff6b4a);
    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, #FF4D4D, #FF6B4A, #FF4D4D);
    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(255, 77, 77, 0.06);
}


/* ── Social Navbar Mobile ── */
@media (max-width: 768px) {
    .navbar-social {
        overflow-x: clip;
    }

    .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 (Facebook-style)
   ══════════════════════════════════════════════════════════════ */

.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-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255, 77, 77, 0.15), transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.08), transparent 60%);
}

.profile-cover-content {
    position: absolute;
    bottom: -40px;
    left: 32px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    z-index: 2;
}

.profile-avatar-wrapper {
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.profile-info {
    padding-bottom: 12px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.profile-email {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 2px 0 8px;
}

.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(255, 77, 77, 0.08); color: var(--accent); border-color: rgba(255, 77, 77, 0.2); }
.profile-badge-factory { background: rgba(139, 92, 246, 0.08); color: #a78bfa; border-color: rgba(139, 92, 246, 0.2); }

/* ── Profile Tabs ── */
.profile-tabs {
    display: flex;
    gap: 0;
    margin-top: 56px;
    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 0 12px;
    color: var(--text-primary);
}

/* ── 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: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Agent Grid in Profile ── */
.profile-agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.profile-agents-grid-full {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.profile-agent-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    transition: background 0.15s;
    border: 1px solid var(--border);
}

.profile-agent-card:hover {
    background: rgba(255, 77, 77, 0.04);
    border-color: rgba(255, 77, 77, 0.15);
}

.profile-agent-avatar {
    width: 48px;
    height: 48px;
    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.88rem;
    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-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-see-all {
    display: block;
    margin-top: 12px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}


/* ══════════════════════════════════════════════════════════════
   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;
}

/* ── 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(255, 77, 77, 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(255, 77, 77, 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), #ff6b4a);
    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(255, 77, 77, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 77, 77, 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(255, 77, 77, 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(255, 77, 77, 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: 140px; margin: -12px -12px 0; }
    .profile-cover-content { left: 16px; }
    .profile-avatar-img { width: 80px; height: 80px; }
    .profile-name { font-size: 1.2rem; }
    .profile-tabs { margin-top: 40px; 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 { grid-template-columns: 1fr; }
    .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 Mobile Responsive ── */
@media (max-width: 600px) {
    .wizard-container { padding: 12px 0 40px; }
    .wizard-title { font-size: 1.35rem; }
    .wizard-preset-grid { gap: 10px; }
    .wizard-preset-card { padding: 16px 10px; }
    .wizard-preset-icon { font-size: 1.6rem; }
    .wizard-preset-label { font-size: 0.88rem; }

    .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; }
}

