:root {
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --shadow-soft: 0 24px 60px rgba(6, 11, 28, 0.28);
    --shadow-glow: 0 0 0 1px rgba(120, 180, 255, 0.22), 0 18px 40px rgba(26, 86, 255, 0.18);
    --surface-quiet: rgba(255, 255, 255, 0.05);
    --surface-quiet-strong: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.04);
    --dropdown-bg: #101a35;
    --dropdown-hover: #18274b;
    --admin-surface: rgba(9, 14, 28, 0.96);
    --admin-shadow: 0 8px 18px rgba(5, 10, 25, 0.12);
}

html[data-theme='dark'] {
    color-scheme: dark;
    --bg: #050816;
    --bg-elevated: rgba(11, 19, 40, 0.72);
    --bg-panel: rgba(8, 14, 30, 0.82);
    --bg-soft: rgba(22, 33, 62, 0.54);
    --text: #f4f7ff;
    --text-muted: #a9b6d4;
    --text-soft: #7c8cae;
    --line: rgba(140, 175, 255, 0.16);
    --line-strong: rgba(123, 164, 255, 0.3);
    --primary: #69b7ff;
    --secondary: #7b69ff;
    --accent: #4ef5d2;
    --danger: #ff6b94;
    --surface-glow: radial-gradient(circle at top left, rgba(105, 183, 255, 0.24), transparent 48%), radial-gradient(circle at bottom right, rgba(123, 105, 255, 0.2), transparent 42%);
}

html[data-theme='light'] {
    color-scheme: light;
    --bg: #f3f7ff;
    --bg-elevated: rgba(255, 255, 255, 0.78);
    --bg-panel: rgba(255, 255, 255, 0.94);
    --bg-soft: rgba(227, 236, 255, 0.7);
    --text: #0e1730;
    --text-muted: #50627f;
    --text-soft: #6d7e9c;
    --line: rgba(73, 111, 191, 0.12);
    --line-strong: rgba(60, 110, 220, 0.22);
    --primary: #0e76ff;
    --secondary: #6557ff;
    --accent: #00b999;
    --danger: #d73b68;
    --surface-glow: radial-gradient(circle at top left, rgba(103, 162, 255, 0.18), transparent 48%), radial-gradient(circle at bottom right, rgba(116, 106, 255, 0.16), transparent 42%);
    --shadow-soft: 0 24px 60px rgba(72, 95, 148, 0.16);
    --shadow-glow: 0 0 0 1px rgba(111, 146, 223, 0.18), 0 16px 32px rgba(62, 103, 194, 0.12);
    --surface-quiet: rgba(255, 255, 255, 0.82);
    --surface-quiet-strong: rgba(231, 239, 255, 0.96);
    --input-bg: rgba(255, 255, 255, 0.92);
    --dropdown-bg: #f7faff;
    --dropdown-hover: #e7efff;
    --admin-surface: rgba(255, 255, 255, 0.94);
    --admin-shadow: 0 16px 38px rgba(95, 116, 166, 0.16);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.45s ease, color 0.35s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    background: none;
}

input,
textarea,
select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--input-bg);
    color: var(--text);
    padding: 0.95rem 1rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(105, 183, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(105, 183, 255, 0.12);
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
        linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
    background-position:
        calc(100% - 1.15rem) calc(50% - 0.15rem),
        calc(100% - 0.8rem) calc(50% - 0.15rem);
    background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
    background-repeat: no-repeat;
    padding-right: 2.7rem;
    position: relative;
    z-index: 6;
}

select:hover {
    border-color: var(--line-strong);
    background-color: var(--surface-quiet-strong);
}

select option,
select optgroup {
    background: var(--dropdown-bg);
    color: var(--text);
}

select option:hover,
select option:checked {
    background: var(--dropdown-hover);
    color: var(--text);
}

select::-ms-expand {
    display: none;
}

textarea {
    resize: vertical;
}

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

.background-shell {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.55;
    animation: floatOrb 16s ease-in-out infinite;
}

.orb-a {
    width: 28rem;
    height: 28rem;
    top: -8rem;
    left: -6rem;
    background: rgba(64, 160, 255, 0.18);
}

.orb-b {
    width: 24rem;
    height: 24rem;
    right: -5rem;
    top: 18%;
    background: rgba(123, 105, 255, 0.2);
    animation-delay: -3s;
}

.orb-c {
    width: 18rem;
    height: 18rem;
    left: 34%;
    bottom: -6rem;
    background: rgba(78, 245, 210, 0.14);
    animation-delay: -8s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(100, 140, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 140, 255, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.95), transparent 88%);
}

.site-header,
.site-main,
.site-footer,
.app-shell,
.flash-stack {
    position: relative;
    z-index: 1;
}

.site-header {
    padding: 1.4rem clamp(1rem, 2vw, 2rem) 0;
}

.site-main,
.site-footer,
.app-main {
    padding-inline: clamp(1rem, 2vw, 2rem);
}

.site-main {
    padding-bottom: 2rem;
}

.section {
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 4.5rem) 0;
}

.glass-card,
.nav-shell,
.sidebar,
.flash,
.metric-card,
.feature-card,
.auth-shell,
.form-shell,
.chat-panel,
.tab-shell,
.contact-card,
.timeline-card,
.command-center {
    background: var(--surface-glow), var(--bg-elevated);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: var(--radius-lg);
}

.nav-shell,
.footer-shell {
    max-width: 1240px;
    margin: 0 auto;
}

.nav-shell,
.footer-shell,
.sidebar,
.page-intro,
.metric-card,
.feature-card,
.contact-card,
.history-item,
.signal-card,
.chat-bubble,
.faq-item,
.bot-chip,
.tab-shell,
.glass-card {
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.nav-shell:hover,
.glass-card:hover,
.metric-card:hover,
.feature-card:hover,
.faq-item:hover,
.bot-chip:hover,
.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-glow);
}

.nav-shell,
.footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.brand-mark {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 30px rgba(65, 114, 255, 0.3);
}

.brand-copy {
    display: grid;
    gap: 0.1rem;
}

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

.brand-copy strong {
    font-family: var(--font-display);
    font-size: 0.98rem;
    letter-spacing: 0.08em;
}

.brand-copy small {
    color: var(--text-soft);
    font-size: 0.8rem;
}

.site-nav,
.nav-actions,
.sidebar-nav,
.intro-actions,
.hero-actions,
.pill-row,
.composer-actions,
.table-actions,
.field-grid,
.admin-grid,
.demo-grid {
    display: flex;
    gap: 1rem;
}

.site-nav {
    align-items: center;
    flex-wrap: wrap;
}

.site-nav a,
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
}

.site-nav a.is-active,
.nav-link.is-active {
    color: var(--text);
}

.nav-actions,
.intro-actions,
.hero-actions,
.composer-actions,
.table-actions {
    align-items: center;
    flex-wrap: wrap;
}

.nav-profile-thumb {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(108, 160, 255, 0.28), rgba(132, 102, 255, 0.22));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e8f0ff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.nav-profile-thumb:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 8px 22px rgba(93, 149, 255, 0.28);
    border-color: rgba(132, 102, 255, 0.35);
}

.nav-profile-thumb span {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 34px rgba(60, 111, 255, 0.28);
}

.button-secondary {
    background: var(--surface-quiet);
    color: var(--text);
    border-color: var(--line);
}

.button-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text-muted);
}

.button-danger {
    background: rgba(255, 107, 148, 0.14);
    border-color: rgba(255, 107, 148, 0.3);
    color: #ffd2de;
}

html[data-theme='light'] .button-danger {
    color: #bb234f;
}

.button-small {
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
}

.button-block {
    width: 100%;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 118px;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--surface-quiet);
}

.theme-toggle-icon {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    border-radius: 999px;
    position: relative;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

html[data-theme='dark'] .theme-toggle-icon {
    background: linear-gradient(135deg, rgba(168, 197, 255, 0.98), rgba(92, 146, 255, 0.96));
    box-shadow: inset -0.2rem -0.1rem 0 rgba(5, 8, 22, 0.55), 0 0 0 0.12rem rgba(126, 175, 255, 0.26);
}

html[data-theme='light'] .theme-toggle-icon {
    background: linear-gradient(135deg, #ffd35f, #ffb347);
    box-shadow: 0 0 0 0.16rem rgba(255, 211, 95, 0.28), 0 0 24px rgba(255, 181, 71, 0.22);
}

.eyebrow,
.status-pill,
.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    border-radius: 999px;
    padding: 0.36rem 0.8rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--accent);
    background: rgba(78, 245, 210, 0.09);
    border: 1px solid rgba(78, 245, 210, 0.16);
}

.status-pill {
    color: var(--primary);
    background: rgba(105, 183, 255, 0.1);
    border: 1px solid rgba(105, 183, 255, 0.18);
}

.status-pill.status-open {
    color: #ff9c54;
    background: rgba(255, 140, 79, 0.14);
    border-color: rgba(255, 140, 79, 0.26);
}

.status-pill.status-in-review {
    color: #5ea9ff;
    background: rgba(94, 169, 255, 0.14);
    border-color: rgba(94, 169, 255, 0.26);
}

.status-pill.status-resolved {
    color: #37c98b;
    background: rgba(55, 201, 139, 0.14);
    border-color: rgba(55, 201, 139, 0.26);
}

.status-pill.status-closed {
    color: #9aa6bf;
    background: rgba(154, 166, 191, 0.14);
    border-color: rgba(154, 166, 191, 0.24);
}

.info-pill {
    color: var(--text-muted);
    background: var(--surface-quiet);
    border: 1px solid var(--line);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
    color: var(--text-muted);
    transition: background 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.filter-pill:hover,
.filter-pill.is-active {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface-quiet-strong);
    box-shadow: var(--shadow-glow);
}

.hero-grid,
.split-section,
.auth-grid,
.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: clamp(1.25rem, 2vw, 2rem);
    align-items: start;
}

.hero-copy h1,
.section-copy h2,
.auth-copy h1,
.page-intro h1,
.cta-card h2 {
    margin: 0.85rem 0 1rem;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.hero-copy h1 {
    font-size: clamp(2.7rem, 6vw, 5.25rem);
    max-width: 12ch;
}

.section-copy h2,
.auth-copy h1,
.page-intro h1,
.cta-card h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero-lead,
.section-heading p,
.section-copy p,
.auth-copy p,
.page-intro p,
.cta-card p,
.auth-meta,
.microcopy {
    color: var(--text-muted);
}

.eyebrow-stack,
.section-heading,
.section-copy,
.auth-copy,
.auth-shell,
.form-shell,
.contact-highlights,
.auth-benefits,
.history-card,
.profile-card,
.insight-card,
.support-shell {
    display: grid;
    gap: 1rem;
}

.stat-strip,
.feature-grid,
.metric-grid,
.signal-stack {
    display: grid;
    gap: 1rem;
}

.stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.5rem;
}

.stat-card,
.metric-card,
.signal-card {
    padding: 1.1rem 1.15rem;
}

.stat-card strong,
.metric-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 2rem);
    margin-bottom: 0.35rem;
}

.stat-card span,
.metric-card span {
    display: block;
    color: var(--text-soft);
}

.hero-visual,
.workspace-preview,
.timeline-card,
.cta-card,
.page-intro,
.tab-shell,
.support-shell,
.contact-highlights,
.command-center,
.chart-card {
    padding: clamp(1.2rem, 2.4vw, 1.6rem);
}

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

.panel-header strong {
    font-size: 1rem;
}

.panel-header p,
.panel-status {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.signal-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signal-card {
    background: var(--surface-quiet);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.signal-card span {
    display: block;
    color: var(--text-soft);
    margin-bottom: 0.4rem;
}

.signal-card strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.preview-chat,
.preview-thread,
.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.preview-chat {
    margin-top: 1.25rem;
}

.chat-bubble {
    max-width: min(88%, 42rem);
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(105, 183, 255, 0.2), rgba(123, 105, 255, 0.16));
}

.bubble-assistant {
    align-self: flex-start;
    background: var(--surface-quiet);
}

.bubble-admin {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(105, 183, 255, 0.22), rgba(123, 105, 255, 0.18));
}

.bubble-customer {
    align-self: flex-start;
    background: var(--surface-quiet);
}

.bubble-error {
    background: rgba(255, 107, 148, 0.12);
    border-color: rgba(255, 107, 148, 0.3);
}

.feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
    padding: 1.3rem;
}

.feature-card h3,
.timeline-card h3,
.auth-shell h2,
.support-shell h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.feature-card p,
.timeline-card p,
.check-list li,
.faq-answer p,
.history-item p,
.contact-card p,
.form-shell p,
.insight-card p {
    color: var(--text-muted);
}

.timeline-card {
    display: grid;
    gap: 1rem;
}

.timeline-card article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: flex-start;
}

.timeline-step {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: var(--primary);
    font-family: var(--font-display);
    background: rgba(105, 183, 255, 0.08);
    border: 1px solid rgba(105, 183, 255, 0.18);
}

.demo-grid {
    align-items: stretch;
}

.demo-grid > * {
    flex: 1 1 0;
}

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

.workspace-header p {
    margin: 0.25rem 0 0;
    color: var(--text-soft);
}

.check-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.65rem;
}

.cta-section {
    padding-bottom: 4.5rem;
}

.cta-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.auth-page .site-main {
    padding-top: 1rem;
}

.auth-section {
    padding-top: clamp(1.5rem, 4vw, 3rem);
}

.auth-shell,
.form-shell,
.contact-highlights,
.support-shell {
    padding: clamp(1.3rem, 2.5vw, 1.7rem);
}

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

.field {
    display: grid;
    gap: 0.5rem;
}

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

.field-grid {
    flex-wrap: wrap;
}

.field-grid > * {
    flex: 1 1 220px;
}

.auth-meta {
    margin: 0;
}

.auth-meta a,
.contact-highlights a {
    color: var(--primary);
}

.faq-list,
.history-list,
.side-stack,
.contact-stack,
.bot-editor-stack {
    display: grid;
    gap: 1rem;
}

.ticket-console-grid {
    display: grid;
    grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.ticket-list-pane,
.ticket-list {
    display: grid;
    gap: 1rem;
}

.ticket-list-header p {
    margin: 0.35rem 0 0;
    color: var(--text-soft);
}

.ticket-summary-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    color: var(--text);
    text-decoration: none;
}

.ticket-summary-card.is-active {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(180deg, rgba(105, 183, 255, 0.12), transparent), var(--bg-elevated);
}

.ticket-summary-head,
.ticket-summary-meta,
.ticket-panel-head,
.ticket-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.ticket-summary-head {
    align-items: flex-start;
}

.ticket-summary-card p {
    margin: 0;
    color: var(--text-muted);
}

.ticket-summary-meta {
    color: var(--text-soft);
    font-size: 0.84rem;
}

.ticket-conversation-panel {
    padding: 1.2rem;
    display: grid;
    gap: 1rem;
}

.ticket-panel-head {
    align-items: flex-start;
}

.ticket-panel-head h3 {
    margin: 0.25rem 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.ticket-panel-head p,
.ticket-toolbar .microcopy {
    margin: 0;
    color: var(--text-soft);
}

.ticket-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ticket-status-form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 0.9rem;
}

.ticket-thread-shell {
    min-height: 31rem;
    max-height: 36rem;
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
    overflow: hidden;
}

.ticket-thread {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.ticket-message-bubble {
    max-width: min(88%, 38rem);
}

.ticket-message-meta {
    margin-bottom: 0.7rem;
    font-size: 0.82rem;
    color: var(--text-soft);
}

.bubble-admin .ticket-message-meta {
    color: rgba(235, 242, 255, 0.86);
}

.ticket-reply-form {
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.ticket-reply-form textarea {
    min-height: 7.25rem;
}

.ticket-reply-form .composer-actions {
    align-items: center;
}

.faq-item {
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.15rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.2rem;
}

.faq-item.is-open .faq-answer {
    max-height: 220px;
    padding: 0 1.2rem 1.15rem;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 100vh;
    padding: 1.2rem;
}

.sidebar {
    position: sticky;
    top: 1.2rem;
    align-self: start;
    min-height: calc(100vh - 2.4rem);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
}

.sidebar-nav {
    display: grid;
    gap: 0.55rem;
}

.nav-link {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid transparent;
}

.nav-link.is-active,
.nav-link:hover {
    border-color: var(--line);
    background: var(--surface-quiet-strong);
    color: var(--text);
}

.user-chip {
    display: grid;
    gap: 0.55rem;
}

.user-chip-meta {
    display: grid;
}

.user-chip-meta small,
.ghost-link {
    color: var(--text-soft);
}

.app-main {
    padding-top: 1.2rem;
    padding-bottom: 1.8rem;
}

.app-page {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    gap: 1.25rem;
}

.page-intro,
.metric-grid {
    width: 100%;
}

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bot-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.bot-chip {
    flex: 1 1 210px;
    padding: 1rem 1.1rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
}

.bot-chip strong {
    display: block;
    margin-bottom: 0.25rem;
}

.bot-chip span {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.bot-chip.is-active {
    border-color: rgba(105, 183, 255, 0.35);
    box-shadow: var(--shadow-glow);
}

.workspace-grid {
    grid-template-columns: minmax(0, 1.3fr) 340px;
}

.chat-panel {
    padding: 1.25rem;
    min-height: 720px;
}

.chat-interface {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.chat-thread {
    min-height: 480px;
    max-height: 560px;
    overflow: auto;
    padding-right: 0.2rem;
}

.chat-form {
    margin-top: auto;
    display: grid;
    gap: 0.9rem;
}

.chat-form textarea:disabled,
.chat-form select:disabled,
.chat-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.chat-form.is-loading .button-primary {
    box-shadow: 0 10px 24px rgba(60, 111, 255, 0.2);
}

.chat-form.is-loading .button-primary::after {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    margin-left: 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    animation: pulseDot 1.1s infinite ease-in-out;
}

.inline-field {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-muted);
}

.inline-field select {
    width: auto;
    min-width: 170px;
}

.profile-card,
.history-card,
.insight-card {
    padding: 1.2rem;
}

.profile-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
}

.profile-meta:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.profile-meta span {
    color: var(--text-soft);
}

.history-item {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.history-item strong {
    display: block;
    margin-bottom: 0.15rem;
}

.history-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.history-item span {
    color: var(--text-soft);
    white-space: nowrap;
}

.history-item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.history-item.is-hidden {
    display: none;
}

.history-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.history-rename {
    background: none;
    border: 1px solid transparent;
    color: var(--text-soft);
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    border-radius: 10px;
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.history-rename:hover {
    color: var(--text);
    border-color: var(--line);
    transform: translateY(-1px);
}

.history-delete {
    background: none;
    border: 1px solid transparent;
    color: var(--text-soft);
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    border-radius: 10px;
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.history-delete:hover {
    color: #ff9b9b;
    border-color: var(--line);
    transform: translateY(-1px);
}

.history-rename-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
    color: var(--text);
}

.empty-state {
    display: grid;
    gap: 0.7rem;
    place-items: start;
    padding: 1.35rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--line-strong);
    background: var(--surface-quiet);
}

.empty-state.compact {
    padding: 1rem;
}

.flash-stack {
    max-width: 1240px;
    margin: 0 auto 1rem;
    display: grid;
    gap: 0.75rem;
}

.flash {
    padding: 0.95rem 1rem;
}

.flash-success {
    border-color: rgba(78, 245, 210, 0.24);
}

.flash-error {
    border-color: rgba(255, 107, 148, 0.32);
}

.tab-shell {
    display: grid;
    gap: 1.25rem;
}

.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tab-button {
    padding: 0.82rem 1.05rem;
    border-radius: 999px;
    color: var(--text-muted);
    border: 1px solid var(--line);
}

.tab-button.is-active {
    color: var(--text);
    background: var(--surface-quiet-strong);
    box-shadow: var(--shadow-glow);
}

.tab-panel {
    display: none;
    gap: 1.25rem;
}

.tab-panel.is-active {
    display: grid;
}

.admin-shell {
    contain: layout paint;
}

.admin-grid {
    flex-wrap: wrap;
}

.admin-grid > * {
    flex: 1 1 340px;
}

.chart-card {
    min-height: 360px;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 1rem;
}

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

.overview-kpi-card,
.overview-panel,
.overview-note {
    padding: 1.2rem;
}

.overview-kpi-label {
    display: block;
    color: var(--text-soft);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.overview-kpi-value {
    display: block;
    margin: 0.5rem 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2vw, 2.1rem);
}

.overview-kpi-note {
    margin: 0;
    color: var(--text-muted);
}

.activity-strip,
.usage-list {
    display: grid;
    gap: 1rem;
}

.activity-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    min-height: 220px;
}

.activity-day {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
}

.activity-bar-shell {
    width: 100%;
    min-height: 170px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
}

.activity-bar {
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(78, 245, 210, 0.95), rgba(105, 183, 255, 0.9));
    box-shadow: 0 10px 24px rgba(78, 245, 210, 0.12);
}

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

.activity-day small {
    color: var(--text-soft);
}

.usage-item {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
}

.usage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.usage-head span {
    color: var(--text-muted);
    white-space: nowrap;
}

.usage-track {
    width: 100%;
    height: 0.7rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-quiet-strong);
}

.usage-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(105, 183, 255, 0.92), rgba(123, 105, 255, 0.9));
}

.table-wrap {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.data-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: var(--surface-quiet);
}

.data-table th,
.data-table td {
    padding: 0.95rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table th {
    color: var(--text-soft);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.inline-form select {
    min-width: 110px;
}

.inline-search {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.inline-search input {
    min-width: 220px;
}

.bot-editor {
    padding: 1.2rem;
}

.bot-summary-stack {
    display: grid;
    gap: 1rem;
}

.bot-summary-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface-quiet);
}

.bot-summary-card strong {
    display: block;
    margin-bottom: 0.2rem;
}

.bot-summary-card p {
    margin: 0;
    color: var(--text-soft);
}

.bot-summary-card.is-active {
    border-color: rgba(105, 183, 255, 0.35);
    box-shadow: var(--shadow-glow);
}

.bot-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bot-editor-panel {
    min-height: 100%;
}

.contact-card {
    padding: 1.2rem;
}

.contact-card p {
    margin: 0.5rem 0 1rem;
}

.typing-bubble {
    min-width: 90px;
}

.typing-dots {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.typing-dots span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--primary);
    animation: pulseDot 1.1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 15;
    display: grid;
    gap: 0.75rem;
}

/* Notification drawer */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.notification-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 350px;
    z-index: 9999;
    background: var(--surface-glow), var(--bg-elevated);
    border-left: 1px solid var(--line-strong);
    box-shadow: -26px 0 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    padding: 1.2rem;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    pointer-events: none;
}

.notification-drawer.open {
    transform: translateX(0);
    pointer-events: auto;
}

body.notification-open {
    overflow: hidden;
}

.notification-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-views {
    display: grid;
    gap: 1rem;
    grid-template-rows: 1fr auto;
    height: 100%;
}

.notification-list {
    overflow-y: auto;
    display: grid;
    gap: 0.65rem;
}

.notification-item {
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-quiet);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.notification-item:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.notification-item.is-unread {
    border-color: rgba(105, 183, 255, 0.5);
    box-shadow: 0 8px 24px rgba(105, 183, 255, 0.16);
}

.notification-dot {
    width: 9px;
    height: 9px;
    border-radius: 6px;
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(105, 183, 255, 0.7);
    margin-top: 4px;
}

.notification-dot.is-read {
    background: var(--line);
    box-shadow: none;
}

.notification-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
}

.notification-body {
    display: grid;
    gap: 0.25rem;
}

.notification-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    letter-spacing: 0.01em;
}

.notification-preview {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.notification-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-soft);
    margin-top: 0.1rem;
}

.notification-title {
    font-weight: 700;
    font-size: 0.98rem;
    margin: 0;
}

.notification-preview {
    margin: 0;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-meta {
    font-size: 0.82rem;
    color: var(--text-soft);
    display: flex;
    gap: 0.6rem;
}

.notification-thread {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.75rem;
    height: 100%;
}

.notification-thread-head p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
}

.notification-messages {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem;
    background: var(--surface-quiet);
    overflow-y: auto;
    display: grid;
    gap: 0.75rem;
}

.notification-reply-form textarea {
    min-height: 4.5rem;
}

.notification-reply-form .composer-actions {
    justify-content: space-between;
    align-items: center;
}

.notification-shell {
    position: relative;
}

.toast {
    min-width: 240px;
    max-width: 320px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--bg-panel);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.site-footer {
    padding-bottom: 1.4rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-muted);
    background: var(--surface-quiet);
}

.pagination-link.is-active {
    color: var(--text);
    border-color: rgba(105, 183, 255, 0.32);
    box-shadow: var(--shadow-glow);
}

.pagination-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.footer-shell {
    margin-top: 1rem;
}

.footer-shell p,
.footer-links a {
    color: var(--text-soft);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

body.app-body .particle-canvas {
    display: none;
}

body.app-body .glass-card,
body.app-body .sidebar,
body.app-body .metric-card,
body.app-body .tab-shell {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.admin-page .glass-card,
body.admin-page .sidebar,
body.admin-page .metric-card,
body.admin-page .tab-shell {
    background: var(--admin-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--admin-shadow);
}

body.admin-page .sidebar,
body.admin-page .page-intro,
body.admin-page .metric-card,
body.admin-page .tab-shell,
body.admin-page .overview-kpi-card,
body.admin-page .overview-panel,
body.admin-page .overview-note {
    transition: none;
}

body.admin-page .glass-card:hover,
body.admin-page .metric-card:hover,
body.admin-page .page-intro:hover,
body.admin-page .overview-kpi-card:hover,
body.admin-page .overview-panel:hover,
body.admin-page .overview-note:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: var(--admin-shadow);
}

body.admin-page .tab-shell,
body.admin-page .metric-card,
body.admin-page .overview-panel,
body.admin-page .overview-note {
    contain: layout paint;
}

/* Profile & Pricing additions */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.profile-panel .profile-avatar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.avatar-shell {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(96,176,255,0.24), rgba(115,66,255,0.24));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.avatar-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-weight: 700;
    color: #cfe4ff;
}

.usage-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-list li {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.pricing-card .price-tag {
    font-size: 20px;
    font-weight: 700;
    color: #8bd3ff;
}

.pricing-card.highlight {
    box-shadow: 0 10px 40px rgba(91, 119, 255, 0.25);
    border: 1px solid rgba(115, 145, 255, 0.35);
}

.feature-list {
    list-style: none;
    margin: 12px 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(14px, -24px, 0) scale(1.04);
    }
}

@keyframes pulseDot {
    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.55;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

    .metric-grid,
    .signal-stack,
    .overview-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-grid,
    .hero-grid,
    .split-section,
    .auth-grid,
    .overview-grid,
    .ticket-console-grid {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: auto;
    }
}

@media (max-width: 860px) {
    .nav-shell,
    .footer-shell,
    .page-intro,
    .cta-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav,
    .nav-actions,
    .composer-actions,
    .table-actions,
    .ticket-panel-head,
    .ticket-toolbar {
        width: 100%;
    }

    .stat-strip,
    .metric-grid,
    .signal-stack,
    .feature-grid,
    .overview-kpi-grid,
    .activity-strip {
        grid-template-columns: 1fr;
    }

    .demo-grid,
    .admin-grid {
        flex-direction: column;
    }

    .inline-field,
    .inline-search,
    .inline-form,
    .ticket-status-form {
        width: 100%;
    }

    .inline-field select,
    .inline-search input,
    .inline-form select,
    .ticket-status-form select {
        width: 100%;
    }

    .ticket-summary-head,
    .ticket-summary-meta,
    .ticket-message-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .app-shell,
    .app-main,
    .site-main,
    .site-footer,
    .site-header {
        padding-inline: 0.9rem;
    }

    .app-shell {
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .hero-copy h1 {
        font-size: 2.35rem;
    }

    .section-copy h2,
    .auth-copy h1,
    .page-intro h1,
    .cta-card h2 {
        font-size: 1.75rem;
    }

    .chat-bubble {
        max-width: 100%;
    }
}
