:root {
    --bg: #f4efe6;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-strong: #fffdf8;
    --line: rgba(74, 54, 31, 0.12);
    --text: #1f1b16;
    --muted: #756452;
    --accent: #b24a2d;
    --accent-soft: rgba(178, 74, 45, 0.12);
    --blue: #1f6a8a;
    --green: #2f7a45;
    --yellow: #b78318;
    --red: #a53b32;
    --shadow: 0 20px 60px rgba(70, 48, 30, 0.1);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --line-meta-width: clamp(136px, 15vw, 170px);
    --production-min-width: 860px;
    --board-chat-width: min(420px, calc(50vw - 40px));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(178, 74, 45, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(31, 106, 138, 0.16), transparent 35%),
        var(--bg);
}

.assistant-body {
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at top center, rgba(47, 125, 250, 0.18), transparent 28%),
        radial-gradient(circle at bottom center, rgba(66, 133, 244, 0.12), transparent 34%),
        linear-gradient(180deg, #eef5ff 0%, #f5f9ff 46%, #edf4ff 100%);
}

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

.board-page,
.assistant-page {
    max-width: 1480px;
    margin: 0 auto;
    padding: clamp(18px, 2.4vw, 28px);
}

.board-page {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
}

.assistant-page {
    width: min(100%, 430px);
    max-width: 430px;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.assistant-shell {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 12px;
    padding:
        calc(16px + env(safe-area-inset-top, 0px))
        14px
        0;
    overflow: hidden;
}

.shell-header,
.assistant-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    letter-spacing: 0.14em;
    font-size: 12px;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(1.7rem, 2.2vw, 2.8rem);
}

h2 {
    font-size: 1.35rem;
}

.shell-subtitle,
.assistant-status-text,
.panel-kicker,
.hero-label,
.axis-tick,
.line-meta span,
.line-meta em,
.dock-vehicle div:last-child,
.dock-empty small,
.message-card small {
    color: var(--muted);
}

.shell-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
}

.nav-link-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.hero-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.hero-metric,
.board-panel,
.message-card {
    border-radius: var(--radius-xl);
    background: var(--panel);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.hero-metric {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.hero-metric strong {
    font-size: 1.5rem;
}

.hero-button,
.primary-button,
.ghost-button,
.quick-actions button,
.suggestion-button {
    font: inherit;
    border: none;
    cursor: pointer;
}

.hero-button,
.primary-button {
    background: linear-gradient(135deg, #1f6a8a, #b24a2d);
    color: #fff;
    border-radius: 18px;
    padding: 14px 18px;
    box-shadow: 0 12px 24px rgba(31, 106, 138, 0.22);
}

.assistant-body .primary-button {
    background: linear-gradient(135deg, #2f7dfa, #4f98ff);
    box-shadow: 0 12px 24px rgba(47, 125, 250, 0.22);
}

.hero-button {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ghost-button {
    border-radius: 18px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--line);
}

.assistant-body .ghost-button {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(47, 125, 250, 0.16);
    color: #2457c5;
}

.hero-button:disabled,
.primary-button:disabled,
.ghost-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.board-main {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    gap: 20px;
    align-items: start;
    min-height: calc(100dvh - 220px);
}

.board-panel {
    padding: clamp(16px, 1.8vw, 22px);
    min-width: 0;
}

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

.metric-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.metric-chip {
    min-width: 88px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-chip span {
    font-size: 12px;
    color: var(--muted);
}

.tone-red strong {
    color: var(--red);
}

.tone-green strong {
    color: var(--green);
}

.tone-blue strong {
    color: var(--blue);
}

.timeline-axis {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
    padding-left: calc(var(--line-meta-width) + 14px);
    min-width: var(--production-min-width);
}

.axis-tick {
    font-size: 12px;
    text-align: center;
}

.production-lines {
    display: grid;
    gap: 14px;
    min-width: var(--production-min-width);
}

.line-row {
    display: grid;
    grid-template-columns: var(--line-meta-width) minmax(680px, 1fr);
    gap: 14px;
    align-items: stretch;
}

.line-meta {
    padding: 16px;
    border-radius: 20px;
    background: rgba(250, 245, 238, 0.9);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 0 12px 30px rgba(70, 48, 30, 0.08);
}

.line-track {
    position: relative;
    min-height: 136px;
    padding: 16px 12px;
    border-radius: 22px;
    background:
        linear-gradient(to right, rgba(255, 255, 255, 0.85), rgba(255, 250, 242, 0.95)),
        repeating-linear-gradient(
            to right,
            transparent,
            transparent calc(12.5% - 1px),
            rgba(74, 54, 31, 0.06) calc(12.5% - 1px),
            rgba(74, 54, 31, 0.06) 12.5%
        );
    border: 1px solid var(--line);
    overflow: hidden;
}

.production-board-scroller {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    margin-bottom: 2px;
    scrollbar-gutter: stable both-edges;
}

.task-card {
    position: absolute;
    top: 16px;
    min-height: 102px;
    border-radius: 18px;
    padding: 12px;
    color: #fff;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.task-card p {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.94;
}

.task-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.task-pending { background: linear-gradient(135deg, #8b8f98, #5d636c); }
.task-in_progress { background: linear-gradient(135deg, #1f6a8a, #3d91b6); }
.task-completed { background: linear-gradient(135deg, #2f7a45, #49a464); }
.task-abnormal,
.task-paused { background: linear-gradient(135deg, #a53b32, #d06a49); }

.progress-bar,
.mini-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar span,
.mini-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.dock-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.dock-card {
    min-height: clamp(220px, 28vh, 250px);
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.dock-idle { background: rgba(255, 255, 255, 0.82); }
.dock-waiting { background: rgba(255, 244, 220, 0.92); }
.dock-loading { background: rgba(225, 242, 248, 0.96); }
.dock-departed { background: rgba(238, 249, 241, 0.98); }
.dock-abnormal {
    background: linear-gradient(135deg, #7f201a, #a53b32);
    color: #fff;
    border-color: rgba(127, 32, 26, 0.35);
}
.dock-delayed { background: rgba(253, 229, 224, 0.96); }

.dock-abnormal .dock-header span,
.dock-abnormal .dock-vehicle div:last-child,
.dock-abnormal .dock-empty,
.dock-abnormal .dock-empty small {
    color: rgba(255, 255, 255, 0.82);
}

.dock-abnormal .mini-progress {
    background: rgba(255, 255, 255, 0.2);
}

.dock-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.dock-vehicle,
.cargo-row,
.panel-summary,
.summary-grid,
.composer-actions {
    display: flex;
}

.dock-vehicle,
.panel-summary {
    flex-wrap: wrap;
    gap: 8px 16px;
}

.cargo-list {
    display: grid;
    gap: 10px;
}

.cargo-row {
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.cargo-row > div:first-child {
    display: grid;
    gap: 4px;
}

.mini-progress {
    max-width: 120px;
    margin-top: 0;
    background: rgba(31, 27, 22, 0.08);
}

.dock-empty {
    min-height: 148px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 18px;
}

.panel-summary {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    justify-content: space-between;
}

.text-danger {
    color: var(--red);
}

.notification-stack {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.notification {
    min-width: 340px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    opacity: 0;
    transition: 0.25s ease;
}

.notification.visible {
    transform: translateY(0);
    opacity: 1;
}

.notification-warning { border-color: rgba(183, 131, 24, 0.28); }
.notification-danger { border-color: rgba(165, 59, 50, 0.3); }

.board-chat {
    position: fixed;
    z-index: 12;
    width: var(--board-chat-width);
    border-radius: 24px;
    background: rgba(255, 253, 248, 0.94);
    border: 1px solid rgba(74, 54, 31, 0.14);
    box-shadow: 0 24px 50px rgba(70, 48, 30, 0.16);
    backdrop-filter: blur(18px);
    overflow: hidden;
    transition: border-color 0.6s ease, box-shadow 0.6s ease, background 0.6s ease, transform 0.6s ease;
}

.board-chat-manager {
    left: 24px;
    bottom: 24px;
    border-color: rgba(47, 125, 250, 0.24);
    background: rgba(246, 250, 255, 0.96);
    box-shadow: 0 24px 52px rgba(47, 125, 250, 0.16);
}

.board-chat-driver {
    left: calc(24px + var(--board-chat-width) + 16px);
    bottom: 24px;
    border-color: rgba(7, 193, 96, 0.24);
    background: rgba(245, 255, 249, 0.97);
    box-shadow: 0 24px 52px rgba(7, 193, 96, 0.16);
}

.board-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(74, 54, 31, 0.08);
    background: linear-gradient(135deg, rgba(31, 106, 138, 0.1), rgba(178, 74, 45, 0.08));
}

.board-chat-manager .board-chat-header {
    background: linear-gradient(135deg, rgba(47, 125, 250, 0.16), rgba(120, 168, 255, 0.08));
}

.board-chat-driver .board-chat-header {
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.16), rgba(89, 214, 137, 0.08));
}

.board-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.board-chat-logo {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
}

.board-chat-kicker {
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--muted);
}

.board-chat-log {
    display: grid;
    gap: 10px;
    max-height: 220px;
    padding: 14px 16px 16px;
    overflow-y: auto;
}

.board-chat-message {
    justify-self: end;
    width: fit-content;
    max-width: calc(100% - 8px);
    padding: 12px 14px;
    border-radius: 18px 18px 6px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 239, 230, 0.96));
    border: 1px solid rgba(74, 54, 31, 0.08);
    box-shadow: 0 10px 24px rgba(70, 48, 30, 0.08);
    white-space: pre-line;
}

.board-chat-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.board-chat-message-avatar {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    object-fit: contain;
    border-radius: 6px;
}

.board-chat-manager .board-chat-message {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(235, 244, 255, 0.96));
    border-color: rgba(47, 125, 250, 0.12);
}

.board-chat-driver .board-chat-message {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(232, 249, 239, 0.97));
    border-color: rgba(7, 193, 96, 0.14);
}

.board-chat-message small {
    display: block;
    color: var(--muted);
    font-weight: 600;
}

.board-chat-message.is-system {
    background: rgba(255, 255, 255, 0.78);
}

.board-chat-manager .board-chat-message.is-system {
    background: rgba(240, 247, 255, 0.94);
}

.board-chat-driver .board-chat-message.is-system {
    background: rgba(238, 251, 244, 0.94);
}

.board-chat-message.is-streaming p::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: -2px;
    background: rgba(178, 74, 45, 0.7);
    border-radius: 999px;
    animation: streamCursor 0.85s steps(1) infinite;
}

.board-chat-manager .board-chat-message.is-streaming p::after {
    background: rgba(47, 125, 250, 0.72);
}

.board-chat-driver .board-chat-message.is-streaming p::after {
    background: rgba(7, 193, 96, 0.76);
}

.board-chat-message.is-wecom {
    border-radius: 20px 20px 8px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(236, 245, 255, 0.98));
    border-color: rgba(47, 125, 250, 0.16);
    box-shadow: 0 14px 28px rgba(47, 125, 250, 0.12);
}

.board-chat-message.is-wecom .board-chat-message-meta small {
    color: #2457c5;
}

.board-chat-message.is-wechat {
    border-radius: 20px 20px 8px 20px;
}

.board-chat.is-emphasized {
    border-color: rgba(178, 74, 45, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(249, 241, 232, 0.96)),
        rgba(255, 253, 248, 0.96);
    box-shadow: 0 28px 68px rgba(178, 74, 45, 0.16), 0 18px 44px rgba(31, 106, 138, 0.12);
    transform: translateY(-2px);
    animation: boardChatGlow 2.6s ease-in-out infinite alternate;
}

.board-chat-manager.is-emphasized {
    border-color: rgba(47, 125, 250, 0.42);
    background:
        linear-gradient(180deg, rgba(248, 252, 255, 0.99), rgba(238, 246, 255, 0.97)),
        rgba(246, 250, 255, 0.98);
    box-shadow: 0 28px 68px rgba(47, 125, 250, 0.18), 0 18px 44px rgba(120, 168, 255, 0.12);
}

.board-chat-driver.is-emphasized {
    border-color: rgba(7, 193, 96, 0.42);
    background:
        linear-gradient(180deg, rgba(249, 255, 251, 0.99), rgba(237, 251, 243, 0.97)),
        rgba(245, 255, 249, 0.98);
    box-shadow: 0 28px 68px rgba(7, 193, 96, 0.18), 0 18px 44px rgba(89, 214, 137, 0.12);
}

.loading-panel {
    display: grid;
    place-items: center;
    min-height: 55vh;
}

.loading-card {
    width: min(460px, 100%);
    padding: 34px;
    text-align: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.loading-pulse {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(178, 74, 45, 0.9), rgba(178, 74, 45, 0.15));
    animation: pulse 1.6s infinite ease-in-out;
}

.hidden {
    display: none !important;
}

.assistant-status-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 600;
}

.assistant-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.assistant-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    padding-top: 2px;
}

.assistant-brand-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(7, 120, 58, 0.18));
}

.assistant-brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2457c5;
    white-space: nowrap;
}

.assistant-status-hidden {
    display: none;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-ready { background: var(--green); }
.status-loading { background: var(--yellow); }

.quick-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 0;
    scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
    display: none;
}

.quick-actions button {
    flex: 0 0 auto;
    align-self: center;
    height: auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.15;
    box-shadow: 0 6px 16px rgba(70, 48, 30, 0.08);
}

.suggestion-button {
    padding: 11px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    text-align: left;
    box-shadow: 0 10px 24px rgba(70, 48, 30, 0.08);
}

.quick-actions button:hover,
.suggestion-button:hover {
    transform: translateY(-1px);
}

.assistant-body .quick-actions button,
.assistant-body .suggestion-button {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(47, 125, 250, 0.14);
    color: #2457c5;
}

.chat-log {
    display: grid;
    gap: 14px;
    align-content: start;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    padding: 4px 2px calc(228px + env(safe-area-inset-bottom, 0px));
    scrollbar-gutter: stable;
}

.message-card {
    width: fit-content;
    max-width: min(88%, 340px);
    padding: 14px 15px;
    border-radius: 22px;
    border: 1px solid rgba(74, 54, 31, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(70, 48, 30, 0.08);
    white-space: pre-line;
}

.assistant-body .message-card {
    box-shadow: 0 16px 34px rgba(47, 125, 250, 0.08);
}

.assistant-bubble {
    justify-self: start;
    max-width: min(88%, 340px);
}

.user-bubble {
    justify-self: end;
    max-width: min(82%, 320px);
    background: linear-gradient(135deg, #1d6481, #3f8bb0);
    color: #fff;
    border-color: transparent;
}

.assistant-body .user-bubble {
    background: linear-gradient(135deg, #2f7dfa, #4f98ff);
}

.system-bubble {
    width: 100%;
    max-width: none;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(246, 239, 229, 0.94));
    border-color: rgba(178, 74, 45, 0.12);
}

.assistant-body .system-bubble {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.95));
    border-color: rgba(47, 125, 250, 0.12);
}

.system-bubble strong,
.system-bubble p + p {
    display: block;
    margin-top: 6px;
}

.status-card h3,
.alert-card h3,
.suggestion-card h3,
.success-card h3,
.error-card h3 {
    margin-bottom: 10px;
}

.summary-grid {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.summary-grid > div {
    min-width: 110px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    display: grid;
    gap: 4px;
}

.conflict-item {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    margin-top: 10px;
}

.conflict-urgent {
    background: rgba(253, 229, 224, 0.96);
    border-color: rgba(165, 59, 50, 0.18);
}

.conflict-attention {
    background: rgba(255, 244, 220, 0.96);
    border-color: rgba(183, 131, 24, 0.22);
}

.conflict-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.suggestion-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.command-notification-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 10px;
}

.command-notification-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(47, 125, 250, 0.12);
}

.command-notification-item strong {
    display: block;
    margin-bottom: 6px;
    color: #2457c5;
}

.command-notification-item p {
    line-height: 1.55;
}

.suggestion-button {
    display: grid;
    gap: 6px;
    width: 100%;
    border-radius: 18px;
    padding: 14px;
}

.status-card,
.alert-card,
.suggestion-card,
.success-card,
.error-card {
    width: 100%;
    max-width: none;
}

.status-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 249, 0.92));
}

.alert-card {
    background: linear-gradient(180deg, rgba(255, 249, 244, 0.98), rgba(253, 236, 230, 0.96));
}

.suggestion-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 240, 233, 0.96));
}

.success-card {
    background: linear-gradient(180deg, rgba(238, 249, 241, 0.98), rgba(226, 244, 231, 0.96));
}

.error-card {
    background: linear-gradient(180deg, rgba(255, 245, 243, 0.98), rgba(253, 229, 224, 0.96));
}

.assistant-composer {
    position: fixed;
    left: max(14px, calc(50vw - 215px));
    right: max(14px, calc(50vw - 215px));
    bottom: 0;
    width: auto;
    margin-top: 0;
    z-index: 3;
    padding: 6px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(237, 244, 255, 0), rgba(237, 244, 255, 0.84) 28%, rgba(237, 244, 255, 1) 100%);
}

.assistant-input-shell {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(47, 125, 250, 0.12);
    box-shadow: 0 18px 42px rgba(47, 125, 250, 0.14);
    padding: 10px;
    display: grid;
    gap: 8px;
}

.assistant-input-shell .quick-actions {
    padding: 0;
}

.assistant-composer textarea {
    width: 100%;
    min-height: 82px;
    max-height: 140px;
    resize: none;
    border: none;
    border-radius: 18px;
    padding: 10px 12px 4px;
    font: inherit;
    background: transparent;
    color: var(--text);
    outline: none;
}

.composer-actions {
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.assistant-voice-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
}

.assistant-voice-button.is-recording {
    background: linear-gradient(135deg, #a53b32, #d06a49);
    color: #fff;
    border-color: transparent;
    animation: pulse 1.25s infinite ease-in-out;
}

.assistant-body .assistant-voice-button {
    background: rgba(47, 125, 250, 0.08);
    border-color: rgba(47, 125, 250, 0.16);
    color: #2457c5;
}

.assistant-send-button {
    min-width: 108px;
    min-height: 56px;
    border-radius: 18px;
}

.assistant-header {
    align-items: center;
    gap: 12px;
}

.assistant-header-main {
    display: grid;
    gap: 4px;
}

.assistant-helper-text,
.assistant-status-hint {
    color: var(--muted);
    font-size: 13px;
}

.assistant-board-link {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(74, 54, 31, 0.1);
    box-shadow: 0 10px 24px rgba(70, 48, 30, 0.08);
}

.assistant-clear-button {
    font: inherit;
    border: 1px solid rgba(165, 59, 50, 0.16);
    background: rgba(255, 255, 255, 0.86);
    color: var(--red);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.assistant-body .assistant-clear-button {
    border-color: rgba(47, 125, 250, 0.14);
    background: rgba(255, 255, 255, 0.94);
    color: #2457c5;
}

.assistant-clear-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.is-flashing {
    animation: flash 2s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.78; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes flash {
    0%, 100% { box-shadow: 0 0 0 rgba(178, 74, 45, 0); transform: translateY(0); }
    25% { box-shadow: 0 0 0 6px rgba(178, 74, 45, 0.16); transform: translateY(-2px); }
    70% { box-shadow: 0 0 0 14px rgba(178, 74, 45, 0); }
}

@keyframes streamCursor {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes boardChatGlow {
    0% {
        border-color: rgba(178, 74, 45, 0.22);
        box-shadow: 0 24px 50px rgba(70, 48, 30, 0.16);
        background:
            linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(248, 242, 235, 0.93)),
            rgba(255, 253, 248, 0.94);
    }
    100% {
        border-color: rgba(31, 106, 138, 0.36);
        box-shadow: 0 30px 72px rgba(178, 74, 45, 0.18), 0 20px 48px rgba(31, 106, 138, 0.14);
        background:
            linear-gradient(180deg, rgba(255, 249, 243, 0.98), rgba(240, 247, 250, 0.96)),
            rgba(255, 253, 248, 0.96);
    }
}

@media (max-width: 1320px) {
    .board-main {
        grid-template-columns: 1fr;
    }

    .dock-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    :root {
        --production-min-width: 760px;
    }

    .panel-summary {
        gap: 10px 16px;
    }
}

@media (max-width: 760px) {
    .board-page,
    .assistant-page {
        padding: 18px;
    }

    .assistant-page {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .hero-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dock-wall {
        grid-template-columns: 1fr;
    }

    .assistant-header,
    .shell-header {
        flex-direction: column;
    }

    .assistant-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .panel-header {
        margin-bottom: 14px;
    }

    .line-meta {
        min-width: 124px;
    }

    .task-card {
        min-height: 96px;
        padding: 10px;
    }

    .assistant-bubble,
    .user-bubble {
        max-width: 100%;
    }

    .board-chat {
        position: static;
        width: 100%;
        margin-bottom: 14px;
    }
}

@media (max-width: 560px) {
    .hero-strip {
        grid-template-columns: 1fr;
    }

    .metric-chip {
        min-width: calc(50% - 5px);
    }

    .task-head {
        flex-direction: column;
        gap: 4px;
    }

    .task-card p {
        font-size: 11px;
    }

    .composer-actions {
        gap: 8px;
    }

    .assistant-send-button {
        min-width: 96px;
    }
}

@media (min-width: 761px) {
    .assistant-page {
        padding: 18px 0;
    }

    .assistant-shell {
        min-height: calc(100dvh - 36px);
        border-radius: 34px;
        overflow: hidden;
        border: 1px solid rgba(74, 54, 31, 0.1);
        box-shadow: 0 28px 80px rgba(70, 48, 30, 0.18);
    }
}
