:root {
    --awx-primary-900: #0E76BC;
    --awx-primary-800: #176AA4;
    --awx-primary-700: #1F5D8F;

    --awx-sky-600: #1498DB;
    --awx-sky-500: #1EA7D8;
    --awx-sky-400: #21B6D7;

    --awx-aqua-600: #17B7C9;
    --awx-aqua-500: #11C3D3;
    --awx-aqua-400: #22C7D6;

    --awx-ink-950: #0F172A;
    --awx-ink-900: #1E293B;
    --awx-ink-800: #334155;
    --awx-ink-700: #475569;
    --awx-ink-600: #64748B;
    --awx-ink-500: #94A3B8;

    --awx-white: #FFFFFF;
    --awx-gray-25: #FCFDFE;
    --awx-gray-50: #F8FAFC;
    --awx-gray-75: #F4F7FA;
    --awx-gray-100: #EEF3F7;
    --awx-gray-150: #E7EDF3;
    --awx-gray-200: #D9E3EC;
    --awx-gray-300: #C7D2E0;

    --awx-success: #16A34A;
    --awx-warning: #D99212;
    --awx-danger: #DC2626;

    --awx-border: rgba(15, 23, 42, .08);
    --awx-border-strong: rgba(15, 23, 42, .14);
    --awx-border-soft: rgba(14, 118, 188, .10);

    --awx-shadow-xs: 0 2px 8px rgba(15, 23, 42, .05);
    --awx-shadow-sm: 0 12px 28px rgba(15, 23, 42, .08);
    --awx-shadow-md: 0 18px 50px rgba(14, 118, 188, .10);
    --awx-shadow-lg: 0 32px 80px rgba(15, 23, 42, .12);
    --awx-shadow-xl: 0 40px 100px rgba(15, 23, 42, .14);

    --awx-radius-sm: .75rem;
    --awx-radius-md: 1rem;
    --awx-radius-lg: 1.35rem;
    --awx-radius-xl: 1.75rem;
    --awx-radius-2xl: 2rem;
    --awx-radius-3xl: 2.4rem;
    --awx-radius-pill: 999px;

    --awx-space-1: .35rem;
    --awx-space-2: .5rem;
    --awx-space-3: .75rem;
    --awx-space-4: 1rem;
    --awx-space-5: 1.25rem;
    --awx-space-6: 1.5rem;
    --awx-space-7: 2rem;
    --awx-space-8: 2.5rem;
    --awx-space-9: 3rem;
    --awx-space-10: 4rem;

    --awx-transition-fast: 160ms ease;
    --awx-transition: 220ms ease;
    --awx-transition-slow: 320ms ease;

    --awx-shell-width: 1400px;
    --awx-chat-width: 1180px;

    --awx-avatar-size: 42px;
    --awx-bubble-max: min(78%, 720px);
    --awx-history-height: min(68vh, 760px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    color: var(--awx-ink-800);
    background: linear-gradient(180deg, #F6FAFD 0%, #EFF4F8 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.container,
.container-fluid {
    position: relative;
    z-index: 1;
}

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

header#page-title.awx-page-titlebar {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid rgba(14, 118, 188, .08);
    background: linear-gradient(135deg, rgba(255, 255, 255, .98) 0%, rgba(245, 250, 253, .98) 48%, rgba(233, 246, 250, .98) 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .7);
}

header#page-title.awx-page-titlebar::before,
header#page-title.awx-page-titlebar::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

header#page-title.awx-page-titlebar::before {
    top: -120px;
    right: -110px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(20, 152, 219, .14) 0%, rgba(20, 152, 219, 0) 68%);
}

header#page-title.awx-page-titlebar::after {
    left: -140px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(34, 199, 214, .10) 0%, rgba(34, 199, 214, 0) 70%);
}

.awx-page-titlebar-inner {
    position: relative;
    z-index: 1;
    max-width: var(--awx-shell-width);
    margin: 0 auto;
    padding: 1.15rem 1rem 1.4rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
}

.awx-page-copy {
    min-width: 0;
}

.awx-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .75rem;
    padding: .5rem .9rem;
    border-radius: var(--awx-radius-pill);
    background: rgba(20, 152, 219, .08);
    border: 1px solid rgba(20, 152, 219, .10);
    color: var(--awx-primary-900);
    font-size: .70rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.awx-page-kicker i {
    color: var(--awx-aqua-600);
}

.awx-page-heading {
    margin: 0;
    color: var(--awx-ink-950);
    font-size: clamp(1.7rem, 2.2vw, 2.7rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.045em;
}

.awx-page-subheading {
    margin: .55rem 0 0;
    max-width: 760px;
    color: var(--awx-ink-600);
    font-size: .98rem;
    line-height: 1.65;
}

.awx-page-breadcrumb {
    flex-shrink: 0;
    align-self: center;
}

.breadcrumb.awx-breadcrumb {
    margin: 0;
    padding: .72rem 1rem;
    border-radius: var(--awx-radius-pill);
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(15, 23, 42, .06);
    box-shadow: var(--awx-shadow-xs);
    backdrop-filter: blur(10px);
}

.breadcrumb.awx-breadcrumb .breadcrumb-item,
.breadcrumb.awx-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    color: var(--awx-ink-500);
}

.breadcrumb.awx-breadcrumb .breadcrumb-item a {
    color: var(--awx-primary-900);
    text-decoration: none;
    font-weight: 800;
}

.breadcrumb.awx-breadcrumb .breadcrumb-item.active {
    color: var(--awx-ink-700);
    font-weight: 700;
}

main#content.awx-chat-app {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: calc(100vh - 120px);
    padding: var(--awx-space-7) 0 var(--awx-space-9);
    background:
        radial-gradient(circle at 8% 10%, rgba(14, 118, 188, .06) 0%, transparent 22%),
        radial-gradient(circle at 92% 8%, rgba(34, 199, 214, .08) 0%, transparent 24%),
        linear-gradient(180deg, #F6FAFD 0%, #EEF3F7 100%);
}

main#content.awx-chat-app::before,
main#content.awx-chat-app::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

main#content.awx-chat-app::before {
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .20)),
        repeating-linear-gradient(90deg,
            rgba(255, 255, 255, .015) 0,
            rgba(255, 255, 255, .015) 1px,
            transparent 1px,
            transparent 48px);
}

main#content.awx-chat-app::after {
    inset-inline: 0;
    top: 0;
    height: 220px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .36), rgba(255, 255, 255, 0));
}

.awx-chat-shell {
    position: relative;
    z-index: 1;
    max-width: var(--awx-shell-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    gap: 1rem;
}

.awx-chat-topbar {
    width: 100%;
    max-width: var(--awx-chat-width);
    margin: 0 auto;
    padding: 1rem 1.05rem;
    border-radius: var(--awx-radius-2xl);
    border: 1px solid rgba(255, 255, 255, .55);
    background: linear-gradient(180deg, rgba(255, 255, 255, .84) 0%, rgba(248, 250, 252, .78) 100%);
    box-shadow: 0 24px 50px rgba(15, 23, 42, .08), 0 1px 0 rgba(255, 255, 255, .7) inset;
    backdrop-filter: blur(16px);
}

.awx-chat-topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.awx-agent-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.awx-agent-avatar {
    position: relative;
    width: 3.35rem;
    height: 3.35rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--awx-primary-900), var(--awx-sky-500) 65%, var(--awx-aqua-500));
    box-shadow: 0 18px 35px rgba(14, 118, 188, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.awx-agent-avatar::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(34, 199, 214, .18);
    pointer-events: none;
}

.awx-agent-copy {
    min-width: 0;
}

.awx-agent-name {
    margin: 0;
    color: var(--awx-ink-950);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.awx-agent-status {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin-top: .35rem;
    color: var(--awx-ink-600);
    font-size: .82rem;
    line-height: 1.4;
}

.awx-inline-state {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--awx-success);
    font-weight: 800;
}

.awx-inline-state .dot {
    width: .52rem;
    height: .52rem;
    border-radius: 50%;
    background: var(--awx-success);
    box-shadow: 0 0 0 5px rgba(22, 163, 74, .10), 0 0 18px rgba(22, 163, 74, .16);
}

.awx-chat-topbar-meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.awx-topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
    padding: .62rem .88rem;
    border-radius: var(--awx-radius-pill);
    border: 1px solid var(--awx-border);
    background: rgba(255, 255, 255, .86);
    color: var(--awx-ink-700);
    font-size: .79rem;
    font-weight: 800;
    box-shadow: var(--awx-shadow-xs);
}

.awx-topbar-chip i {
    color: var(--awx-primary-900);
}

.awx-chat-card {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: var(--awx-chat-width);
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 76vh;
    border-radius: var(--awx-radius-3xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(251, 253, 255, .88) 100%);
    box-shadow:
        0 40px 100px rgba(15, 23, 42, .12),
        0 6px 20px rgba(14, 118, 188, .06),
        inset 0 1px 0 rgba(255, 255, 255, .70);
    backdrop-filter: blur(20px);
}

.awx-chat-card::before,
.awx-chat-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.awx-chat-card::before {
    inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 199, 214, .06), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0));
}

.awx-chat-card::after {
    inset: 1px;
    border-radius: calc(var(--awx-radius-3xl) - 1px);
    border: 1px solid rgba(14, 118, 188, .05);
}

.awx-chat-context {
    position: relative;
    z-index: 1;
    display: grid;
    gap: .95rem;
    padding: 1.15rem 1.15rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(246, 250, 253, .90));
}

.awx-chat-context-copy {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    color: var(--awx-ink-700);
    font-size: .95rem;
    line-height: 1.55;
}

.awx-chat-context-copy strong {
    color: var(--awx-ink-950);
    font-weight: 900;
}

.awx-chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.awx-quick-action,
.awx-inline-action-btn {
    appearance: none;
    border-radius: var(--awx-radius-pill);
    font-weight: 800;
    transition:
        transform var(--awx-transition-fast),
        background var(--awx-transition-fast),
        border-color var(--awx-transition-fast),
        color var(--awx-transition-fast),
        box-shadow var(--awx-transition-fast);
}

.awx-quick-action {
    border: 1px solid rgba(20, 152, 219, .14);
    background: linear-gradient(180deg, rgba(20, 152, 219, .07), rgba(20, 152, 219, .045));
    color: var(--awx-primary-900);
    padding: .68rem .92rem;
    font-size: .81rem;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), 0 4px 10px rgba(14, 118, 188, .04);
}

.awx-quick-action:hover,
.awx-quick-action:focus-visible {
    background: linear-gradient(135deg, var(--awx-primary-900), var(--awx-sky-500));
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(14, 118, 188, .16);
    outline: none;
}

.awx-chat-history {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 440px;
    height: var(--awx-history-height);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.2rem 1.15rem .9rem;
    background: linear-gradient(180deg, rgba(251, 253, 255, .92) 0%, rgba(245, 249, 252, .96) 100%);
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.awx-chat-history::before {
    content: "";
    position: sticky;
    top: 0;
    display: block;
    height: 0;
    box-shadow: 0 18px 22px rgba(255, 255, 255, .9);
    pointer-events: none;
}

.awx-chat-history::-webkit-scrollbar {
    width: 10px;
}

.awx-chat-history::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(14, 118, 188, .24), rgba(34, 199, 214, .22));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.awx-chat-history::-webkit-scrollbar-track {
    background: transparent;
}

.awx-msg-row {
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    animation: awxFadeUp .24s ease both;
}

.awx-msg-row.is-user {
    justify-content: flex-end;
}

.awx-msg-avatar {
    width: var(--awx-avatar-size);
    height: var(--awx-avatar-size);
    flex: 0 0 var(--awx-avatar-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--awx-primary-900), var(--awx-sky-500));
    box-shadow: 0 10px 24px rgba(2, 132, 199, .18);
}

.awx-msg-row.is-user .awx-msg-avatar {
    background: linear-gradient(135deg, var(--awx-aqua-600), var(--awx-sky-600));
}

.awx-bubble {
    position: relative;
    width: fit-content;
    max-width: var(--awx-bubble-max);
    padding: .95rem 1rem .9rem;
    border-radius: 1.35rem;
    line-height: 1.58;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-shadow: var(--awx-shadow-sm);
    backdrop-filter: blur(8px);
}

.awx-bubble-ai {
    color: var(--awx-ink-800);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(250, 252, 254, .98) 100%);
    border: 1px solid rgba(15, 23, 42, .08);
    border-top-left-radius: .55rem;
}

.awx-bubble-user {
    color: #fff;
    background: linear-gradient(135deg, var(--awx-primary-900) 0%, var(--awx-sky-500) 72%, var(--awx-aqua-500) 100%);
    border: 1px solid rgba(14, 118, 188, .12);
    border-top-right-radius: .55rem;
    box-shadow: 0 18px 35px rgba(14, 118, 188, .18), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.awx-bubble-system {
    max-width: 100%;
    color: var(--awx-primary-900);
    background: linear-gradient(180deg, rgba(20, 152, 219, .08), rgba(17, 195, 211, .05));
    border: 1px dashed rgba(20, 152, 219, .24);
    box-shadow: none;
}

.awx-bubble-title {
    margin-bottom: .4rem;
    font-size: .94rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.awx-bubble-text {
    font-size: .95rem;
    line-height: 1.65;
    white-space: normal;
}

.awx-bubble-loading {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--awx-ink-600);
    font-weight: 700;
}

.awx-msg-meta {
    margin-top: .7rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: .72rem;
    line-height: 1.2;
    opacity: .76;
}

.awx-bubble-divider {
    height: 1px;
    margin: .85rem 0 .8rem;
    background: rgba(15, 23, 42, .08);
}

.awx-bubble-block {
    margin-top: .78rem;
}

.awx-bubble-section-title {
    margin-bottom: .5rem;
    color: var(--awx-ink-600);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.awx-bubble-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.awx-inline-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .48rem .72rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: var(--awx-gray-50);
    color: var(--awx-ink-700);
    font-size: .75rem;
    font-weight: 800;
}

.awx-inline-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .55rem;
}

.awx-inline-action-btn {
    border: 1px solid rgba(20, 152, 219, .14);
    background: rgba(20, 152, 219, .05);
    color: var(--awx-primary-900);
    padding: .68rem .9rem;
    font-size: .79rem;
    text-align: center;
}

.awx-inline-action-btn:hover,
.awx-inline-action-btn:focus-visible {
    background: var(--awx-primary-900);
    border-color: var(--awx-primary-900);
    color: #fff;
    transform: translateY(-1px);
    outline: none;
}

.awx-bubble-similar {
    padding: .84rem .88rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: var(--awx-gray-50);
}

.awx-bubble-similar summary {
    cursor: pointer;
    list-style: none;
    color: var(--awx-primary-900);
    font-weight: 900;
}

.awx-bubble-similar summary::-webkit-details-marker {
    display: none;
}

.awx-similar-list {
    display: grid;
    gap: .65rem;
    margin-top: .8rem;
}

.awx-similar-item {
    padding: .8rem .85rem;
    border-radius: .95rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
}

.awx-similar-q {
    margin-bottom: .3rem;
    color: var(--awx-ink-900);
    font-size: .82rem;
    font-weight: 900;
    line-height: 1.4;
}

.awx-similar-a {
    color: var(--awx-ink-600);
    font-size: .82rem;
    line-height: 1.55;
}

.awx-chat-composer-wrap {
    position: relative;
    z-index: 2;
    padding: 1rem 1.1rem 1.05rem;
    border-top: 1px solid rgba(15, 23, 42, .06);
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(250, 252, 254, .98));
    box-shadow: 0 -10px 30px rgba(255, 255, 255, .8);
}

.awx-chat-composer {
    display: block;
}

.awx-composer-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: .65rem;
    padding: .55rem;
    border-radius: 1.45rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(255, 255, 255, .98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 10px 24px rgba(15, 23, 42, .04);
    transition: border-color var(--awx-transition), box-shadow var(--awx-transition), background var(--awx-transition);
}

.awx-composer-box:focus-within {
    background: #fff;
    border-color: rgba(17, 195, 211, .36);
    box-shadow:
        0 0 0 4px rgba(17, 195, 211, .10),
        0 14px 26px rgba(14, 118, 188, .08),
        inset 0 1px 0 rgba(255, 255, 255, .8);
}

.awx-composer-tools {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
}

.awx-tool-btn {
    appearance: none;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--awx-ink-600);
    transition: all var(--awx-transition-fast);
}

.awx-tool-btn:hover,
.awx-tool-btn:focus-visible {
    background: rgba(20, 152, 219, .08);
    color: var(--awx-primary-900);
    outline: none;
}

.awx-tool-btn.is-listening {
    background: rgba(220, 38, 38, .10);
    color: var(--awx-danger);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .08);
}

#user-input.awx-user-input {
    width: 100%;
    min-height: 3rem;
    max-height: 12rem;
    padding: .8rem .25rem;
    border: 0 !important;
    outline: 0 !important;
    resize: none;
    overflow-y: auto;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--awx-ink-950);
    font-size: .96rem;
    line-height: 1.5;
}

#user-input.awx-user-input::placeholder {
    color: var(--awx-ink-500);
}

.awx-send-btn {
    appearance: none;
    min-width: 3.1rem;
    height: 3.1rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .52rem;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--awx-primary-900), var(--awx-sky-500));
    box-shadow: 0 16px 30px rgba(14, 118, 188, .20), inset 0 1px 0 rgba(255, 255, 255, .16);
    transition:
        transform var(--awx-transition-fast),
        box-shadow var(--awx-transition-fast),
        opacity var(--awx-transition-fast),
        filter var(--awx-transition-fast);
}

.awx-send-btn:hover,
.awx-send-btn:focus-visible {
    transform: translateY(-1px);
    filter: saturate(1.05);
    box-shadow: 0 20px 34px rgba(14, 118, 188, .24), inset 0 1px 0 rgba(255, 255, 255, .18);
    outline: none;
}

.awx-send-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.awx-composer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .78rem;
    color: var(--awx-ink-500);
    font-size: .77rem;
}

.awx-meta-left,
.awx-meta-right {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.awx-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 .38rem;
    border-radius: .45rem;
    border: 1px solid var(--awx-border-strong);
    background: #fff;
    color: var(--awx-ink-700);
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: var(--awx-shadow-xs);
}

.awx-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.8rem;
    padding: .38rem .72rem;
    border-radius: 999px;
    border: 1px solid rgba(22, 163, 74, .14);
    background: rgba(22, 163, 74, .08);
    color: var(--awx-success);
    font-weight: 900;
    line-height: 1;
}

.awx-status-badge[data-state="error"] {
    border-color: rgba(220, 38, 38, .16);
    background: rgba(220, 38, 38, .08);
    color: var(--awx-danger);
}

.awx-speak-hint {
    min-height: 1.1rem;
    margin-top: .45rem;
    padding-left: .15rem;
    color: var(--awx-ink-500);
    font-size: .8rem;
}

.awx-glass-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, .08), transparent);
}

@keyframes awxFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 8px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 1199.98px) {
    .awx-chat-shell {
        padding: 0 .85rem;
    }

    .awx-chat-topbar,
    .awx-chat-card {
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .awx-page-titlebar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: .9rem;
        padding-bottom: 1.1rem;
    }

    .awx-page-breadcrumb {
        align-self: flex-start;
    }

    main#content.awx-chat-app {
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .awx-chat-topbar-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .awx-chat-topbar-meta {
        justify-content: flex-start;
    }

    .awx-chat-card {
        min-height: auto;
        border-radius: 1.75rem;
    }

    .awx-chat-history {
        min-height: 380px;
        height: 60vh;
    }
}

@media (max-width: 767.98px) {
    :root {
        --awx-avatar-size: 38px;
        --awx-bubble-max: 90%;
    }

    .awx-page-titlebar-inner {
        padding-inline: .9rem;
    }

    .awx-page-heading {
        font-size: 1.55rem;
    }

    .awx-page-subheading {
        font-size: .93rem;
        line-height: 1.6;
    }

    .breadcrumb.awx-breadcrumb {
        padding: .6rem .85rem;
    }

    .awx-chat-topbar {
        padding: .9rem;
        border-radius: 1.35rem;
    }

    .awx-agent-avatar {
        width: 3rem;
        height: 3rem;
    }

    .awx-chat-card {
        border-radius: 1.4rem;
    }

    .awx-chat-context {
        padding: .95rem .9rem .88rem;
    }

    .awx-chat-history {
        min-height: 340px;
        height: 56vh;
        padding: .95rem .85rem .7rem;
    }

    .awx-bubble {
        padding: .88rem .9rem .82rem;
        border-radius: 1.15rem;
    }

    .awx-chat-composer-wrap {
        padding: .9rem .85rem .92rem;
    }

    .awx-composer-box {
        gap: .48rem;
        padding: .45rem;
        border-radius: 1.15rem;
    }

    .awx-send-btn span {
        display: none;
    }

    .awx-composer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: .45rem;
    }
}

@media (max-width: 575.98px) {
    :root {
        --awx-avatar-size: 34px;
        --awx-bubble-max: calc(100% - 2.9rem);
    }

    header#page-title.awx-page-titlebar::before,
    header#page-title.awx-page-titlebar::after,
    main#content.awx-chat-app::before {
        opacity: .7;
    }

    .awx-page-titlebar-inner {
        padding-inline: .75rem;
        padding-top: .9rem;
        padding-bottom: 1rem;
    }

    .awx-page-kicker {
        font-size: .7rem;
        padding: .42rem .7rem;
        margin-bottom: .62rem;
    }

    .awx-page-heading {
        font-size: 1.38rem;
    }

    .awx-page-subheading {
        font-size: .9rem;
    }

    .awx-chat-shell {
        padding: 0 .7rem;
    }

    .awx-chat-topbar {
        padding: .8rem;
        border-radius: 1.2rem;
    }

    .awx-agent-identity {
        gap: .75rem;
    }

    .awx-agent-avatar {
        width: 2.7rem;
        height: 2.7rem;
    }

    .awx-agent-name {
        font-size: .95rem;
    }

    .awx-agent-status {
        font-size: .76rem;
    }

    .awx-topbar-chip {
        font-size: .73rem;
        padding: .5rem .68rem;
    }

    .awx-chat-context {
        gap: .8rem;
        padding: .85rem .8rem;
    }

    .awx-chat-context-copy {
        font-size: .9rem;
    }

    .awx-chat-quick-actions {
        gap: .45rem;
    }

    .awx-quick-action {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: .76rem;
        padding: .6rem .75rem;
    }

    .awx-chat-history {
        min-height: 300px;
        height: 52vh;
        padding: .8rem .75rem .65rem;
    }

    .awx-msg-row {
        gap: .55rem;
    }

    .awx-msg-avatar {
        font-size: .9rem;
    }

    .awx-bubble {
        padding: .82rem .84rem .78rem;
    }

    .awx-bubble-text {
        font-size: .92rem;
        line-height: 1.58;
    }

    .awx-tool-btn {
        width: 2.45rem;
        height: 2.45rem;
        border-radius: .85rem;
    }

    .awx-send-btn {
        width: 2.8rem;
        min-width: 2.8rem;
        height: 2.8rem;
        padding: 0;
        border-radius: .9rem;
    }

    .awx-meta-left {
        display: none;
    }

    .awx-inline-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {

    .awx-agent-status,
    .awx-composer-meta,
    .awx-msg-meta,
    .awx-inline-chip {
        font-size: .7rem;
    }

    .awx-chat-history {
        height: 50vh;
    }

    .awx-composer-box {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .awx-composer-tools {
        order: 2;
        justify-content: flex-start;
    }

    #user-input.awx-user-input {
        order: 1;
        min-height: 2.85rem;
        padding-inline: .2rem;
    }

    .awx-send-btn {
        order: 3;
        width: 100%;
        min-width: 100%;
        height: 2.95rem;
        border-radius: .95rem;
    }

    .awx-send-btn span {
        display: inline;
    }
}

@media (hover: none) and (pointer: coarse) {

    .awx-quick-action:hover,
    .awx-inline-action-btn:hover,
    .awx-tool-btn:hover,
    .awx-send-btn:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {

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