/* HeyDaili - Premium SaaS Design System v2 */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Brand Colors */
    --h-brand: #6366F1;
    --h-brand-hover: #4F46E5;
    --h-brand-light: #818CF8;
    --h-brand-subtle: rgba(99, 102, 241, 0.15);
    
    /* Neutral Palette */
    --h-bg-primary: #0B0C0E;
    --h-bg-secondary: #13141A;
    --h-bg-tertiary: #1A1C24;
    --h-bg-elevated: #22242E;
    
    --h-border: #2A2D38;
    --h-border-light: #3D4155;
    
    /* Text */
    --h-text-primary: #F4F4F5;
    --h-text-secondary: #A1A1AA;
    --h-text-muted: #71717A;
    
    /* Accents */
    --h-success: #10B981;
    --h-warning: #F59E0B;
    --h-error: #EF4444;
    --h-info: #3B82F6;
    
    /* Spacing */
    --h-space-xs: 0.25rem;
    --h-space-sm: 0.5rem;
    --h-space-md: 1rem;
    --h-space-lg: 1.5rem;
    --h-space-xl: 2rem;
    --h-space-2xl: 3rem;
    --h-space-3xl: 4rem;
    --h-space-4xl: 6rem;
    
    /* Typography */
    --h-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Effects */
    --h-radius-sm: 6px;
    --h-radius: 8px;
    --h-radius-lg: 12px;
    --h-radius-xl: 16px;
    --h-radius-full: 9999px;
    
    --h-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --h-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --h-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --h-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --h-shadow-glow: 0 0 60px rgba(99, 102, 241, 0.25);
    
    --h-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--h-font);
    background: var(--h-bg-primary);
    color: var(--h-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

a:hover {
    color: var(--h-brand);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--h-text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--h-text-secondary);
    line-height: 1.7;
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--h-text-muted); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--h-font);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: var(--h-radius);
    cursor: pointer;
    transition: var(--h-transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--h-brand);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--h-brand-hover);
    transform: translateY(-1px);
    box-shadow: var(--h-shadow-glow);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--h-bg-elevated);
    border-color: var(--h-border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--h-text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: var(--h-radius-lg);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--h-font);
    font-size: 0.9375rem;
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    transition: var(--h-transition);
}

.form-input::placeholder {
    color: var(--h-text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--h-brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-error {
    color: var(--h-error);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1400px;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing {
    --h-bg-primary: #F7F8FC;
    --h-bg-secondary: #FFFFFF;
    --h-bg-tertiary: #F1F3F8;
    --h-bg-elevated: #E9ECF4;
    --h-border: #E2E5ED;
    --h-border-light: #C9CFDB;
    --h-text-primary: #16181D;
    --h-text-secondary: #515866;
    --h-text-muted: #7A8291;
    --h-brand: #5B5CE2;
    --h-brand-hover: #4849CC;
    --h-brand-light: #6667E8;
    --h-brand-subtle: rgba(91, 92, 226, 0.09);
    --h-shadow-sm: 0 2px 8px rgba(34, 40, 54, 0.06);
    --h-shadow: 0 10px 28px rgba(34, 40, 54, 0.08);
    --h-shadow-lg: 0 18px 42px rgba(34, 40, 54, 0.10);
    --h-shadow-xl: 0 26px 70px rgba(34, 40, 54, 0.12);
    --h-shadow-glow: 0 18px 55px rgba(91, 92, 226, 0.12);
    min-height: 100vh;
    background: var(--h-bg-primary);
    color: var(--h-text-primary);
}

/* Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--h-border);
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--h-text-primary);
    letter-spacing: -0.03em;
}

.landing-logo-mark {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--h-brand), var(--h-brand-light));
    border-radius: var(--h-radius);
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(91, 92, 226, 0.10) 0%, transparent 62%);
    pointer-events: none;
}

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

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #101217 0%, #565E6D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--h-text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Product Demo */
.product-demo {
    max-width: 1000px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.demo-window {
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-xl);
    overflow: hidden;
    box-shadow: var(--h-shadow-xl), var(--h-shadow-glow);
}

.demo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--h-bg-tertiary);
    border-bottom: 1px solid var(--h-border);
}

.demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demo-dot-red { background: #EF4444; }
.demo-dot-yellow { background: #F59E0B; }
.demo-dot-green { background: #10B981; }

.demo-title {
    flex: 1;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--h-text-muted);
}

.demo-content {
    padding: 2rem;
    min-height: 300px;
}

/* Chat Preview */
.chat-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.chat-message {
    max-width: 85%;
    padding: 1rem 1.25rem;
    border-radius: var(--h-radius-lg);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.chat-message.ai {
    align-self: flex-start;
    background: var(--h-bg-tertiary);
    border: 1px solid var(--h-border);
    border-bottom-left-radius: 4px;
}

.chat-message.ai h4 {
    font-size: 0.8125rem;
    color: var(--h-brand-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-message.ai h4::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--h-success);
    border-radius: 50%;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--h-brand);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--h-bg-secondary);
}

.features-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.features-header h2 {
    margin-bottom: 0.75rem;
}

.features-header p {
    font-size: 1.0625rem;
    max-width: 500px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: var(--h-bg-primary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
    transition: var(--h-transition);
}

.feature-card:hover {
    border-color: var(--h-brand);
    transform: translateY(-4px);
    box-shadow: var(--h-shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--h-brand-subtle);
    border-radius: var(--h-radius);
    margin-bottom: 1.25rem;
    color: var(--h-brand-light);
    font-size: 1.25rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--h-text-muted);
}

/* How It Works */
.how-it-works {
    padding: 5rem 0;
}

.how-it-works-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.steps {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.step {
    flex: 1;
    max-width: 280px;
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--h-brand);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.875rem;
    color: var(--h-text-muted);
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: var(--h-bg-secondary);
    text-align: center;
}

.cta-section-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

/* Footer */
.landing-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--h-border);
}

.landing-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-footer p {
    font-size: 0.8125rem;
    color: var(--h-text-muted);
}

.landing-footer-links {
    display: flex;
    gap: 1.5rem;
}

.landing-footer-links a {
    font-size: 0.8125rem;
    color: var(--h-text-muted);
}

.landing-footer-links a:hover {
    color: var(--h-text-primary);
}

/* Landing page additions */
.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-nav-links a {
    color: var(--h-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.landing-nav-links a:hover {
    color: var(--h-text-primary);
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--h-brand-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-eyebrow::before,
.section-kicker::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--h-brand-light);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: -1.75rem;
}

.hero-trust span {
    padding: 0.45rem 0.75rem;
    color: var(--h-text-muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-full);
    font-size: 0.75rem;
}

.landing-demo-content {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.75fr);
    gap: 2rem;
    align-items: center;
}

.workspace-preview {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.25rem;
    background: var(--h-bg-primary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
}

.workspace-preview-label {
    margin-bottom: 0.15rem;
    color: var(--h-text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workspace-file {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    color: var(--h-text-secondary);
    background: var(--h-bg-tertiary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    font-size: 0.8125rem;
}

.workspace-file span {
    color: var(--h-brand-light);
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 1rem;
}

.section-heading p {
    font-size: 1.0625rem;
}

.landing-problem {
    padding: 5.5rem 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

.comparison-card {
    padding: 2rem;
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-xl);
}

.comparison-card-muted {
    background: var(--h-bg-secondary);
}

.comparison-card-brand {
    background:
        linear-gradient(180deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.035)),
        var(--h-bg-secondary);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.comparison-label {
    margin-bottom: 0.75rem;
    color: var(--h-text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comparison-card h3 {
    margin-bottom: 1.25rem;
}

.comparison-card ul {
    display: grid;
    gap: 0.85rem;
    list-style: none;
}

.comparison-card li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--h-text-secondary);
    font-size: 0.9375rem;
}

.comparison-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--h-brand-light);
    font-weight: 700;
}

.comparison-card-muted li::before {
    content: '–';
    color: var(--h-text-muted);
}

.landing-benefits {
    border-top: 1px solid var(--h-border);
    border-bottom: 1px solid var(--h-border);
}

.section-cta {
    margin-top: 3rem;
    text-align: center;
}

.landing-details {
    padding: 5rem 0;
    background: var(--h-bg-secondary);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.detail-card {
    min-height: 190px;
    padding: 1.6rem;
    background: var(--h-bg-primary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
}

.detail-card h3 {
    margin-bottom: 0.65rem;
    font-size: 1rem;
}

.detail-card p {
    color: var(--h-text-muted);
    font-size: 0.9rem;
}

.landing-faq {
    padding: 5.5rem 0;
}

.faq-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
    gap: 4rem;
    align-items: start;
}

.faq-intro h2 {
    margin-bottom: 1rem;
}

.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-list details {
    padding: 1.1rem 1.25rem;
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
}

.faq-list summary {
    color: var(--h-text-primary);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

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

.faq-list summary::after {
    content: '+';
    float: right;
    color: var(--h-text-muted);
}

.faq-list details[open] summary::after {
    content: '−';
}

.faq-list details p {
    margin-top: 0.75rem;
    color: var(--h-text-muted);
    font-size: 0.9rem;
}

.landing-logo-footer {
    font-size: 1rem;
}

@media (max-width: 860px) {
    .landing-nav-links {
        display: none;
    }

    .landing-demo-content,
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .comparison-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .faq-layout {
        gap: 2rem;
    }
}

@media (max-width: 560px) {
    .landing-nav {
        position: sticky;
    }

    .landing-nav-inner {
        gap: 0.75rem;
    }

    .landing-logo {
        font-size: 1rem;
    }

    .landing-logo-mark {
        width: 32px;
        height: 32px;
    }

    .landing-nav-actions {
        gap: 0.35rem;
    }

    .landing-nav-actions .btn {
        padding: 0.55rem 0.75rem;
        font-size: 0.78rem;
    }

    .hero {
        padding-top: 4.5rem;
    }

    .hero-trust {
        margin-top: -2.25rem;
    }

    .demo-content {
        padding: 1rem;
    }

    .comparison-card,
    .feature-card,
    .detail-card {
        padding: 1.35rem;
    }
}

/* ============================================
   PRICING
   ============================================ */
.pricing-section {
    padding: 6rem 0;
    background:
        linear-gradient(180deg, rgba(91, 92, 226, 0.035), rgba(91, 92, 226, 0)),
        var(--h-bg-primary);
    border-top: 1px solid var(--h-border);
    border-bottom: 1px solid var(--h-border);
}

.pricing-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
    gap: 4rem;
    align-items: center;
}

.pricing-copy h2 {
    max-width: 560px;
    margin-bottom: 1.25rem;
}

.pricing-copy > p {
    max-width: 600px;
    font-size: 1.125rem;
}

.pricing-includes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 2rem;
}

.pricing-includes span {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.8rem;
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-full);
    color: var(--h-text-secondary);
    font-size: 0.8125rem;
    box-shadow: var(--h-shadow-sm);
}

.pricing-card {
    position: relative;
    overflow: hidden;
    padding: 2.5rem;
    background: #FFFFFF;
    border: 1px solid rgba(91, 92, 226, 0.28);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(50, 58, 87, 0.13);
}

.pricing-card > *:not(.pricing-card-orb) {
    position: relative;
    z-index: 1;
}

.pricing-card-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.pricing-card-orb-one {
    width: 190px;
    height: 190px;
    top: -90px;
    right: -55px;
    background: rgba(91, 92, 226, 0.12);
}

.pricing-card-orb-two {
    width: 180px;
    height: 180px;
    bottom: -95px;
    left: -70px;
    background: rgba(67, 184, 195, 0.12);
}

.pricing-badge {
    display: inline-flex;
    margin-bottom: 1.4rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(135deg, #743EE8, #A143ED);
    border-radius: var(--h-radius-full);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-card h3 {
    margin-bottom: 1rem;
    color: #303544;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.pricing-price {
    display: flex;
    align-items: flex-end;
    gap: 0.15rem;
    margin-bottom: 1.25rem;
    color: #3566E8;
    line-height: 0.9;
}

.pricing-currency {
    margin-bottom: 0.65rem;
    font-size: 2rem;
    font-weight: 800;
}

.pricing-number {
    font-size: clamp(4rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.06em;
}

.pricing-period {
    margin: 0 0 0.7rem 0.3rem;
    color: #4E5566;
    font-size: 1.35rem;
    font-weight: 700;
}

.pricing-description {
    max-width: 560px;
    margin-bottom: 1.5rem;
    color: #5E6678;
    font-size: 1rem;
}

.pricing-feature-list {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.pricing-feature-list li {
    position: relative;
    padding-left: 1.6rem;
    color: #3F4656;
    font-size: 0.925rem;
}

.pricing-feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #5B5CE2;
    font-weight: 800;
}

.pricing-cta {
    width: 100%;
    min-height: 58px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(53, 102, 232, 0.2);
}

.pricing-footnote {
    margin-top: 0.9rem;
    color: #8A92A2;
    text-align: center;
    font-size: 0.75rem;
}

@media (max-width: 860px) {
    .pricing-layout {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .pricing-copy {
        text-align: left;
    }

    .pricing-card {
        max-width: 620px;
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .pricing-section {
        padding: 4rem 0;
    }

    .pricing-card {
        padding: 1.6rem;
        border-radius: 22px;
    }

    .pricing-price {
        margin-bottom: 1rem;
    }
}

/* ============================================
   PREMIUM GET-AGENT SIGNUP
   ============================================ */
.signup-page {
    min-height: 100vh;
    background: #F7F8FC;
    color: #16181D;
}

.signup-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #E4E7EE;
    backdrop-filter: blur(18px);
}

.signup-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #171920;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.signup-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #5B5CE2, #7D6CF2);
    border-radius: 10px;
    color: #FFFFFF;
    box-shadow: 0 10px 22px rgba(91, 92, 226, 0.22);
}

.signup-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #747C8B;
    font-size: 0.85rem;
}

.signup-topbar-right a {
    color: #4D50D8;
    font-weight: 700;
}

.signup-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    min-height: calc(100vh - 72px);
}

.signup-visual {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 6vw, 6rem);
    background:
        linear-gradient(145deg, rgba(91, 92, 226, 0.09), rgba(255, 255, 255, 0.7) 50%, rgba(53, 102, 232, 0.06)),
        #F2F4FA;
}

.signup-visual > *:not(.signup-visual-glow) {
    position: relative;
    z-index: 1;
}

.signup-visual-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.signup-visual-glow-one {
    width: 420px;
    height: 420px;
    top: -170px;
    right: -140px;
    background: rgba(91, 92, 226, 0.12);
}

.signup-visual-glow-two {
    width: 320px;
    height: 320px;
    bottom: -150px;
    left: -110px;
    background: rgba(67, 184, 195, 0.11);
}

.signup-step-pill {
    display: inline-flex;
    margin-bottom: 1.4rem;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(91, 92, 226, 0.16);
    border-radius: 999px;
    color: #5B5CE2;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(53, 60, 86, 0.06);
}

.signup-visual h1 {
    max-width: 720px;
    margin-bottom: 1.25rem;
    color: #151821;
    font-size: clamp(2.8rem, 5.8vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.signup-visual-copy {
    max-width: 650px;
    margin-bottom: 2rem;
    color: #626A79;
    font-size: 1.05rem;
    line-height: 1.7;
}

.signup-plan-card,
.signup-mini-workspace {
    max-width: 720px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(91, 92, 226, 0.16);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(54, 62, 91, 0.09);
}

.signup-plan-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.signup-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.signup-plan-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #8A91A0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signup-plan-head h2 {
    color: #2D3240;
    font-size: 1.25rem;
}

.signup-plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    color: #3566E8;
    white-space: nowrap;
}

.signup-plan-price strong {
    font-size: 2.2rem;
    letter-spacing: -0.05em;
}

.signup-plan-price span {
    color: #677082;
    font-size: 0.85rem;
    font-weight: 700;
}

.signup-plan-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
}

.signup-plan-items div {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #505867;
    font-size: 0.82rem;
}

.signup-plan-items span {
    color: #5B5CE2;
    font-weight: 900;
}

.signup-mini-workspace {
    padding: 1.25rem;
}

.signup-mini-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: #778090;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.signup-mini-dot {
    width: 8px;
    height: 8px;
    background: #22B57A;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34, 181, 122, 0.1);
}

.signup-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.signup-mini-chat,
.signup-mini-agent {
    padding: 1rem;
    border-radius: 16px;
}

.signup-mini-chat {
    background: #EFF2F8;
}

.signup-mini-agent {
    background: linear-gradient(145deg, rgba(91, 92, 226, 0.11), rgba(91, 92, 226, 0.045));
    border: 1px solid rgba(91, 92, 226, 0.12);
}

.signup-mini-grid span {
    display: block;
    margin-bottom: 0.35rem;
    color: #797F8D;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.signup-mini-grid p {
    color: #414855;
    font-size: 0.82rem;
    line-height: 1.5;
}

.signup-form-panel {
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: #FFFFFF;
}

.signup-form-card {
    width: 100%;
    max-width: 500px;
}

.signup-form-kicker {
    margin-bottom: 0.65rem;
    color: #5B5CE2;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signup-form-card h2 {
    margin-bottom: 0.6rem;
    color: #171A22;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.signup-form-subtitle {
    margin-bottom: 2rem;
    color: #757D8C;
    font-size: 0.95rem;
}

.signup-form .form-group {
    margin-bottom: 1.1rem;
}

.signup-form .form-group label {
    margin-bottom: 0.45rem;
    color: #3B414D;
    font-size: 0.82rem;
    font-weight: 700;
}

.signup-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 0.95rem;
    background: #F8F9FC;
    border: 1px solid #DDE1EA;
    border-radius: 12px;
    color: #171A22;
    font: inherit;
    outline: none;
    transition: 0.2s ease;
}

.signup-form input::placeholder {
    color: #A2A8B3;
}

.signup-form input:focus {
    background: #FFFFFF;
    border-color: #6A6BE6;
    box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.09);
}

.signup-form small {
    display: block;
    margin-top: 0.45rem;
    color: #8B92A0;
    font-size: 0.72rem;
}

.signup-submit {
    width: 100%;
    min-height: 56px;
    margin-top: 0.35rem;
    border-radius: 13px;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(91, 92, 226, 0.2);
}

.signup-security-note {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.3rem;
    padding: 0.95rem 1rem;
    background: #F7F8FC;
    border: 1px solid #E5E8EF;
    border-radius: 14px;
}

.signup-security-note span {
    color: #5B5CE2;
    font-size: 1.15rem;
}

.signup-security-note p {
    color: #747C8B;
    font-size: 0.78rem;
    line-height: 1.5;
}

@media (max-width: 980px) {
    .signup-shell {
        grid-template-columns: 1fr;
    }

    .signup-visual {
        padding: 3.5rem 2rem;
    }

    .signup-visual h1 {
        max-width: 760px;
        font-size: clamp(2.7rem, 9vw, 4.6rem);
    }

    .signup-form-panel {
        padding: 3rem 1.5rem 4rem;
    }
}

@media (max-width: 620px) {
    .signup-topbar {
        min-height: 64px;
        padding: 0 1rem;
    }

    .signup-topbar-right span {
        display: none;
    }

    .signup-visual {
        padding: 2.5rem 1rem;
    }

    .signup-visual h1 {
        font-size: 2.6rem;
    }

    .signup-plan-head {
        align-items: center;
    }

    .signup-plan-items,
    .signup-mini-grid {
        grid-template-columns: 1fr;
    }

    .signup-plan-card,
    .signup-mini-workspace {
        border-radius: 18px;
    }

    .signup-form-panel {
        padding: 2.5rem 1rem 3.5rem;
    }
}

/* ============================================
   PREMIUM LOGIN
   ============================================ */
.login-shell {
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
}

.login-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-agent-card {
    max-width: 680px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(91, 92, 226, 0.16);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(54, 62, 91, 0.09);
}

.login-agent-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.15rem;
    color: #7A8291;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-agent-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-agent-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #5B5CE2, #7D6CF2);
    border-radius: 18px;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(91, 92, 226, 0.2);
}

.login-agent-body h2 {
    margin-bottom: 0.35rem;
    color: #232733;
    font-size: 1.25rem;
}

.login-agent-body p {
    max-width: 500px;
    color: #6F7787;
    font-size: 0.84rem;
}

.login-agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.login-agent-tags span {
    padding: 0.48rem 0.72rem;
    background: #F4F6FA;
    border: 1px solid #E3E7EF;
    border-radius: 999px;
    color: #626A79;
    font-size: 0.72rem;
    font-weight: 700;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.login-label-row label {
    margin-bottom: 0 !important;
}

.login-label-row a {
    color: #5B5CE2;
    font-size: 0.75rem;
    font-weight: 700;
}

.login-create-row {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.4rem;
    color: #818897;
    font-size: 0.8rem;
}

.login-create-row a {
    color: #5B5CE2;
    font-weight: 800;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .login-agent-card {
        border-radius: 18px;
    }

    .login-agent-tags {
        gap: 0.4rem;
    }

    .login-create-row {
        flex-wrap: wrap;
        text-align: center;
    }
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--h-bg-primary);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-xl);
    box-shadow: var(--h-shadow-xl);
    position: relative;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-logo-mark {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--h-brand), var(--h-brand-light));
    border-radius: var(--h-radius);
    font-weight: 700;
    color: white;
}

.auth-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--h-text-primary);
    letter-spacing: -0.03em;
}

.auth-card h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--h-text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--h-border);
}

.auth-footer p {
    font-size: 0.875rem;
    color: var(--h-text-muted);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    min-height: 100vh;
    background: var(--h-bg-primary);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--h-bg-secondary);
    border-bottom: 1px solid var(--h-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-brand-mark {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--h-brand), var(--h-brand-light));
    border-radius: var(--h-radius);
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.dashboard-brand-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--h-text-primary);
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dashboard-nav a {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--h-text-muted);
    border-radius: var(--h-radius);
    transition: var(--h-transition);
}

.dashboard-nav a:hover {
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
}

.dashboard-nav a.active {
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dashboard Content */
.dashboard-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-section {
    margin-bottom: 2.5rem;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.dashboard-section-header h2 {
    font-size: 1.25rem;
}

/* Agent Cards */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.agent-card {
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
    padding: 1.5rem;
    transition: var(--h-transition);
}

.agent-card:hover {
    border-color: var(--h-border-light);
    transform: translateY(-2px);
    box-shadow: var(--h-shadow-lg);
}

.agent-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.agent-card-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agent-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--h-brand), var(--h-brand-light));
    border-radius: var(--h-radius);
    font-weight: 600;
    color: white;
}

.agent-card-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.agent-card-info p {
    font-size: 0.8125rem;
    color: var(--h-text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--h-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-ready {
    background: rgba(16, 185, 129, 0.15);
    color: var(--h-success);
}

.status-ready::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--h-success);
    border-radius: 50%;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--h-warning);
}

.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--h-error);
}

.agent-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--h-border);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--h-bg-secondary);
    border: 1px dashed var(--h-border);
    border-radius: var(--h-radius-lg);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--h-bg-tertiary);
    border-radius: var(--h-radius-lg);
    color: var(--h-text-muted);
    font-size: 1.5rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--h-text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================
   CHAT
   ============================================ */
.chat-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--h-bg-primary);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--h-bg-secondary);
    border-bottom: 1px solid var(--h-border);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-header-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--h-text-muted);
    border-radius: var(--h-radius);
    transition: var(--h-transition);
}

.chat-header-back:hover {
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--h-brand), var(--h-brand-light));
    border-radius: var(--h-radius);
    font-weight: 600;
    color: white;
}

.chat-header-info h2 {
    font-size: 1rem;
    font-weight: 600;
}

.chat-header-info p {
    font-size: 0.75rem;
    color: var(--h-text-muted);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 75%;
    padding: 1rem 1.25rem;
    border-radius: var(--h-radius-lg);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.message.user {
    align-self: flex-end;
    background: var(--h-brand);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.6875rem;
    color: var(--h-text-muted);
    margin-top: 0.375rem;
    opacity: 0.7;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    background: var(--h-bg-secondary);
    border-top: 1px solid var(--h-border);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background: var(--h-bg-tertiary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
    padding: 0.5rem;
    transition: var(--h-transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--h-brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.chat-input {
    flex: 1;
    padding: 0.625rem 0.75rem;
    font-family: var(--h-font);
    font-size: 0.9375rem;
    color: var(--h-text-primary);
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    min-height: 24px;
    max-height: 150px;
}

.chat-input::placeholder {
    color: var(--h-text-muted);
}

.chat-send-btn {
    padding: 0.625rem 1rem;
    background: var(--h-brand);
    color: white;
    border: none;
    border-radius: var(--h-radius);
    cursor: pointer;
    transition: var(--h-transition);
}

.chat-send-btn:hover {
    background: var(--h-brand-hover);
}

/* ============================================
   CREATE AGENT
   ============================================ */
.create-page {
    min-height: 100vh;
    background: var(--h-bg-primary);
}

.create-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--h-bg-secondary);
    border-bottom: 1px solid var(--h-border);
}

.create-header-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--h-text-muted);
    border-radius: var(--h-radius);
}

.create-header-back:hover {
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
}

.create-header h1 {
    font-size: 1.25rem;
}

.create-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.create-step {
    padding: 2rem 0;
}

.create-step h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.create-step > p {
    margin-bottom: 1.5rem;
}

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

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius);
    cursor: pointer;
    transition: var(--h-transition);
}

.checkbox-item:hover {
    border-color: var(--h-border-light);
}

.checkbox-item.selected {
    border-color: var(--h-brand);
    background: var(--h-brand-subtle);
}

.checkbox-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--h-bg-tertiary);
    border-radius: var(--h-radius);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.checkbox-item.selected .checkbox-item-icon {
    background: var(--h-brand);
}

.checkbox-item-label h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.checkbox-item-label p {
    font-size: 0.8125rem;
    color: var(--h-text-muted);
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--h-border);
}

/* ============================================
   PROVISIONING ONBOARDING
   ============================================ */
.provisioning-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.14), transparent 34%),
        var(--h-bg-primary);
}

.provisioning-card {
    width: min(720px, 100%);
    padding: 2.5rem;
    background: var(--h-bg-secondary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-xl);
    box-shadow: var(--h-shadow-xl);
}

.provisioning-kicker {
    margin-bottom: 0.75rem;
    color: var(--h-brand-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.provisioning-card h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 5vw, 3rem);
}

.provisioning-card > p {
    margin-bottom: 2rem;
    color: var(--h-text-secondary);
}

.provisioning-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.provisioning-progress-track {
    flex: 1;
    height: 10px;
    overflow: hidden;
    background: var(--h-bg-tertiary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-full);
}

.provisioning-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--h-brand), var(--h-brand-light));
    border-radius: inherit;
    transition: width 0.45s ease;
}

.provisioning-progress-bar.is-failed {
    background: var(--h-error);
}

#provisioning-percent {
    min-width: 3rem;
    text-align: right;
    color: var(--h-text-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.provisioning-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.provisioning-steps > div {
    padding: 1rem;
    background: var(--h-bg-tertiary);
    border: 1px solid var(--h-border);
    border-radius: var(--h-radius-lg);
}

.provisioning-steps span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 0.75rem;
    background: var(--h-brand-subtle);
    color: var(--h-brand-light);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.provisioning-steps p {
    color: var(--h-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.provisioning-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--h-border);
}

@media (max-width: 640px) {
    .provisioning-page {
        padding: 1rem;
    }

    .provisioning-card {
        padding: 1.5rem;
    }

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

    .provisioning-actions {
        flex-direction: column;
    }

    .provisioning-actions .btn {
        width: 100%;
    }
}

/* ============================================
   AGENT DETAIL
   ============================================ */
.agent-detail {
    min-height: 100vh;
    background: var(--h-bg-primary);
}

.agent-detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--h-bg-secondary);
    border-bottom: 1px solid var(--h-border);
}

.agent-detail-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--h-text-muted);
    border-radius: var(--h-radius);
}

.agent-detail-back:hover {
    color: var(--h-text-primary);
    background: var(--h-bg-tertiary);
}

.agent-detail-avatar {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--h-brand), var(--h-brand-light));
    border-radius: var(--h-radius-lg);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.agent-detail-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.agent-detail-info p {
    font-size: 0.875rem;
    color: var(--h-text-muted);
}

.agent-detail-tabs {
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
    background: var(--h-bg-secondary);
    border-bottom: 1px solid var(--h-border);
}

.agent-detail-tabs button {
    padding: 1rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--h-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--h-transition);
}

.agent-detail-tabs button:hover {
    color: var(--h-text-secondary);
}

.agent-detail-tabs button.active {
    color: var(--h-text-primary);
    border-bottom-color: var(--h-brand);
}

.agent-detail-content {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-page {
    min-height: 100vh;
    background: var(--h-bg-primary);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--h-bg-secondary);
    border-bottom: 1px solid var(--h-border);
}

.settings-content {
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--h-border);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none; }

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #F7F8FC;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #E1E5ED;
    border-top-color: #6A6BE6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .hero { padding: 6rem 0 3rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
        align-items: center;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-footer-inner {
        flex-direction: column;
        gap: 1rem;
    }
}


/* ============================================
   PREMIUM MEMBER APP v1
   ============================================ */
.app-surface {
    --h-bg-primary: #F7F8FC;
    --h-bg-secondary: #FFFFFF;
    --h-bg-tertiary: #F1F3F8;
    --h-bg-elevated: #E9ECF4;
    --h-border: #E2E5ED;
    --h-border-light: #C8CFDC;
    --h-text-primary: #171A22;
    --h-text-secondary: #596170;
    --h-text-muted: #818897;
    --h-brand: #5B5CE2;
    --h-brand-hover: #4849CC;
    --h-brand-light: #6F70EA;
    --h-brand-subtle: rgba(91, 92, 226, 0.09);
    --h-shadow-sm: 0 2px 10px rgba(38, 46, 68, 0.05);
    --h-shadow: 0 12px 30px rgba(38, 46, 68, 0.07);
    --h-shadow-lg: 0 20px 48px rgba(38, 46, 68, 0.10);
    --h-shadow-xl: 0 28px 72px rgba(38, 46, 68, 0.12);
    min-height: 100vh;
    background: #F7F8FC;
    color: #171A22;
}

.app-surface h1,
.app-surface h2,
.app-surface h3,
.app-surface h4 {
    color: #171A22;
}

.app-surface p {
    color: #687080;
}

.app-surface .btn-primary {
    background: linear-gradient(135deg, #5B5CE2, #6869EC);
    color: #FFFFFF;
    box-shadow: 0 10px 24px rgba(91, 92, 226, 0.18);
}

.app-surface .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4E4FD4, #5E5FE1);
    box-shadow: 0 14px 28px rgba(91, 92, 226, 0.22);
}

.app-surface .btn-secondary {
    background: #FFFFFF;
    color: #343A47;
    border: 1px solid #DDE2EA;
    box-shadow: 0 2px 8px rgba(40, 48, 68, 0.03);
}

.app-surface .btn-secondary:hover:not(:disabled) {
    background: #F7F8FC;
    border-color: #CBD2DE;
}

.app-surface .btn-ghost {
    color: #687080;
}

.app-surface .btn-danger {
    background: #FFF1F2;
    color: #C63E4F;
    border: 1px solid #F2C8CE;
}

.member-app {
    min-height: 100vh;
}

.member-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.25rem;
    min-height: 72px;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #E5E8EF;
    backdrop-filter: blur(18px);
}

.member-topbar-chat {
    grid-template-columns: 1fr auto;
}

.member-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    justify-self: start;
    color: #171A22;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.member-brand:hover {
    color: #171A22;
}

.member-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #5B5CE2, #7D6CF2);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(91, 92, 226, 0.19);
}

.member-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-self: center;
    padding: 0.32rem;
    background: #F4F6FA;
    border: 1px solid #E7EAF0;
    border-radius: 12px;
}

.member-nav a {
    padding: 0.55rem 0.85rem;
    color: #727A89;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 700;
}

.member-nav a:hover {
    color: #313744;
    background: rgba(255, 255, 255, 0.65);
}

.member-nav a.active {
    color: #292E39;
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(38, 46, 68, 0.07);
}

.member-account {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 0.7rem;
}

.member-user-pill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    background: #F7F8FB;
    border: 1px solid #E5E8EF;
    border-radius: 999px;
}

.member-user-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: #E8E8FC;
    border-radius: 50%;
    color: #5556D9;
    font-size: 0.72rem;
    font-weight: 900;
}

.member-user-name {
    max-width: 140px;
    overflow: hidden;
    color: #4C5361;
    font-size: 0.76rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-logout {
    padding: 0.55rem 0.65rem;
    background: transparent;
    border: 0;
    color: #858D9C;
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
}

.member-logout:hover {
    color: #343A47;
}

.member-main {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3.5rem 0 5rem;
}

.member-main-narrow {
    width: min(900px, calc(100% - 2rem));
}

.member-main-settings {
    width: min(1000px, calc(100% - 2rem));
}

.member-hero-row,
.member-page-heading {
    margin-bottom: 2.25rem;
}

.member-hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.member-hero-row h1,
.member-page-heading h1 {
    margin: 0.2rem 0 0.7rem;
    color: #161923;
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    font-weight: 760;
    letter-spacing: -0.05em;
}

.member-hero-row p,
.member-page-heading p {
    max-width: 680px;
    color: #6C7484;
    font-size: 1rem;
}

.member-eyebrow,
.member-card-label {
    color: #6364E4;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.member-plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex: 0 0 auto;
    padding: 0.65rem 0.85rem;
    background: #FFFFFF;
    border: 1px solid #E1E5ED;
    border-radius: 999px;
    color: #555E6E;
    font-size: 0.76rem;
    font-weight: 750;
    box-shadow: 0 6px 18px rgba(35, 45, 68, 0.05);
}

.member-plan-dot {
    width: 8px;
    height: 8px;
    background: #29B77A;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(41, 183, 122, 0.09);
}

.member-back-link {
    display: inline-flex;
    margin-bottom: 1.25rem;
    color: #737B8B;
    font-size: 0.8rem;
    font-weight: 750;
}

.member-back-link:hover {
    color: #5657DB;
}

.member-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
    gap: 1.25rem;
    align-items: stretch;
}

.premium-agent-card,
.member-panel,
.member-side-card,
.member-empty-card {
    background: #FFFFFF;
    border: 1px solid #E3E7EE;
    box-shadow: 0 16px 42px rgba(38, 46, 68, 0.07);
}

.premium-agent-card {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border-radius: 24px;
}

.premium-agent-card::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    top: -190px;
    right: -80px;
    background: rgba(91, 92, 226, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.premium-agent-top,
.premium-agent-identity,
.premium-agent-actions,
.member-panel-head {
    display: flex;
    align-items: center;
}

.premium-agent-top {
    position: relative;
    z-index: 1;
    justify-content: space-between;
    gap: 1rem;
}

.premium-agent-identity {
    gap: 1rem;
}

.premium-agent-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #5B5CE2, #7B6BEC);
    border-radius: 15px;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(91, 92, 226, 0.18);
}

.premium-agent-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 19px;
    font-size: 0.95rem;
}

.premium-agent-card h2 {
    margin-top: 0.2rem;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.premium-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: capitalize;
}

.premium-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.premium-status.status-ready {
    background: #EAF9F2;
    color: #16845A;
}

.premium-status.status-ready::before {
    background: #20B779;
}

.premium-status.status-provisioning,
.premium-status.status-pending {
    background: #FFF6E6;
    color: #A46A0D;
}

.premium-status.status-provisioning::before,
.premium-status.status-pending::before {
    background: #EAA33B;
}

.premium-status.status-stopped {
    background: #F0F2F6;
    color: #687080;
}

.premium-status.status-stopped::before {
    background: #8B93A0;
}

.premium-status.status-failed {
    background: #FFF0F1;
    color: #B83F50;
}

.premium-status.status-failed::before {
    background: #D65061;
}

.premium-agent-description {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 1.4rem 0 1.6rem;
    color: #697181;
    font-size: 0.94rem;
}

.premium-agent-facts {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.premium-agent-facts > div {
    min-width: 0;
    padding: 1rem;
    background: #F7F8FB;
    border: 1px solid #EAECF2;
    border-radius: 15px;
}

.premium-fact-icon {
    display: block;
    margin-bottom: 0.55rem;
    color: #6162DF;
    font-size: 1rem;
    font-weight: 900;
}

.premium-agent-facts strong,
.premium-agent-facts small {
    display: block;
}

.premium-agent-facts strong {
    color: #303642;
    font-size: 0.83rem;
}

.premium-agent-facts small {
    margin-top: 0.2rem;
    overflow: hidden;
    color: #858D9C;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.premium-agent-actions {
    position: relative;
    z-index: 1;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid #ECEEF3;
}

.member-side-stack {
    display: grid;
    gap: 1rem;
}

.member-side-card {
    display: flex;
    gap: 0.9rem;
    padding: 1.3rem;
    border-radius: 19px;
}

.member-side-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    background: #EFEFFD;
    border-radius: 12px;
    color: #5B5CE2;
    font-weight: 900;
}

.member-side-card h3 {
    margin: 0.15rem 0 0.45rem;
    font-size: 1rem;
}

.member-side-card p {
    color: #798190;
    font-size: 0.78rem;
    line-height: 1.55;
}

.member-empty-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.5rem;
    border-radius: 26px;
}

.member-empty-orb {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,0.35), transparent 32%),
        linear-gradient(145deg, #5B5CE2, #806EF0);
    border-radius: 42px;
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: 0 24px 44px rgba(91, 92, 226, 0.22);
    transform: rotate(-4deg);
}

.member-empty-copy h2 {
    max-width: 680px;
    margin: 0.25rem 0 0.65rem;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.member-empty-copy > p {
    max-width: 660px;
}

.member-empty-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.2rem 0 1.4rem;
}

.member-empty-points span {
    padding: 0.45rem 0.65rem;
    background: #F4F5FA;
    border-radius: 999px;
    color: #646C7B;
    font-size: 0.72rem;
    font-weight: 700;
}

.member-panel {
    padding: 1.5rem;
    border-radius: 21px;
}

.member-panel-head {
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.member-panel-head h2 {
    margin-top: 0.18rem;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

/* Premium create-agent wizard */
.premium-wizard {
    position: relative;
}

.wizard-global-error {
    min-height: 1.25rem;
    margin-bottom: 0.5rem;
    color: #C84757;
    font-weight: 700;
}

.premium-wizard .wizard-step {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: #FFFFFF;
    border: 1px solid #E3E7EE;
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(38, 46, 68, 0.07);
}

.wizard-step-head {
    margin-bottom: 1.8rem;
}

.wizard-step-head > span {
    display: inline-flex;
    margin-bottom: 0.8rem;
    padding: 0.4rem 0.62rem;
    background: #EFEFFD;
    border-radius: 999px;
    color: #5A5BDC;
    font-size: 0.68rem;
    font-weight: 850;
}

.wizard-step-head h2 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.04em;
}

.wizard-step-head p {
    color: #7A8291;
    font-size: 0.9rem;
}

.premium-field {
    margin-bottom: 1.25rem;
}

.premium-field label,
.premium-setting-label {
    display: block;
    margin-bottom: 0.48rem;
    color: #3E4552;
    font-size: 0.79rem;
    font-weight: 800;
}

.premium-field input {
    width: 100%;
    min-height: 54px;
    padding: 0 1rem;
    background: #F8F9FC;
    border: 1px solid #DDE2EA;
    border-radius: 13px;
    color: #1C2029;
    font: inherit;
    outline: none;
    transition: 0.2s ease;
}

.premium-field input:focus {
    background: #FFFFFF;
    border-color: #6869E8;
    box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.09);
}

.premium-field small {
    display: block;
    margin-top: 0.5rem;
    color: #9097A5;
    font-size: 0.7rem;
}

.premium-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.premium-choice-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.premium-choice-grid-three,
.premium-choice-grid-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.premium-choice {
    position: relative;
    display: flex;
    min-height: 132px;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    padding: 1.15rem;
    background: #F9FAFC;
    border: 1px solid #E3E7EE;
    border-radius: 17px;
    cursor: pointer;
    transition: 0.2s ease;
}

.premium-choice:hover {
    background: #FFFFFF;
    border-color: #C8CFDC;
    transform: translateY(-1px);
}

.premium-choice:has(input:checked) {
    background: #F1F1FE;
    border-color: #7677E7;
    box-shadow: 0 0 0 3px rgba(91, 92, 226, 0.07);
}

.premium-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.premium-choice .choice-icon {
    margin-bottom: 0.45rem;
    color: #6263DE;
    font-size: 1.1rem;
    font-weight: 900;
}

.premium-choice strong {
    color: #343A47;
    font-size: 0.9rem;
}

.premium-choice small {
    color: #8B92A0;
    font-size: 0.72rem;
    line-height: 1.45;
}

.premium-choice-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.premium-setting-groups {
    display: grid;
    gap: 1.5rem;
}

.premium-segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0.3rem;
    background: #F1F3F7;
    border: 1px solid #E2E6ED;
    border-radius: 13px;
}

.premium-segmented label {
    cursor: pointer;
}

.premium-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.premium-segmented span {
    display: block;
    padding: 0.72rem;
    color: #78808F;
    border-radius: 9px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 750;
}

.premium-segmented label:has(input:checked) span {
    background: #FFFFFF;
    color: #4C4ED1;
    box-shadow: 0 4px 12px rgba(38, 46, 68, 0.08);
}

.premium-wizard .wizard-nav {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid #ECEEF3;
}

.wizard-nav-end {
    justify-content: flex-end;
}

.premium-review .review-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    overflow: hidden;
    background: #F8F9FC;
    border: 1px solid #E5E8EF;
    border-radius: 16px;
}

.premium-review .review-list dt,
.premium-review .review-list dd {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #E8EBF1;
    font-size: 0.8rem;
}

.premium-review .review-list dt {
    color: #858D9C;
    font-weight: 750;
}

.premium-review .review-list dd {
    color: #343A47;
}

.premium-review .review-list dt:last-of-type,
.premium-review .review-list dd:last-of-type {
    border-bottom: 0;
}

/* Premium provisioning */
.premium-provisioning-page {
    min-height: calc(100vh - 72px);
    padding: 3rem 1rem;
    background:
        radial-gradient(circle at 50% 8%, rgba(91, 92, 226, 0.11), transparent 32%),
        #F7F8FC;
}

.premium-provisioning-card {
    width: min(780px, 100%);
    padding: clamp(1.8rem, 4vw, 3rem);
    background: #FFFFFF;
    border: 1px solid #E2E6ED;
    border-radius: 26px;
    text-align: center;
    box-shadow: 0 26px 70px rgba(38, 46, 68, 0.1);
}

.provisioning-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 1.5rem;
}

.provisioning-core {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    background: linear-gradient(145deg, #5B5CE2, #806EF0);
    border-radius: 18px;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 15px 30px rgba(91, 92, 226, 0.22);
}

.provisioning-ring {
    position: absolute;
    border: 1px solid rgba(91, 92, 226, 0.2);
    border-radius: 50%;
    animation: provisioningPulse 2.4s ease-in-out infinite;
}

.provisioning-ring-one {
    width: 84px;
    height: 84px;
}

.provisioning-ring-two {
    width: 110px;
    height: 110px;
    animation-delay: 0.35s;
}

@keyframes provisioningPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1); }
}

.premium-provisioning-card .provisioning-kicker {
    color: #5B5CE2;
}

.premium-provisioning-card h1 {
    margin-bottom: 0.6rem;
    color: #171A22;
    letter-spacing: -0.04em;
}

.premium-provisioning-card > p {
    max-width: 620px;
    margin: 0 auto 2rem;
    color: #727A89;
}

.premium-provisioning-card .provisioning-progress-track {
    background: #EFF1F5;
    border-color: #E3E7EE;
}

.premium-provisioning-card #provisioning-percent {
    color: #717989;
}

.premium-provisioning-card .provisioning-steps {
    text-align: left;
}

.premium-provisioning-card .provisioning-steps > div {
    background: #F8F9FC;
    border-color: #E7EAF0;
}

.premium-provisioning-card .provisioning-steps strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #3A404D;
    font-size: 0.78rem;
}

.premium-provisioning-card .provisioning-steps p {
    color: #8A92A0;
    font-size: 0.7rem;
}

.premium-provisioning-card .provisioning-actions {
    justify-content: center;
    border-color: #ECEEF3;
}

/* Premium agent detail */
.agent-premium-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.agent-premium-name-row {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.agent-premium-name-row h1 {
    margin: 0.15rem 0 0.45rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.05em;
}

.agent-premium-statusline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    color: #858D9B;
    font-size: 0.72rem;
    font-weight: 700;
}

.agent-premium-statusline > span:not(.premium-status) {
    padding: 0.35rem 0.55rem;
    background: #F2F4F8;
    border-radius: 999px;
}

.agent-premium-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
    gap: 1rem;
}

.agent-overview-panel,
.agent-config-panel,
.agent-architecture-panel {
    min-width: 0;
}

.agent-config-panel,
.agent-architecture-panel {
    grid-column: span 1;
}

.agent-container-badge {
    padding: 0.42rem 0.62rem;
    background: #EDF8F2;
    border-radius: 999px;
    color: #27825E;
    font-size: 0.68rem;
    font-weight: 850;
}

.agent-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.agent-stat-grid > div {
    padding: 1rem;
    background: #F8F9FC;
    border: 1px solid #EAECF2;
    border-radius: 14px;
}

.agent-stat-grid span,
.agent-stat-grid strong,
.agent-stat-grid small {
    display: block;
}

.agent-stat-grid span {
    margin-bottom: 0.3rem;
    color: #8B92A0;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.agent-stat-grid strong {
    color: #343A47;
    font-size: 0.88rem;
}

.agent-stat-grid small {
    margin-top: 0.2rem;
    color: #9198A5;
    font-size: 0.68rem;
}

.agent-controls-panel > p {
    margin-bottom: 1.2rem;
    font-size: 0.82rem;
}

.agent-runtime-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.premium-config-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #E8EBF1;
    border-radius: 14px;
}

.premium-config-list > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 0.8rem 0.95rem;
    background: #FAFBFD;
    border-bottom: 1px solid #ECEEF3;
}

.premium-config-list > div:last-child {
    border-bottom: 0;
}

.premium-config-list dt {
    color: #858D9C;
    font-size: 0.72rem;
    font-weight: 750;
}

.premium-config-list dd {
    color: #363C48;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}

.architecture-flow {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
}

.architecture-flow > div {
    flex: 1;
    padding: 0.9rem;
    background: #F7F8FB;
    border: 1px solid #E7EAF0;
    border-radius: 13px;
    text-align: center;
}

.architecture-flow > b {
    align-self: center;
    color: #A4ABB7;
}

.architecture-flow span,
.architecture-flow small {
    display: block;
}

.architecture-flow span {
    color: #353B47;
    font-size: 0.76rem;
    font-weight: 800;
}

.architecture-flow small {
    margin-top: 0.25rem;
    color: #8A92A0;
    font-size: 0.62rem;
}

.architecture-flow .architecture-private {
    background: #F0F0FE;
    border-color: #D8D8F7;
}

.danger-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1rem;
    border-color: #F0DADD;
    box-shadow: none;
}

.danger-panel h2 {
    margin: 0.18rem 0 0.35rem;
    font-size: 1rem;
}

.danger-panel p {
    font-size: 0.76rem;
}

/* Workspace overview */
.overview-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

.overview-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    height: calc(100dvh - 72px);
    min-height: 0;
    overflow: hidden;
}

.overview-workspace {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #F7F8FB;
}

.overview-content {
    height: 100%;
    overflow-y: auto;
    padding: 1.35rem clamp(1rem, 2.6vw, 2rem) 2.5rem;
}

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

.overview-kicker,
.overview-card-label {
    color: #7B8290;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.overview-header h1 {
    margin: 0.12rem 0 0.2rem;
    color: #252A34;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.overview-header p {
    color: #7D8593;
    font-size: 0.78rem;
}

.overview-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.overview-health-card,
.overview-stat-card,
.overview-panel,
.overview-empty {
    background: #FFFFFF;
    border: 1px solid #E1E5EC;
    box-shadow: 0 8px 22px rgba(36, 44, 64, 0.035);
}

.overview-health-card {
    padding: 1.1rem;
    border-radius: 16px;
}

.overview-health-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.overview-health-identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.overview-health-identity h2 {
    margin: 0.1rem 0 0.16rem;
    color: #2E3440;
    font-size: 1.12rem;
    letter-spacing: -0.025em;
}

.overview-health-identity p {
    color: #818997;
    font-size: 0.72rem;
}

.overview-health-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.overview-runtime-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #5B5CE2, #7466EB);
    border-radius: 13px;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(91, 92, 226, 0.16);
}

.overview-health-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid #ECEFF4;
}

.overview-health-strip > div {
    min-width: 0;
    padding: 0 0.85rem;
    border-right: 1px solid #ECEFF4;
}

.overview-health-strip > div:first-child {
    padding-left: 0;
}

.overview-health-strip > div:last-child {
    padding-right: 0;
    border-right: 0;
}

.overview-health-strip span,
.overview-config-inline span {
    display: block;
    color: #939AA6;
    font-size: 0.62rem;
}

.overview-health-strip strong,
.overview-config-inline strong {
    display: block;
    margin-top: 0.16rem;
    overflow: hidden;
    color: #424957;
    font-size: 0.7rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-pulse-section {
    margin-top: 1rem;
}

.overview-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.overview-section-title h2 {
    margin-top: 0.1rem;
    color: #353B47;
    font-size: 0.9rem;
}

.overview-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.overview-stat-card {
    min-width: 0;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
}

.overview-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.48rem;
}

.overview-stat-card strong {
    display: block;
    overflow: hidden;
    color: #2E3440;
    font-size: 1.25rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-stat-card strong.overview-plan-value {
    font-size: 0.92rem;
    line-height: 1.25;
}

.overview-stat-card small {
    display: block;
    margin-top: 0.26rem;
    color: #9299A6;
    font-size: 0.63rem;
}

.overview-stat-icon,
.overview-session-icon {
    display: inline-grid;
    place-items: center;
    color: #989FAA;
}

.overview-stat-icon svg,
.overview-session-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.overview-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 0.7rem;
    margin-top: 0.9rem;
    align-items: start;
}

.overview-panel {
    min-width: 0;
    padding: 1rem;
    border-radius: 15px;
}

.overview-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.overview-panel-head h2 {
    margin-top: 0.1rem;
    color: #353B47;
    font-size: 0.88rem;
    letter-spacing: -0.015em;
}

.overview-count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    padding: 0 0.4rem;
    background: #F1F2F6;
    border-radius: 999px;
    color: #737B89;
    font-size: 0.63rem;
    font-weight: 800;
}

.overview-session-list,
.overview-system-list,
.overview-attention-list {
    display: grid;
}

.overview-session-row,
.overview-system-row,
.overview-activity-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.62rem 0.05rem;
    border-bottom: 1px solid #EFF1F5;
}

.overview-session-row:last-child,
.overview-system-row:last-child,
.overview-activity-empty:last-child {
    border-bottom: 0;
}

.overview-session-copy,
.overview-system-copy {
    min-width: 0;
    flex: 1;
}

.overview-session-row strong,
.overview-session-row small,
.overview-system-row strong,
.overview-system-row small,
.overview-activity-empty strong,
.overview-activity-empty small {
    display: block;
}

.overview-session-row strong,
.overview-system-row strong,
.overview-activity-empty strong {
    overflow: hidden;
    color: #454C59;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-session-row small,
.overview-system-row small,
.overview-activity-empty small {
    margin-top: 0.12rem;
    color: #969DA8;
    font-size: 0.61rem;
}

.overview-row-status {
    flex: 0 0 auto;
    max-width: 120px;
    overflow: hidden;
    color: #8A929F;
    font-size: 0.61rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-system-marker {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: #A8AEB8;
    border-radius: 50%;
}

.overview-system-marker.status-completed,
.overview-system-marker.status-success {
    background: #24B67B;
}

.overview-system-marker.status-running {
    background: #5B5CE2;
}

.overview-system-marker.status-failed {
    background: #D55364;
}

.overview-attention-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.72rem;
    background: #F8F9FB;
    border: 1px solid #ECEEF3;
    border-radius: 11px;
}

.overview-attention-item + .overview-attention-item {
    margin-top: 0.45rem;
}

.overview-attention-dot {
    width: 8px;
    height: 8px;
    margin-top: 0.22rem;
    flex: 0 0 auto;
    background: #6D76E8;
    border-radius: 50%;
}

.overview-attention-item strong,
.overview-attention-item small {
    display: block;
}

.overview-attention-item strong {
    color: #4A515E;
    font-size: 0.69rem;
}

.overview-attention-item small {
    margin-top: 0.16rem;
    color: #8C94A1;
    font-size: 0.61rem;
    line-height: 1.4;
}

.overview-attention-item.tone-success {
    background: #F3FBF7;
    border-color: #DDEFE6;
}

.overview-attention-item.tone-success .overview-attention-dot {
    background: #24B67B;
}

.overview-attention-item.tone-warning {
    background: #FFF9EF;
    border-color: #F2E7CC;
}

.overview-attention-item.tone-warning .overview-attention-dot {
    background: #DA9A31;
}

.overview-attention-item.tone-danger {
    background: #FFF5F6;
    border-color: #F0DDE1;
}

.overview-attention-item.tone-danger .overview-attention-dot {
    background: #D55364;
}

.overview-tool-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
}

.overview-tool-chips span {
    padding: 0.38rem 0.52rem;
    background: #F3F4F8;
    border: 1px solid #E7E9EF;
    border-radius: 999px;
    color: #646C7A;
    font-size: 0.63rem;
    font-weight: 700;
}

.overview-tool-chips .overview-muted-chip {
    color: #9299A5;
}

.overview-config-inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding-top: 0.75rem;
    border-top: 1px solid #EEF0F4;
}

.overview-config-inline > div {
    min-width: 0;
}

.overview-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: 16px;
}

.overview-empty-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    background: #EEEEFD;
    border-radius: 15px;
    color: #5B5CE2;
    font-size: 0.8rem;
    font-weight: 900;
}

.overview-empty h2 {
    margin: 0.15rem 0 0.35rem;
    color: #2D333E;
    font-size: 1.08rem;
}

.overview-empty p {
    max-width: 640px;
    margin-bottom: 0.7rem;
    color: #7A8291;
    font-size: 0.74rem;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .overview-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .overview-health-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem 0;
    }

    .overview-health-strip > div:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .overview-layout {
        grid-template-columns: 1fr;
    }

    .overview-layout .chat-sidepanel {
        display: none;
    }

    .overview-header,
    .overview-health-main {
        align-items: stretch;
        flex-direction: column;
    }

    .overview-health-actions {
        justify-content: space-between;
    }
}

@media (max-width: 520px) {
    .overview-stat-grid,
    .overview-health-strip,
    .overview-config-inline {
        grid-template-columns: 1fr;
    }

    .overview-health-strip > div {
        padding: 0.4rem 0;
        border-right: 0;
        border-bottom: 1px solid #EEF0F4;
    }

    .overview-health-strip > div:last-child {
        border-bottom: 0;
    }

    .overview-header-actions {
        width: 100%;
    }

    .overview-header-actions .btn {
        flex: 1;
    }
}

/* Workspace channels */
.channels-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

.channels-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    height: calc(100dvh - 72px);
    min-height: 0;
    overflow: hidden;
}

.channels-workspace {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #F7F8FB;
}

.channels-content {
    height: 100%;
    overflow-y: auto;
    padding: 1.35rem clamp(1rem, 2.6vw, 2rem) 2.5rem;
}

.channels-header {
    margin-bottom: 1rem;
}

.channels-header h1 {
    margin: 0.12rem 0 0.2rem;
    color: #252A34;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.channels-header p {
    color: #7D8593;
    font-size: 0.78rem;
}

.channels-primary-card,
.channel-card,
.channels-info-panel {
    background: #FFFFFF;
    border: 1px solid #E1E5EC;
    box-shadow: 0 8px 22px rgba(36, 44, 64, 0.035);
}

.channels-primary-card {
    border-radius: 16px;
    overflow: hidden;
}

.channels-primary-main {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem;
}

.channels-primary-copy {
    min-width: 0;
    flex: 1;
}

.channels-primary-copy h2 {
    margin: 0.1rem 0 0.18rem;
    color: #303641;
    font-size: 1.05rem;
}

.channels-primary-copy p {
    color: #858D9B;
    font-size: 0.7rem;
}

.channels-brand-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    background: #F1F2F6;
    border: 1px solid #E5E8EE;
    border-radius: 12px;
    color: #717988;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.channels-brand-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.channels-brand-web {
    background: #EEEEFD;
    border-color: #DEDEF8;
    color: #5B5CE2;
}

.channels-state {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    flex: 0 0 auto;
    color: #7E8694;
    font-size: 0.64rem;
    font-weight: 750;
}

.channels-state > span {
    width: 7px;
    height: 7px;
    background: #A4ABB6;
    border-radius: 50%;
}

.channels-state.is-connected {
    color: #23815C;
}

.channels-state.is-connected > span {
    background: #25B97B;
    box-shadow: 0 0 0 4px rgba(37, 185, 123, 0.09);
}

.channels-state.is-idle > span {
    background: #A4ABB6;
}

.channels-primary-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: #FAFBFC;
    border-top: 1px solid #EBEDF2;
}

.channels-primary-footer > div:not(.channels-primary-actions) span,
.channels-primary-footer > div:not(.channels-primary-actions) strong {
    display: block;
}

.channels-primary-footer > div:not(.channels-primary-actions) span {
    color: #959CA8;
    font-size: 0.61rem;
}

.channels-primary-footer > div:not(.channels-primary-actions) strong {
    margin-top: 0.12rem;
    color: #4A515E;
    font-size: 0.69rem;
    text-transform: capitalize;
}

.channels-section {
    margin-top: 1rem;
}

.channels-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.55rem;
}

.channels-section-head h2 {
    margin-top: 0.1rem;
    color: #353B47;
    font-size: 0.9rem;
}

.channels-section-note {
    color: #949BA7;
    font-size: 0.62rem;
}

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

.channel-card {
    min-width: 0;
    padding: 1rem;
    border-radius: 15px;
}

.channel-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.channel-card h3 {
    color: #353B47;
    font-size: 0.85rem;
}

.channel-card p {
    min-height: 2.6em;
    margin-top: 0.28rem;
    color: #858D9B;
    font-size: 0.68rem;
    line-height: 1.45;
}

.channel-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #EEF0F4;
}

.channel-card-meta > span {
    color: #979EAA;
    font-size: 0.61rem;
}

.channel-card .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.channels-info-panel {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-top: 0.9rem;
    padding: 1rem;
    border-radius: 15px;
}

.channels-info-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    background: #F1F2F7;
    border-radius: 11px;
    color: #707887;
}

.channels-info-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.channels-info-panel h2 {
    margin: 0.1rem 0 0.2rem;
    color: #3B424F;
    font-size: 0.86rem;
}

.channels-info-panel p {
    max-width: 720px;
    color: #858D9B;
    font-size: 0.68rem;
    line-height: 1.45;
}

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

@media (max-width: 760px) {
    .channels-layout {
        grid-template-columns: 1fr;
    }

    .channels-layout .chat-sidepanel {
        display: none;
    }

    .channels-primary-main,
    .channels-primary-footer,
    .channels-section-head {
        align-items: stretch;
    }

    .channels-primary-main,
    .channels-section-head {
        flex-direction: column;
    }

    .channels-primary-footer {
        grid-template-columns: 1fr;
    }

    .channels-primary-actions .btn {
        width: 100%;
    }
}

/* Shared workspace control pages */
.workspace-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

.workspace-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    height: calc(100dvh - 72px);
    min-height: 0;
    overflow: hidden;
}

.workspace-main {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #F7F8FB;
}

.workspace-content {
    height: 100%;
    overflow-y: auto;
    padding: 1.35rem clamp(1rem, 2.6vw, 2rem) 2.5rem;
}

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

.workspace-header h1 {
    margin: 0.12rem 0 0.2rem;
    color: #252A34;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.workspace-header p {
    color: #7D8593;
    font-size: 0.78rem;
}

.workspace-header-actions,
.workspace-action-row,
.workspace-row-actions,
.workspace-form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.workspace-panel,
.workspace-hero-card,
.workspace-empty,
.workspace-stat-grid > article,
.workspace-agent-card {
    background: #FFFFFF;
    border: 1px solid #E1E5EC;
    box-shadow: 0 8px 22px rgba(36, 44, 64, 0.035);
}

.workspace-panel,
.workspace-hero-card,
.workspace-empty {
    border-radius: 15px;
}

.workspace-panel {
    min-width: 0;
    padding: 1rem;
}

.workspace-panel + .workspace-panel {
    margin-top: 0.75rem;
}

.workspace-panel-head,
.workspace-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.75rem;
}

.workspace-panel-head h2,
.workspace-hero-top h2 {
    margin-top: 0.1rem;
    color: #353B47;
    font-size: 0.9rem;
}

.workspace-panel-note,
.workspace-form-note {
    color: #8A92A0;
    font-size: 0.65rem;
    line-height: 1.45;
}

.workspace-panel-note {
    margin-bottom: 0.75rem;
}

.workspace-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.workspace-empty h2 {
    margin: 0.12rem 0 0.25rem;
    color: #303641;
    font-size: 1rem;
}

.workspace-empty p {
    margin-bottom: 0.7rem;
    color: #858D9B;
    font-size: 0.7rem;
}

.workspace-hero-card {
    padding: 1rem;
}

.workspace-agent-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workspace-agent-identity h2 {
    margin: 0.1rem 0 0.15rem;
}

.workspace-agent-identity p,
.workspace-hero-top p {
    color: #858D9B;
    font-size: 0.67rem;
}

.workspace-metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0.85rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid #ECEFF4;
    border-bottom: 1px solid #ECEFF4;
}

.workspace-metric-strip > div {
    min-width: 0;
    padding: 0 0.75rem;
    border-right: 1px solid #ECEFF4;
}

.workspace-metric-strip > div:first-child {
    padding-left: 0;
}

.workspace-metric-strip > div:last-child {
    border-right: 0;
}

.workspace-metric-strip span,
.workspace-stat-grid article > span {
    display: block;
    color: #9299A5;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.045em;
}

.workspace-metric-strip strong {
    display: block;
    margin-top: 0.14rem;
    overflow: hidden;
    color: #454C59;
    font-size: 0.69rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.workspace-stat-grid > article {
    min-width: 0;
    padding: 0.9rem;
    border-radius: 14px;
}

.workspace-stat-grid article > strong {
    display: block;
    margin-top: 0.45rem;
    overflow: hidden;
    color: #2E3440;
    font-size: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-stat-grid article > strong.workspace-small-value {
    font-size: 0.78rem;
}

.workspace-stat-grid article > small {
    display: block;
    margin-top: 0.25rem;
    color: #9299A6;
    font-size: 0.62rem;
}

.workspace-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.workspace-grid-2 > .workspace-panel {
    margin-top: 0;
}

.workspace-list {
    display: grid;
}

.workspace-list-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.68rem 0.05rem;
    border-bottom: 1px solid #EFF1F5;
}

.workspace-list-row:last-child {
    border-bottom: 0;
}

.workspace-list-copy {
    min-width: 0;
    flex: 1;
}

.workspace-list-copy strong,
.workspace-list-copy small {
    display: block;
}

.workspace-list-copy strong {
    overflow: hidden;
    color: #454C59;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-list-copy small {
    margin-top: 0.12rem;
    color: #969DA8;
    font-size: 0.61rem;
}

.workspace-list-meta {
    flex: 0 0 auto;
    max-width: 150px;
    overflow: hidden;
    color: #8A929F;
    font-size: 0.61rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-list-icon,
.workspace-skill-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #9299A5;
}

.workspace-list-icon svg,
.workspace-skill-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.workspace-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: #A7AEB8;
    border-radius: 50%;
}

.workspace-status-dot.status-completed,
.workspace-status-dot.status-success,
.workspace-status-dot.status-ready {
    background: #24B67B;
}

.workspace-status-dot.status-running {
    background: #5B5CE2;
}

.workspace-status-dot.status-failed {
    background: #D55364;
}

.workspace-empty-row {
    padding: 1rem 0.25rem;
    color: #949BA7;
    font-size: 0.68rem;
}

.workspace-search-row {
    margin-bottom: 0.45rem;
}

.workspace-search-input,
.workspace-form input[type="text"],
.workspace-form input[type="datetime-local"],
.workspace-form select,
.workspace-form textarea,
.workspace-upload-row input[type="file"] {
    width: 100%;
    padding: 0.68rem 0.75rem;
    background: #FAFBFC;
    border: 1px solid #DDE2EA;
    border-radius: 10px;
    color: #353B47;
    font: inherit;
    font-size: 0.72rem;
    outline: none;
}

.workspace-search-input:focus,
.workspace-form input:focus,
.workspace-form select:focus,
.workspace-form textarea:focus {
    background: #FFFFFF;
    border-color: #7374E8;
    box-shadow: 0 0 0 3px rgba(91, 92, 226, 0.06);
}

.workspace-form {
    display: grid;
    gap: 0.8rem;
}

.workspace-form > label,
.workspace-form-grid > label {
    display: grid;
    gap: 0.32rem;
    color: #616977;
    font-size: 0.66rem;
    font-weight: 750;
}

.workspace-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

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

.workspace-form-actions {
    margin-top: 0.1rem;
}

.workspace-form-feedback {
    color: #2A8C64;
    font-size: 0.65rem;
    font-weight: 750;
}

.workspace-form-feedback.is-error,
.workspace-error-text {
    color: #C34F60 !important;
}

.workspace-callout {
    padding: 0.85rem;
    background: #F7F8FB;
    border: 1px solid #EAEDF2;
    border-radius: 11px;
}

.workspace-callout strong {
    display: block;
    color: #4A515E;
    font-size: 0.7rem;
}

.workspace-callout p {
    margin-top: 0.18rem;
    color: #89919F;
    font-size: 0.63rem;
    line-height: 1.45;
}

.workspace-callout-danger {
    margin-top: 0.7rem;
    background: #FFF6F7;
    border-color: #F0DDE1;
}

.usage-bars {
    display: grid;
    gap: 0.48rem;
}

.usage-bar-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 0.55rem;
}

.usage-bar-row > span,
.usage-bar-row > strong {
    color: #858D9B;
    font-size: 0.61rem;
}

.usage-bar-row > strong {
    text-align: right;
}

.usage-bar-row > div {
    height: 7px;
    overflow: hidden;
    background: #ECEEF3;
    border-radius: 999px;
}

.usage-bar-row i {
    display: block;
    height: 100%;
    background: #6C6DE6;
    border-radius: inherit;
}

.workspace-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.workspace-agent-card {
    padding: 1rem;
    border-radius: 14px;
}

.workspace-agent-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.workspace-agent-card h3 {
    margin-top: 0.7rem;
    color: #373E4A;
    font-size: 0.85rem;
}

.workspace-agent-card p {
    margin: 0.2rem 0 0.75rem;
    color: #8A92A0;
    font-size: 0.64rem;
}

.workspace-skill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.workspace-skill-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.65rem;
    padding: 0.85rem;
    background: #FAFBFC;
    border: 1px solid #E3E6EC;
    border-radius: 12px;
    cursor: pointer;
}

.workspace-skill-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.workspace-skill-copy strong,
.workspace-skill-copy small {
    display: block;
}

.workspace-skill-copy strong {
    color: #454C59;
    font-size: 0.69rem;
}

.workspace-skill-copy small {
    margin-top: 0.18rem;
    color: #8D95A2;
    font-size: 0.61rem;
    line-height: 1.4;
}

.workspace-toggle-mark {
    width: 28px;
    height: 16px;
    padding: 2px;
    background: #D9DDE5;
    border-radius: 999px;
}

.workspace-toggle-mark::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform 150ms ease;
}

.workspace-skill-card input:checked ~ .workspace-toggle-mark {
    background: #6A6BE6;
}

.workspace-skill-card input:checked ~ .workspace-toggle-mark::after {
    transform: translateX(12px);
}

.workspace-skill-catalog {
    margin-top: 0.9rem;
}

.workspace-skill-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.workspace-skill-summary span,
.workspace-skill-section-head span {
    padding: 0.24rem 0.46rem;
    border: 1px solid #E2E5EB;
    border-radius: 999px;
    background: #F8F9FB;
    color: #7D8592;
    font-size: 0.58rem;
    font-weight: 700;
}

.workspace-skill-section + .workspace-skill-section {
    margin-top: 1rem;
}

.workspace-skill-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.workspace-skill-section-head h3 {
    margin: 0;
    color: #545B68;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workspace-runtime-skill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.workspace-runtime-skill-card {
    position: relative;
    min-height: 128px;
    padding: 0.82rem 3.35rem 0.82rem 0.85rem;
    border: 1px solid #E3E6EC;
    border-radius: 12px;
    background: #FAFBFC;
}

.workspace-runtime-skill-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
}

.workspace-runtime-skill-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #414854;
    font-size: 0.72rem;
}

.workspace-runtime-skill-card p {
    margin: 0.34rem 0 0;
    color: #858D9A;
    font-size: 0.63rem;
    line-height: 1.48;
}

.workspace-skill-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C07A2B;
    box-shadow: 0 0 0 3px rgba(192, 122, 43, 0.08);
}

.workspace-skill-status-dot.is-ready {
    background: #3C9A5F;
    box-shadow: 0 0 0 3px rgba(60, 154, 95, 0.08);
}

.workspace-skill-status-dot.is-disabled {
    background: #AAB0BA;
    box-shadow: none;
}

.workspace-skill-status-label {
    color: #959CA7;
    font-size: 0.55rem;
    font-weight: 700;
    white-space: nowrap;
}

.workspace-skill-missing {
    display: block;
    margin-top: 0.36rem;
    color: #B06F28;
    font-size: 0.56rem;
    line-height: 1.35;
}

.workspace-skill-switch {
    position: absolute;
    right: 0.78rem;
    bottom: 0.78rem;
    width: 34px;
    height: 19px;
    padding: 2px;
    border: 0;
    border-radius: 999px;
    background: #D9DDE5;
    cursor: pointer;
}

.workspace-skill-switch span {
    display: block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(25, 30, 42, 0.2);
    transition: transform 150ms ease;
}

.workspace-skill-switch.is-on {
    background: #6A6BE6;
}

.workspace-skill-switch.is-on span {
    transform: translateX(15px);
}

.workspace-skill-switch:disabled {
    cursor: wait;
    opacity: 0.55;
}

@media (max-width: 820px) {
    .workspace-runtime-skill-grid {
        grid-template-columns: 1fr;
    }

    .workspace-runtime-skill-card {
        min-height: 118px;
    }
}

.workspace-detail-list {
    margin: 0;
}

.workspace-detail-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.68rem 0;
    border-bottom: 1px solid #EEF0F4;
}

.workspace-detail-list > div:last-child {
    border-bottom: 0;
}

.workspace-detail-list dt {
    color: #8B93A0;
    font-size: 0.66rem;
}

.workspace-detail-list dd {
    margin: 0;
    max-width: 60%;
    overflow: hidden;
    color: #444B58;
    font-size: 0.69rem;
    font-weight: 750;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-pref-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.78rem 0;
    border-bottom: 1px solid #EEF0F4;
    cursor: pointer;
}

.workspace-pref-row strong,
.workspace-pref-row small {
    display: block;
}

.workspace-pref-row strong {
    color: #454C59;
    font-size: 0.69rem;
}

.workspace-pref-row small {
    margin-top: 0.15rem;
    color: #9198A5;
    font-size: 0.61rem;
}

.workspace-pref-row input {
    position: absolute;
    opacity: 0;
}

.workspace-pref-row > i {
    width: 32px;
    height: 18px;
    padding: 2px;
    background: #D9DDE5;
    border-radius: 999px;
}

.workspace-pref-row > i::after {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform 150ms ease;
}

.workspace-pref-row input:checked + i {
    background: #6A6BE6;
}

.workspace-pref-row input:checked + i::after {
    transform: translateX(14px);
}

.workspace-preview-card {
    padding: 0.9rem;
    background: #F7F8FB;
    border: 1px solid #E8EBF1;
    border-radius: 11px;
}

.workspace-preview-card strong,
.workspace-preview-card p {
    display: block;
}

.workspace-preview-card strong {
    margin-top: 0.15rem;
    color: #454C59;
    font-size: 0.72rem;
}

.workspace-preview-card p {
    margin-top: 0.15rem;
    color: #8D95A2;
    font-size: 0.62rem;
}

.workspace-log-list {
    display: grid;
}

.workspace-log-row {
    display: grid;
    grid-template-columns: 8px 120px minmax(140px, 0.6fr) 80px minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    padding: 0.58rem 0;
    border-bottom: 1px solid #EFF1F5;
    font-size: 0.61rem;
}

.workspace-log-row time,
.workspace-log-row > span {
    color: #9299A5;
}

.workspace-log-row strong {
    overflow: hidden;
    color: #4A515E;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-log-row code {
    overflow: hidden;
    color: #6F7784;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.workspace-density-compact .workspace-content {
    padding-top: 0.9rem;
}

.workspace-density-compact .workspace-panel,
.workspace-density-compact .workspace-hero-card {
    padding: 0.78rem;
}

.workspace-density-compact .workspace-list-row {
    padding: 0.48rem 0.05rem;
}

.workspace-density-compact .chat-nav-item {
    min-height: 32px;
    padding-block: 0.4rem;
}

.workspace-reduced-motion *,
.workspace-reduced-motion *::before,
.workspace-reduced-motion *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
}

@media (max-width: 1050px) {
    .workspace-stat-grid,
    .workspace-skill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-log-row {
        grid-template-columns: 8px 110px minmax(140px, 1fr) 70px;
    }

    .workspace-log-row code {
        grid-column: 2 / -1;
    }
}

@media (max-width: 760px) {
    .workspace-layout {
        grid-template-columns: 1fr;
    }

    .workspace-layout .chat-sidepanel {
        display: none;
    }

    .workspace-header,
    .workspace-hero-top {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-grid-2,
    .workspace-card-grid,
    .workspace-skill-grid,
    .workspace-form-grid,
    .workspace-stat-grid,
    .workspace-metric-strip {
        grid-template-columns: 1fr;
    }

    .workspace-metric-strip > div {
        padding: 0.45rem 0;
        border-right: 0;
        border-bottom: 1px solid #EEF0F4;
    }

    .workspace-metric-strip > div:last-child {
        border-bottom: 0;
    }

    .workspace-list-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .workspace-list-copy {
        flex-basis: calc(100% - 30px);
    }

    .workspace-row-actions {
        width: 100%;
        padding-left: 24px;
    }

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

    .workspace-log-row {
        grid-template-columns: 8px 1fr;
    }

    .workspace-log-row > *:not(.workspace-status-dot) {
        grid-column: 2;
    }
}

/* Premium chat */
.premium-chat-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

.premium-chat-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    height: calc(100dvh - 72px);
    min-height: 0;
    overflow: hidden;
}

.chat-sidepanel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #F7F8FB;
    border-right: 1px solid #E1E5ED;
}

.chat-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 0.7rem 1.1rem;
    scrollbar-gutter: stable;
}

.chat-sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.chat-sidebar-scroll::-webkit-scrollbar-thumb {
    background: #D8DCE6;
    border-radius: 999px;
}

.chat-nav-group + .chat-nav-group {
    margin-top: 1.15rem;
}

.chat-nav-heading {
    margin: 0 0.45rem 0.45rem;
    color: #5D6472;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.chat-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 38px;
    padding: 0.55rem 0.65rem;
    color: #58606E;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.chat-nav-item + .chat-nav-item {
    margin-top: 0.14rem;
}

.chat-nav-item:hover {
    color: #303641;
    background: #FFFFFF;
    border-color: #E7EAF0;
}

.chat-nav-item.active {
    color: #4E4FD0;
    background: #EEEEFD;
    border-color: #DADAF8;
    font-weight: 800;
}

.chat-nav-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    color: #9AA0AA;
    line-height: 1;
}

.chat-nav-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-nav-item.active .chat-nav-icon {
    color: #5B5CE2;
}

.chat-sidebar-fixed-footer {
    flex: 0 0 auto;
    padding: 0.65rem 0.7rem 0.8rem;
    background: #F7F8FB;
    border-top: 1px solid #E1E5ED;
}

.chat-docs-item {
    background: #FFFFFF;
    border-color: #E7EAF0;
}

.chat-workspace {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    background: #FFFFFF;
}

.chat-workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E7EAF0;
}

.chat-workspace-header h1 {
    margin-top: 0.15rem;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.premium-chat-messages {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    padding: 1.5rem clamp(1rem, 5vw, 4.5rem);
    background:
        radial-gradient(circle at 50% 0%, rgba(91, 92, 226, 0.035), transparent 30%),
        #FBFCFE;
}

.premium-chat-page .message {
    width: fit-content;
    max-width: min(760px, 82%);
    padding: 0.9rem 1rem;
    border-radius: 16px;
    box-shadow: none;
    animation: hineronMessageIn 180ms ease-out;
}

@keyframes hineronMessageIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-chat-page .message.user {
    margin-left: auto;
    background: linear-gradient(135deg, #5B5CE2, #6869E8);
    color: #FFFFFF;
    border: 0;
    border-bottom-right-radius: 5px;
    box-shadow: 0 8px 22px rgba(91, 92, 226, 0.14);
}

.premium-chat-page .message.assistant {
    margin-right: auto;
    background: linear-gradient(180deg, #FFFFFF, #FDFDFF);
    color: #343A47;
    border: 1px solid #E3E7EE;
    border-bottom-left-radius: 5px;
    box-shadow: 0 8px 24px rgba(38, 46, 68, 0.045);
}

.message-role {
    margin-bottom: 0.22rem;
    opacity: 0.62;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.chat-welcome {
    max-width: 680px;
    margin: auto;
    padding: 2rem 0;
    text-align: center;
}

.chat-welcome .premium-agent-avatar {
    margin: 0 auto 1rem;
}

.chat-welcome h2 {
    margin-bottom: 0.55rem;
    font-size: 1.6rem;
}

.chat-welcome > p {
    max-width: 560px;
    margin: 0 auto;
    color: #727A89;
    font-size: 0.88rem;
}

.chat-starter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.chat-starter-grid button {
    min-height: 72px;
    padding: 0.8rem;
    background: #FFFFFF;
    border: 1px solid #E1E5ED;
    border-radius: 13px;
    color: #4F5665;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 750;
    transition: 0.2s ease;
}

.chat-starter-grid button:hover {
    border-color: #BFC6D4;
    transform: translateY(-1px);
}

.premium-chat-composer-wrap {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    flex-shrink: 0;
    padding: 0.7rem clamp(1rem, 5vw, 4.5rem) max(0.9rem, env(safe-area-inset-bottom));
    background: #FFFFFF;
    border-top: 1px solid #E7EAF0;
}

.premium-chat-composer {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem;
    background: #F7F8FB;
    border: 1px solid #DDE2EA;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(38, 46, 68, 0.07);
}

.premium-chat-composer:focus-within {
    background: #FFFFFF;
    border-color: #7475E8;
    box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.07);
}

.premium-chat-composer input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem;
    background: transparent;
    border: 0;
    color: #252A34;
    font: inherit;
    font-size: 0.88rem;
    outline: none;
}

.premium-chat-composer input::placeholder {
    color: #9AA1AD;
}

.chat-stop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.62rem 0.85rem;
    background: #FFFFFF;
    border: 1px solid #D8DDE7;
    border-radius: 10px;
    color: #4B5361;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

.chat-stop-button[hidden] {
    display: none !important;
}

.chat-stop-button:hover {
    background: #F3F4F8;
}

.chat-stop-icon {
    width: 9px;
    height: 9px;
    background: currentColor;
    border-radius: 2px;
}

.message-stopped {
    color: #697180 !important;
}

.premium-chat-composer-wrap > p {
    margin-top: 0.45rem;
    color: #A0A7B3;
    font-size: 0.64rem;
    text-align: center;
}

.chat-activity-status {
    min-height: 1.35rem;
    margin: 0 0 0.35rem 0.15rem;
    color: #7A8291;
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.chat-activity-status.is-active {
    opacity: 1;
    transform: translateY(0);
}

.premium-chat-page .message-typing {
    min-width: 128px;
}

.typing-content {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 22px;
}

.typing-label {
    color: #6F7786;
    font-size: 0.78rem;
    font-weight: 700;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #7778E9;
    border-radius: 50%;
    animation: hineronTypingDot 1.15s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.14s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes hineronTypingDot {
    0%, 60%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.premium-chat-page .message.error {
    margin-right: auto;
    background: #FFF5F6;
    color: #A63D4B;
    border: 1px solid #F1D4D8;
    border-bottom-left-radius: 5px;
}

/* ChatGPT-style progressive response presentation */
.message-body {
    min-width: 0;
    color: inherit;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.message-body p,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body li {
    color: inherit;
}

.message-body p {
    margin: 0 0 0.36rem;
}

.message-body p:last-child {
    margin-bottom: 0;
}

.message-body strong {
    font-weight: 800;
}

.message-body em {
    font-style: italic;
}

.chat-heading {
    margin: 0.18rem 0 0.34rem;
    color: inherit !important;
    line-height: 1.24;
    letter-spacing: -0.02em;
}

.chat-heading-1 {
    font-size: 1.08rem;
}

.chat-heading-2 {
    font-size: 1rem;
}

.chat-heading-3 {
    font-size: 0.94rem;
}

.chat-list {
    margin: 0.12rem 0 0.4rem 1.15rem;
    padding: 0;
}

.chat-list li {
    margin: 0.14rem 0;
    padding-left: 0.1rem;
}

.chat-paragraph-gap {
    height: 0.2rem;
}

.chat-inline-code {
    padding: 0.12rem 0.3rem;
    background: rgba(52, 58, 71, 0.08);
    border-radius: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
}

.message.user .chat-inline-code {
    background: rgba(255, 255, 255, 0.16);
}

.chat-code-block {
    overflow: hidden;
    margin: 0.65rem 0;
    background: #1F2430;
    border: 1px solid #2B3241;
    border-radius: 11px;
    color: #F5F7FB;
}

.chat-code-language {
    padding: 0.45rem 0.7rem;
    background: #292F3D;
    color: #B8C0CF;
    font-size: 0.64rem;
    font-weight: 750;
    text-transform: uppercase;
}

.chat-code-block pre {
    margin: 0;
    padding: 0.8rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

.chat-code-block code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.76rem;
    line-height: 1.55;
}

.chat-streaming-body.is-streaming::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    background: #696AE7;
    border-radius: 999px;
    vertical-align: -0.12em;
    animation: hineronStreamCursor 0.85s steps(1) infinite;
}

@keyframes hineronStreamCursor {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .premium-chat-page .message,
    .chat-streaming-body.is-streaming::after,
    .typing-dots span {
        animation: none;
    }
}

/* Premium settings */
.settings-premium-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.settings-profile-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid #ECEEF3;
}

.settings-profile-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: #ECECFD;
    border-radius: 16px;
    color: #5B5CE2;
    font-size: 1rem;
    font-weight: 900;
}

.settings-profile-row strong,
.settings-profile-row span {
    display: block;
}

.settings-profile-row strong {
    color: #303642;
}

.settings-profile-row span {
    margin-top: 0.15rem;
    color: #8A92A0;
    font-size: 0.75rem;
}

.settings-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.settings-readonly-grid > div {
    padding: 0.8rem;
    background: #F8F9FC;
    border-radius: 12px;
}

.settings-readonly-grid span,
.settings-readonly-grid strong {
    display: block;
}

.settings-readonly-grid span {
    margin-bottom: 0.25rem;
    color: #9299A5;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-readonly-grid strong {
    overflow: hidden;
    color: #404653;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-plan-price {
    color: #3566E8;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

.settings-plan-price span {
    color: #7A8291;
    font-size: 0.72rem;
}

.settings-plan-panel > p,
.settings-security-panel > p {
    font-size: 0.82rem;
}

.settings-plan-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.settings-plan-tags span {
    padding: 0.4rem 0.55rem;
    background: #F3F4F8;
    border-radius: 999px;
    color: #707887;
    font-size: 0.66rem;
    font-weight: 700;
}

.settings-password-panel {
    grid-column: span 1;
}

.premium-settings-form .btn {
    margin-top: 0.3rem;
}

.settings-security-panel {
    background:
        linear-gradient(145deg, rgba(91, 92, 226, 0.06), rgba(255,255,255,0.9)),
        #FFFFFF;
}

/* Premium member app responsive */
@media (max-width: 980px) {
    .member-topbar {
        grid-template-columns: auto 1fr auto;
        padding: 0 1rem;
    }

    .member-user-name {
        display: none;
    }

    .member-nav {
        justify-self: end;
        order: 3;
    }

    .member-account {
        justify-self: end;
    }

    .member-dashboard-grid,
    .agent-premium-grid {
        grid-template-columns: 1fr;
    }

    .member-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .premium-chat-layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .member-topbar {
        grid-template-columns: 1fr auto;
        min-height: 64px;
    }

    .member-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: calc(100% + 2rem);
        margin: 0 -1rem;
        padding: 0.35rem 1rem 0.55rem;
        overflow-x: auto;
        background: #FFFFFF;
        border: 0;
        border-top: 1px solid #ECEEF3;
        border-radius: 0;
        justify-self: stretch;
    }

    .member-nav a {
        white-space: nowrap;
    }

    .member-account {
        grid-column: 2;
        grid-row: 1;
    }

    .member-user-pill {
        display: none;
    }

    .member-main {
        width: min(100% - 1.25rem, 1180px);
        padding-top: 2rem;
    }

    .member-hero-row,
    .agent-premium-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-plan-chip {
        align-self: flex-start;
    }

    .member-empty-card {
        grid-template-columns: 1fr;
        padding: 1.4rem;
    }

    .member-empty-orb {
        width: 96px;
        height: 96px;
        border-radius: 28px;
    }

    .premium-agent-facts,
    .agent-stat-grid {
        grid-template-columns: 1fr;
    }

    .member-side-stack,
    .settings-premium-grid {
        grid-template-columns: 1fr;
    }

    .premium-choice-grid,
    .premium-choice-grid-three,
    .premium-choice-grid-tools,
    .premium-choice-grid-four {
        grid-template-columns: 1fr;
    }

    .premium-choice {
        min-height: 105px;
    }

    .premium-segmented {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

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

    .agent-premium-name-row {
        align-items: flex-start;
    }

    .architecture-flow {
        flex-direction: column;
    }

    .architecture-flow > b {
        transform: rotate(90deg);
    }

    .danger-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .premium-chat-page {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .premium-chat-layout {
        display: flex;
        height: auto;
        min-height: calc(100vh - 116px);
        flex-direction: column;
    }

    .chat-sidepanel {
        display: none;
    }

    .chat-workspace {
        min-height: calc(100vh - 116px);
    }

    .premium-chat-messages {
        min-height: 420px;
        padding: 1rem;
    }

    .chat-workspace-header {
        padding: 1rem;
    }

    .chat-workspace-header h1 {
        font-size: 1.05rem;
    }

    .premium-chat-composer-wrap {
        position: sticky;
        bottom: 0;
        padding: 0.65rem;
    }

    .chat-starter-grid {
        grid-template-columns: 1fr;
    }

    .premium-review .review-list {
        grid-template-columns: 110px 1fr;
    }
}

@media (max-width: 480px) {
    .member-brand > span:last-child {
        display: none;
    }

    .member-hero-row h1,
    .member-page-heading h1 {
        font-size: 2rem;
    }

    .premium-agent-card,
    .member-panel,
    .premium-wizard .wizard-step,
    .premium-provisioning-card {
        padding: 1.2rem;
        border-radius: 18px;
    }

    .premium-agent-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .premium-agent-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .premium-agent-actions .btn,
    .wizard-nav .btn,
    .agent-premium-primary-actions .btn {
        width: 100%;
    }

    .premium-wizard .wizard-nav {
        flex-direction: column-reverse;
    }

    .agent-premium-name-row {
        gap: 0.8rem;
    }

    .premium-config-list > div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .premium-config-list dd {
        text-align: left;
    }

    .settings-readonly-grid {
        grid-template-columns: 1fr;
    }
}


/* Membership pricing + BYOK */
.pricing-heading {
    margin-bottom: 2.5rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1040px;
    margin: 0 auto;
    align-items: stretch;
}

.pricing-card-byok {
    border-color: #DCE1EA;
    box-shadow: 0 20px 54px rgba(50, 58, 87, 0.08);
}

.pricing-card-featured {
    border-color: rgba(91, 92, 226, 0.4);
    box-shadow: 0 28px 70px rgba(50, 58, 87, 0.14);
}

.pricing-badge-soft {
    background: #EEF0F5;
    color: #596170;
}

.signup-change-plan {
    display: inline-flex;
    margin-top: 1rem;
    color: #5B5CE2;
    font-size: 0.75rem;
    font-weight: 800;
}

.membership-status-tag {
    text-transform: capitalize;
}

.settings-provider-panel {
    min-height: 220px;
}

.provider-connected-badge,
.provider-needed-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.65rem;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 850;
}

.provider-connected-badge {
    background: #EAF9F2;
    color: #16845A;
}

.provider-needed-badge {
    background: #FFF5E5;
    color: #A5680A;
}

.provider-connected-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #F8F9FC;
    border: 1px solid #E8EBF1;
    border-radius: 14px;
}

.provider-connected-row strong {
    display: block;
    color: #343A47;
    font-size: 0.86rem;
}

.provider-connected-row p {
    margin-top: 0.18rem;
    color: #858D9C;
    font-size: 0.72rem;
}

.settings-provider-note {
    margin: 0.2rem 0 1rem;
    color: #7A8291;
    font-size: 0.8rem;
    line-height: 1.6;
}

@media (max-width: 860px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 620px;
    }
}

@media (max-width: 560px) {
    .provider-connected-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .provider-connected-row form,
    .provider-connected-row .btn {
        width: 100%;
    }
}

/* Collapsible workspace sidebar */
:root {
    --hineron-sidebar-width: 236px;
}

:root.workspace-sidebar-collapsed {
    --hineron-sidebar-width: 76px;
}

.premium-chat-layout,
.overview-layout,
.channels-layout,
.workspace-layout {
    grid-template-columns: var(--hineron-sidebar-width) minmax(0, 1fr);
    transition: grid-template-columns 180ms ease;
}

.chat-sidebar-toggle-row {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    padding: 0.65rem 0.7rem 0.3rem;
}

.chat-sidebar-toggle {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #FFFFFF;
    border: 1px solid #E1E5ED;
    border-radius: 10px;
    color: #7D8491;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(38, 46, 68, 0.04);
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 180ms ease;
}

.chat-sidebar-toggle:hover {
    background: #FDFDFF;
    border-color: #CDD2DC;
    color: #4D5563;
}

.chat-sidebar-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 180ms ease;
}

.workspace-sidebar-collapsed .chat-sidebar-toggle svg {
    transform: rotate(180deg);
}

.workspace-sidebar-collapsed .chat-sidebar-toggle-row {
    justify-content: center;
    padding-inline: 0.45rem;
}

.workspace-sidebar-collapsed .chat-sidebar-scroll {
    padding: 0.6rem 0.55rem 0.8rem;
    scrollbar-width: none;
}

.workspace-sidebar-collapsed .chat-sidebar-scroll::-webkit-scrollbar {
    display: none;
}

.workspace-sidebar-collapsed .chat-nav-heading,
.workspace-sidebar-collapsed .chat-nav-label {
    display: none;
}

.workspace-sidebar-collapsed .chat-nav-group + .chat-nav-group {
    margin-top: 0.55rem;
}

.workspace-sidebar-collapsed .chat-nav-item {
    justify-content: center;
    width: 42px;
    min-height: 42px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.55rem;
    gap: 0;
    border-radius: 11px;
}

.workspace-sidebar-collapsed .chat-nav-item + .chat-nav-item {
    margin-top: 0.18rem;
}

.workspace-sidebar-collapsed .chat-nav-icon {
    width: 18px;
    min-width: 18px;
}

.workspace-sidebar-collapsed .chat-sidebar-fixed-footer {
    padding: 0.6rem 0.55rem 0.75rem;
}

.workspace-sidebar-collapsed .chat-sidebar-fixed-footer .chat-nav-item {
    margin-inline: auto;
}

/* Give the conversation more usable horizontal room. */
.premium-chat-messages {
    padding-left: clamp(1rem, 2.2vw, 2.25rem);
    padding-right: clamp(1rem, 2.2vw, 2.25rem);
}

.premium-chat-composer-wrap {
    padding-left: clamp(1rem, 2.2vw, 2.25rem);
    padding-right: clamp(1rem, 2.2vw, 2.25rem);
}

.premium-chat-page .message {
    max-width: min(840px, 86%);
}

@media (max-width: 760px) {
    .premium-chat-layout,
    .overview-layout,
    .channels-layout,
    .workspace-layout {
        grid-template-columns: 1fr;
    }
}

/* Assistant identity and timestamps */
.premium-chat-page .message.assistant {
    margin-left: 0.85rem;
}

.premium-chat-page .message.assistant .message-role {
    letter-spacing: 0;
    text-transform: none;
}

.message-time {
    color: inherit;
    opacity: 0.48;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
}

.message-time-below {
    display: block;
    margin-top: 0.42rem;
    line-height: 1;
}

.premium-chat-page .message.user .message-time-below {
    text-align: right;
    opacity: 0.7;
}

.message-time-below[hidden] {
    display: none;
}

@media (max-width: 760px) {
    .premium-chat-page .message.assistant {
        margin-left: 0.35rem;
    }
}

/* Seamless in-app route transitions */
#app.route-pending {
    cursor: progress;
}

#app.route-pending .chat-nav-item,
#app.route-pending .member-topbar a {
    cursor: progress;
}

#app.route-swap .chat-workspace,
#app.route-swap .overview-workspace,
#app.route-swap .channels-workspace,
#app.route-swap .workspace-main {
    animation: hineron-route-in 120ms ease-out both;
}

@keyframes hineron-route-in {
    from {
        opacity: 0.985;
        transform: translateY(1px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.workspace-reduced-motion #app.route-swap .chat-workspace,
.workspace-reduced-motion #app.route-swap .overview-workspace,
.workspace-reduced-motion #app.route-swap .channels-workspace,
.workspace-reduced-motion #app.route-swap .workspace-main {
    animation: none;
}

/* HeyDaili Mission Control */
.mission-control-page {
    min-height: 100dvh;
    background:
        radial-gradient(circle at 18% 20%, rgba(106, 107, 230, 0.08), transparent 28%),
        radial-gradient(circle at 85% 32%, rgba(62, 184, 199, 0.07), transparent 30%),
        #EEF1F6;
    color: #353B49;
}

.mission-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1120px, calc(100% - 2rem));
    min-height: 70px;
    margin: 0 auto;
    padding: 0 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 16px 40px rgba(39, 47, 69, 0.07);
    backdrop-filter: blur(18px);
}

.mission-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #343A48;
}

.mission-brand > span:last-child {
    display: grid;
    gap: 0.03rem;
}

.mission-brand strong {
    font-size: 0.94rem;
    line-height: 1;
}

.mission-brand small {
    color: #858D9B;
    font-size: 0.62rem;
    font-weight: 700;
}

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

.mission-chat-link {
    padding: 0.55rem 0.65rem;
    color: #555D6D;
    font-size: 0.75rem;
    font-weight: 800;
}

.mission-chat-link:hover {
    color: #5B5CE2;
}

.mission-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 2.5rem;
}

.mission-hero {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 2rem;
    background:
        linear-gradient(120deg, rgba(30, 35, 48, 0.96), rgba(67, 72, 90, 0.9)),
        #343A48;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    box-shadow: 0 22px 50px rgba(40, 47, 65, 0.13);
}

.mission-hero::after {
    content: '';
    position: absolute;
    inset: auto -5% -60% 22%;
    height: 140px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.42), rgba(255,255,255,0) 66%);
    filter: blur(8px);
    pointer-events: none;
}

.mission-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
    padding-top: 2.6rem;
}

.mission-hero-copy > span {
    color: #A5A8FF;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.mission-hero-copy h1 {
    margin: 0.25rem 0 0.3rem;
    color: #FFFFFF;
    font-size: clamp(1.7rem, 3.5vw, 2.65rem);
    letter-spacing: -0.045em;
}

.mission-hero-copy p {
    max-width: 620px;
    color: rgba(255,255,255,0.72);
    font-size: 0.8rem;
    line-height: 1.5;
}

.mission-hero-mark {
    position: absolute;
    top: 1.4rem;
    right: 3.2rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #6C6DE6, #8A79F1);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 24px;
    color: #FFFFFF;
    font-size: 2.1rem;
    font-weight: 950;
    box-shadow: 0 20px 35px rgba(18, 21, 34, 0.28);
    transform: rotate(-5deg);
}

.mission-orbit {
    position: absolute;
    border: 1px solid rgba(164, 169, 255, 0.24);
    border-radius: 50%;
    pointer-events: none;
}

.mission-orbit-a {
    width: 260px;
    height: 260px;
    top: -110px;
    right: -50px;
}

.mission-orbit-b {
    width: 180px;
    height: 180px;
    top: -70px;
    right: 38px;
}

.mission-online-pill {
    position: absolute;
    right: 1.4rem;
    bottom: 1.15rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.62rem;
    background: rgba(231, 250, 239, 0.92);
    border-radius: 999px;
    color: #2E835E;
    font-size: 0.63rem;
    font-weight: 850;
    text-transform: capitalize;
}

.mission-online-pill span {
    width: 7px;
    height: 7px;
    background: #2EB879;
    border-radius: 50%;
}

.mission-control-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.15fr);
    gap: 0.85rem;
    margin-top: 0.85rem;
    align-items: stretch;
}

.mission-detail-panel {
    min-height: 510px;
    padding: 1.55rem;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.96);
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(41, 49, 68, 0.08);
}

.mission-detail-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mission-detail-eyebrow {
    color: #725FF0;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.mission-detail-top h2 {
    margin: 0.4rem 0 0.5rem;
    max-width: 390px;
    color: #4A5062;
    font-size: 1.55rem;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.mission-detail-top p {
    max-width: 420px;
    color: #6E7688;
    font-size: 0.78rem;
    line-height: 1.55;
}

.mission-detail-icon,
.mission-card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: #052E3C;
    border: 1px solid rgba(93, 232, 245, 0.42);
    color: #55E0EE;
    box-shadow: 0 9px 20px rgba(4, 40, 52, 0.13);
}

.mission-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
}

.mission-detail-icon svg,
.mission-card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mission-detail-box {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #EEF1F6;
    border-radius: 20px;
}

.mission-detail-box ul {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mission-detail-box li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #596173;
    font-size: 0.72rem;
    font-weight: 750;
}

.mission-detail-box li > span {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: #3478F6;
    border-radius: 50%;
}

.mission-detail-cta {
    margin-top: 1rem;
}

.mission-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.mission-card {
    min-height: 200px;
    padding: 1rem 0.9rem;
    background: rgba(255,255,255,0.91);
    border: 1px solid rgba(255,255,255,0.96);
    border-radius: 25px;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: center;
    box-shadow: 0 14px 34px rgba(44, 52, 70, 0.07);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 38px rgba(44, 52, 70, 0.10);
}

.mission-card.active {
    border-color: #2F77FF;
    box-shadow: 0 0 0 1px #2F77FF, 0 18px 40px rgba(47, 119, 255, 0.10);
}

.mission-card.tone-mint {
    background: linear-gradient(145deg, rgba(229, 248, 235, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card.tone-blue {
    background: linear-gradient(145deg, rgba(229, 242, 255, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card.tone-lavender {
    background: linear-gradient(145deg, rgba(239, 231, 255, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card.tone-cyan {
    background: linear-gradient(145deg, rgba(226, 249, 248, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card.tone-peach {
    background: linear-gradient(145deg, rgba(255, 238, 219, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card.tone-sky {
    background: linear-gradient(145deg, rgba(226, 239, 255, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card.tone-rose {
    background: linear-gradient(145deg, rgba(255, 230, 242, 0.94), rgba(255,255,255,0.96) 55%);
}

.mission-card-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.7rem;
    border-radius: 10px;
}

.mission-card-icon svg {
    width: 19px;
    height: 19px;
}

.mission-card strong {
    display: block;
    color: #4B5264;
    font-size: 0.78rem;
}

.mission-card p {
    min-height: 3.9em;
    margin: 0.35rem auto 0;
    color: #71798B;
    font-size: 0.66rem;
    line-height: 1.45;
}

.mission-card-action {
    display: inline-block;
    margin-top: 0.75rem;
    color: #246CF0;
    font-size: 0.63rem;
    font-weight: 850;
}

.mission-community-card {
    margin-top: 0.85rem;
    padding: 0.9rem;
    background: rgba(255,255,255,0.86);
    border: 1px solid #E3E7EE;
    border-radius: 16px;
}

.mission-community-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
}

.mission-community-card h3 {
    margin-top: 0.18rem;
    color: #4A5062;
    font-size: 0.92rem;
}

.mission-community-card p {
    margin: 0.6rem 0 0.8rem;
    color: #6D7587;
    font-size: 0.68rem;
    line-height: 1.5;
}

.mission-status-chip {
    padding: 0.32rem 0.46rem;
    background: #EAF0FF;
    border-radius: 999px;
    color: #3973E7;
    font-size: 0.6rem;
    font-weight: 850;
}

.mission-community-card .btn[disabled] {
    opacity: 0.52;
    cursor: not-allowed;
}

@media (max-width: 960px) {
    .mission-control-grid {
        grid-template-columns: 1fr;
    }

    .mission-detail-panel {
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .mission-topbar {
        width: 100%;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .mission-topbar .member-user-name,
    .mission-topbar .member-logout {
        display: none;
    }

    .mission-shell {
        width: min(100% - 1rem, 1120px);
    }

    .mission-hero {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .mission-hero-mark,
    .mission-orbit {
        opacity: 0.55;
    }

    .mission-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .mission-card-grid {
        grid-template-columns: 1fr;
    }

    .mission-detail-top {
        flex-direction: column-reverse;
    }

    .mission-online-pill {
        position: static;
        width: fit-content;
        margin-top: 1rem;
    }
}


/* Mobile hardening — 2026-09-29 */
html,
body,
#app {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

@media (max-width: 760px) {
    /* Mobile top bar: keep the product usable without squeezing desktop chrome. */
    .member-topbar,
    .member-topbar-chat {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.5rem;
        min-height: 60px;
        padding: env(safe-area-inset-top) 0.75rem 0;
    }

    .member-brand {
        min-width: 0;
        gap: 0.5rem;
    }

    .member-brand-mark {
        width: 32px;
        height: 32px;
        flex: 0 0 auto;
    }

    .member-brand > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .member-account {
        gap: 0.25rem;
    }

    .member-logout {
        min-width: 44px;
        min-height: 44px;
        padding: 0.45rem;
    }

    .member-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: calc(100% + 1.5rem);
        margin: 0 -0.75rem;
        padding: 0.4rem 0.75rem 0.55rem;
        gap: 0.35rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .member-nav::-webkit-scrollbar,
    .chat-sidepanel::-webkit-scrollbar,
    .chat-sidebar-scroll::-webkit-scrollbar {
        display: none;
    }

    .member-nav a {
        flex: 0 0 auto;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        padding: 0.55rem 0.8rem;
        scroll-snap-align: start;
    }

    /* The detailed sidebar used to disappear completely on phones.
       Turn it into a horizontally scrollable workspace navigator instead. */
    .premium-chat-layout,
    .overview-layout,
    .channels-layout,
    .workspace-layout {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .premium-chat-layout .chat-sidepanel,
    .overview-layout .chat-sidepanel,
    .channels-layout .chat-sidepanel,
    .workspace-layout .chat-sidepanel,
    .chat-sidepanel {
        display: flex;
        flex: 0 0 auto;
        flex-direction: row;
        width: 100%;
        min-width: 0;
        min-height: 52px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        background: #F7F8FB;
        border-right: 0;
        border-bottom: 1px solid #E1E5ED;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .chat-sidebar-toggle-row {
        display: none;
    }

    .chat-sidebar-scroll {
        display: flex;
        flex: 0 0 auto;
        min-height: auto;
        overflow: visible;
        padding: 0.45rem 0.55rem;
        gap: 0.35rem;
    }

    .chat-nav-group {
        display: flex;
        flex: 0 0 auto;
        gap: 0.3rem;
        margin: 0 !important;
    }

    .chat-nav-heading {
        display: none;
    }

    .chat-nav-item,
    .workspace-sidebar-collapsed .chat-nav-item {
        flex: 0 0 auto;
        width: auto;
        min-width: max-content;
        min-height: 42px;
        margin: 0;
        padding: 0.58rem 0.72rem;
        gap: 0.5rem;
        border-radius: 10px;
    }

    .workspace-sidebar-collapsed .chat-nav-label {
        display: inline;
    }

    .chat-sidebar-fixed-footer,
    .workspace-sidebar-collapsed .chat-sidebar-fixed-footer {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        padding: 0.45rem 0.55rem 0.45rem 0;
        border-top: 0;
        border-left: 1px solid #E1E5ED;
        background: #F7F8FB;
    }

    .chat-sidebar-fixed-footer .chat-nav-item,
    .workspace-sidebar-collapsed .chat-sidebar-fixed-footer .chat-nav-item {
        margin: 0;
    }

    /* Remove desktop fixed-height assumptions. Mobile browser chrome and
       the two-row top bar make those calculations unreliable. */
    .workspace-page,
    .channels-page,
    .overview-page {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .workspace-layout,
    .channels-layout,
    .overview-layout {
        min-height: calc(100dvh - 108px);
    }

    .workspace-main,
    .channels-workspace,
    .overview-workspace {
        min-height: 0;
        overflow: visible;
    }

    .workspace-content,
    .channels-content,
    .overview-content {
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 1rem 0.75rem calc(2rem + env(safe-area-inset-bottom));
    }

    .workspace-header,
    .workspace-panel-head,
    .workspace-hero-top,
    .channels-header,
    .channels-section-head,
    .overview-header,
    .overview-health-main {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-header {
        gap: 0.65rem;
    }

    .workspace-header h1,
    .channels-header h1 {
        font-size: 1.35rem;
    }

    .workspace-header-actions,
    .workspace-action-row,
    .workspace-form-actions,
    .channels-primary-actions,
    .overview-header-actions,
    .overview-health-actions {
        width: 100%;
    }

    .workspace-header-actions .btn,
    .workspace-action-row .btn,
    .workspace-form-actions .btn,
    .channels-primary-actions .btn {
        min-height: 44px;
    }

    .workspace-grid-2,
    .workspace-card-grid,
    .workspace-form-grid,
    .workspace-runtime-skill-grid,
    .channels-grid,
    .settings-premium-grid,
    .member-dashboard-grid,
    .agent-premium-grid {
        grid-template-columns: 1fr;
    }

    .workspace-skill-grid {
        grid-template-columns: 1fr;
    }

    .workspace-stat-grid,
    .workspace-metric-strip,
    .overview-stat-grid,
    .overview-health-strip,
    .overview-config-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-metric-strip {
        gap: 0.55rem;
        padding: 0.6rem 0;
    }

    .workspace-metric-strip > div {
        padding: 0.45rem 0.55rem;
        border-right: 0;
        border-bottom: 1px solid #ECEFF4;
    }

    .workspace-metric-strip > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .workspace-list-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .workspace-list-meta {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .workspace-detail-list > div,
    .premium-config-list > div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .workspace-detail-list dd,
    .premium-config-list dd {
        text-align: left;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .workspace-panel,
    .workspace-hero-card,
    .workspace-empty,
    .channel-card,
    .channels-primary-card,
    .channels-info-panel {
        max-width: 100%;
    }

    .channels-primary-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .channels-primary-footer {
        grid-template-columns: 1fr;
    }

    /* Chat behaves like a native full-height conversation. */
    .premium-chat-page {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .premium-chat-layout {
        min-height: calc(100dvh - 108px);
    }

    .chat-workspace {
        min-height: calc(100dvh - 160px);
        height: auto;
        overflow: visible;
    }

    .chat-workspace-header {
        flex: 0 0 auto;
        padding: 0.8rem 0.75rem;
    }

    .premium-chat-messages {
        min-height: 46dvh;
        overflow-y: visible;
        padding: 0.85rem 0.75rem 1rem;
        scrollbar-gutter: auto;
    }

    .premium-chat-page .message {
        max-width: 92%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .premium-chat-page .message.assistant {
        margin-left: 0;
    }

    .chat-starter-grid {
        grid-template-columns: 1fr;
    }

    .premium-chat-composer-wrap {
        position: sticky;
        bottom: 0;
        z-index: 90;
        padding: 0.55rem 0.65rem max(0.65rem, env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
    }

    .premium-chat-composer {
        gap: 0.4rem;
        padding: 0.35rem;
        border-radius: 14px;
    }

    .premium-chat-composer input {
        min-height: 44px;
        padding: 0.6rem;
        font-size: 16px; /* prevents iOS Safari input zoom */
    }

    .premium-chat-composer button,
    .chat-stop-button {
        min-width: 44px;
        min-height: 44px;
    }

    /* Forms stay readable and do not trigger iOS zoom. */
    .form-input,
    .workspace-search-input,
    .workspace-form input[type="text"],
    .workspace-form input[type="datetime-local"],
    .workspace-form select,
    .workspace-form textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .workspace-form textarea {
        min-height: 120px;
    }

    /* Wide content should never force the entire page sideways. */
    pre,
    code,
    .workspace-small-value,
    .workspace-list-copy strong,
    .workspace-agent-card p,
    .workspace-panel p {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .workspace-table,
    .table-scroll,
    table {
        max-width: 100%;
    }

    .workspace-table,
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Mission Control */
    .mission-topbar {
        width: 100%;
        min-height: 60px;
        padding: max(0.55rem, env(safe-area-inset-top)) 0.75rem 0.55rem;
        border-radius: 0;
    }

    .mission-topbar-actions {
        min-width: 0;
        gap: 0.3rem;
    }

    .mission-shell {
        width: calc(100% - 1rem);
        padding-top: 0.5rem;
    }

    .mission-hero {
        min-height: 0;
        padding: 1.15rem;
    }

    .mission-hero-copy {
        padding-top: 0;
        padding-right: 3.5rem;
    }

    .mission-hero-mark {
        top: 1rem;
        right: 1rem;
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 1.4rem;
    }

    .mission-control-grid,
    .mission-card-grid {
        grid-template-columns: 1fr;
    }

    .mission-detail-panel {
        min-height: 0;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container,
    .features-inner,
    .how-it-works-inner,
    .cta-section-inner,
    .product-demo {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .landing-nav-inner {
        gap: 0.4rem;
    }

    .landing-nav-actions {
        gap: 0.25rem;
    }

    .landing-nav-actions .btn {
        padding: 0.52rem 0.62rem;
        font-size: 0.72rem;
    }

    .hero {
        padding: 3.5rem 0 2.5rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 11vw, 2.7rem);
    }

    .hero-actions {
        width: 100%;
        gap: 0.65rem;
    }

    .hero-actions .btn,
    .section-cta .btn,
    .cta-section .btn {
        width: 100%;
        min-height: 46px;
    }

    .demo-content {
        min-height: 0;
        padding: 0.75rem;
    }

    .chat-message {
        max-width: 92%;
        padding: 0.8rem 0.9rem;
    }

    .workspace-stat-grid,
    .workspace-metric-strip,
    .overview-stat-grid,
    .overview-health-strip,
    .overview-config-inline {
        grid-template-columns: 1fr;
    }

    .workspace-metric-strip > div,
    .workspace-metric-strip > div:nth-last-child(-n + 2) {
        border-bottom: 1px solid #ECEFF4;
    }

    .workspace-metric-strip > div:last-child {
        border-bottom: 0;
    }

    .workspace-header-actions,
    .workspace-action-row,
    .workspace-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-header-actions .btn,
    .workspace-action-row .btn,
    .workspace-form-actions .btn {
        width: 100%;
    }

    .workspace-panel,
    .workspace-hero-card,
    .workspace-empty,
    .workspace-stat-grid > article,
    .workspace-agent-card {
        border-radius: 13px;
    }

    .workspace-empty {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-panel-head,
    .workspace-hero-top {
        gap: 0.5rem;
    }

    .workspace-skill-summary {
        justify-content: flex-start;
    }

    .premium-chat-page .message {
        max-width: 96%;
        padding: 0.78rem 0.82rem;
    }

    .premium-chat-composer-wrap > p {
        display: none;
    }

    .chat-stop-button .typing-label,
    .chat-stop-button span:not(.chat-stop-icon) {
        display: none;
    }

    .mission-brand small,
    .mission-chat-link,
    .mission-topbar .member-user-pill {
        display: none;
    }

    .mission-brand > span:last-child {
        min-width: 0;
    }

    .mission-hero-copy {
        padding-right: 0;
        padding-top: 3.4rem;
    }

    .mission-hero-mark {
        left: 1rem;
        right: auto;
    }
}


/* Mobile chat viewport fix — 2026-09-29 */
@media (max-width: 760px) {
    .premium-chat-page {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: var(--chat-viewport-height, 100dvh);
        min-height: 0;
        max-height: var(--chat-viewport-height, 100dvh);
        overflow: hidden;
        overscroll-behavior: none;
    }

    .premium-chat-page > .member-topbar {
        position: relative;
        top: auto;
        flex: 0 0 auto;
        width: 100%;
    }

    .premium-chat-page .premium-chat-layout {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: hidden;
    }

    /* Keep chat focused on the conversation on phones. Workspace navigation
       remains reachable from the HeyDaili/Mission Control entry point. */
    .premium-chat-page .chat-sidepanel {
        display: none;
    }

    .premium-chat-page .chat-workspace {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: hidden;
    }

    .premium-chat-page .premium-chat-messages {
        flex: 1 1 0;
        height: auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: auto;
        padding: 0.9rem 0.75rem 1rem;
        scroll-padding-bottom: 1rem;
    }

    .premium-chat-page .premium-chat-composer-wrap {
        position: relative;
        inset: auto;
        z-index: 5;
        flex: 0 0 auto;
        width: 100%;
        padding: 0.55rem 0.65rem max(0.65rem, env(safe-area-inset-bottom));
        background: #FFFFFF;
        border-top: 1px solid #E7EAF0;
        backdrop-filter: none;
    }

    .premium-chat-page .premium-chat-composer {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-shadow: 0 5px 18px rgba(38, 46, 68, 0.06);
    }

    .premium-chat-page .premium-chat-composer input {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        font-size: 16px;
    }

    .premium-chat-page .premium-chat-composer .btn {
        flex: 0 0 auto;
        min-height: 44px;
        padding-inline: 1rem;
    }

    .premium-chat-page .chat-activity-status {
        min-height: 0;
        margin: 0;
    }

    .premium-chat-page .chat-activity-status.is-active {
        min-height: 1.25rem;
        margin: 0 0 0.25rem 0.15rem;
    }

    .premium-chat-page .message {
        max-width: min(92%, 680px);
    }

    .premium-chat-page .message.assistant {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .premium-chat-page .member-topbar-chat {
        min-height: 56px;
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .premium-chat-page .member-logout {
        min-width: auto;
        min-height: 40px;
        padding: 0.45rem 0.35rem;
    }

    .premium-chat-page .premium-chat-messages {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .premium-chat-page .message {
        max-width: 94%;
    }

    .premium-chat-page .premium-chat-composer-wrap {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }
}


/* iOS Safari fixed chat shell — 2026-09-29 */
@media (max-width: 760px) {
    html:has(.premium-chat-page),
    body:has(.premium-chat-page),
    body:has(.premium-chat-page) #app {
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .premium-chat-page {
        position: fixed;
        top: var(--chat-viewport-top, 0px);
        left: 0;
        right: 0;
        bottom: auto;
        display: flex;
        flex-direction: column;
        width: 100vw;
        height: var(--chat-viewport-height, 100dvh);
        min-height: 0;
        max-height: none;
        margin: 0;
        overflow: hidden;
        background: #FBFCFE;
        overscroll-behavior: none;
        transform: translateZ(0);
    }

    .premium-chat-page > .member-topbar {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        z-index: 20;
        flex: 0 0 auto;
        width: 100%;
        min-height: 56px;
        padding-top: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
    }

    .premium-chat-page .premium-chat-layout {
        flex: 1 1 0;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: hidden;
    }

    .premium-chat-page .chat-workspace {
        flex: 1 1 0;
        height: 100%;
        min-height: 0;
        max-height: none;
        overflow: hidden;
    }

    .premium-chat-page .premium-chat-messages {
        flex: 1 1 0;
        height: 0;
        min-height: 0;
        overflow-y: auto;
        padding-bottom: 1rem;
    }

    .premium-chat-page .premium-chat-composer-wrap {
        position: relative;
        flex: 0 0 auto;
        bottom: auto;
        margin: 0;
        padding-bottom: max(0.55rem, env(safe-area-inset-bottom));
    }
}

/* Fallback for browsers without :has(). */
@supports not selector(:has(*)) {
    @media (max-width: 760px) {
        .premium-chat-page {
            position: fixed;
            top: var(--chat-viewport-top, 0px);
            left: 0;
            width: 100vw;
            height: var(--chat-viewport-height, 100dvh);
        }
    }
}
