:root {
    --bg: #0f1117;
    --surface: #161b22;
    --surface-2: #1f2630;
    --surface-3: #263040;
    --text: #e6edf3;
    --text-muted: #9da7b3;
    --border: #30363d;
    --primary: #2f81f7;
    --primary-hover: #1f6feb;
    --success: #3fb950;
    --success-hover: #2ea043;
    --warning: #d29922;
    --danger: #f85149;
    --info: #39c5cf;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    padding: 10px 12px;
    margin-bottom: 12px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
    padding: 24px;
    text-align: center;
}

.login-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.login-card h1 {
    font-size: 20px;
    margin-bottom: 18px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-guest,
.auth-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-user {
    justify-content: flex-start;
}

.file-auth-user {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-3);
}

.auth-user-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-guest input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
}

.auth-error {
    color: #ffa198;
    font-size: 12px;
    min-height: 16px;
}

header {
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

header h1 {
    color: var(--text);
}

nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--surface-2);
}

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

.chat-toggle-btn {
    margin-left: auto;
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.chat-toggle-btn:hover {
    background: var(--success-hover);
}

.main-wrapper {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.file-panel {
    width: 320px;
    min-width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.file-panel-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.file-panel-header h3 {
    font-size: 15px;
}

.file-toolbar {
    display: flex;
    gap: 8px;
}

.file-toolbar button {
    padding: 6px 10px;
    font-size: 12px;
}


.workspace-breadcrumb {
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-drop-tip {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--border);
    transition: all 0.15s ease;
}

.workspace-drop-tip.drag-over {
    color: #79c0ff;
    background: rgba(47, 129, 247, 0.08);
    border-bottom-color: rgba(47, 129, 247, 0.5);
}

.workspace-files {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
    transition: background 0.15s ease, outline-color 0.15s ease;
}

.workspace-files.drag-over {
    background: rgba(47, 129, 247, 0.08);
    outline: 2px dashed rgba(47, 129, 247, 0.6);
    outline-offset: -6px;
}

.workspace-item {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-2);
    margin-bottom: 8px;
    padding: 8px;
}

.workspace-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.workspace-item-name {
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-item-name.directory {
    color: #79c0ff;
    font-weight: 600;
}

.workspace-item-name.file {
    color: var(--text);
}

.workspace-item-meta {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 11px;
}

.workspace-context-menu {
    position: fixed;
    z-index: 2000;
    display: none;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    overflow: hidden;
}

.workspace-context-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
}

.workspace-context-menu-item:hover {
    background: var(--surface-3);
}

.workspace-context-menu-item.danger {
    color: #ffa198;
}

.workspace-context-menu-item.danger:hover {
    background: rgba(248, 81, 73, 0.16);
}

.workspace-empty {
    color: var(--text-muted);
    font-size: 12px;
    padding: 8px;
}

main {
    flex: 1;
    min-width: 0;
}

#chat-panel {
    min-width: 380px;
}

@media (max-width: 1400px) {
    .file-panel {
        width: 280px;
        min-width: 240px;
    }

    #chat-panel {
        min-width: 320px;
    }
}

@media (max-width: 1100px) {
    .main-wrapper {
        flex-direction: column;
    }

    .file-panel,
    #chat-panel {
        width: 100%;
        min-width: 0;
    }
}

.tab-content {
    display: none;
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    height: 100%;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
}

.form-group textarea {
    resize: vertical;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.crawler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.crawler-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    background: var(--surface-2);
    transition: box-shadow 0.2s;
    position: relative;
}

.crawler-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.crawler-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.crawler-card h3 {
    margin: 0;
    color: var(--text);
}

.crawler-card-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-run-icon,
.btn-more,
.run-spinner {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-run-icon,
.btn-more {
    cursor: pointer;
}

.run-spinner::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #79c0ff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: run-spin 0.8s linear infinite;
}

.btn-run-icon:hover,
.btn-more:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-run-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-more {
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.crawler-menu {
    position: absolute;
    top: 34px;
    right: 0;
    min-width: 120px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    display: none;
    overflow: hidden;
    z-index: 50;
}

.crawler-menu.open {
    display: block;
}

.crawler-menu button {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 9px 12px;
    font-size: 12px;
    cursor: pointer;
}

.crawler-menu button:hover {
    background: var(--surface-3);
}

.crawler-menu button.danger {
    color: #ffa198;
}

.crawler-menu button.danger:hover {
    background: rgba(248, 81, 73, 0.16);
}

.crawler-card .status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 10px;
}

.status.active { background: rgba(63, 185, 80, 0.18); color: #7ee787; }
.status.inactive { background: rgba(157, 167, 179, 0.16); color: #9da7b3; }
.status.pending { background: rgba(210, 153, 34, 0.2); color: #e3b341; }
.status.running { background: rgba(47, 129, 247, 0.2); color: #79c0ff; }
.status.failed { background: rgba(248, 81, 73, 0.2); color: #ffa198; }

.btn-edit { background: var(--warning); color: #111; }
.btn-schedule { background: var(--info); color: #041014; }
.btn-delete { background: var(--danger); color: #fff; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: var(--surface);
    margin: 50px auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    color: var(--text);
}

.close {
    float: right;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-muted);
}

.code-preview {
    background: #2d2d2d;
    color: #f8f8f2;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    min-height: 420px;
    max-height: 65vh;
    overflow: auto;
}

.code-preview code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
}

.code-editor {
    width: 100%;
    min-height: 300px;
    font-family: 'Monaco', 'Menlo', monospace;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
}

.schedule-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--surface-2);
}

.schedule-item h3 {
    margin-bottom: 10px;
}

.cron-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cron-inputs input {
    width: 60px;
    padding: 5px;
    text-align: center;
}

.logs-container {
    max-height: 300px;
    overflow-y: auto;
    background: var(--surface-2);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-family: monospace;
    font-size: 12px;
}

.log-entry {
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
}

.log-entry.ERROR { color: #dc3545; }
.log-entry.WARNING { color: #ffc107; }
.log-entry.INFO { color: #28a745; }

/* Chat Panel Styles */
.chat-panel {
    width: 50%;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    transition: width 0.3s, opacity 0.3s;
    overflow: hidden;
}

.chat-panel.collapsed {
    width: 0;
    opacity: 0;
    border: none;
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--surface-3);
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.chat-panel-header h3 {
    font-size: 16px;
}

.chat-panel-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: var(--surface-2);
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-message.user {
    background: var(--primary);
    color: #fff;
    margin-left: auto;
}

.chat-message.assistant {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    margin-right: auto;
}

.chat-message .md-content p {
    margin: 0;
}

.chat-message .md-content p + p {
    margin-top: 8px;
}

.chat-message .md-content h1,
.chat-message .md-content h2,
.chat-message .md-content h3 {
    margin: 8px 0;
    line-height: 1.3;
}

.chat-message .md-content ul,
.chat-message .md-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.chat-message .md-content li {
    margin: 4px 0;
}

.chat-message .md-content blockquote {
    margin: 8px 0;
    padding: 8px 12px;
    border-left: 3px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
}

.chat-message .md-content blockquote p {
    margin: 0;
}

.chat-message.user .md-content blockquote {
    border-left-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.chat-message.user .md-content h1,
.chat-message.user .md-content h2,
.chat-message.user .md-content h3,
.chat-message.user .md-content p,
.chat-message.user .md-content li,
.chat-message.user .md-content strong,
.chat-message.user .md-content em,
.chat-message.user .md-content code {
    color: #fff;
}

.chat-message.user .md-content code {
    background: rgba(255, 255, 255, 0.2);
}

.chat-message.user .md-content ul,
.chat-message.user .md-content ol {
    color: #fff;
}

.chat-message.user .md-content a {
    color: #fff;
}

.chat-message.user .md-content a:visited {
    color: #fff;
}

.chat-message.user .md-content a:hover {
    color: #f8f9fa;
}

.chat-message.user .md-content a:active {
    color: #e9ecef;
}

.chat-message.user .md-content a:focus {
    color: #fff;
}

.chat-message.user .md-content a:focus-visible {
    color: #fff;
}

.chat-message.user .md-content a:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.chat-message.user .md-content a:focus {
    outline: none;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-thickness: 2px;
}

.chat-message.user .md-content a:focus-visible {
    text-underline-offset: 2px;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-color: rgba(255, 255, 255, 0.9);
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-style: solid;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-line: underline;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-skip-ink: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration: underline;
}

.chat-message.user .md-content a:focus-visible {
    border-radius: 2px;
}

.chat-message.user .md-content a:focus-visible {
    box-shadow: none;
}

.chat-message.user .md-content a:focus-visible {
    background: transparent;
}

.chat-message.user .md-content a:focus-visible {
    padding: 0;
}

.chat-message.user .md-content a:focus-visible {
    margin: 0;
}

.chat-message.user .md-content a:focus-visible {
    border: none;
}

.chat-message.user .md-content a:focus-visible {
    font-weight: inherit;
}

.chat-message.user .md-content a:focus-visible {
    line-height: inherit;
}

.chat-message.user .md-content a:focus-visible {
    vertical-align: baseline;
}

.chat-message.user .md-content a:focus-visible {
    white-space: normal;
}

.chat-message.user .md-content a:focus-visible {
    word-break: break-word;
}

.chat-message.user .md-content a:focus-visible {
    overflow-wrap: anywhere;
}

.chat-message.user .md-content a:focus-visible {
    cursor: pointer;
}

.chat-message.user .md-content a:focus-visible {
    opacity: 1;
}

.chat-message.user .md-content a:focus-visible {
    filter: none;
}

.chat-message.user .md-content a:focus-visible {
    transform: none;
}

.chat-message.user .md-content a:focus-visible {
    transition: none;
}

.chat-message.user .md-content a:focus-visible {
    pointer-events: auto;
}

.chat-message.user .md-content a:focus-visible {
    user-select: text;
}

.chat-message.user .md-content a:focus-visible {
    -webkit-tap-highlight-color: transparent;
}

.chat-message.user .md-content a:focus-visible {
    text-rendering: optimizeLegibility;
}

.chat-message.user .md-content a:focus-visible {
    -webkit-font-smoothing: antialiased;
}

.chat-message.user .md-content a:focus-visible {
    -moz-osx-font-smoothing: grayscale;
}

.chat-message.user .md-content a:focus-visible {
    font-synthesis: none;
}

.chat-message.user .md-content a:focus-visible {
    contain: none;
}

.chat-message.user .md-content a:focus-visible {
    isolation: auto;
}

.chat-message.user .md-content a:focus-visible {
    mix-blend-mode: normal;
}

.chat-message.user .md-content a:focus-visible {
    clip-path: none;
}

.chat-message.user .md-content a:focus-visible {
    mask: none;
}

.chat-message.user .md-content a:focus-visible {
    backdrop-filter: none;
}

.chat-message.user .md-content a:focus-visible {
    text-transform: none;
}

.chat-message.user .md-content a:focus-visible {
    letter-spacing: normal;
}

.chat-message.user .md-content a:focus-visible {
    word-spacing: normal;
}

.chat-message.user .md-content a:focus-visible {
    direction: inherit;
}

.chat-message.user .md-content a:focus-visible {
    unicode-bidi: normal;
}

.chat-message.user .md-content a:focus-visible {
    writing-mode: horizontal-tb;
}

.chat-message.user .md-content a:focus-visible {
    text-orientation: mixed;
}

.chat-message.user .md-content a:focus-visible {
    text-align: inherit;
}

.chat-message.user .md-content a:focus-visible {
    text-indent: 0;
}

.chat-message.user .md-content a:focus-visible {
    display: inline;
}

.chat-message.user .md-content a:focus-visible {
    position: static;
}

.chat-message.user .md-content a:focus-visible {
    top: auto;
}

.chat-message.user .md-content a:focus-visible {
    right: auto;
}

.chat-message.user .md-content a:focus-visible {
    bottom: auto;
}

.chat-message.user .md-content a:focus-visible {
    left: auto;
}

.chat-message.user .md-content a:focus-visible {
    z-index: auto;
}

.chat-message.user .md-content a:focus-visible {
    float: none;
}

.chat-message.user .md-content a:focus-visible {
    clear: none;
}

.chat-message.user .md-content a:focus-visible {
    min-width: 0;
}

.chat-message.user .md-content a:focus-visible {
    min-height: 0;
}

.chat-message.user .md-content a:focus-visible {
    max-width: none;
}

.chat-message.user .md-content a:focus-visible {
    max-height: none;
}

.chat-message.user .md-content a:focus-visible {
    width: auto;
}

.chat-message.user .md-content a:focus-visible {
    height: auto;
}

.chat-message.user .md-content a:focus-visible {
    flex: 0 1 auto;
}

.chat-message.user .md-content a:focus-visible {
    align-self: auto;
}

.chat-message.user .md-content a:focus-visible {
    justify-self: auto;
}

.chat-message.user .md-content a:focus-visible {
    order: 0;
}

.chat-message.user .md-content a:focus-visible {
    grid-column: auto;
}

.chat-message.user .md-content a:focus-visible {
    grid-row: auto;
}

.chat-message.user .md-content a:focus-visible {
    place-self: auto;
}

.chat-message.user .md-content a:focus-visible {
    align-items: normal;
}

.chat-message.user .md-content a:focus-visible {
    justify-items: normal;
}

.chat-message.user .md-content a:focus-visible {
    align-content: normal;
}

.chat-message.user .md-content a:focus-visible {
    justify-content: normal;
}

.chat-message.user .md-content a:focus-visible {
    gap: normal;
}

.chat-message.user .md-content a:focus-visible {
    row-gap: normal;
}

.chat-message.user .md-content a:focus-visible {
    column-gap: normal;
}

.chat-message.user .md-content a:focus-visible {
    overflow: visible;
}

.chat-message.user .md-content a:focus-visible {
    text-overflow: clip;
}

.chat-message.user .md-content a:focus-visible {
    max-inline-size: none;
}

.chat-message.user .md-content a:focus-visible {
    max-block-size: none;
}

.chat-message.user .md-content a:focus-visible {
    inline-size: auto;
}

.chat-message.user .md-content a:focus-visible {
    block-size: auto;
}

.chat-message.user .md-content a:focus-visible {
    inset: auto;
}

.chat-message.user .md-content a:focus-visible {
    inset-inline: auto;
}

.chat-message.user .md-content a:focus-visible {
    inset-block: auto;
}

.chat-message.user .md-content a:focus-visible {
    margin-inline: 0;
}

.chat-message.user .md-content a:focus-visible {
    margin-block: 0;
}

.chat-message.user .md-content a:focus-visible {
    padding-inline: 0;
}

.chat-message.user .md-content a:focus-visible {
    padding-block: 0;
}

.chat-message.user .md-content a:focus-visible {
    border-inline: none;
}

.chat-message.user .md-content a:focus-visible {
    border-block: none;
}

.chat-message.user .md-content a:focus-visible {
    outline-width: 1px;
}

.chat-message.user .md-content a:focus-visible {
    outline-style: solid;
}

.chat-message.user .md-content a:focus-visible {
    outline-color: rgba(255, 255, 255, 0.8);
}

.chat-message.user .md-content a:focus-visible {
    outline-offset: 2px;
}

.chat-message.user .md-content a:focus-visible {
    border-image: none;
}

.chat-message.user .md-content a:focus-visible {
    border-image-source: none;
}

.chat-message.user .md-content a:focus-visible {
    border-image-slice: 100%;
}

.chat-message.user .md-content a:focus-visible {
    border-image-width: 1;
}

.chat-message.user .md-content a:focus-visible {
    border-image-outset: 0;
}

.chat-message.user .md-content a:focus-visible {
    border-image-repeat: stretch;
}

.chat-message.user .md-content a:focus-visible {
    background-clip: border-box;
}

.chat-message.user .md-content a:focus-visible {
    background-origin: padding-box;
}

.chat-message.user .md-content a:focus-visible {
    background-size: auto;
}

.chat-message.user .md-content a:focus-visible {
    background-repeat: repeat;
}

.chat-message.user .md-content a:focus-visible {
    background-position: 0 0;
}

.chat-message.user .md-content a:focus-visible {
    background-attachment: scroll;
}

.chat-message.user .md-content a:focus-visible {
    isolation: isolate;
}

.chat-message.user .md-content a:focus-visible {
    contain: content;
}

.chat-message.user .md-content a:focus-visible {
    will-change: auto;
}

.chat-message.user .md-content a:focus-visible {
    content-visibility: visible;
}

.chat-message.user .md-content a:focus-visible {
    visibility: visible;
}

.chat-message.user .md-content a:focus-visible {
    clip: auto;
}

.chat-message.user .md-content a:focus-visible {
    perspective: none;
}

.chat-message.user .md-content a:focus-visible {
    perspective-origin: 50% 50%;
}

.chat-message.user .md-content a:focus-visible {
    transform-origin: 50% 50%;
}

.chat-message.user .md-content a:focus-visible {
    transform-style: flat;
}

.chat-message.user .md-content a:focus-visible {
    backface-visibility: visible;
}

.chat-message.user .md-content a:focus-visible {
    animation: none;
}

.chat-message.user .md-content a:focus-visible {
    animation-name: none;
}

.chat-message.user .md-content a:focus-visible {
    animation-duration: 0s;
}

.chat-message.user .md-content a:focus-visible {
    animation-timing-function: ease;
}

.chat-message.user .md-content a:focus-visible {
    animation-delay: 0s;
}

.chat-message.user .md-content a:focus-visible {
    animation-iteration-count: 1;
}

.chat-message.user .md-content a:focus-visible {
    animation-direction: normal;
}

.chat-message.user .md-content a:focus-visible {
    animation-fill-mode: none;
}

.chat-message.user .md-content a:focus-visible {
    animation-play-state: running;
}

.chat-message.user .md-content a:focus-visible {
    transition-property: none;
}

.chat-message.user .md-content a:focus-visible {
    transition-duration: 0s;
}

.chat-message.user .md-content a:focus-visible {
    transition-timing-function: ease;
}

.chat-message.user .md-content a:focus-visible {
    transition-delay: 0s;
}

.chat-message.user .md-content a:focus-visible {
    scroll-behavior: auto;
}

.chat-message.user .md-content a:focus-visible {
    scroll-margin: 0;
}

.chat-message.user .md-content a:focus-visible {
    scroll-padding: 0;
}

.chat-message.user .md-content a:focus-visible {
    overscroll-behavior: auto;
}

.chat-message.user .md-content a:focus-visible {
    touch-action: auto;
}

.chat-message.user .md-content a:focus-visible {
    caret-color: auto;
}

.chat-message.user .md-content a:focus-visible {
    accent-color: auto;
}

.chat-message.user .md-content a:focus-visible {
    columns: auto;
}

.chat-message.user .md-content a:focus-visible {
    column-count: auto;
}

.chat-message.user .md-content a:focus-visible {
    column-fill: balance;
}

.chat-message.user .md-content a:focus-visible {
    column-gap: normal;
}

.chat-message.user .md-content a:focus-visible {
    column-rule: none;
}

.chat-message.user .md-content a:focus-visible {
    column-rule-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    column-rule-style: none;
}

.chat-message.user .md-content a:focus-visible {
    column-rule-width: medium;
}

.chat-message.user .md-content a:focus-visible {
    column-span: none;
}

.chat-message.user .md-content a:focus-visible {
    column-width: auto;
}

.chat-message.user .md-content a:focus-visible {
    page-break-before: auto;
}

.chat-message.user .md-content a:focus-visible {
    page-break-after: auto;
}

.chat-message.user .md-content a:focus-visible {
    page-break-inside: auto;
}

.chat-message.user .md-content a:focus-visible {
    break-before: auto;
}

.chat-message.user .md-content a:focus-visible {
    break-after: auto;
}

.chat-message.user .md-content a:focus-visible {
    break-inside: auto;
}

.chat-message.user .md-content a:focus-visible {
    orphans: 2;
}

.chat-message.user .md-content a:focus-visible {
    widows: 2;
}

.chat-message.user .md-content a:focus-visible {
    hyphens: manual;
}

.chat-message.user .md-content a:focus-visible {
    tab-size: 8;
}

.chat-message.user .md-content a:focus-visible {
    quotes: auto;
}

.chat-message.user .md-content a:focus-visible {
    counter-reset: none;
}

.chat-message.user .md-content a:focus-visible {
    counter-increment: none;
}

.chat-message.user .md-content a:focus-visible {
    list-style: none;
}

.chat-message.user .md-content a:focus-visible {
    list-style-type: disc;
}

.chat-message.user .md-content a:focus-visible {
    list-style-position: outside;
}

.chat-message.user .md-content a:focus-visible {
    list-style-image: none;
}

.chat-message.user .md-content a:focus-visible {
    marker: auto;
}

.chat-message.user .md-content a:focus-visible {
    alignment-baseline: baseline;
}

.chat-message.user .md-content a:focus-visible {
    baseline-shift: baseline;
}

.chat-message.user .md-content a:focus-visible {
    dominant-baseline: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-anchor: start;
}

.chat-message.user .md-content a:focus-visible {
    vector-effect: none;
}

.chat-message.user .md-content a:focus-visible {
    stop-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    stop-opacity: 1;
}

.chat-message.user .md-content a:focus-visible {
    flood-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    flood-opacity: 1;
}

.chat-message.user .md-content a:focus-visible {
    lighting-color: rgb(255, 255, 255);
}

.chat-message.user .md-content a:focus-visible {
    color-interpolation: srgb;
}

.chat-message.user .md-content a:focus-visible {
    color-interpolation-filters: linearRGB;
}

.chat-message.user .md-content a:focus-visible {
    color-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    shape-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    image-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    glyph-orientation-horizontal: 0deg;
}

.chat-message.user .md-content a:focus-visible {
    glyph-orientation-vertical: auto;
}

.chat-message.user .md-content a:focus-visible {
    kerning: auto;
}

.chat-message.user .md-content a:focus-visible {
    font-kerning: auto;
}

.chat-message.user .md-content a:focus-visible {
    font-feature-settings: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variation-settings: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-optical-sizing: auto;
}

.chat-message.user .md-content a:focus-visible {
    font-size-adjust: none;
}

.chat-message.user .md-content a:focus-visible {
    font-stretch: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-style: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-weight: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant-caps: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant-east-asian: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant-ligatures: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant-numeric: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant-position: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-family: inherit;
}

.chat-message.user .md-content a:focus-visible {
    line-break: auto;
}

.chat-message.user .md-content a:focus-visible {
    hanging-punctuation: none;
}

.chat-message.user .md-content a:focus-visible {
    text-justify: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-combine-upright: none;
}

.chat-message.user .md-content a:focus-visible {
    text-emphasis: none;
}

.chat-message.user .md-content a:focus-visible {
    text-emphasis-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    text-emphasis-position: over right;
}

.chat-message.user .md-content a:focus-visible {
    text-emphasis-style: none;
}

.chat-message.user .md-content a:focus-visible {
    text-size-adjust: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-spacing: normal;
}

.chat-message.user .md-content a:focus-visible {
    ruby-align: space-around;
}

.chat-message.user .md-content a:focus-visible {
    ruby-merge: separate;
}

.chat-message.user .md-content a:focus-visible {
    ruby-position: over;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-skip: objects;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-skip-ink: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-underline-position: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-thickness: from-font;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-style: solid;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-line: underline;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration: underline;
}

.chat-message.user .md-content a:focus-visible {
    text-transform: none;
}

.chat-message.user .md-content a:focus-visible {
    text-shadow: none;
}

.chat-message.user .md-content a:focus-visible {
    text-overflow: clip;
}

.chat-message.user .md-content a:focus-visible {
    vertical-align: baseline;
}

.chat-message.user .md-content a:focus-visible {
    white-space: normal;
}

.chat-message.user .md-content a:focus-visible {
    word-break: normal;
}

.chat-message.user .md-content a:focus-visible {
    overflow-wrap: normal;
}

.chat-message.user .md-content a:focus-visible {
    word-wrap: normal;
}

.chat-message.user .md-content a:focus-visible {
    zoom: normal;
}

.chat-message.user .md-content a:focus-visible {
    box-decoration-break: slice;
}

.chat-message.user .md-content a:focus-visible {
    box-shadow: none;
}

.chat-message.user .md-content a:focus-visible {
    box-sizing: content-box;
}

.chat-message.user .md-content a:focus-visible {
    caption-side: top;
}

.chat-message.user .md-content a:focus-visible {
    clear: none;
}

.chat-message.user .md-content a:focus-visible {
    clip-path: none;
}

.chat-message.user .md-content a:focus-visible {
    color: #fff;
}

.chat-message.user .md-content a:focus-visible {
    contain: none;
}

.chat-message.user .md-content a:focus-visible {
    cursor: pointer;
}

.chat-message.user .md-content a:focus-visible {
    display: inline;
}

.chat-message.user .md-content a:focus-visible {
    filter: none;
}

.chat-message.user .md-content a:focus-visible {
    float: none;
}

.chat-message.user .md-content a:focus-visible {
    height: auto;
}

.chat-message.user .md-content a:focus-visible {
    left: auto;
}

.chat-message.user .md-content a:focus-visible {
    letter-spacing: normal;
}

.chat-message.user .md-content a:focus-visible {
    line-height: inherit;
}

.chat-message.user .md-content a:focus-visible {
    margin: 0;
}

.chat-message.user .md-content a:focus-visible {
    max-height: none;
}

.chat-message.user .md-content a:focus-visible {
    max-width: none;
}

.chat-message.user .md-content a:focus-visible {
    min-height: 0;
}

.chat-message.user .md-content a:focus-visible {
    min-width: 0;
}

.chat-message.user .md-content a:focus-visible {
    opacity: 1;
}

.chat-message.user .md-content a:focus-visible {
    outline: none;
}

.chat-message.user .md-content a:focus-visible {
    overflow: visible;
}

.chat-message.user .md-content a:focus-visible {
    padding: 0;
}

.chat-message.user .md-content a:focus-visible {
    position: static;
}

.chat-message.user .md-content a:focus-visible {
    right: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-align: inherit;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration: underline;
}

.chat-message.user .md-content a:focus-visible {
    text-indent: 0;
}

.chat-message.user .md-content a:focus-visible {
    top: auto;
}

.chat-message.user .md-content a:focus-visible {
    transform: none;
}

.chat-message.user .md-content a:focus-visible {
    transition: none;
}

.chat-message.user .md-content a:focus-visible {
    user-select: text;
}

.chat-message.user .md-content a:focus-visible {
    visibility: visible;
}

.chat-message.user .md-content a:focus-visible {
    width: auto;
}

.chat-message.user .md-content a:focus-visible {
    z-index: auto;
}

.chat-message.user .md-content a:focus-visible {
    word-break: break-word;
}

.chat-message.user .md-content a:focus-visible {
    overflow-wrap: anywhere;
}

.chat-message.user .md-content a:focus-visible {
    white-space: normal;
}

.chat-message.user .md-content a:focus-visible {
    line-break: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-rendering: optimizeLegibility;
}

.chat-message.user .md-content a:focus-visible {
    -webkit-font-smoothing: antialiased;
}

.chat-message.user .md-content a:focus-visible {
    -moz-osx-font-smoothing: grayscale;
}

.chat-message.user .md-content a:focus-visible {
    font-synthesis: none;
}

.chat-message.user .md-content a:focus-visible {
    isolation: auto;
}

.chat-message.user .md-content a:focus-visible {
    mix-blend-mode: normal;
}

.chat-message.user .md-content a:focus-visible {
    background: transparent;
}

.chat-message.user .md-content a:focus-visible {
    border: none;
}

.chat-message.user .md-content a:focus-visible {
    border-radius: 2px;
}

.chat-message.user .md-content a:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.8);
}

.chat-message.user .md-content a:focus-visible {
    outline-offset: 2px;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-thickness: 2px;
}

.chat-message.user .md-content a:focus-visible {
    text-underline-offset: 2px;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-color: rgba(255, 255, 255, 0.9);
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-style: solid;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-line: underline;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration-skip-ink: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-decoration: underline;
}

.chat-message.user .md-content a:focus-visible {
    cursor: pointer;
}

.chat-message.user .md-content a:focus-visible {
    pointer-events: auto;
}

.chat-message.user .md-content a:focus-visible {
    background-clip: border-box;
}

.chat-message.user .md-content a:focus-visible {
    background-origin: padding-box;
}

.chat-message.user .md-content a:focus-visible {
    background-size: auto;
}

.chat-message.user .md-content a:focus-visible {
    background-repeat: repeat;
}

.chat-message.user .md-content a:focus-visible {
    background-position: 0 0;
}

.chat-message.user .md-content a:focus-visible {
    background-attachment: scroll;
}

.chat-message.user .md-content a:focus-visible {
    caret-color: auto;
}

.chat-message.user .md-content a:focus-visible {
    accent-color: auto;
}

.chat-message.user .md-content a:focus-visible {
    box-decoration-break: slice;
}

.chat-message.user .md-content a:focus-visible {
    clip: auto;
}

.chat-message.user .md-content a:focus-visible {
    clip-path: none;
}

.chat-message.user .md-content a:focus-visible {
    mask: none;
}

.chat-message.user .md-content a:focus-visible {
    backdrop-filter: none;
}

.chat-message.user .md-content a:focus-visible {
    perspective: none;
}

.chat-message.user .md-content a:focus-visible {
    perspective-origin: 50% 50%;
}

.chat-message.user .md-content a:focus-visible {
    transform-origin: 50% 50%;
}

.chat-message.user .md-content a:focus-visible {
    transform-style: flat;
}

.chat-message.user .md-content a:focus-visible {
    backface-visibility: visible;
}

.chat-message.user .md-content a:focus-visible {
    animation: none;
}

.chat-message.user .md-content a:focus-visible {
    transition: none;
}

.chat-message.user .md-content a:focus-visible {
    scroll-behavior: auto;
}

.chat-message.user .md-content a:focus-visible {
    touch-action: auto;
}

.chat-message.user .md-content a:focus-visible {
    hyphens: manual;
}

.chat-message.user .md-content a:focus-visible {
    tab-size: 8;
}

.chat-message.user .md-content a:focus-visible {
    quotes: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-shadow: none;
}

.chat-message.user .md-content a:focus-visible {
    vertical-align: baseline;
}

.chat-message.user .md-content a:focus-visible {
    zoom: normal;
}

.chat-message.user .md-content a:focus-visible {
    will-change: auto;
}

.chat-message.user .md-content a:focus-visible {
    content-visibility: visible;
}

.chat-message.user .md-content a:focus-visible {
    contain: none;
}

.chat-message.user .md-content a:focus-visible {
    isolation: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-size-adjust: auto;
}

.chat-message.user .md-content a:focus-visible {
    word-spacing: normal;
}

.chat-message.user .md-content a:focus-visible {
    letter-spacing: normal;
}

.chat-message.user .md-content a:focus-visible {
    text-transform: none;
}

.chat-message.user .md-content a:focus-visible {
    direction: inherit;
}

.chat-message.user .md-content a:focus-visible {
    unicode-bidi: normal;
}

.chat-message.user .md-content a:focus-visible {
    writing-mode: horizontal-tb;
}

.chat-message.user .md-content a:focus-visible {
    text-orientation: mixed;
}

.chat-message.user .md-content a:focus-visible {
    alignment-baseline: baseline;
}

.chat-message.user .md-content a:focus-visible {
    dominant-baseline: auto;
}

.chat-message.user .md-content a:focus-visible {
    text-anchor: start;
}

.chat-message.user .md-content a:focus-visible {
    vector-effect: none;
}

.chat-message.user .md-content a:focus-visible {
    stop-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    stop-opacity: 1;
}

.chat-message.user .md-content a:focus-visible {
    flood-color: currentColor;
}

.chat-message.user .md-content a:focus-visible {
    flood-opacity: 1;
}

.chat-message.user .md-content a:focus-visible {
    lighting-color: rgb(255, 255, 255);
}

.chat-message.user .md-content a:focus-visible {
    color-interpolation: srgb;
}

.chat-message.user .md-content a:focus-visible {
    color-interpolation-filters: linearRGB;
}

.chat-message.user .md-content a:focus-visible {
    color-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    shape-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    image-rendering: auto;
}

.chat-message.user .md-content a:focus-visible {
    glyph-orientation-horizontal: 0deg;
}

.chat-message.user .md-content a:focus-visible {
    glyph-orientation-vertical: auto;
}

.chat-message.user .md-content a:focus-visible {
    kerning: auto;
}

.chat-message.user .md-content a:focus-visible {
    font-kerning: auto;
}

.chat-message.user .md-content a:focus-visible {
    font-feature-settings: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variation-settings: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-optical-sizing: auto;
}

.chat-message.user .md-content a:focus-visible {
    font-size-adjust: none;
}

.chat-message.user .md-content a:focus-visible {
    font-stretch: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-style: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-weight: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-variant: normal;
}

.chat-message.user .md-content a:focus-visible {
    font-family: inherit;
}

.chat-message.user .md-content a:focus-visible {
    list-style: none;
}

.chat-message.user .md-content a:focus-visible {
    columns: auto;
}

.chat-message.user .md-content a:focus-visible {
    column-count: auto;
}

.chat-message.user .md-content a:focus-visible {
    column-width: auto;
}

.chat-message.user .md-content a:focus-visible {
    page-break-before: auto;
}

.chat-message.user .md-content a:focus-visible {
    page-break-after: auto;
}

.chat-message.user .md-content a:focus-visible {
    page-break-inside: auto;
}

.chat-message.user .md-content a:focus-visible {
    break-before: auto;
}

.chat-message.user .md-content a:focus-visible {
    break-after: auto;
}

.chat-message.user .md-content a:focus-visible {
    break-inside: auto;
}

.chat-message.user .md-content a:focus-visible {
    orphans: 2;
}

.chat-message.user .md-content a:focus-visible {
    widows: 2;
}

.chat-message.user .md-content a:focus-visible {
    counter-reset: none;
}

.chat-message.user .md-content a:focus-visible {
    counter-increment: none;
}

.chat-message.user .md-content a:focus-visible {
    marker: auto;
}

.chat-message pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.chat-message code {
    white-space: pre-wrap;
}

.code-token-keyword { color: #ff79c6; font-weight: 600; }
.code-token-string { color: #f1fa8c; }
.code-token-number { color: #bd93f9; }
.code-token-comment { color: #6272a4; font-style: italic; }

.chat-message pre code {
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
}

.chat-message .md-content code {
    background: rgba(240, 246, 252, 0.12);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
}

.chat-message .md-content a {
    color: #79c0ff;
    text-decoration: underline;
}

.chat-message.user .md-content a {
    color: #fff;
}

.chat-suggestions {
    padding: 15px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.chat-suggestions p {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.chat-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chat-suggestions li {
    margin-bottom: 8px;
}

.chat-suggestions button {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.chat-suggestions button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.chat-input-area {
    position: sticky;
    bottom: 12px;
    margin: 15px 15px 15px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    z-index: 3;
}

.chat-container {
    margin-bottom: 0;
}

.chat-messages {
    padding-bottom: 15px;
}

.crawler-name-input {
    margin-bottom: 10px;
}

.crawler-name-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
}

.chat-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-row textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
    resize: none;
    font-family: inherit;
    font-size: 14px;
}

.chat-input-row .btn-primary {
    height: auto;
    padding: 10px 20px;
}

.chat-send-icon {
    width: 31px;
    height: 31px;
    margin: 12px 12px 12px 4px;
}

.chat-send-icon {
    transition: transform 0.15s ease;
}

.chat-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-secondary {
    background: #4b5563;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #374151;
}

.btn-success {
    background: var(--success);
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-success:hover {
    background: var(--success-hover);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

@keyframes run-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}