/* Katsironni - Main Stylesheet */
/* System fonts, clean design, no frameworks */

:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #64748b;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --color-warning: #f59e0b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-focus: #2563eb;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --transition: 150ms ease;
    --container-max: 1200px;
    --header-height: 64px;
}

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

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-top: 0; margin-bottom: 1rem; }

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

code {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--color-bg-alt);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: white;
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--color-bg-alt);
    border-color: var(--color-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
    background: var(--color-bg-alt);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}
.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-success {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.0625rem; }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }

/* Form Elements */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--color-text-muted);
}
.nav a:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

/* Main */
.main {
    flex: 1;
    padding: 2.5rem 0;
}

/* Footer */
.footer {
    padding: 2rem 0;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}
.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer nav { display: flex; gap: 1.5rem; }
.footer a { color: var(--color-text-muted); font-size: 0.875rem; }

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Products Grid */
.products h2, .features h2, .pricing h1 { text-align: center; margin-bottom: 2rem; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.product-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.product-header h3 { margin: 0; font-size: 1.125rem; }
.product-key { font-size: 0.75rem; color: var(--color-text-muted); background: var(--color-bg-alt); padding: 0.125rem 0.5rem; border-radius: 4px; }
.product-pricing { margin-bottom: 1rem; }
.price-option { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.price-option:last-child { border-bottom: none; }
.price-label { color: var(--color-text-muted); }
.price-value { font-weight: 600; font-size: 1.125rem; }

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.feature { padding: 1.5rem; background: var(--color-bg-alt); border-radius: var(--radius); }
.feature h4 { margin-bottom: 0.5rem; }
.feature p { margin: 0; color: var(--color-text-muted); font-size: 0.9375rem; }

/* Pricing Table */
.pricing-table-container { overflow-x: auto; margin-bottom: 3rem; }
.pricing-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.pricing-table th, .pricing-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.pricing-table th { background: var(--color-bg-alt); font-weight: 600; }
.pricing-table tbody tr:hover { background: var(--color-bg-alt); }
.bundle-highlight { background: linear-gradient(135deg, var(--color-primary), #7c3aed); color: white; padding: 2rem; border-radius: var(--radius); text-align: center; }
.bundle-highlight h3 { color: white; margin-bottom: 1rem; }
.bundle-highlight p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }
.bundle-highlight .btn-primary { background: white; color: var(--color-primary); border-color: white; }
.bundle-highlight .btn-primary:hover { background: var(--color-bg-alt); }

/* Product Detail */
.breadcrumb { margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.product-main { display: grid; grid-template-columns: 1fr 350px; gap: 2rem; }
@media (max-width: 900px) { .product-main { grid-template-columns: 1fr; } }
.pricing-options { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.price-card { background: var(--color-bg); border: 2px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; cursor: pointer; transition: all var(--transition); }
.price-card:hover, .price-card.selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.price-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
.price-amount { font-size: 1.5rem; font-weight: 700; }
.price-period { font-size: 0.875rem; color: var(--color-text-muted); font-weight: 400; }
.price-features { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; color: var(--color-text-muted); }
.price-features li { padding: 0.25rem 0; }
.checkout-form { margin-bottom: 1rem; }
.divider { text-align: center; color: var(--color-text-muted); padding: 1rem 0; position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--color-border); }
.divider::before { left: 0; } .divider::after { right: 0; }
.chain-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.chain-badge { background: var(--color-bg-alt); border: 1px solid var(--color-border); padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.8125rem; }

/* Auth Pages */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-height) - 200px); padding: 2rem 0; }
.auth-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-card h1 { text-align: center; margin-bottom: 0.5rem; }
.auth-subtitle { text-align: center; color: var(--color-text-muted); margin-bottom: 2rem; }
.auth-form .form-group:last-of-type { margin-bottom: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--color-text-muted); }
.success-card { text-align: center; }
.success-icon, .error-icon { font-size: 3rem; margin-bottom: 1rem; }
.success-icon { color: var(--color-success); }
.error-icon { color: var(--color-danger); }

/* Account Page */
.account-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.account-section { margin-bottom: 2.5rem; }
.account-section h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.entitlements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.entitlement-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; }
.entitlement-card.active { border-color: var(--color-success); }
.entitlement-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.entitlement-service { font-weight: 600; }
.entitlement-status { text-transform: capitalize; font-size: 0.8125rem; }
.status-badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.status-active { background: #dcfce7; color: #166534; }
.status-past_due { background: #fef3c7; color: #92400e; }
.status-canceled { background: #fef2f2; color: #991b1b; }
.status-expired { background: #f1f5f9; color: #475569; }
.status-pending { background: #e0e7ff; color: #3730a3; }
.status-verified { background: #dcfce7; color: #166534; }
.status-rejected { background: #fef2f2; color: #991b1b; }
.entitlement-details p { margin: 0.25rem 0; font-size: 0.875rem; }
.entitlement-details strong { color: var(--color-text); }
.empty-state { text-align: center; color: var(--color-text-muted); padding: 2rem; }
.payments-table { width: 100%; border-collapse: collapse; }
.payments-table th, .payments-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.payments-table th { background: var(--color-bg-alt); font-weight: 600; }

/* Crypto Checkout */
.crypto-checkout { max-width: 1000px; }
.checkout-header { margin-bottom: 2rem; }
.checkout-header h1 { margin-bottom: 0.25rem; }
.checkout-header p { color: var(--color-text-muted); }
.checkout-content { display: grid; grid-template-columns: 1fr 350px; gap: 2rem; }
@media (max-width: 900px) { .checkout-content { grid-template-columns: 1fr; } }
.amount-summary { background: var(--color-bg-alt); border-radius: var(--radius); padding: 1.5rem; text-align: center; margin-bottom: 2rem; }
.amount-large { font-size: 3rem; font-weight: 700; color: var(--color-primary); }
.amount-period { color: var(--color-text-muted); margin-top: 0.25rem; }
.chain-selector h3 { margin-bottom: 1rem; }
.chain-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.chain-option { display: flex; flex-direction: column; align-items: center; padding: 1rem; background: var(--color-bg); border: 2px solid var(--color-border); border-radius: var(--radius); cursor: pointer; transition: all var(--transition); }
.chain-option:hover, .chain-option.selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.chain-name { font-weight: 600; }
.chain-asset { font-size: 0.875rem; color: var(--color-text-muted); }
.payment-details { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.address-display { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.address-display code { flex: 1; background: var(--color-bg-alt); padding: 0.75rem; border-radius: var(--radius); font-size: 0.875rem; word-break: break-all; }
.amount-crypto { margin-bottom: 1.5rem; }
.amount-crypto label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.amount-input-group { display: flex; align-items: center; gap: 0.75rem; }
.amount-input-group input { flex: 1; background: var(--color-bg-alt); color: var(--color-text); font-weight: 600; font-size: 1.125rem; }
.amount-note { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 0.5rem; }
.tx-submit label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.tx-submit input { flex: 1; }
.verification-status { background: var(--color-bg-alt); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.status-indicator { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-verified .spinner { display: none; }
.status-verified::before { content: '✓'; color: var(--color-success); font-size: 1.5rem; }
.status-rejected::before { content: '✗'; color: var(--color-danger); font-size: 1.5rem; }
.status-detail { color: var(--color-text-muted); font-size: 0.9375rem; }
.help-box { background: var(--color-bg-alt); border-radius: var(--radius); padding: 1.5rem; }
.help-box h4 { margin-top: 0; margin-bottom: 1rem; }
.help-box ol { padding-left: 1.25rem; margin: 0; }
.help-box li { margin-bottom: 0.5rem; color: var(--color-text-muted); }
.help-box .note { font-size: 0.875rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }

/* Admin Dashboard */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.stat-card h3 { font-size: 2.5rem; color: var(--color-primary); margin: 0 0 0.5rem; }
.stat-card p { margin: 0; color: var(--color-text-muted); }
.admin-tabs { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.tab-nav { display: flex; border-bottom: 1px solid var(--color-border); }
.tab-btn { padding: 1rem 1.5rem; background: transparent; border: none; font-size: 0.9375rem; font-weight: 500; color: var(--color-text-muted); cursor: pointer; transition: all var(--transition); }
.tab-btn:hover { color: var(--color-text); background: var(--color-bg-alt); }
.tab-btn.active { color: var(--color-primary); border-bottom: 2px solid var(--color-primary); }
.tab-pane { display: none; padding: 1.5rem; }
.tab-pane.active { display: block; animation: fadeIn 200ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th, .admin-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.admin-table th { background: var(--color-bg-alt); font-weight: 600; }
.admin-table code { font-size: 0.8125rem; }
.admin-table .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; margin-right: 0.25rem; }
.tab-content { position: relative; }

/* Error Page */
.error-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-height)); text-align: center; padding: 2rem; }
.error-page h1 { font-size: 6rem; font-weight: 700; color: var(--color-primary); margin-bottom: 1rem; line-height: 1; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-enter { animation: slideUp 300ms ease; }

/* Responsive */
@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .hero h1 { font-size: 2.25rem; }
    .auth-card { padding: 1.5rem; }
    .header .container { padding: 0 1rem; }
    .nav { gap: 0.5rem; }
    .nav a { padding: 0.375rem 0.5rem; font-size: 0.875rem; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .amount-large { font-size: 2.5rem; }
    .checkout-content { grid-template-columns: 1fr; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .tab-nav { overflow-x: auto; white-space: nowrap; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
/* Social auth buttons */
.social-auth { margin-top: 1.5rem; }
.social-auth .divider {
    display: flex; align-items: center; margin: 1rem 0;
    color: var(--muted, #888); font-size: 0.85rem;
}
.social-auth .divider::before,
.social-auth .divider::after {
    content: ""; flex: 1; height: 1px; background: var(--border, #333);
}
.social-auth .divider span { padding: 0 0.75rem; }
.btn-social {
    display: block; width: 100%; margin-bottom: 0.6rem;
    text-align: center; background: transparent;
    border: 1px solid var(--border, #444); color: inherit;
    padding: 0.65rem 1rem; border-radius: 8px; cursor: pointer;
    text-decoration: none; font-size: 0.95rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-social:hover { border-color: #6b7cff; background: rgba(107, 124, 255, 0.08); }

/* Social buttons — brand variants */
.btn-social { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.soc-svg, .soc-icon { display: inline-block; flex: 0 0 auto; }
.btn-metamask { border-color: #e2761b; }
.btn-metamask:hover { border-color: #f6851b; background: rgba(246,133,27,0.10); }
.btn-google { background: #ffffff; border-color: #dadce0; color: #3c4043; }
.btn-google:hover { background: #f6f8ff; border-color: #6b7cff; }
.btn-x { background: #000000; border-color: #000000; color: #ffffff; }
.btn-x:hover { background: #1d1d1d; border-color: #444; }
.btn-github { background: #24292e; border-color: #24292e; color: #ffffff; }
.btn-github:hover { background: #32383f; border-color: #555; }
.alert-info {
    background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.4);
    color: inherit; padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* API keys UI */
.muted-note { color: var(--muted, #999); font-size: 0.82rem; font-weight: normal; }
.key-state.status-active { color: #22c55e; }
.key-state.status-none { color: var(--muted, #999); }

/* ===== Service page + chat ===== */
.service-hero { padding: 3rem 0 1rem; }
.service-hero-inner { max-width: 780px; }
.service-icon { font-size: 2.4rem; }
.service-hero h1 { margin: 0.4rem 0; }
.service-tagline { font-size: 1.15rem; color: var(--accent, #6b7cff); margin-bottom: 0.8rem; }
.service-explain { line-height: 1.6; opacity: 0.92; }
.service-pricing-line { margin: 1rem 0 0.6rem; font-size: 0.95rem; }
.service-pricing-line strong { color: var(--accent, #6b7cff); }

.chat-section { padding: 1.5rem 0 4rem; }
.chat-shell {
    max-width: 860px; margin: 0 auto; display: flex; flex-direction: column;
    border: 1px solid var(--border, #333); border-radius: 14px; overflow: hidden;
    background: var(--card, #16181d); height: 620px;
}
.chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border, #333);
}
.chat-header h2 { margin: 0; font-size: 1.05rem; }
.chat-status { font-size: 0.8rem; color: var(--muted, #999); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.chat-empty { color: var(--muted, #999); text-align: center; margin: auto; }
.chat-msg { max-width: 82%; padding: 0.6rem 0.9rem; border-radius: 12px; font-size: 0.92rem; line-height: 1.5; }
.chat-msg-user { align-self: flex-end; background: var(--accent, #6b7cff); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg-agent { align-self: flex-start; background: #1e2128; border: 1px solid var(--border, #333); border-bottom-left-radius: 3px; }
.chat-msg-body p { margin: 0.35rem 0; }
.chat-msg-body table { border-collapse: collapse; margin: 0.5rem 0; }
.chat-msg-body th, .chat-msg-body td { border: 1px solid var(--border, #333); padding: 0.25rem 0.55rem; font-size: 0.85rem; }
.chat-msg-body pre { background: #0d0f12; padding: 0.6rem; border-radius: 8px; overflow-x: auto; font-size: 0.82rem; }
.chat-msg-body code { background: #0d0f12; padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.85rem; }
.chat-typing .dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--muted, #888); animation: chatpulse 1.2s infinite; }
.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatpulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 1rem; border-top: 1px solid var(--border, #333); }
.chat-input { display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.7rem 1rem; border-top: 1px solid var(--border, #333); }
.chat-input textarea {
    flex: 1; resize: none; background: transparent; color: inherit;
    border: 1px solid var(--border, #333); border-radius: 10px; padding: 0.55rem 0.7rem;
    font: inherit; font-size: 0.92rem; max-height: 140px;
}
.chat-attach { position: relative; }
.chat-attach.drag { outline: 2px dashed var(--accent, #6b7cff); outline-offset: 4px; border-radius: 8px; }
.chat-files { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.file-chip {
    font-size: 0.75rem; background: #1e2128; border: 1px solid var(--border, #333);
    padding: 0.15rem 0.5rem; border-radius: 999px;
}
.file-chip a { color: var(--accent, #6b7cff); text-decoration: none; margin-left: 0.3rem; }
.chat-subscribe-prompt {
    text-align: center; padding: 0.9rem; border-top: 1px solid var(--border, #333);
    background: rgba(107, 124, 255, 0.06);
}
.chat-subscribe-prompt.hidden { display: none; }

/* landing catalog cards */
.product-card .card-icon { font-size: 1.8rem; }
.product-card .card-desc { font-size: 0.85rem; opacity: 0.85; margin: 0.4rem 0 0.6rem; min-height: 2.2em; }
.product-card .price-from { color: var(--accent, #6b7cff); font-weight: 600; }
