/* Shared presentation for the public AI portal and the ERP AI workspace. */
.ai-workspace {
    --aw-bg: #ffffff;
    --aw-sidebar: #f7f7f8;
    --aw-panel: #ffffff;
    --aw-soft: #f2f3f5;
    --aw-hover: #e9ebee;
    --aw-ink: #23262d;
    --aw-muted: #747983;
    --aw-line: #e8e9ec;
    --aw-accent: #217558;
    --aw-accent-soft: #eaf5ef;
    --aw-danger: #b33e44;
    --aw-warning: #805b16;
    --aw-shadow: 0 12px 36px rgba(25, 29, 37, .07);
    --aw-sidebar-width: 252px;
    --ai-bg: var(--aw-bg);
    --ai-surface: var(--aw-panel);
    --ai-surface-2: var(--aw-soft);
    --ai-ink: var(--aw-ink);
    --ai-muted: var(--aw-muted);
    --ai-line: var(--aw-line);
    --ai-red: var(--aw-accent);
    --ai-red-dark: var(--aw-accent);
    --ai-blue: var(--aw-accent);
    --ai-green: var(--aw-accent);
    --ai-shadow: var(--aw-shadow);
    --ai-radius: 18px;
    background: var(--aw-bg);
    color: var(--aw-ink);
    display: grid;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    grid-template-columns: var(--aw-sidebar-width) minmax(0, 1fr);
    height: 100vh;
    height: var(--aw-viewport-height, 100dvh);
    line-height: 1.55;
    margin: 0;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
html[data-ai-theme="dark"] .ai-workspace {
    --aw-bg: #202124;
    --aw-sidebar: #17181b;
    --aw-panel: #26272b;
    --aw-soft: #303136;
    --aw-hover: #393b41;
    --aw-ink: #eceef1;
    --aw-muted: #a3a7b0;
    --aw-line: #37393e;
    --aw-accent: #91d4b5;
    --aw-accent-soft: #263f35;
    --aw-danger: #f29c9e;
    --aw-warning: #e3c181;
    --aw-shadow: 0 12px 36px rgba(0, 0, 0, .13);
    color-scheme: dark;
}
.ai-workspace *, .ai-workspace *::before, .ai-workspace *::after { box-sizing: border-box; }
.ai-workspace [hidden] { display: none !important; }
.ai-workspace a { color: inherit; text-decoration: none; }
.ai-workspace button, .ai-workspace input, .ai-workspace textarea, .ai-workspace select { font: inherit; }
.ai-workspace button, .ai-workspace a, .ai-workspace input, .ai-workspace textarea, .ai-workspace select { -webkit-tap-highlight-color: transparent; }
.ai-workspace button { cursor: pointer; }
.ai-workspace button:disabled { cursor: not-allowed; opacity: .45; }
.ai-workspace :focus-visible { outline: 2px solid var(--aw-accent); outline-offset: 4px; }
.ai-workspace h1, .ai-workspace h2, .ai-workspace h3, .ai-workspace h4 { color: var(--aw-ink); font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
.ai-workspace h1 { font-size: clamp(27px, 3.2vw, 40px); }
.ai-workspace h2 { font-size: clamp(22px, 2.5vw, 30px); }
.ai-workspace h3 { font-size: 18px; }
.ai-workspace p { line-height: 1.65; }
.ai-workspace svg { flex-shrink: 0; }
.ai-workspace-sr-only { border: 0 !important; clip: rect(0, 0, 0, 0) !important; height: 1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; white-space: nowrap !important; width: 1px !important; }
.ai-workspace-skip { background: var(--aw-panel); border: 1px solid var(--aw-accent); border-radius: 10px; left: 12px; padding: 12px 18px; position: fixed; top: -100px; z-index: 1000; }
.ai-workspace-skip:focus { top: 12px; }

/* Application navigation. */
.ai-workspace-sidebar { background: var(--aw-sidebar); border-right: 1px solid var(--aw-line); display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; min-width: 0; overflow-y: auto; padding: 20px 12px 12px; position: relative; z-index: 70; }
.ai-workspace-sidebar-head { align-items: center; display: flex; gap: 8px; justify-content: space-between; }
.ai-workspace-brand { align-items: center; display: flex; flex: 1; gap: 10px; min-height: 44px; padding: 2px 10px 18px; }
.ai-workspace-brand-mark { align-items: center; color: var(--aw-accent); display: inline-flex; font-size: 28px; height: 34px; justify-content: center; width: 34px; }
.ai-workspace-brand-mark svg { height: 30px; width: 30px; }
.ai-workspace-brand-name, .ai-workspace-brand-copy strong { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.04em; }
.ai-workspace-brand small, .ai-workspace-brand-copy small { color: var(--aw-muted); display: block; font-size: 10px; font-weight: 500; letter-spacing: .04em; margin-top: 1px; }
.ai-workspace-nav { display: flex; flex-direction: column; gap: 3px; }
.ai-workspace-nav-label { color: var(--aw-muted); display: block; font-size: 10px; font-weight: 600; letter-spacing: .07em; margin: 20px 12px 7px; text-transform: uppercase; }
.ai-workspace .ai-workspace-nav-link { align-items: center; border: 1px solid transparent; border-radius: 10px; color: var(--aw-ink); display: flex; font-size: 13px; font-weight: 450; gap: 11px; line-height: 1.3; min-height: 41px; padding: 10px 12px; transition: background .15s ease; }
.ai-workspace .ai-workspace-nav-link:hover { background: var(--aw-hover); }
.ai-workspace .ai-workspace-nav-link.is-active, .ai-workspace .ai-workspace-nav-link[aria-current="page"] { background: var(--aw-hover); font-weight: 600; }
.ai-workspace-nav-icon, .ai-workspace-nav-link > svg, .ai-workspace-nav-link > i { align-items: center; color: var(--aw-muted); display: inline-flex; font-size: 16px; height: 19px; justify-content: center; width: 19px; }
.ai-workspace-nav-icon svg { height: 18px; width: 18px; }
.ai-workspace-account { border-top: 1px solid var(--aw-line); margin-top: auto; padding: 10px 0 0; }
.ai-workspace-account > summary { align-items: center; border-radius: 10px; cursor: pointer; display: flex; font-size: 12px; font-weight: 500; gap: 10px; list-style: none; min-height: 48px; padding: 10px; }
.ai-workspace-account > summary::-webkit-details-marker { display: none; }
.ai-workspace-account > summary::after { color: var(--aw-muted); content: "⌃"; font-size: 15px; margin-left: auto; }
.ai-workspace-account > summary > svg:last-child, .ai-workspace-account > summary > i:last-child { display: none; }
.ai-workspace-account[open] > summary::after { content: "⌄"; }
.ai-workspace-account > summary:hover { background: var(--aw-hover); }
.ai-workspace-account-avatar, .ai-workspace-avatar { align-items: center; background: var(--aw-hover); border: 1px solid var(--aw-line); border-radius: 50%; display: inline-flex; flex: 0 0 32px; font-size: 12px; font-weight: 650; height: 32px; justify-content: center; overflow: hidden; width: 32px; }
.ai-workspace-account-copy, .ai-workspace-profile-copy { display: grid; font-size: 12px; gap: 2px; min-width: 0; }
.ai-workspace-account-copy strong, .ai-workspace-profile-copy strong { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-workspace-account-copy small, .ai-workspace-profile-copy small, .ai-workspace-company { color: var(--aw-muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-workspace-account-links { display: grid; gap: 2px; padding: 4px; }
.ai-workspace-account-links > a, .ai-workspace-account > a { border-radius: 8px; display: block; font-size: 12px; padding: 9px 12px; }
.ai-workspace-account-links > a:hover, .ai-workspace-account > a:hover { background: var(--aw-hover); }
.ai-workspace-account-links > a { align-items: center; display: flex; gap: 10px; }
.ai-workspace-account-links > a > svg { height: 17px; width: 17px; }
.ai-workspace-sidebar-footer { border-top: 1px solid var(--aw-line); margin-top: auto; padding: 12px 8px 2px; }
.ai-workspace-profile { align-items: center; display: flex; gap: 10px; min-width: 0; }
.ai-workspace-main { background: var(--aw-bg); display: flex; flex-direction: column; height: 100%; margin: 0; max-width: none; min-height: 0; min-width: 0; overflow: hidden; padding: 0; }
.ai-workspace .ai-public-shell { max-width: none; padding: 0; }
.ai-workspace-topbar { align-items: center; background: var(--aw-bg); border-bottom: 1px solid var(--aw-line); display: flex; flex: 0 0 64px; gap: 16px; justify-content: space-between; min-height: 64px; padding: 12px 28px; position: relative; z-index: 35; }
.ai-workspace-topbar-start, .ai-workspace-topbar-actions { align-items: center; display: flex; gap: 10px; min-width: 0; }
.ai-workspace-topbar-title { font-size: 14px; font-weight: 550; letter-spacing: -.02em; }
.ai-workspace .ai-workspace-topbar-title > h1 { font-size: 14px; font-weight: 550; margin: 0; }
.ai-workspace--erp .ai-workspace-topbar-title > span { color: var(--aw-muted); display: block; font-size: 10px; margin-bottom: 2px; }
.ai-workspace--public .ai-workspace-topbar-title { align-items: center; display: flex; gap: 9px; }
.ai-workspace-topbar-title small { color: var(--aw-muted); font-size: 11px; font-weight: 400; margin-left: 7px; }
.ai-workspace .ai-workspace-icon-button { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--aw-muted); display: inline-flex; flex: 0 0 auto; height: 38px; justify-content: center; padding: 9px; width: 38px; }
.ai-workspace .ai-workspace-icon-button:hover { background: var(--aw-soft); color: var(--aw-ink); }
.ai-workspace-icon-button svg { height: 19px; width: 19px; }
.ai-workspace [data-ai-sidebar-toggle], .ai-workspace [data-ai-sidebar-close] { display: none; }
.ai-workspace-page, .ai-workspace-content { flex: 1; min-height: 0; min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 30px clamp(18px, 4vw, 54px) 48px; scrollbar-color: var(--aw-hover) transparent; scrollbar-width: thin; }
.ai-workspace-sidebar-overlay, .ai-workspace-history-overlay { background: rgba(0, 0, 0, .4); border: 0; height: 100%; inset: 0; position: fixed; width: 100%; z-index: 60; }

/* Reuse the existing pages and form hooks under one visual language. */
.ai-workspace .ai-card, .ai-workspace .ai-image-panel, .ai-workspace .simpledot-ai-system .box, .ai-workspace .simpledot-ai-system .info-box, .ai-workspace .simpledot-ai-system .small-box { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 18px; box-shadow: none; color: var(--aw-ink); padding: 22px; }
.ai-workspace .simpledot-ai-system .box { padding: 0; }
.ai-workspace .simpledot-ai-system { --sai-bg: var(--aw-bg); --sai-panel: var(--aw-panel); --sai-panel-2: var(--aw-soft); --sai-ink: var(--aw-ink); --sai-muted: var(--aw-muted); --sai-line: var(--aw-line); --sai-red: var(--aw-accent); --sai-blue: var(--aw-accent); --sai-green: var(--aw-accent); background: transparent; color: var(--aw-ink); margin: 0; padding: 0; }
.ai-workspace .ai-muted, .ai-workspace .simpledot-ai-select-help { color: var(--aw-muted); font-size: 13px; font-weight: 400; line-height: 1.65; }
.ai-workspace .ai-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); min-width: 0; }
.ai-workspace .simpledot-ai-two-panel { display: grid; gap: 20px; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); }
.ai-workspace .ai-grid > *, .ai-workspace .simpledot-ai-two-panel > * { min-width: 0; }
.ai-workspace .simpledot-ai-page-head { align-items: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--aw-ink); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin: 0 0 26px; padding: 0; }
.ai-workspace .simpledot-ai-page-head h2 { color: var(--aw-ink); font-size: 28px; font-weight: 600; letter-spacing: -.04em; }
.ai-workspace .simpledot-ai-page-head p { color: var(--aw-muted); font-size: 13px; font-weight: 400; margin: 6px 0 0; }
.ai-workspace .simpledot-ai-page-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-workspace .simpledot-ai-system .box-header { background: transparent; border-bottom: 1px solid var(--aw-line); padding: 18px 20px; }
.ai-workspace .simpledot-ai-system .box-title { color: var(--aw-ink); font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.ai-workspace .simpledot-ai-system .box-body { padding: 20px; }
.ai-workspace label, .ai-workspace .simpledot-ai-system label { color: var(--aw-muted); display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.5; margin-bottom: 7px; margin-top: 12px; text-transform: none; }
.ai-workspace .ai-input, .ai-workspace .ai-select, .ai-workspace .ai-textarea, .ai-workspace .simpledot-ai-system .form-control { background: var(--aw-bg); border: 1px solid var(--aw-line); border-radius: 11px; box-shadow: none; color: var(--aw-ink); font: inherit; font-size: 14px; font-weight: 400; margin: 6px 0 14px; min-height: 44px; outline: 0; padding: 10px 13px; width: 100%; }
.ai-workspace textarea.ai-textarea, .ai-workspace .simpledot-ai-system textarea.form-control { line-height: 1.65; min-height: 140px; resize: vertical; }
.ai-workspace .ai-input:focus, .ai-workspace .ai-select:focus, .ai-workspace .ai-textarea:focus, .ai-workspace .simpledot-ai-system .form-control:focus { border-color: var(--aw-accent); box-shadow: 0 0 0 3px var(--aw-accent-soft); }
.ai-workspace select option { background: var(--aw-panel); color: var(--aw-ink); }
.ai-workspace .ai-button, .ai-workspace .simpledot-ai-system .btn { align-items: center; background: var(--aw-soft); border: 1px solid var(--aw-line); border-radius: 10px; box-shadow: none; color: var(--aw-ink); display: inline-flex; font-size: 12px; font-weight: 550; gap: 7px; justify-content: center; line-height: 1.4; margin: 0; min-height: 40px; padding: 10px 15px; text-decoration: none; transition: background .15s ease; white-space: normal; }
.ai-workspace .ai-button:hover, .ai-workspace .simpledot-ai-system .btn:hover { background: var(--aw-hover); border-color: var(--aw-line); color: var(--aw-ink); }
.ai-workspace .ai-button:not(.secondary), .ai-workspace .simpledot-ai-system .btn-primary, .ai-workspace .simpledot-ai-system .btn-success { background: var(--aw-ink); border-color: var(--aw-ink); color: var(--aw-bg); }
.ai-workspace .ai-button:not(.secondary):hover, .ai-workspace .simpledot-ai-system .btn-primary:hover { opacity: .87; }
.ai-workspace .simpledot-ai-system .btn-danger { background: transparent; border-color: var(--aw-line); color: var(--aw-danger); }
.ai-workspace .simpledot-ai-system .btn-warning { background: var(--aw-soft); color: var(--aw-warning); }
.ai-workspace .simpledot-ai-system .btn-xs { border-radius: 7px; font-size: 11px; min-height: 30px; padding: 5px 9px; }
.ai-workspace .simpledot-ai-system .btn-box-tool { background: transparent; border: 0; min-height: 30px; padding: 5px; }
.ai-workspace .simpledot-ai-page-actions .btn { background: transparent; color: var(--aw-muted); }
.ai-workspace .ai-alert, .ai-workspace .simpledot-ai-system .alert, .ai-workspace #flashMessage { background: var(--aw-soft); border: 1px solid var(--aw-line); border-radius: 12px; box-shadow: none; color: var(--aw-ink); font-size: 13px; font-weight: 400; line-height: 1.6; margin-bottom: 18px; padding: 14px 16px; }
.ai-workspace .ai-alert.warning, .ai-workspace .simpledot-ai-system .alert-warning { color: var(--aw-warning); }
.ai-workspace .ai-alert.success, .ai-workspace .simpledot-ai-system .alert-success { color: var(--aw-accent); }
.ai-workspace .simpledot-ai-system .alert-danger, .ai-workspace .ai-alert.error { color: var(--aw-danger); }
.ai-workspace .simpledot-ai-system .table { background: transparent; color: var(--aw-ink); }
.ai-workspace .simpledot-ai-system .table > thead > tr > th { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-muted); font-size: 11px; font-weight: 550; letter-spacing: 0; padding: 12px; text-transform: none; }
.ai-workspace .simpledot-ai-system .table > tbody > tr > td { border-color: var(--aw-line); color: var(--aw-ink); font-size: 12px; padding: 12px; }
.ai-workspace .simpledot-ai-system .table td small { color: var(--aw-muted); font-weight: 400; }
.ai-workspace .simpledot-ai-system .table-responsive { border: 0; overflow-x: auto; }
.ai-workspace .simpledot-ai-metric-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ai-workspace .simpledot-ai-metric { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 14px; box-shadow: none; padding: 18px; }
.ai-workspace .simpledot-ai-metric span { color: var(--aw-muted); font-size: 11px; font-weight: 450; text-transform: none; }
.ai-workspace .simpledot-ai-metric strong { color: var(--aw-ink); font-size: 24px; font-weight: 550; margin-top: 8px; }
.ai-workspace .simpledot-ai-specialist-option { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 10px; font-size: 12px; margin: 0; padding: 11px; }
.ai-workspace .simpledot-ai-specialist-option span { color: var(--aw-ink); font-size: 12px; font-weight: 450; }
.ai-workspace .simpledot-ai-specialist-option:hover, .ai-workspace .simpledot-ai-specialist-option.is-selected { background: var(--aw-accent-soft); border-color: var(--aw-accent); box-shadow: none; }
.ai-workspace .simpledot-ai-specialist-option input:checked + span { color: var(--aw-accent); }
.ai-workspace input[type="checkbox"], .ai-workspace input[type="radio"] { accent-color: var(--aw-accent); }
.ai-workspace .simpledot-ai-specialist-toolbar { gap: 8px; }
.ai-workspace .simpledot-ai-specialist-count { color: var(--aw-muted); font-size: 10px; font-weight: 500; }
.ai-workspace .ai-result, .ai-workspace .simpledot-ai-result { margin-top: 20px; }
.ai-workspace .ai-result-card, .ai-workspace .simpledot-ai-result-card { background: var(--aw-panel); border: 1px solid var(--aw-line) !important; border-radius: 14px; box-shadow: none; color: var(--aw-ink); line-height: 1.75; margin: 0 0 14px; overflow-wrap: anywhere; padding: 20px; white-space: pre-wrap; }
.ai-workspace .ai-result-card.judge, .ai-workspace .simpledot-ai-result-card.judge { background: var(--aw-accent-soft); }
.ai-workspace .ai-result-card.error, .ai-workspace .simpledot-ai-result-card.error { color: var(--aw-danger); }
.ai-workspace .ai-result-title, .ai-workspace .simpledot-ai-result-title { color: var(--aw-muted); display: block; font-size: 11px; font-weight: 600; margin-bottom: 12px; }

/* Chat: existing handlers, attachments, dictation and selectors are retained. */
.ai-workspace--public[data-ai-page="chat"] .ai-workspace-page, .ai-workspace--erp[data-ai-page="index"] .ai-workspace-content { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.ai-workspace .ai-chat-app, .ai-workspace .simpledot-ai-chat-app { background: var(--aw-bg); border: 0; border-radius: 0; box-shadow: none; display: grid; flex: 1; grid-template-columns: 230px minmax(0, 1fr); height: 100%; min-height: 0; min-width: 0; overflow: hidden; }
.ai-workspace .simpledot-ai-erp-home { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.ai-workspace .simpledot-ai-erp-home > .simpledot-ai-page-head { border-bottom: 1px solid var(--aw-line); flex: 0 0 auto; margin: 0; padding: 12px 24px; }
.ai-workspace .simpledot-ai-erp-home > .simpledot-ai-page-head h2 { font-size: 16px; }
.ai-workspace .simpledot-ai-erp-home > .simpledot-ai-page-head p { font-size: 11px; margin-top: 3px; }
.ai-workspace .ai-chat-sidebar, .ai-workspace .simpledot-ai-chat-side { background: var(--aw-bg); border-right: 1px solid var(--aw-line); display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; overflow-y: auto; padding: 20px 12px; }
.ai-workspace .ai-chat-sidebar-head, .ai-workspace .simpledot-ai-chat-side-head { align-items: center; display: flex; flex: 0 0 auto; gap: 8px; justify-content: space-between; padding: 0 6px; }
.ai-workspace .ai-chat-sidebar h1 { font-size: 17px; margin: 2px 0 0; }
.ai-workspace .ai-chat-kicker, .ai-workspace .ai-sidebar-label, .ai-workspace .simpledot-ai-chat-side-head span, .ai-workspace .simpledot-ai-chat-side-head strong { color: var(--aw-muted); display: block; font-size: 11px; font-weight: 500; line-height: 1.5; text-transform: none; }
.ai-workspace .simpledot-ai-chat-side-head strong { color: var(--aw-ink); font-size: 16px; }
.ai-workspace .ai-history-actions, .ai-workspace .simpledot-ai-history-actions { display: flex; gap: 4px; }
.ai-workspace .ai-icon-button, .ai-workspace .simpledot-ai-icon-button { align-items: center; background: transparent; border: 1px solid var(--aw-line); border-radius: 9px; color: var(--aw-muted); display: inline-flex; font-size: 20px; height: 32px; justify-content: center; padding: 6px; width: 32px; }
.ai-workspace .ai-icon-button svg, .ai-workspace .simpledot-ai-icon-button svg { height: 15px; width: 15px; }
.ai-workspace .ai-clear-history, .ai-workspace .simpledot-ai-clear-history { color: var(--aw-muted); }
.ai-workspace .ai-icon-button:hover, .ai-workspace .simpledot-ai-icon-button:hover { background: var(--aw-soft); color: var(--aw-ink); }
.ai-workspace .ai-wallet-strip { align-items: center; background: var(--aw-soft); border: 1px solid var(--aw-line); border-radius: 12px; color: var(--aw-ink); display: flex; gap: 10px; justify-content: space-between; margin: 0; padding: 12px; }
.ai-workspace .ai-wallet-strip span { color: var(--aw-muted); font-size: 10px; font-weight: 400; }
.ai-workspace .ai-wallet-strip strong { font-size: 17px; font-weight: 550; }
.ai-workspace .ai-wallet-strip a { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 8px; color: var(--aw-ink); font-size: 11px; padding: 7px 9px; }
.ai-workspace .ai-sidebar-feature, .ai-workspace .simpledot-ai-side-feature { align-items: center; background: transparent; border: 1px solid var(--aw-line); border-radius: 10px; color: var(--aw-muted); display: flex; font-size: 11px; font-weight: 450; gap: 8px; margin-bottom: 0; min-height: 38px; padding: 10px; }
.ai-workspace .ai-conversation-panel, .ai-workspace .simpledot-ai-history-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0; scrollbar-width: thin; }
.ai-workspace .ai-sidebar-label { margin: 8px 8px 10px; }
.ai-workspace .ai-conversation-row, .ai-workspace .simpledot-ai-conversation-row { align-items: center; border-radius: 9px; display: flex; gap: 3px; margin: 3px 0; }
.ai-workspace .ai-conversation, .ai-workspace .simpledot-ai-conversation { background: transparent; border: 0; border-radius: 9px; color: var(--aw-ink); display: flex; flex: 1; flex-direction: column; font-size: 12px; font-weight: 400; gap: 2px; min-width: 0; padding: 11px 10px; }
.ai-workspace .ai-conversation span, .ai-workspace .simpledot-ai-conversation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-workspace .ai-conversation small, .ai-workspace .simpledot-ai-conversation small { color: var(--aw-muted); font-size: 9px; font-weight: 400; }
.ai-workspace .ai-conversation.active, .ai-workspace .ai-conversation:hover, .ai-workspace .simpledot-ai-conversation.active, .ai-workspace .simpledot-ai-conversation:hover { background: var(--aw-soft); border-color: transparent; color: var(--aw-ink); }
.ai-workspace .ai-delete-conversation, .ai-workspace .simpledot-ai-delete-conversation { align-items: center; background: transparent; border: 0; border-radius: 7px; color: var(--aw-muted); display: inline-flex; flex: 0 0 28px; font-size: 16px; height: 28px; justify-content: center; padding: 6px; width: 28px; }
.ai-workspace .ai-delete-conversation:hover, .ai-workspace .simpledot-ai-delete-conversation:hover { background: var(--aw-soft); color: var(--aw-danger); }
.ai-workspace .ai-empty-list, .ai-workspace .simpledot-ai-empty-list { color: var(--aw-muted); font-size: 11px; line-height: 1.6; padding: 18px 10px; }
.ai-workspace .ai-chat-account > summary { color: var(--aw-muted); cursor: pointer; font-size: 11px; padding: 10px 2px; }
.ai-workspace .ai-chat-main, .ai-workspace .simpledot-ai-chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.ai-workspace .ai-chat-topbar, .ai-workspace .simpledot-ai-chat-topbar { align-items: center; background: var(--aw-bg); border: 0; border-bottom: 1px solid var(--aw-line); display: flex; flex: 0 0 auto; gap: 12px; justify-content: space-between; min-height: 65px; padding: 14px 26px; position: relative; z-index: 20; }
.ai-workspace .ai-chat-title, .ai-workspace .simpledot-ai-chat-current { align-items: center; display: flex; gap: 9px; min-width: 0; }
.ai-workspace .ai-chat-title strong, .ai-workspace .simpledot-ai-chat-current strong { color: var(--aw-ink); display: block; font-size: 13px; font-weight: 550; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-workspace .ai-chat-title span:not(.ai-status-dot), .ai-workspace .simpledot-ai-chat-current span:not(.simpledot-ai-live-dot) { color: var(--aw-muted); display: block; font-size: 10px; font-weight: 400; }
.ai-workspace .ai-status-dot, .ai-workspace .simpledot-ai-live-dot { background: var(--aw-accent); border-radius: 50%; box-shadow: none; flex: 0 0 6px; height: 6px; width: 6px; }
.ai-workspace .ai-chat-options { margin-left: auto; position: relative; }
.ai-workspace .ai-chat-toolbar { align-items: center; display: flex; flex: 0 0 auto; gap: 8px; }
.ai-workspace .ai-chat-history-toggle { align-items: center; background: transparent; border: 1px solid var(--aw-line); border-radius: 9px; color: var(--aw-muted); gap: 6px; justify-content: center; min-height: 35px; padding: 8px; }
.ai-workspace .ai-chat-history-toggle svg { height: 17px; width: 17px; }
.ai-workspace .ai-chat-options > summary { align-items: center; border: 1px solid var(--aw-line); border-radius: 9px; color: var(--aw-muted); cursor: pointer; display: flex; font-size: 11px; gap: 8px; list-style: none; padding: 8px 11px; white-space: nowrap; }
.ai-workspace .ai-chat-options > summary::-webkit-details-marker { display: none; }
.ai-workspace .ai-chat-options > summary::after { content: "⌄"; font-size: 13px; }
.ai-workspace .ai-chat-options[open] > .ai-chat-controls, .ai-workspace .ai-chat-options[open] > .simpledot-ai-chat-controls { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 14px; box-shadow: var(--aw-shadow); display: grid; gap: 12px; grid-template-columns: 1fr; min-width: 280px; padding: 16px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; }
.ai-workspace .ai-chat-controls, .ai-workspace .simpledot-ai-chat-controls { align-items: center; display: flex; gap: 9px; }
.ai-workspace .ai-chat-controls label, .ai-workspace .simpledot-ai-chat-controls label { display: block; margin: 0; min-width: 0; }
.ai-workspace .ai-chat-controls label > span, .ai-workspace .simpledot-ai-chat-controls label > span { color: var(--aw-muted); display: block; font-size: 10px; font-weight: 450; margin-bottom: 4px; text-transform: none; }
.ai-workspace .ai-compact-select, .ai-workspace .simpledot-ai-chat-controls .form-control { background: var(--aw-bg); border: 1px solid var(--aw-line); border-radius: 8px; color: var(--aw-ink); font-size: 12px; font-weight: 400; height: 38px; margin: 0; max-width: 100%; min-height: 38px; padding: 8px 10px; width: 100%; }
.ai-workspace .ai-thread, .ai-workspace .simpledot-ai-thread { background: var(--aw-bg); border: 0; border-radius: 0; flex: 1; height: auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 26px max(22px, calc((100% - 790px) / 2)); scroll-behavior: smooth; scrollbar-color: var(--aw-hover) transparent; scrollbar-width: thin; }
.ai-workspace .ai-welcome, .ai-workspace .simpledot-ai-welcome { align-items: center; color: var(--aw-ink); display: flex; flex-direction: column; height: 100%; justify-content: center; min-height: 200px; padding: 18px 0 36px; text-align: center; }
.ai-workspace .ai-welcome-mark, .ai-workspace .simpledot-ai-welcome-mark { align-items: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--aw-accent); display: flex; font-size: 35px; height: 52px; justify-content: center; margin: 0 0 20px; width: 52px; }
.ai-workspace .ai-welcome-mark svg, .ai-workspace .simpledot-ai-welcome-mark svg { height: 42px; width: 42px; }
.ai-workspace .ai-welcome h2, .ai-workspace .simpledot-ai-welcome h3 { font-size: clamp(25px, 3vw, 35px); font-weight: 500; letter-spacing: -.05em; margin: 0; }
.ai-workspace .ai-welcome p, .ai-workspace .simpledot-ai-welcome p { color: var(--aw-muted); font-size: 12px; margin-top: 12px; }
.ai-workspace .ai-message, .ai-workspace .simpledot-ai-message { background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--aw-ink); font-size: 14px; line-height: 1.85; margin: 0 0 18px; overflow-wrap: anywhere; padding: 16px 4px; white-space: pre-wrap; }
.ai-workspace .ai-message.user, .ai-workspace .simpledot-ai-message.user { background: var(--aw-soft); border-radius: 19px; margin-left: auto; max-width: 88%; padding: 14px 19px; width: fit-content; }
.ai-workspace .ai-message.assistant, .ai-workspace .simpledot-ai-message.assistant { background: transparent; border: 0; margin-right: 0; }
.ai-workspace .ai-message.pending, .ai-workspace .simpledot-ai-message.pending { color: var(--aw-muted); }
.ai-workspace .ai-message.failed, .ai-workspace .simpledot-ai-message.failed { color: var(--aw-danger); }
.ai-workspace .ai-message > strong, .ai-workspace .simpledot-ai-role { color: var(--aw-muted); display: block; font-size: 10px; font-weight: 600; margin-bottom: 8px; text-transform: none; }
.ai-workspace .ai-message-body { min-width: 0; white-space: pre-wrap; }
.ai-workspace .ai-message-body.is-markdown { line-height: 1.8; white-space: normal; }
.ai-workspace .ai-message-body.is-markdown > :first-child { margin-top: 0; }
.ai-workspace .ai-message-body.is-markdown > :last-child { margin-bottom: 0; }
.ai-workspace .ai-message-body p { line-height: inherit; margin: 0 0 14px; }
.ai-workspace .ai-message-body strong { color: inherit; font-weight: 650; }
.ai-workspace .ai-message-body h1, .ai-workspace .ai-message-body h2, .ai-workspace .ai-message-body h3, .ai-workspace .ai-message-body h4, .ai-workspace .ai-message-body h5, .ai-workspace .ai-message-body h6 { font-weight: 600; letter-spacing: -.025em; line-height: 1.4; margin: 22px 0 10px; }
.ai-workspace .ai-message-body h1 { font-size: 22px; }
.ai-workspace .ai-message-body h2 { font-size: 20px; }
.ai-workspace .ai-message-body h3 { font-size: 18px; }
.ai-workspace .ai-message-body h4 { font-size: 16px; }
.ai-workspace .ai-message-body h5, .ai-workspace .ai-message-body h6 { font-size: 14px; }
.ai-workspace .ai-message-body ul, .ai-workspace .ai-message-body ol { margin: 0 0 16px; padding-left: 24px; }
.ai-workspace .ai-message-body li { padding-left: 3px; margin: 5px 0; }
.ai-workspace .ai-message-body li > p { margin-bottom: 5px; }
.ai-workspace .ai-message-body li > ul, .ai-workspace .ai-message-body li > ol { margin: 6px 0; }
.ai-workspace .ai-message-body li::marker { color: var(--aw-muted); }
.ai-workspace .ai-message-body a { color: var(--aw-accent); text-decoration: underline; text-underline-offset: 3px; }
.ai-workspace .ai-message-body a:hover { opacity: .8; }
.ai-workspace .ai-message-body blockquote { background: var(--aw-soft); border: 0; border-left: 3px solid var(--aw-accent); border-radius: 0 9px 9px 0; color: var(--aw-muted); font-size: inherit; margin: 16px 0; padding: 12px 16px; }
.ai-workspace .ai-message-body blockquote > :last-child { margin-bottom: 0; }
.ai-workspace .ai-message-body code { background: var(--aw-soft); border-radius: 5px; color: var(--aw-ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .87em; padding: 2px 5px; }
.ai-workspace .ai-message-body pre { background: var(--aw-soft); border: 1px solid var(--aw-line); border-radius: 12px; color: var(--aw-ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.7; margin: 16px 0; max-width: 100%; overflow-x: auto; padding: 16px; tab-size: 4; white-space: pre; }
.ai-workspace .ai-message-body pre code { background: none; border: 0; border-radius: 0; color: inherit; display: block; font: inherit; overflow-wrap: normal; padding: 0; white-space: pre; word-break: normal; }
.ai-workspace .ai-message-body .ai-md-table-wrap { border: 1px solid var(--aw-line); border-radius: 12px; margin: 16px 0; max-width: 100%; overflow-x: auto; }
.ai-workspace .ai-message-body table { border-collapse: collapse; color: var(--aw-ink); font-size: 12px; line-height: 1.65; margin: 0; min-width: 100%; width: max-content; }
.ai-workspace .ai-message-body th, .ai-workspace .ai-message-body td { border-bottom: 1px solid var(--aw-line); border-right: 1px solid var(--aw-line); max-width: 340px; min-width: 95px; padding: 10px 13px; text-align: left; vertical-align: top; }
.ai-workspace .ai-message-body th { background: var(--aw-soft); font-weight: 550; }
.ai-workspace .ai-message-body .ai-md-align-center { text-align: center; }
.ai-workspace .ai-message-body .ai-md-align-right { text-align: right; }
.ai-workspace .ai-message-body th:last-child, .ai-workspace .ai-message-body td:last-child { border-right: 0; }
.ai-workspace .ai-message-body tbody tr:last-child td { border-bottom: 0; }
.ai-workspace .ai-message-body hr { border: 0; border-top: 1px solid var(--aw-line); margin: 20px 0; }
.ai-workspace .ai-message-attachments, .ai-workspace .simpledot-ai-message-attachments { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; white-space: normal; }
.ai-workspace .ai-message-attachments a, .ai-workspace .ai-message-attachments span, .ai-workspace .simpledot-ai-message-attachments a, .ai-workspace .simpledot-ai-message-attachments span { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 9px; color: var(--aw-muted); font-size: 11px; max-width: 100%; overflow-wrap: anywhere; padding: 7px 9px; }
.ai-workspace .ai-composer, .ai-workspace .simpledot-ai-composer { background: var(--aw-bg); border: 0; flex: 0 0 auto; margin: 0; padding: 10px max(20px, calc((100% - 790px) / 2)) max(16px, env(safe-area-inset-bottom)); }
.ai-workspace .ai-composer-box, .ai-workspace .simpledot-ai-composer-box { align-items: flex-end; background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 24px; box-shadow: 0 3px 14px rgba(0, 0, 0, .025); display: flex; gap: 7px; padding: 10px; }
.ai-workspace .ai-composer-box:focus-within, .ai-workspace .simpledot-ai-composer-box:focus-within { border-color: var(--aw-muted); }
.ai-workspace #ai-message, .ai-workspace #simpledot-ai-message { background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--aw-ink); flex: 1; font-size: 14px; font-weight: 400; line-height: 1.55; margin: 0; max-height: 180px; min-height: 40px; min-width: 0; outline: none; padding: 10px 2px; resize: none; width: 100%; }
.ai-workspace #ai-message::placeholder, .ai-workspace #simpledot-ai-message::placeholder { color: var(--aw-muted); }
.ai-workspace .ai-attach-button, .ai-workspace .ai-mic-button, .ai-workspace .simpledot-ai-attach, .ai-workspace .simpledot-ai-mic { align-items: center; background: transparent; border: 0; border-radius: 50%; color: var(--aw-muted); display: inline-flex; flex: 0 0 36px; height: 40px; justify-content: center; padding: 9px; width: 36px; }
.ai-workspace .ai-attach-button svg, .ai-workspace .ai-mic-button svg, .ai-workspace .simpledot-ai-attach svg, .ai-workspace .simpledot-ai-mic svg { height: 19px; width: 19px; }
.ai-workspace .ai-attach-button:hover, .ai-workspace .ai-mic-button:hover, .ai-workspace .simpledot-ai-attach:hover, .ai-workspace .simpledot-ai-mic:hover { background: var(--aw-soft); color: var(--aw-ink); }
.ai-workspace .ai-mic-button.listening, .ai-workspace .simpledot-ai-mic.listening { background: var(--aw-accent-soft); color: var(--aw-accent); }
.ai-workspace .ai-send-button, .ai-workspace .simpledot-ai-send.btn { align-items: center; background: var(--aw-ink); border: 0; border-radius: 50%; color: var(--aw-bg); display: inline-flex; flex: 0 0 40px; height: 40px; justify-content: center; margin: 0; min-height: 40px; min-width: 40px; padding: 10px; width: 40px; }
.ai-workspace .ai-send-button svg, .ai-workspace .simpledot-ai-send svg { height: 19px; width: 19px; }
.ai-workspace .ai-workspace-composer-help { color: var(--aw-muted); display: block; font-size: 10px; line-height: 1.5; margin: 9px 0 0; text-align: center; }
.ai-workspace .ai-attachment-list, .ai-workspace .simpledot-ai-attachment-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 7px; }
.ai-workspace .ai-attachment-list:empty, .ai-workspace .simpledot-ai-attachment-list:empty { display: none; }
.ai-workspace .ai-attachment-chip, .ai-workspace .simpledot-ai-attachment-chip { align-items: center; background: var(--aw-soft); border: 1px solid var(--aw-line); border-radius: 9px; color: var(--aw-ink); display: inline-flex; font-size: 11px; gap: 7px; max-width: 100%; overflow-wrap: anywhere; padding: 7px 10px; }
.ai-workspace .ai-attachment-chip button, .ai-workspace .simpledot-ai-attachment-chip button { background: none; border: 0; color: var(--aw-muted); font-size: 16px; padding: 0 2px; }
.ai-workspace .simpledot-ai-usage-details { background: var(--aw-bg); border: 0; border-top: 1px solid var(--aw-line); flex: 0 0 auto; margin: 0; padding: 0 22px; }
.ai-workspace .simpledot-ai-usage-details > summary { color: var(--aw-muted); cursor: pointer; font-size: 11px; padding: 10px 0; }
.ai-workspace .simpledot-ai-usage-details .simpledot-ai-metric-row { margin: 8px 0 16px; }
.ai-workspace .simpledot-ai-usage-details .simpledot-ai-metric { padding: 12px; }
.ai-workspace [data-ai-history-toggle] { display: none; }
.ai-workspace [data-ai-history-close] { align-self: flex-end; }

/* Landing, authentication and account pages. */
.ai-workspace .ai-welcome.ai-home-welcome { height: auto; margin: 40px auto 35px; max-width: 720px; min-height: 0; padding: 30px 0 10px; }
.ai-workspace .ai-home-welcome h1 { font-size: clamp(32px, 4.3vw, 48px); font-weight: 500; letter-spacing: -.055em; margin: 6px 0 12px; }
.ai-workspace .ai-home-welcome > p { color: var(--aw-muted); font-size: 14px; margin: 0 auto 24px; max-width: 520px; }
.ai-workspace .ai-welcome-composer { align-items: center; background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 23px; box-shadow: var(--aw-shadow); color: var(--aw-muted); display: flex; gap: 12px; justify-content: space-between; min-height: 82px; padding: 18px 20px; text-align: left; width: 100%; }
.ai-workspace .ai-welcome-composer:hover { border-color: var(--aw-muted); color: var(--aw-ink); }
.ai-workspace .ai-welcome-composer svg { color: var(--aw-ink); height: 30px; width: 30px; }
.ai-workspace .ai-welcome-prompts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 19px 0; }
.ai-workspace .ai-welcome-prompts a { align-items: center; border: 1px solid var(--aw-line); border-radius: 999px; color: var(--aw-muted); display: inline-flex; font-size: 11px; gap: 7px; min-height: 36px; padding: 8px 12px; }
.ai-workspace .ai-welcome-prompts a:hover { background: var(--aw-soft); color: var(--aw-ink); }
.ai-workspace .ai-home-tools { margin: 28px auto; max-width: 1050px; }
.ai-workspace .ai-home-tools > .ai-grid { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.ai-workspace .ai-eyebrow { color: var(--aw-accent); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ai-workspace .ai-home-tool-action { color: var(--aw-accent); display: block; font-size: 11px; font-weight: 550; margin-top: 18px; }
.ai-workspace .ai-home-tools .ai-card { padding: 20px; }
.ai-workspace .ai-home-tools .ai-card h2, .ai-workspace .ai-home-tools .ai-card h3 { font-size: 16px; font-weight: 550; margin: 12px 0 8px; }
.ai-workspace .ai-home-tools .ai-card p { color: var(--aw-muted); font-size: 12px; margin-bottom: 0; }
.ai-workspace .ai-home-tools .ai-card > svg { color: var(--aw-accent); height: 25px; width: 25px; }
.ai-workspace .ai-home-packages { border-top: 1px solid var(--aw-line); margin: 38px auto 0; max-width: 1050px; padding-top: 24px; }
.ai-workspace .ai-home-packages > summary { color: var(--aw-muted); cursor: pointer; font-size: 13px; margin-bottom: 20px; }
.ai-workspace .ai-home-packages .ai-card h3 { font-size: 16px; }
.ai-workspace .ai-auth-card { margin: max(20px, 4vh) auto; max-width: 460px; padding: 30px; }
.ai-workspace .ai-auth-intro { margin-bottom: 24px; }
.ai-workspace .ai-auth-intro h1 { font-size: 28px; margin: 12px 0; }
.ai-workspace .ai-auth-intro p { color: var(--aw-muted); font-size: 13px; }
.ai-workspace .ai-auth-form .ai-button { margin-top: 8px; width: 100%; }
.ai-workspace .ai-auth-footer { border-top: 1px solid var(--aw-line); color: var(--aw-muted); font-size: 12px; margin-top: 22px; padding-top: 18px; }
.ai-workspace .ai-auth-footer a { color: var(--aw-accent); }
.ai-workspace .ai-account-page { margin: 0 auto; max-width: 1100px; }
.ai-workspace .ai-wallet-balance { margin-bottom: 20px; }
.ai-workspace .ai-wallet-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ai-workspace .ai-wallet-package { display: flex; flex-direction: column; gap: 10px; }
.ai-workspace .ai-wallet-package .ai-button { margin-top: auto; }
.ai-workspace .ai-account-page table { color: var(--aw-ink); max-width: 100%; width: 100%; }
.ai-workspace .ai-account-page th, .ai-workspace .ai-account-page td { border-bottom: 1px solid var(--aw-line); font-size: 12px; padding: 12px 8px; }

/* Images, videos, compare, council, manuals and administrative tools. */
.ai-workspace .ai-image-studio, .ai-workspace .simpledot-ai-image-studio { gap: 22px; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); }
.ai-workspace .ai-image-panel h1 { font-size: 29px; font-weight: 550; margin: 8px 0; }
.ai-workspace .ai-image-panel p { color: var(--aw-muted); font-size: 12px; font-weight: 400; }
.ai-workspace .ai-image-kicker { color: var(--aw-accent); font-size: 10px; font-weight: 550; text-transform: none; }
.ai-workspace .ai-image-gallery-head h2 { font-size: 21px; }
.ai-workspace .ai-image-card, .ai-workspace .simpledot-ai-image-card { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 14px; box-shadow: none; }
.ai-workspace .ai-image-card img, .ai-workspace .simpledot-ai-image-card img { background: var(--aw-soft); }
.ai-workspace .ai-image-card-body strong, .ai-workspace .simpledot-ai-image-card-body strong { color: var(--aw-ink); font-size: 12px; font-weight: 500; }
.ai-workspace .ai-image-meta, .ai-workspace .simpledot-ai-image-meta { color: var(--aw-muted); font-size: 10px; font-weight: 400; }
.ai-workspace .ai-image-meta span, .ai-workspace .simpledot-ai-image-meta span { background: var(--aw-soft); color: var(--aw-muted); }
.ai-workspace .ai-image-balance, .ai-workspace .simpledot-ai-image-balance { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-ink); font-size: 11px; font-weight: 450; }
.ai-workspace .ai-image-template, .ai-workspace .simpledot-ai-image-template { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 9px; color: var(--aw-muted); font-size: 11px; font-weight: 450; }
.ai-workspace .ai-image-template:hover, .ai-workspace .simpledot-ai-image-template:hover { background: var(--aw-soft); border-color: var(--aw-muted); }
.ai-workspace .ai-image-card-actions a, .ai-workspace .ai-image-card-actions button, .ai-workspace .simpledot-ai-image-card-actions a, .ai-workspace .simpledot-ai-image-card-actions button { background: var(--aw-soft); border-color: var(--aw-line); border-radius: 8px; color: var(--aw-ink); font-size: 11px; font-weight: 500; }
.ai-workspace .simpledot-ai-image-card-actions .ai-download-image { background: var(--aw-ink); color: var(--aw-bg); }
.ai-workspace .ai-image-head-actions { align-items: center; gap: 8px; }
.ai-workspace .ai-image-source, .ai-workspace .simpledot-ai-image-source { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-warning); }
.ai-workspace .ai-manual-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.ai-workspace .ai-manual-card { background: var(--aw-panel); border: 1px solid var(--aw-line); border-radius: 16px; color: var(--aw-ink); padding: 22px; }
.ai-workspace .ai-manual-card p, .ai-workspace .ai-manual-card li { color: var(--aw-muted); font-size: 13px; }
.ai-workspace .ai-manual-card h2, .ai-workspace .ai-manual-card h3 { font-size: 18px; }
.ai-workspace .ai-manual-card ul { padding-left: 18px; }
.ai-workspace .ai-manual-hero { margin-bottom: 22px; }
.ai-workspace .ai-manual-hero p { color: var(--aw-muted); }
.ai-workspace .ai-manual-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ai-workspace .ai-page-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ai-workspace .ai-workspace-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.ai-workspace .ai-workspace-tabs a { border: 1px solid var(--aw-line); border-radius: 999px; color: var(--aw-muted); font-size: 12px; padding: 8px 13px; }
.ai-workspace .ai-workspace-tabs a:hover { background: var(--aw-soft); color: var(--aw-ink); }
.ai-workspace .ai-manual-number { color: var(--aw-accent); font-size: 11px; font-weight: 600; }
.ai-workspace .ai-manual-card { scroll-margin-top: 20px; }

/* Tool-specific surfaces keep their existing content and controls. */
.ai-workspace .ai-specialists-head { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin-bottom: 24px; }
.ai-workspace .ai-specialists-head h1 { color: var(--aw-ink); font-size: 32px; font-weight: 550; }
.ai-workspace .ai-specialists-kicker { color: var(--aw-accent); font-size: 10px; font-weight: 550; }
.ai-workspace .ai-specialists-head p { color: var(--aw-muted); font-size: 13px; }
.ai-workspace .ai-mini-button { background: var(--aw-soft); border-color: var(--aw-line); border-radius: 10px; color: var(--aw-ink); font-size: 12px; font-weight: 500; }
.ai-workspace .ai-mini-button.primary { background: var(--aw-ink); box-shadow: none; color: var(--aw-bg); }
.ai-workspace .ai-specialist-grid, .ai-workspace .simpledot-ai-specialist-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ai-workspace .ai-specialist-card, .ai-workspace .simpledot-ai-specialist-card, .ai-workspace .ai-empty-specialists { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 16px; box-shadow: none; color: var(--aw-ink); padding: 22px; }
.ai-workspace .ai-specialist-mark, .ai-workspace .simpledot-ai-specialist-mark { background: var(--aw-accent-soft); border-radius: 14px; box-shadow: none; color: var(--aw-accent); font-size: 20px; font-weight: 550; }
.ai-workspace .ai-specialist-top h2, .ai-workspace .simpledot-ai-specialist-body h3 { color: var(--aw-ink); font-size: 17px; font-weight: 550; }
.ai-workspace .ai-specialist-card p, .ai-workspace .simpledot-ai-specialist-body p, .ai-workspace .ai-specialist-top span, .ai-workspace .simpledot-ai-specialist-foot span { color: var(--aw-muted); font-size: 12px; font-weight: 400; }
.ai-workspace .ai-specialist-tags span { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-muted); font-size: 10px; font-weight: 450; text-transform: none; }
.ai-workspace .ai-specialist-foot, .ai-workspace .simpledot-ai-specialist-foot { border-color: var(--aw-line); }
.ai-workspace .ai-video-studio { gap: 22px; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); }
.ai-workspace .ai-video-panel, .ai-workspace .ai-video-card, .ai-workspace .simpledot-ai-video-card { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 16px; box-shadow: none; color: var(--aw-ink); }
.ai-workspace .ai-video-panel { padding: 22px; }
.ai-workspace .ai-video-head { flex-wrap: wrap; }
.ai-workspace .ai-video-head h1 { font-size: 29px; }
.ai-workspace .ai-video-head h2 { font-size: 21px; }
.ai-workspace .ai-video-balance, .ai-workspace .simpledot-ai-video-balance, .ai-workspace .ai-video-state, .ai-workspace .simpledot-ai-video-state { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-ink); font-size: 11px; font-weight: 450; }
.ai-workspace .ai-video-upload, .ai-workspace .simpledot-ai-video-upload { background: var(--aw-soft); border-color: var(--aw-line); border-radius: 12px; }
.ai-workspace .ai-video-meta, .ai-workspace .simpledot-ai-video-meta, .ai-workspace .ai-video-status, .ai-workspace .simpledot-ai-video-status, .ai-workspace .ai-video-empty, .ai-workspace .simpledot-ai-video-empty { color: var(--aw-muted); font-weight: 400; }
.ai-workspace .ai-video-card-actions a, .ai-workspace .ai-video-card-actions button, .ai-workspace .simpledot-ai-video-card-actions a, .ai-workspace .simpledot-ai-video-card-actions button { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-ink); font-size: 12px; font-weight: 500; }
.ai-workspace .ai-video-state.failed, .ai-workspace .simpledot-ai-video-state.failed { background: var(--aw-soft); color: var(--aw-danger); }
.ai-workspace .ai-video-progress span, .ai-workspace .simpledot-ai-video-progress span { background: var(--aw-accent); }
.ai-workspace .simpledot-ai-manual-hero, .ai-workspace .simpledot-ai-manual-card, .ai-workspace .simpledot-ai-admin-manual { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 16px; box-shadow: none; }
.ai-workspace .simpledot-ai-manual-hero h2 { color: var(--aw-ink); font-size: 30px; font-weight: 550; }
.ai-workspace .simpledot-ai-manual-card h3, .ai-workspace .simpledot-ai-admin-manual-head h3 { color: var(--aw-ink); font-size: 18px; font-weight: 550; }
.ai-workspace .simpledot-ai-manual-hero span, .ai-workspace .simpledot-ai-admin-manual-head span, .ai-workspace .simpledot-ai-manual-card a { color: var(--aw-accent); font-weight: 550; }
.ai-workspace .simpledot-ai-manual-hero p, .ai-workspace .simpledot-ai-admin-manual-head p, .ai-workspace .simpledot-ai-manual-card p, .ai-workspace .simpledot-ai-manual-card li { color: var(--aw-muted); font-size: 13px; }
.ai-workspace .simpledot-ai-manual-card i { background: var(--aw-accent-soft); border-radius: 12px; color: var(--aw-accent); }
.ai-workspace .simpledot-ai-manual-nav a { background: var(--aw-panel); border-color: var(--aw-line); color: var(--aw-muted); font-weight: 450; }
.ai-workspace .simpledot-ai-manual-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ai-workspace .simpledot-ai-bi-panel, .ai-workspace .simpledot-ai-bi-output, .ai-workspace .simpledot-ai-kb-upload, .ai-workspace .simpledot-ai-kb-list, .ai-workspace .simpledot-ai-agent-row, .ai-workspace .simpledot-ai-agent-empty { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 16px; box-shadow: none; color: var(--aw-ink); }
.ai-workspace .simpledot-ai-bi-metrics div, .ai-workspace .simpledot-ai-bi-card, .ai-workspace .simpledot-ai-bi-chart, .ai-workspace .simpledot-ai-bi-table-wrap, .ai-workspace .simpledot-ai-bi-context, .ai-workspace .simpledot-ai-kb-file, .ai-workspace .simpledot-ai-kb-empty { background: var(--aw-soft); border-color: var(--aw-line); border-radius: 12px; color: var(--aw-muted); }
.ai-workspace .simpledot-ai-bi-narrative, .ai-workspace .simpledot-ai-bi-table { background: var(--aw-panel); border-color: var(--aw-line); color: var(--aw-ink); }
.ai-workspace .simpledot-ai-bi-empty-mark { background: var(--aw-accent-soft); box-shadow: none; color: var(--aw-accent); border-radius: 16px; }
.ai-workspace .simpledot-ai-bi-prompts button, .ai-workspace .simpledot-ai-bi-chip, .ai-workspace .simpledot-ai-kb-icon { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-accent); font-weight: 450; }
.ai-workspace .simpledot-ai-bi-empty, .ai-workspace .simpledot-ai-bi-metrics span, .ai-workspace .simpledot-ai-bi-controls label span, .ai-workspace .simpledot-ai-bi-question-label, .ai-workspace .simpledot-ai-bi-card span, .ai-workspace .simpledot-ai-bi-bar span, .ai-workspace .simpledot-ai-bi-history-item span, .ai-workspace .simpledot-ai-muted, .ai-workspace .simpledot-ai-kb-main span, .ai-workspace .simpledot-ai-kb-main small, .ai-workspace .simpledot-ai-kb-upload-head span, .ai-workspace .simpledot-ai-kb-list-head span, .ai-workspace .simpledot-ai-agent-main p, .ai-workspace .simpledot-ai-agent-meta span, .ai-workspace .simpledot-ai-agent-meta a { color: var(--aw-muted); font-weight: 400; }
.ai-workspace .simpledot-ai-bi-metrics strong, .ai-workspace .simpledot-ai-bi-card strong, .ai-workspace .simpledot-ai-bi-result-head strong, .ai-workspace .simpledot-ai-bi-chart h4, .ai-workspace .simpledot-ai-bi-table-wrap h4, .ai-workspace .simpledot-ai-bi-empty h3, .ai-workspace .simpledot-ai-bi-result, .ai-workspace .simpledot-ai-bi-history-item strong, .ai-workspace .simpledot-ai-kb-main strong, .ai-workspace .simpledot-ai-agent-title strong { color: var(--aw-ink); font-weight: 550; }
.ai-workspace .simpledot-ai-bi-bar-line { background: var(--aw-soft); }
.ai-workspace .simpledot-ai-bi-bar-line i { background: var(--aw-accent); }
.ai-workspace .simpledot-ai-kb-file i { color: var(--aw-accent); }
.ai-workspace .simpledot-ai-agent-status--pending { background: var(--aw-soft); color: var(--aw-warning); }
.ai-workspace .simpledot-ai-agent-status--executed { background: var(--aw-accent-soft); color: var(--aw-accent); }
.ai-workspace .simpledot-ai-agent-status--rejected { background: var(--aw-soft); color: var(--aw-danger); }
.ai-workspace .ai-image-empty, .ai-workspace .simpledot-ai-image-empty, .ai-workspace .ai-image-upload, .ai-workspace .simpledot-ai-image-upload, .ai-workspace .ai-image-editor, .ai-workspace .simpledot-ai-image-editor { background: var(--aw-soft); border-color: var(--aw-line); border-radius: 12px; color: var(--aw-muted); font-weight: 450; }
.ai-workspace .ai-image-mode, .ai-workspace .simpledot-ai-image-mode, .ai-workspace .ai-image-editor-tools button, .ai-workspace .simpledot-ai-image-editor-tools button { background: var(--aw-panel); border-color: var(--aw-line); color: var(--aw-ink); font-weight: 450; }
.ai-workspace .ai-image-mode.active, .ai-workspace .simpledot-ai-image-mode.active, .ai-workspace .ai-image-card-actions .ai-image-favorite.active, .ai-workspace .simpledot-ai-image-card-actions .simpledot-ai-image-favorite.active { background: var(--aw-accent-soft); border-color: var(--aw-accent); color: var(--aw-accent); }
.ai-workspace .ai-image-editor-head strong, .ai-workspace .simpledot-ai-image-editor-head strong, .ai-workspace .ai-image-lightbox-top strong, .ai-workspace .simpledot-ai-image-lightbox-top strong { color: var(--aw-ink); font-weight: 550; }
.ai-workspace .ai-image-lightbox-panel, .ai-workspace .simpledot-ai-image-lightbox-panel { background: var(--aw-panel); border-radius: 16px; }
.ai-workspace .ai-image-status, .ai-workspace .simpledot-ai-image-status { color: var(--aw-muted); font-weight: 450; }
.ai-workspace .ai-image-source button, .ai-workspace .simpledot-ai-image-source button { color: var(--aw-warning); font-weight: 500; }
.ai-workspace .ai-image-card-actions .ai-download-image { background: var(--aw-ink); color: var(--aw-bg); }
.ai-workspace .simpledot-ai-package { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 14px; box-shadow: none; color: var(--aw-ink); }
.ai-workspace .simpledot-ai-package.is-selected, .ai-workspace .simpledot-ai-package.bg-info { background: var(--aw-accent-soft); border-color: var(--aw-accent); box-shadow: none; }
.ai-workspace .simpledot-ai-package strong { color: var(--aw-ink); font-weight: 550; }
.ai-workspace .simpledot-ai-package span { color: var(--aw-ink); font-weight: 500; }
.ai-workspace .simpledot-ai-package small { color: var(--aw-muted); font-weight: 400; }
.ai-workspace #ai-card-element, .ai-workspace .simpledot-ai-card-element { background: #fff; border: 1px solid var(--aw-line); border-radius: 10px; color: #23262d; color-scheme: light; min-height: 44px; padding: 12px; }
.ai-workspace .ai-wallet-balance-value { color: var(--aw-ink); font-size: 28px; font-weight: 500; }
.ai-workspace .ai-wallet-package + .ai-wallet-package { margin-top: 12px; }
.ai-workspace .simpledot-ai-users-search, .ai-workspace .simpledot-ai-location-head, .ai-workspace .simpledot-ai-user-card { background: var(--aw-panel); border-color: var(--aw-line); border-radius: 14px; box-shadow: none; }
.ai-workspace .simpledot-ai-users-search input, .ai-workspace .simpledot-ai-users-summary, .ai-workspace .simpledot-ai-location-head strong, .ai-workspace .simpledot-ai-location-head span, .ai-workspace .simpledot-ai-user-title small, .ai-workspace .simpledot-ai-role-group h3, .ai-workspace .simpledot-ai-user-count span, .ai-workspace .simpledot-ai-user-count small { font-weight: 500; }
.ai-workspace .simpledot-ai-user-action, .ai-workspace .simpledot-ai-location-action, .ai-workspace .simpledot-ai-location-tab, .ai-workspace .simpledot-ai-role-pill span, .ai-workspace .simpledot-ai-user-count { background: var(--aw-soft); border-color: var(--aw-line); color: var(--aw-muted); font-weight: 450; }
.ai-workspace .simpledot-ai-location-action.is-primary, .ai-workspace .simpledot-ai-location-tab.is-active { background: var(--aw-ink); border-color: var(--aw-ink); color: var(--aw-bg); }
.ai-workspace .simpledot-ai-role-pill input:checked + span { background: var(--aw-accent-soft); border-color: var(--aw-accent); color: var(--aw-accent); }
.ai-workspace .simpledot-ai-role-pill input:focus-visible + span { outline: 2px solid var(--aw-accent); outline-offset: 3px; }
.ai-workspace .simpledot-ai-user-avatar { background: var(--aw-accent-soft); border-radius: 12px; color: var(--aw-accent); font-weight: 500; }
.ai-workspace .simpledot-ai-user-card.is-dirty { border-color: var(--aw-warning); box-shadow: none; }
.ai-workspace .simpledot-ai-user-card-foot { border-color: var(--aw-line); }
.ai-workspace .simpledot-ai-save-status.is-error { color: var(--aw-danger); }

@media (min-width: 1181px) {
    .ai-workspace [data-ai-conversation-panel] > [data-ai-history-close] { display: none; }
}
@media (max-width: 1180px) {
    .ai-workspace .ai-chat-app, .ai-workspace .simpledot-ai-chat-app { grid-template-columns: minmax(0, 1fr); }
    .ai-workspace [data-ai-history-toggle] { display: inline-flex; }
    .ai-workspace [data-ai-conversation-panel] { bottom: 0; box-shadow: var(--aw-shadow); height: var(--aw-viewport-height, 100dvh); left: var(--aw-sidebar-width); max-width: calc(100vw - var(--aw-sidebar-width)); position: fixed; top: 0; transform: translateX(-110vw); transition: transform .18s ease; width: 280px; z-index: 90; }
    .ai-workspace.ai-history-open [data-ai-conversation-panel] { transform: translateX(0); }
    .ai-workspace .ai-workspace-history-overlay { z-index: 85; }
    .ai-workspace .ai-image-studio, .ai-workspace .simpledot-ai-image-studio { grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr); }
}
@media (max-width: 900px) {
    .ai-workspace { --aw-sidebar-width: 240px; grid-template-columns: minmax(0, 1fr); }
    .ai-workspace .ai-workspace-sidebar { box-shadow: var(--aw-shadow); height: var(--aw-viewport-height, 100dvh); left: 0; max-width: calc(100vw - 38px); position: fixed; top: 0; transform: translateX(-105%); transition: transform .2s ease; width: var(--aw-sidebar-width); z-index: 90; }
    .ai-workspace.ai-sidebar-open .ai-workspace-sidebar { transform: translateX(0); }
    .ai-workspace [data-ai-sidebar-toggle], .ai-workspace [data-ai-sidebar-close] { display: inline-flex; }
    .ai-workspace [data-ai-conversation-panel] { left: 0; max-width: calc(100vw - 38px); }
    .ai-workspace-topbar { flex-basis: 59px; min-height: 59px; padding: 9px 16px; }
    .ai-workspace .ai-image-studio, .ai-workspace .simpledot-ai-image-studio, .ai-workspace .simpledot-ai-two-panel { grid-template-columns: minmax(0, 1fr); }
    .ai-workspace .ai-video-studio, .ai-workspace .simpledot-ai-video-page .simpledot-ai-video-studio { grid-template-columns: minmax(0, 1fr); }
    .ai-workspace .ai-grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
    .ai-workspace .simpledot-ai-page-head { align-items: flex-start; gap: 12px; }
    .ai-workspace .ai-chat-topbar, .ai-workspace .simpledot-ai-chat-topbar { padding: 11px 18px; }
    .ai-workspace .ai-home-welcome { margin-top: 20px; }
}
@media (max-width: 600px) {
    .ai-workspace { font-size: 14px; }
    .ai-workspace-topbar { gap: 8px; padding: 8px 12px; }
    .ai-workspace-topbar-title { font-size: 13px; }
    .ai-workspace-topbar-title small { display: none; }
    .ai-workspace-topbar-actions { gap: 5px; }
    .ai-workspace-page, .ai-workspace-content { padding: 22px 14px 32px; }
    .ai-workspace .ai-card, .ai-workspace .ai-image-panel { border-radius: 14px; padding: 18px; }
    .ai-workspace .ai-input, .ai-workspace .ai-select, .ai-workspace .ai-textarea, .ai-workspace .simpledot-ai-system .form-control { font-size: 16px; }
    .ai-workspace .simpledot-ai-page-head h2 { font-size: 25px; }
    .ai-workspace .simpledot-ai-system .box-body { padding: 16px; }
    .ai-workspace .simpledot-ai-page-actions { display: flex; width: auto; }
    .ai-workspace .simpledot-ai-page-actions .btn { font-size: 11px; min-height: 34px; padding: 7px 10px; }
    .ai-workspace .ai-chat-title strong, .ai-workspace .simpledot-ai-chat-current strong { max-width: 34vw; }
    .ai-workspace .ai-chat-title span:not(.ai-status-dot), .ai-workspace .simpledot-ai-chat-current span:not(.simpledot-ai-live-dot) { font-size: 9px; }
    .ai-workspace .ai-chat-topbar, .ai-workspace .simpledot-ai-chat-topbar { gap: 8px; min-height: 59px; padding: 10px 12px; }
    .ai-workspace .ai-chat-options > summary { font-size: 10px; padding: 7px 9px; }
    .ai-workspace .ai-chat-options[open] > .ai-chat-controls, .ai-workspace .ai-chat-options[open] > .simpledot-ai-chat-controls { min-width: 0; width: min(290px, calc(100vw - 24px)); }
    .ai-workspace .ai-thread, .ai-workspace .simpledot-ai-thread { padding: 18px 16px; }
    .ai-workspace .ai-message, .ai-workspace .simpledot-ai-message { font-size: 14px; line-height: 1.75; }
    .ai-workspace .ai-message.user, .ai-workspace .simpledot-ai-message.user { max-width: 94%; }
    .ai-workspace .ai-composer, .ai-workspace .simpledot-ai-composer { padding: 8px 10px max(12px, env(safe-area-inset-bottom)); }
    .ai-workspace .ai-composer-box, .ai-workspace .simpledot-ai-composer-box { border-radius: 21px; gap: 3px; padding: 7px; }
    .ai-workspace #ai-message, .ai-workspace #simpledot-ai-message { font-size: 16px; }
    .ai-workspace .ai-attach-button, .ai-workspace .ai-mic-button, .ai-workspace .simpledot-ai-attach, .ai-workspace .simpledot-ai-mic { flex-basis: 31px; padding: 7px; width: 31px; }
    .ai-workspace .ai-workspace-composer-help { font-size: 9px; }
    .ai-workspace .simpledot-ai-erp-home > .simpledot-ai-page-head { padding: 10px 15px; }
    .ai-workspace .simpledot-ai-usage-details { padding: 0 15px; }
    .ai-workspace .simpledot-ai-metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-workspace .simpledot-ai-metric { padding: 13px; }
    .ai-workspace .simpledot-ai-metric strong { font-size: 21px; }
    .ai-workspace .ai-welcome.ai-home-welcome { margin: 10px auto 22px; padding: 18px 0 4px; }
    .ai-workspace .ai-home-welcome h1 { font-size: 33px; }
    .ai-workspace .ai-home-welcome > p { font-size: 13px; }
    .ai-workspace .ai-welcome-composer { font-size: 13px; min-height: 75px; padding: 16px; }
    .ai-workspace .ai-home-tools > .ai-grid { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-workspace .ai-home-tools .ai-card { padding: 15px; }
    .ai-workspace .ai-home-tools .ai-card h2, .ai-workspace .ai-home-tools .ai-card h3 { font-size: 14px; }
    .ai-workspace .ai-auth-card { margin: 12px auto; padding: 22px; }
    .ai-workspace .ai-image-gallery-head, .ai-workspace .simpledot-ai-image-toolbar { align-items: flex-start; flex-wrap: wrap; }
    .ai-workspace .ai-image-grid, .ai-workspace .simpledot-ai-image-gallery { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .ai-workspace *, .ai-workspace *::before, .ai-workspace *::after { scroll-behavior: auto !important; transition: none !important; }
}
