        :root {
            /* Spectrum-ish palette */
            --bg-dark: #071827;
            --bg-darker: #040d16;
            --bg-card: #0f2539;
            --accent-blue: #1f8fff;
            --accent-teal: #00c1b2;
            --accent-soft: #3a8ad6;
            --text-main: #ffffff;
            --text-muted: #b4c4d8;
            --border-subtle: #1f3347;
            --error-red: #ff5a5a;

            --radius-lg: 18px;
            --radius-md: 12px;
            --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            background: radial-gradient(circle at top, #163656 0, #040b12 55%, #010509 100%);
            color: var(--text-main);
            display: flex;
            flex-direction: column;
        }

        header {
            padding: 18px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            background: linear-gradient(90deg, rgba(10,25,43,0.95), rgba(10,25,43,0.85));
            backdrop-filter: blur(10px);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo-icon {
            width: 32px;
            height: 32px;
            border-radius: 10px;
            background: radial-gradient(circle at 25% 25%, var(--accent-teal), var(--accent-blue));
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 0 16px rgba(31, 143, 255, 0.5);
            font-weight: 800;
            font-size: 20px;
        }

        .logo-text-main {
            font-weight: 700;
            letter-spacing: 0.03em;
        }

        .logo-text-sub {
            font-size: 11px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.15em;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 14px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 999px;
            background: rgba(0, 193, 178, 0.12);
            color: var(--accent-teal);
            font-size: 12px;
            border: 1px solid rgba(0, 193, 178, 0.4);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-teal);
            box-shadow: 0 0 10px rgba(0, 193, 178, 0.8);
        }

        main {
            flex: 1;
            display: flex;
            justify-content: center;
            padding: 24px;
        }

        .shell {
            width: 100%;
            max-width: 1200px;
            display: grid;
            grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
            gap: 20px;
        }

        @media (max-width: 900px) {
            .shell {
                grid-template-columns: 1fr;
            }
        }

        /* Left info panel */

        .info-card {
            background: linear-gradient(145deg, rgba(8, 26, 45, 0.96), rgba(5, 17, 30, 0.98));
            border-radius: var(--radius-lg);
            padding: 20px 20px 18px;
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-soft);
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .info-header {
            margin-bottom: 6px;
        }

        .info-title {
            font-size: 22px;
            font-weight: 650;
            margin-bottom: 6px;
        }

        .info-subtitle {
            font-size: 13px;
            color: var(--text-muted);
        }

        .info-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 6px;
        }

        .info-badge {
            font-size: 11px;
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            color: var(--text-muted);
            background: radial-gradient(circle at 0 0, rgba(31, 143, 255, 0.18), transparent);
        }

        .info-section-title {
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.16em;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 4px;
            font-size: 13px;
        }

        @media (max-width: 900px) {
            .info-grid {
                grid-template-columns: 1fr;
            }
        }

        .info-grid-item {
            background: radial-gradient(circle at top left, rgba(31,143,255,0.16), rgba(3,12,24,0.95));
            border-radius: var(--radius-md);
            border: 1px solid rgba(255,255,255,0.04);
            padding: 10px 11px;
        }

        .info-grid-title {
            font-weight: 600;
            font-size: 13px;
            margin-bottom: 2px;
        }

        .info-grid-text {
            font-size: 12px;
            color: var(--text-muted);
        }

        .quick-questions {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.05);
        }

        .quick-questions-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 6px;
        }

        .quick-question-btn {
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.14);
            background: rgba(5,18,33,0.7);
            color: var(--accent-soft);
            font-size: 12px;
            padding: 6px 10px;
            cursor: pointer;
            outline: none;
            transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
        }

        .quick-question-btn:hover {
            background: rgba(31,143,255,0.15);
            border-color: rgba(31,143,255,0.7);
            transform: translateY(-1px);
        }

        .quick-question-btn:active {
            transform: translateY(0);
        }

        /* Right chat panel */

        .chat-card {
            background: radial-gradient(circle at top left, rgba(31,143,255,0.21), rgba(2,9,18,0.98));
            border-radius: var(--radius-lg);
            padding: 16px 16px 14px;
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-soft);
            display: flex;
            flex-direction: column;
            min-height: 460px;
        }

        .chat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 4px 10px;
        }

        .chat-header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .avatar {
            width: 32px;
            height: 32px;
            border-radius: 999px;
            background: radial-gradient(circle at 30% 20%, var(--accent-teal), var(--accent-blue));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 700;
            box-shadow: 0 0 12px rgba(31, 143, 255, 0.6);
        }

        .chat-title-block {
            display: flex;
            flex-direction: column;
        }

        .chat-title {
            font-size: 15px;
            font-weight: 600;
        }

        .chat-subtitle {
            font-size: 12px;
            color: var(--text-muted);
        }

        .chat-header-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 4px;
        }

        .connection-status {
            font-size: 11px;
            color: var(--text-muted);
        }

        .connection-status span {
            font-weight: 600;
        }

        .small-pill {
            font-size: 10px;
            padding: 3px 9px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.12);
            color: var(--text-muted);
        }

        .chat-log {
            flex: 1;
            overflow-y: auto;
            padding: 10px 6px 10px;
            margin-bottom: 8px;
            border-radius: var(--radius-md);
            background: radial-gradient(circle at top, rgba(4,14,26,0.75), rgba(1,5,9,0.98));
            border: 1px solid rgba(255,255,255,0.06);
            scroll-behavior: smooth;
        }

        .chat-log::-webkit-scrollbar {
            width: 8px;
        }

        .chat-log::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.02);
        }

        .chat-log::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.13);
            border-radius: 999px;
        }

        .message {
            margin-bottom: 10px;
            display: flex;
        }

        .message.user {
            justify-content: flex-end;
        }

        .message.assistant {
            justify-content: flex-start;
        }

        .bubble {
            max-width: 80%;
            padding: 9px 11px;
            border-radius: 16px;
            font-size: 13px;
            line-height: 1.35;
            border: 1px solid transparent;
        }

        .message.user .bubble {
            background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
            color: #04101c;
            border-color: rgba(0,0,0,0.12);
            border-bottom-right-radius: 4px;
        }

        .message.assistant .bubble {
            background: rgba(7, 22, 38, 0.93);
            border-color: rgba(92,130,170,0.4);
            border-bottom-left-radius: 4px;
            color: var(--text-main);
        }

        .meta-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 3px;
        }

        .typing {
            display: inline-flex;
            gap: 3px;
        }

        .typing span {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--accent-soft);
            animation: blink 1s infinite ease-in-out;
        }

        .typing span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes blink {
            0%, 80%, 100% {
                opacity: 0.15;
                transform: translateY(0);
            }
            40% {
                opacity: 1;
                transform: translateY(-2px);
            }
        }

        .chat-footer {
            border-top: 1px solid rgba(255,255,255,0.08);
            padding-top: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .input-row {
            display: flex;
            gap: 8px;
        }

        .input-wrap {
            flex: 1;
            background: rgba(3, 10, 20, 0.9);
            border-radius: 999px;
            border: 1px solid rgba(122,151,190,0.5);
            display: flex;
            align-items: center;
            padding: 3px 12px;
        }

        .input-wrap input {
            flex: 1;
            border: none;
            outline: none;
            background: transparent;
            color: var(--text-main);
            font-size: 13px;
            padding: 6px 0;
        }

        .input-wrap input::placeholder {
            color: rgba(180,196,216,0.5);
        }

        .send-btn {
            border-radius: 999px;
            padding: 7px 14px;
            border: none;
            outline: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
            color: #04101c;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 10px 24px rgba(15, 106, 204, 0.55);
            transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
        }

        .send-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.05);
            box-shadow: 0 14px 30px rgba(15, 106, 204, 0.7);
        }

        .send-btn:active {
            transform: translateY(0);
            box-shadow: 0 8px 20px rgba(15, 106, 204, 0.4);
        }

        .send-btn[disabled] {
            opacity: 0.6;
            cursor: default;
            box-shadow: none;
            transform: none;
        }

        .footer-hint {
            font-size: 11px;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            gap: 8px;
        }

        .footer-hint span {
            opacity: 0.9;
        }

        .footer-hint strong {
            color: var(--accent-teal);
        }

        .error-text {
            color: var(--error-red);
        }