:root {
    font-family: 'Segoe UI', sans-serif;
    color: #202534;
    background: #f7f8fb;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --ink: #202534;
    --muted: #8a90a1;
    --line: #e9ebf1;
    --purple: #7257e8;
    --sidebar: #10131d;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 360px; min-height: 100vh; background: #f7f8fb; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 4; display: flex; flex-direction: column; width: 248px; padding: 27px 17px 17px; color: #c1c5d2; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 49px 5px; color: #fff; text-decoration: none; font-family: 'Segoe UI', sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -.8px; }
.brand-icon { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; border-radius: 9px; background: linear-gradient(140deg, #9a7df5, #624be0); }
.brand-icon svg { width: 19px; height: 19px; stroke-width: 2; }
.brand-dot { color: #a38dfc; }
.workspace-label { margin: 0 0 11px 11px; color: #73798b; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
.side-nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 11px; color: #a8adbd; border: 0; border-radius: 8px; background: transparent; text-align: left; text-decoration: none; font-size: 12px; font-weight: 500; transition: .18s ease; }
.nav-link svg { width: 17px; height: 17px; color: #858b9d; }
.nav-link:hover { color: #fff; background: #1b1f2c; }
.nav-link.active { color: #fff; background: #29233d; }
.nav-link.active svg { color: #a890ff; }
.nav-count { display: grid; min-width: 19px; height: 19px; place-items: center; margin-left: auto; color: #cbc1ff; border-radius: 6px; background: #393152; font-size: 10px; }
.sidebar-divider { height: 1px; margin: 22px 4px 21px; background: #252936; }
.nav-button { width: 100%; margin-top: 4px; }
.sidebar-bottom { margin-top: auto; }
.privacy-note { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 13px 10px; border: 1px solid #252a37; border-radius: 9px; background: #171b27; }
.privacy-note svg { flex: 0 0 auto; width: 17px; color: #8b75f0; }
.privacy-note strong, .privacy-note span { display: block; }
.privacy-note strong { color: #d7d9e2; font-size: 10px; font-weight: 600; }
.privacy-note span { margin-top: 3px; color: #858b9d; font-size: 9px; }
.profile { display: flex; align-items: center; gap: 9px; padding: 12px 4px 0; border-top: 1px solid #252936; }
.avatar { display: grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; color: #dcd5ff; border: 1px solid #4d426f; border-radius: 50%; background: #32294a; font-size: 9px; font-weight: 700; }
.profile-copy { min-width: 0; }
.profile-copy strong, .profile-copy span { display: block; }
.profile-copy strong { color: #e7e8ed; font-size: 10px; font-weight: 600; }
.profile-copy span { margin-top: 3px; color: #878d9e; font-size: 9px; }
.profile-menu { margin-left: auto; color: #858b9d; font-size: 19px; letter-spacing: 1px; }

.main-content { width: calc(100% - 248px); min-height: 100vh; margin-left: 248px; }
.topbar { display: flex; height: 66px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid #eceef3; background: rgba(255,255,255,.82); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #989dad; font-size: 11px; }
.breadcrumbs strong { color: #3a4050; font-weight: 600; }
.crumb-slash { color: #c3c6d0; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.secure-label { display: flex; align-items: center; gap: 7px; color: #858b9b; font-size: 10px; }
.provider-picker { display: inline-flex; align-items: center; gap: 7px; color: #687782; font-size: 11px; font-weight: 600; }
.provider-picker select { min-width: 115px; height: 34px; padding: 0 26px 0 10px; color: #285d56; border: 1px solid #dce8e3; border-radius: 8px; outline: 0; background: #f5faf7; font-size: 11px; font-weight: 600; }
.provider-picker select:focus-visible { border-color: #85b3a2; box-shadow: 0 0 0 3px rgb(79 145 121 / 12%); }
.provider-picker select:disabled { cursor: default; opacity: 1; }
.secure-dot, .model-badge span { width: 6px; height: 6px; border-radius: 50%; background: #49b98d; box-shadow: 0 0 0 3px #e2f5ee; }
.icon-button { display: grid; width: 31px; height: 31px; place-items: center; color: #62697a; border: 1px solid #e8eaf0; border-radius: 8px; background: #fff; }
.icon-button:hover { color: var(--purple); border-color: #cfc5ff; }
.icon-button svg { width: 16px; height: 16px; }
.account-button { display: inline-flex; height: 32px; align-items: center; gap: 7px; padding: 0 10px; color: #6656bb; border: 1px solid #e8e3fc; border-radius: 8px; background: #faf9ff; font-size: 10px; font-weight: 600; }
.account-button:hover { border-color: #cfc5ff; background: #f5f2ff; }
.account-button svg { width: 15px; height: 15px; }
.account-modal[hidden] { display: none; }
.account-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(15,18,29,.48); backdrop-filter: blur(3px); }
.account-dialog { width: min(440px, 100%); max-height: min(680px, calc(100vh - 36px)); overflow-y: auto; padding: 20px; border: 1px solid #e9ebf1; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(14,17,31,.2); }
.account-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; }
.account-dialog-header h2 { margin: 5px 0 0; color: #303547; font-size: 20px; }
.account-close { width: 29px; height: 29px; color: #858b9b; border: 1px solid #e8eaf0; border-radius: 7px; background: #fff; font-size: 19px; line-height: 1; }
.account-description { margin: 11px 0 13px; color: #858b9b; font-size: 11px; line-height: 1.6; }
.account-notice { display: none; margin-bottom: 10px; padding: 9px 10px; color: #6254a9; border: 1px solid #eae6fc; border-radius: 8px; background: #faf9ff; font-size: 10px; line-height: 1.5; }
.account-notice:not(:empty) { display: block; }
.account-notice.error { color: #a23c46; border-color: #f7d8dc; background: #fff8f8; }
.account-list { display: grid; gap: 7px; }
.account-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; color: #4a5060; border: 1px solid #eceef3; border-radius: 8px; background: #fff; text-align: left; }
.account-option:hover:not(:disabled) { border-color: #d7d0fa; background: #fcfbff; }
.account-option:disabled { cursor: default; }
.account-option strong, .account-option small { display: block; }
.account-option strong { font-size: 11px; font-weight: 600; }
.account-option small { margin-top: 3px; color: #969baa; font-size: 9px; }
.account-active { padding: 4px 7px; color: #278369; border-radius: 12px; background: #e9f7f1; font-size: 8px; font-weight: 700; }
.login-flow { margin-top: 11px; padding: 11px; border: 1px solid #e8e4fa; border-radius: 9px; background: #fcfbff; }
.login-flow[hidden] { display: none; }
.login-flow p { margin: 0 0 9px; color: #858b9b; font-size: 9px; line-height: 1.5; }
.device-link { color: #6955cf; font-size: 10px; font-weight: 600; text-decoration: none; }
.device-link:hover { text-decoration: underline; }
.device-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.device-code-row strong { color: #303547; font-family: Consolas, monospace; font-size: 17px; letter-spacing: 1.5px; }
.copy-code-button { padding: 6px 8px; color: #6a59c3; border: 1px solid #e6e1fa; border-radius: 6px; background: #fff; font-size: 9px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.account-secondary, .account-logout { min-height: 32px; padding: 0 10px; border: 1px solid #e8eaf0; border-radius: 7px; background: #fff; font-size: 9px; }
.account-secondary { color: #6754c7; border-color: #e6e1fa; }
.account-secondary:hover { background: #f8f6ff; }
.account-logout { color: #a3414c; border-color: #f1dfe2; }
.account-logout:hover { background: #fff8f8; }
.account-secondary:disabled, .account-logout:disabled { cursor: wait; opacity: .55; }
.account-footnote { margin: 12px 0 0; color: #a0a5b1; font-size: 8px; line-height: 1.55; }
.content-wrap { width: min(1190px, 100%); margin: 0 auto; padding: 35px 42px 25px; }
.intro { margin-bottom: 24px; }
.eyebrow, .panel-eyebrow { color: #9a8bdf; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
.sparkle { margin-right: 5px; color: #8a6af0; font-size: 13px; vertical-align: -1px; }
h1, h2, p { margin-top: 0; }
.intro h1 { margin: 10px 0 7px; color: #222638; font-family: 'Segoe UI', sans-serif; font-size: clamp(29px, 3.2vw, 39px); font-weight: 700; letter-spacing: -1.65px; line-height: 1.15; }
.intro h1 span { color: #7660dc; }
.intro p { max-width: 495px; margin: 0; color: #858b9b; font-size: 12px; line-height: 1.65; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 21px; }
.overview-card { display: flex; min-height: 91px; align-items: center; gap: 12px; padding: 15px; border: 1px solid #eceef3; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(31,35,55,.018); }
.overview-icon { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 10px; }
.overview-icon svg { width: 17px; height: 17px; }
.icon-lilac { color: #795fe5; background: #f0edff; }
.icon-mint { color: #249c7c; background: #e8f7f1; }
.icon-blue { color: #4386d9; background: #eaf3ff; }
.overview-label, .overview-card strong, .overview-card small { display: block; }
.overview-label { margin-bottom: 4px; color: #9298a8; font-size: 9px; }
.overview-card strong { color: #303547; font-family: 'Segoe UI', sans-serif; font-size: 15px; font-weight: 700; }
.overview-card small { margin-top: 3px; color: #a1a6b3; font-size: 9px; }
.gateway-card strong { font-size: 12px; }
.gateway-status { display: block; width: fit-content; padding: 3px 7px; border-radius: 20px; font-size: 10px !important; }
.gateway-status.pending { color: #77718d; background: #f0eef7; }
.gateway-status.ready { color: #18764f; background: #e7f7ef; }
.gateway-status.offline { color: #a53d49; background: #fff0f1; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(255px, .92fr); align-items: start; gap: 16px; }
.chat-panel, .goals-panel, .templates-panel { border: 1px solid #e9ebf1; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(33,38,58,.025); }
.chat-panel { display: flex; min-height: 570px; flex-direction: column; padding: 0 19px 13px; }
.chat-header { display: flex; height: 58px; flex: 0 0 auto; align-items: center; gap: 10px; border-bottom: 1px solid #f0f1f5; }
.assistant-avatar { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; border-radius: 9px; background: linear-gradient(145deg, #9c82f6, #6952df); }
.assistant-avatar svg { width: 17px; height: 17px; }
.chat-header strong, .chat-header span { display: block; }
.chat-header strong { color: #303547; font-size: 11px; font-weight: 700; }
.chat-header div:nth-child(2) span { margin-top: 3px; color: #9ba0ad; font-size: 9px; }
.model-badge { display: flex !important; align-items: center; gap: 6px; margin-left: auto; padding: 5px 8px; color: #6b5ac3; border: 1px solid #eeeafd; border-radius: 20px; background: #faf9ff; font-size: 9px; font-weight: 600; }
.model-badge span { width: 5px; height: 5px; box-shadow: none; background: #8a70ed; }
.chat-scroll { display: flex; flex: 1 1 auto; flex-direction: column; gap: 14px; overflow-y: auto; padding: 22px 3px 10px; }
.welcome-message { max-width: 390px; margin: auto; padding: 26px 12px 36px; text-align: center; }
.welcome-symbol { display: grid; width: 40px; height: 40px; place-items: center; margin: 0 auto 14px; color: #8068ea; border: 1px solid #ece8ff; border-radius: 13px; background: #f7f5ff; font-size: 20px; }
.welcome-message h2 { margin: 0 0 9px; color: #303447; font-family: 'Segoe UI', sans-serif; font-size: 19px; letter-spacing: -.5px; }
.welcome-message h2 span { font-size: 15px; }
.welcome-message p { margin: 0; color: #969bab; font-size: 11px; line-height: 1.75; }
.message { max-width: 90%; }
.message.user { align-self: flex-end; }
.message.assistant { align-self: flex-start; }
.message-label { display: block; margin: 0 0 5px 2px; color: #9da2af; font-size: 9px; }
.message-bubble { padding: 11px 13px; color: #4a5060; border: 1px solid #edeef3; border-radius: 11px 11px 11px 3px; background: #fafafd; font-size: 11px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.message-bubble > :first-child { margin-top: 0; }
.message-bubble > :last-child { margin-bottom: 0; }
.message-bubble p { margin: 0 0 9px; }
.message-bubble h2, .message-bubble h3, .message-bubble h4 { margin: 13px 0 6px; color: #38354d; font-size: 12px; line-height: 1.45; }
.message-bubble h2 { font-size: 14px; }
.message-bubble ul, .message-bubble ol { margin: 5px 0 10px; padding-left: 21px; }
.message-bubble li { padding-left: 2px; margin: 3px 0; }
.message-bubble blockquote { margin: 8px 0; padding: 3px 0 3px 10px; color: #717688; border-left: 2px solid #c9c1ef; }
.message-bubble blockquote p { margin: 0; }
.message-bubble pre { margin: 8px 0; padding: 10px; overflow-x: auto; border-radius: 7px; background: #f0eff5; white-space: pre-wrap; }
.message-bubble code { padding: 1px 4px; border-radius: 4px; background: #efedf6; font-family: Consolas, monospace; font-size: .92em; }
.message-bubble pre code { padding: 0; background: none; }
.message-bubble hr { border: 0; border-top: 1px solid #e4e3eb; }
.markdown-table-wrap { max-width: 100%; margin: 9px 0; overflow-x: auto; }
.message-bubble table { width: 100%; border-collapse: collapse; font-size: 10px; }
.message-bubble th, .message-bubble td { min-width: 76px; padding: 6px 8px; border: 1px solid #e5e5ee; text-align: left; vertical-align: top; }
.message-bubble th { color: #494266; background: #f1eff9; font-weight: 650; }
.message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0 0 2px; }
.message-actions select, .message-actions button { min-height: 25px; padding: 4px 7px; color: #68637d; border: 1px solid #e8e6ef; border-radius: 6px; background: #fff; font: inherit; font-size: 9px; }
.message-actions button { color: #6654c1; cursor: pointer; }
.message-actions button:hover { border-color: #cfc5ff; background: #f8f6ff; }
.message-actions button:disabled { cursor: wait; opacity: .6; }
.message-action-status { color: #858a98; font-size: 9px; }
.message.user .message-bubble { color: #fff; border-color: #7460df; border-radius: 11px 11px 3px 11px; background: #7763e2; }
.message-error .message-bubble { color: #a23c46; border-color: #f7d8dc; background: #fff8f8; }
.typing-dots { display: flex; gap: 4px; padding: 12px 13px; }
.typing-dots span { width: 5px; height: 5px; border-radius: 50%; background: #9a8ae7; animation: pulse 1s infinite alternate; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { opacity: .3; transform: translateY(-2px); } }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 1px 11px; }
.suggestions button { padding: 7px 9px; color: #7164b7; border: 1px solid #ebe8fa; border-radius: 20px; background: #fcfbff; font-size: 9px; transition: .16s ease; }
.suggestions button:hover { color: #5943c2; border-color: #cfc5ff; background: #f5f2ff; }
.composer { padding: 10px 11px 8px; border: 1px solid #e6e8ef; border-radius: 10px; background: #fff; box-shadow: 0 3px 11px rgba(27,30,50,.035); }
.composer:focus-within { border-color: #c7bdfb; box-shadow: 0 0 0 3px #f4f1ff; }
.composer textarea { display: block; width: 100%; min-height: 30px; max-height: 130px; resize: none; color: #3d4353; border: 0; outline: 0; background: transparent; font-size: 11px; line-height: 1.55; }
.composer textarea::placeholder { color: #a4a8b4; }
.composer-toolbar, .composer-tools { display: flex; align-items: center; justify-content: space-between; }
.composer-tools { gap: 14px; }
.tool-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; color: #8990a0; border: 0; background: none; font-size: 9px; }
.tool-button:hover { color: #6d57d6; }
.tool-button svg { width: 14px; height: 14px; }
.send-button { display: grid; width: 29px; height: 29px; place-items: center; color: #fff; border: 0; border-radius: 8px; background: #7862e3; transition: .16s ease; }
.send-button:hover { background: #6249d6; transform: translateY(-1px); }
.send-button:disabled { cursor: wait; opacity: .55; }
.send-button svg { width: 15px; height: 15px; }
.disclaimer { margin: 8px 0 0; color: #a6aab6; font-size: 8px; text-align: center; }
.attachment-preview { padding: 0 0 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 8px; color: #6254a9; border: 1px solid #eae6fc; border-radius: 7px; background: #faf9ff; font-size: 9px; }
.file-chip svg { flex: 0 0 auto; width: 14px; height: 14px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { padding: 0 2px; color: #8d87a8; border: 0; background: none; font-size: 14px; }
.attachment-hint { display: block; margin: 4px 0 0 3px; color: #989eac; font-size: 8px; }

.right-column { display: grid; gap: 14px; }
.goals-panel, .templates-panel { padding: 17px 15px 15px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-eyebrow { font-size: 8px; letter-spacing: 1.05px; }
.panel-heading h2 { margin: 5px 0 0; color: #303547; font-family: 'Segoe UI', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -.4px; }
.add-goal-button { display: grid; width: 27px; height: 27px; place-items: center; color: #755fe0; border: 1px solid #e8e3fc; border-radius: 8px; background: #f8f6ff; font-size: 20px; line-height: 1; }
.add-goal-button:hover { color: #fff; background: #7862e3; }
.panel-description { margin: 8px 0 13px; color: #969baa; font-size: 9px; line-height: 1.5; }
.goal-list { display: grid; gap: 14px; }
.goal-item { padding-bottom: 12px; border-bottom: 1px solid #f0f1f4; }
.goal-item:last-child { padding-bottom: 0; border-bottom: 0; }
.goal-item-top, .goal-values { display: flex; align-items: center; justify-content: space-between; }
.goal-item-top strong, .goal-item-top span { display: block; }
.goal-item-top strong { color: #4a5060; font-size: 10px; font-weight: 600; }
.goal-item-top span { margin-top: 3px; color: #a0a5b1; font-size: 8px; }
.delete-goal { padding: 1px 5px; color: #b1b5c0; border: 0; background: none; font-size: 15px; }
.delete-goal:hover { color: #dc6671; }
.goal-values { margin: 10px 0 6px; color: #858b9b; font-size: 9px; }
.goal-values strong { color: #6d5bd0; font-size: 9px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 5px; background: #f0eef9; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #957ff1, #6e59db); }
.empty-goal { display: grid; justify-items: center; padding: 15px 8px 13px; text-align: center; }
.empty-goal-icon { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 9px; color: #8c79e9; border-radius: 10px; background: #f3f0ff; font-size: 20px; }
.empty-goal strong { color: #555b6b; font-size: 10px; }
.empty-goal span { max-width: 180px; margin-top: 5px; color: #a0a5b1; font-size: 8px; line-height: 1.5; }
.goal-form { display: grid; gap: 9px; margin: 13px 0; padding: 11px; border: 1px solid #edeaf9; border-radius: 9px; background: #fcfbff; }
.goal-form[hidden] { display: none; }
.goal-form label { display: grid; gap: 4px; color: #858b9b; font-size: 8px; }
.goal-form input { width: 100%; height: 30px; padding: 0 8px; color: #43495a; border: 1px solid #e8e9ef; border-radius: 6px; outline: 0; background: #fff; font-size: 9px; }
.goal-form input:focus { border-color: #b9aefa; }
.goal-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goal-form-actions { display: flex; justify-content: flex-end; gap: 7px; }
.cancel-button, .save-button { padding: 7px 9px; border: 1px solid #e5e6ed; border-radius: 6px; background: #fff; font-size: 8px; }
.cancel-button { color: #818797; }
.save-button { color: #fff; border-color: #7862e3; background: #7862e3; }
.form-error { display: none; margin: 0; color: #b94a54; font-size: 8px; }
.form-error:not(:empty) { display: block; }
.template-card { display: flex; width: 100%; align-items: center; gap: 9px; margin-top: 9px; padding: 9px 7px; border: 1px solid transparent; border-radius: 8px; background: #fff; text-align: left; transition: .17s ease; }
.template-card:hover { border-color: #ece9fa; background: #fcfbff; transform: translateY(-1px); }
.template-icon { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 8px; }
.template-icon svg { width: 15px; height: 15px; }
.template-purple { color: #795fe2; background: #f1eeff; }
.template-green { color: #299879; background: #eaf7f1; }
.template-blue { color: #4784d4; background: #edf4ff; }
.template-card span:nth-child(2) { min-width: 0; }
.template-card strong, .template-card small { display: block; }
.template-card strong { color: #505666; font-size: 9px; font-weight: 600; }
.template-card small { margin-top: 4px; overflow: hidden; color: #9ca1ae; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.template-arrow { margin-left: auto; color: #a9a3c4; font-size: 13px; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 17px; color: #a2a7b3; font-size: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

@media (min-width: 1500px) {
    .content-wrap { padding-top: 43px; }
    .chat-panel { min-height: 610px; }
}

@media (max-width: 1100px) {
    .sidebar { width: 215px; }
    .main-content { width: calc(100% - 215px); margin-left: 215px; }
    .content-wrap { padding-right: 25px; padding-left: 25px; }
    .topbar { padding-right: 25px; padding-left: 25px; }
    .workspace-grid { grid-template-columns: minmax(0, 1.3fr) minmax(235px, .9fr); gap: 12px; }
    .chat-panel { padding-right: 14px; padding-left: 14px; }
}

.brand-icon svg { width: 19px; height: 19px; }

:root {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #202b34;
    background: #f3f5f4;
    --ink: #202b34;
    --muted: #687782;
    --line: #e2e8e6;
    --purple: #266e64;
    --sidebar: #172b31;
}

body {
    min-width: 320px;
    background: #f3f5f4;
    color: var(--ink);
    font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgb(54 132 118 / 28%);
    outline-offset: 2px;
}

.sidebar {
    width: 252px;
    padding: 26px 18px 18px;
    background: #172b31;
}

.brand {
    margin-bottom: 42px;
    font-family: inherit;
    font-size: 21px;
    letter-spacing: -.7px;
}

.brand-icon {
    background: #2b7066;
}

.brand-dot { color: #7bc2a5; }
.workspace-label { color: #9aa9aa; font-size: 10px; letter-spacing: 1.1px; }
.nav-link { min-height: 44px; border-radius: 9px; font-size: 13px; }
.nav-link.active { background: #294147; }
.nav-link.active svg { color: #8bc6ae; }
.sidebar-divider { background: #2a3c41; }
.privacy-note { border-color: #2a3c41; background: #1d3339; }
.privacy-note strong { font-size: 11px; }
.privacy-note span, .profile-copy span { font-size: 10px; }
.profile-copy strong { font-size: 11px; }
.profile-logout { width: 32px; height: 32px; }

.main-content {
    width: calc(100% - 252px);
    min-width: 0;
    margin-left: 252px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 68px;
    padding: 0 clamp(20px, 3vw, 44px);
    border-color: #e5eae8;
    background: rgb(255 255 255 / 94%);
    backdrop-filter: blur(12px);
}

.breadcrumbs { font-size: 13px; }
.breadcrumbs strong { color: #27353c; }
.topbar-right { gap: 12px; }
.secure-label { font-size: 12px; }
.account-button, .icon-button { min-height: 38px; border-radius: 9px; font-size: 12px; }
.account-button { padding: 0 12px; color: #285d56; border-color: #dce8e3; background: #f5faf7; }
.account-button:hover { border-color: #a9cbbd; background: #eef7f2; }
.icon-button { width: 38px; height: 38px; }

.content-wrap {
    width: min(1380px, 100%);
    padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 44px) 32px;
}

.intro { margin-bottom: 28px; }
.eyebrow, .panel-eyebrow { color: #46786d; font-size: 10px; letter-spacing: 1.15px; }
.sparkle { color: #438c79; }
.intro h1 {
    margin-top: 12px;
    color: #1e2b33;
    font-family: inherit;
    font-size: clamp(32px, 3.3vw, 42px);
    font-weight: 650;
    letter-spacing: -1.6px;
}
.intro h1 span { color: #367b6e; }
.intro p { color: #687782; font-size: 14px; }

.overview-grid { gap: 14px; margin-bottom: 22px; }
.overview-card {
    min-height: 100px;
    gap: 14px;
    padding: 18px;
    border-color: #e3e9e7;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgb(26 47 49 / 3%);
}
.overview-icon { width: 40px; height: 40px; border-radius: 11px; }
.icon-lilac { color: #3d7469; background: #edf4ef; }
.icon-mint { color: #34836b; background: #eaf5ef; }
.icon-blue { color: #477a84; background: #edf4f3; }
.overview-label { color: #687782; font-size: 11px; }
.overview-card strong { color: #24343b; font-family: inherit; font-size: 18px; }
.overview-card small { color: #829098; font-size: 11px; }
.gateway-card strong { font-size: 13px; }
.gateway-status.pending { color: #596c73; background: #edf1f0; }
.gateway-status.ready { color: #24674f; background: #e8f4ec; }
.gateway-status.offline { color: #a53d49; background: #fff0f1; }

.workspace-grid { gap: 18px; }
.chat-panel, .goals-panel, .templates-panel, .calculator-panel {
    border-color: #e2e8e6;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(26 47 49 / 3%);
}
.chat-panel { min-height: 620px; padding: 0 22px 16px; }
.chat-header { height: 68px; gap: 12px; border-color: #edf0ef; }
.assistant-avatar { width: 36px; height: 36px; border-radius: 10px; background: #2f7167; }
.chat-header strong { color: #26363d; font-size: 13px; }
.chat-header div:nth-child(2) span { color: #78878d; font-size: 11px; }
.model-badge { padding: 6px 10px; color: #38695f; border-color: #dce9e3; background: #f4f9f6; font-size: 11px; }
.model-badge span { background: #4a947b; }
.chat-scroll { padding-top: 28px; }
.welcome-message { max-width: 460px; padding: 32px 16px 42px; }
.welcome-symbol { color: #367b6e; border-color: #e1ece6; border-radius: 12px; background: #f2f7f4; }
.welcome-message h2 { color: #28373d; font-family: inherit; font-size: 22px; }
.welcome-message p { color: #718087; font-size: 13px; }
.message-label { font-size: 11px; }
.message-bubble { padding: 13px 15px; color: #3d4a50; border-color: #e6ebe9; border-radius: 12px 12px 12px 4px; background: #f8faf9; font-size: 13px; line-height: 1.7; }
.message-bubble h2, .message-bubble h3, .message-bubble h4 { color: #2a4944; font-size: 15px; }
.message-bubble h2 { font-size: 17px; }
.message-bubble th { color: #315a52; background: #f0f5f2; }
.message.user .message-bubble { border-color: #316f65; background: #316f65; }
.message-actions select, .message-actions button { min-height: 32px; padding: 6px 9px; color: #4f6664; border-color: #e1e9e6; border-radius: 7px; font-size: 11px; }
.message-actions button { color: #326c62; }
.suggestions { gap: 8px; padding-bottom: 13px; }
.suggestions button { padding: 8px 11px; color: #416d64; border-color: #dfe9e5; border-radius: 8px; background: #f8fbf9; font-size: 11px; }
.suggestions button:hover { color: #28594f; border-color: #b7d2c7; background: #f0f7f3; }
.composer { padding: 12px 13px 10px; border-color: #dfe7e4; border-radius: 12px; box-shadow: 0 2px 8px rgb(26 47 49 / 4%); }
.composer:focus-within { border-color: #89b6a5; box-shadow: 0 0 0 3px rgb(79 145 121 / 12%); }
.composer textarea { min-height: 38px; color: #293a40; font-size: 14px; }
.tool-button { gap: 7px; color: #60736f; font-size: 11px; }
.tool-button:hover { color: #2e7265; }
.send-button { width: 36px; height: 36px; border-radius: 9px; background: #316f65; }
.send-button:hover { background: #275b53; }
.disclaimer { color: #7d8b8d; font-size: 10px; line-height: 1.55; }

.right-column { gap: 16px; }
.calculator-panel, .goals-panel, .templates-panel { padding: 20px; }
.panel-heading h2 { color: #28383e; font-family: inherit; font-size: 18px; letter-spacing: -.3px; }
.panel-description { margin-top: 9px; color: #718087; font-size: 12px; line-height: 1.6; }
.calculator-form { gap: 12px; }
.calculator-form > label, .goal-form label { gap: 6px; color: #4c5d61; font-size: 12px; font-weight: 550; }
.calculator-form select, .calculator-form input, .goal-form input, .goal-form select, .goal-period-form input {
    min-height: 40px;
    padding: 0 11px;
    color: #2c3c42;
    border-color: #dce5e2;
    border-radius: 8px;
    background-color: #fff;
    font-size: 13px;
}
.calculator-form select:focus, .calculator-form input:focus, .goal-form input:focus, .goal-form select:focus, .goal-period-form input:focus {
    border-color: #85b3a2;
    box-shadow: 0 0 0 3px rgb(79 145 121 / 11%);
}
.save-button { min-height: 38px; color: #fff; border-color: #316f65; border-radius: 8px; background: #316f65; font-size: 12px; }
.save-button:hover { border-color: #275b53; background: #275b53; }
.calculation-result { display: grid; gap: 8px; margin-top: 14px; padding: 13px; border: 1px solid #e0ebe5; border-radius: 9px; background: #f7faf8; }
.calculation-result strong { color: #2e6858; font-size: 13px; }
.calculation-result > span { color: #62746f; font-size: 11px; line-height: 1.55; }
.calculation-result .cancel-button { color: #326c62; font-size: 11px; }
.add-goal-button { width: 34px; height: 34px; color: #326d62; border-color: #dce9e3; border-radius: 9px; background: #f3f8f5; }
.add-goal-button:hover { color: #fff; background: #316f65; }
.goal-list { gap: 16px; }
.goal-item { padding-bottom: 15px; border-color: #edf0ef; }
.goal-item-top strong { color: #35474c; font-size: 13px; }
.goal-item-top span, .goal-values { color: #77868a; font-size: 11px; }
.goal-values strong { color: #347562; font-size: 12px; }
.progress-track { height: 7px; background: #edf2ef; }
.progress-track span { background: #4b9678; }
.goal-period-form, .goal-form { padding: 12px; border-color: #e6ece9; border-radius: 9px; background: #f8faf9; }
.goal-period-form label, .goal-form label { color: #59696d; font-size: 11px; }
.goal-period-form button, .edit-goal { min-height: 30px; padding: 6px 9px; color: #326c62; border-color: #dce9e3; border-radius: 7px; background: #f5f9f6; font-size: 10px; }
.goal-period-form button:hover, .edit-goal:hover { border-color: #b7d2c7; background: #edf5f0; }
.empty-goal { padding: 22px 10px; }
.empty-goal-icon { color: #397867; background: #edf5f0; }
.empty-goal strong { color: #43565a; font-size: 12px; }
.empty-goal span { color: #77868a; font-size: 11px; }
.template-card { gap: 11px; margin-top: 7px; padding: 11px 9px; border-radius: 9px; }
.template-card:hover { border-color: #dce9e3; background: #f8fbf9; }
.template-icon { width: 36px; height: 36px; border-radius: 9px; }
.template-purple, .template-green, .template-blue { color: #397565; background: #edf5f0; }
.template-card strong { color: #3c4d51; font-size: 12px; }
.template-card small { color: #77868a; font-size: 10px; }
.template-arrow { color: #718880; }
.page-footer { color: #758588; font-size: 10px; }
.account-dialog { border-color: #e2e8e6; border-radius: 16px; }
.account-dialog-header h2 { color: #28383e; }
.account-option, .login-flow { border-color: #e3eae7; border-radius: 9px; }
.account-secondary { color: #326c62; border-color: #dce9e3; }

.auth-page {
    display: grid;
    min-width: 320px;
    min-height: 100vh;
    place-items: center;
    padding: clamp(16px, 4vw, 48px);
    background: #f1f4f2;
}

.auth-shell {
    display: grid;
    width: min(100%, 980px);
    min-height: 620px;
    grid-template-columns: minmax(280px, .88fr) minmax(0, 1.12fr);
    overflow: hidden;
    border: 1px solid #e0e7e4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgb(28 48 48 / 9%);
}

.auth-aside {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: clamp(28px, 4vw, 48px);
    color: #f2f6f4;
    background: #1a3035;
}

.auth-aside .auth-brand { margin: 0; color: #f5f8f6; }
.auth-aside .brand-icon { color: #fff; background: #34786c; }
.auth-aside .brand-dot { color: #87c4a8; }
.auth-aside-copy { margin: auto 0; padding: 44px 0; }
.auth-aside-label { color: #a8c9bc; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
.auth-aside-copy h2 { margin: 15px 0 14px; color: #f5f7f6; font-size: clamp(29px, 3.2vw, 39px); font-weight: 600; letter-spacing: -1.2px; line-height: 1.15; }
.auth-aside-copy p { max-width: 330px; margin: 0; color: #c1cfcb; font-size: 14px; line-height: 1.8; }
.auth-aside-foot { display: flex; align-items: center; gap: 10px; color: #b5c6c1; font-size: 11px; }
.auth-aside-mark { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #82bd9d; }

.auth-card {
    align-self: center;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: clamp(30px, 5vw, 64px);
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.auth-card .panel-eyebrow { margin-bottom: 11px; color: #44786c; font-size: 10px; }
.auth-card h1 { color: #233239; font-size: clamp(25px, 3vw, 31px); font-weight: 650; letter-spacing: -.8px; }
.auth-description { margin: 11px 0 27px; color: #718087; font-size: 14px; line-height: 1.65; }
.auth-form { display: grid; gap: 18px; }
.auth-form > label { display: grid; gap: 7px; color: #3d4c50; font-size: 13px; font-weight: 600; }
.auth-form > label small { margin-top: -3px; color: #73827f; font-size: 11px; }
.auth-form input:not([type="checkbox"]) {
    display: block;
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    color: #26373d;
    border: 1px solid #dce5e2;
    border-radius: 8px;
    font-size: 14px;
}
.auth-form input:not([type="checkbox"]):focus { border-color: #85b3a2; box-shadow: 0 0 0 3px rgb(79 145 121 / 12%); }
.auth-form .remember-row { display: flex; align-items: center; gap: 10px; color: #657579; font-size: 12px; }
.remember-row input { width: 16px; height: 16px; accent-color: #367b6e; }
.auth-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 3px;
    border-radius: 8px;
    background: #316f65;
    box-shadow: none;
    font-size: 14px;
    font-weight: 650;
}
.auth-submit:hover { background: #275b53; filter: none; transform: none; }
.auth-links { justify-content: flex-start; gap: 20px; margin-top: 22px; }
.auth-links a { color: #326e63; font-size: 13px; }
.auth-links a:hover { color: #204f47; }
.auth-notice { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; font-size: 13px; }

@media (max-width: 1100px) {
    .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .right-column { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
    .chat-panel { min-height: 570px; }
}

@media (max-width: 820px) {
    .sidebar {
        inset: 0 0 auto;
        width: 100%;
        height: 66px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        border-bottom: 1px solid #2a3c41;
        box-shadow: 0 4px 14px rgb(20 39 42 / 10%);
    }

    .brand { margin: 0; }
    .workspace-label, .sidebar-divider, .sidebar > .nav-button,
    .history-label, .conversation-list, .privacy-note, .profile-copy { display: none; }
    .side-nav { display: flex; width: auto; gap: 5px; }
    .nav-link { min-height: 38px; gap: 7px; padding: 0 10px; font-size: 12px; }
    .nav-link svg { width: 16px; height: 16px; }
    .nav-count { position: static; min-width: 18px; height: 18px; font-size: 10px; }
    .sidebar-bottom { width: auto; margin: 0 0 0 8px; }
    .profile { justify-content: center; padding: 0; border: 0; }
    .profile-logout { width: 36px; height: 36px; }
    .main-content { width: 100%; margin: 66px 0 0; }
    .topbar { height: 60px; padding: 0 22px; }
    .content-wrap { padding: 30px 22px 26px; }
}

@media (max-width: 680px) {
    .right-column { grid-template-columns: minmax(0, 1fr); }
    .overview-grid { grid-template-columns: minmax(0, 1fr); }
    .overview-card { min-height: 86px; }
    .overview-icon { width: 38px; height: 38px; }
    .overview-label { font-size: 12px; }
    .overview-card strong { font-size: 17px; }
    .overview-card small { font-size: 11px; }
    .gateway-card strong { font-size: 13px; }
    .topbar { padding: 0 16px; }
    .content-wrap { padding: 26px 16px 24px; }
    .intro { margin-bottom: 22px; }
    .intro h1 { font-size: clamp(30px, 8vw, 38px); }
    .intro p { font-size: 13px; }
    .chat-panel { min-height: 520px; padding-right: 14px; padding-left: 14px; }
    .welcome-message { padding: 26px 8px 32px; }
    .message { max-width: 96%; }
    .page-footer { flex-direction: column; gap: 6px; }
    .auth-page { padding: 14px; }
    .auth-shell { min-height: 0; grid-template-columns: minmax(0, 1fr); border-radius: 14px; }
    .auth-aside { min-height: 0; padding: 22px 24px; }
    .auth-aside-copy { margin: 28px 0 0; padding: 0; }
    .auth-aside-copy h2 { margin: 9px 0 7px; font-size: 27px; }
    .auth-aside-copy p { font-size: 12px; line-height: 1.55; }
    .auth-aside-foot { margin-top: 18px; font-size: 10px; }
    .auth-card { max-width: none; padding: 30px 24px 32px; }
}

@media (max-width: 420px) {
    .sidebar { height: 60px; padding: 0 12px; }
    .brand { gap: 7px; font-size: 18px; }
    .brand-icon { width: 28px; height: 28px; }
    .side-nav { gap: 2px; }
    .nav-link { width: 38px; justify-content: center; padding: 0; }
    .nav-link > span:not(.nav-count) { display: none; }
    .nav-count { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; font-size: 9px; }
    .sidebar-bottom { margin-left: 3px; }
    .main-content { margin-top: 60px; }
    .topbar { height: 54px; padding: 0 12px; }
    .breadcrumbs { gap: 7px; font-size: 11px; }
    .topbar-right { gap: 7px; }
    .provider-picker { gap: 4px; font-size: 10px; }
    .provider-picker select { min-width: 94px; height: 32px; padding-left: 7px; font-size: 10px; }
    .secure-label { display: none; }
    .account-button { width: 34px; min-height: 34px; justify-content: center; padding: 0; }
    .account-button span { display: none; }
    .icon-button { width: 34px; height: 34px; min-height: 34px; }
    .content-wrap { padding: 23px 12px 20px; }
    .overview-grid { gap: 9px; margin-bottom: 17px; }
    .chat-panel { min-height: 490px; padding-right: 11px; padding-left: 11px; }
    .suggestions button { font-size: 10px; }
    .tool-button { font-size: 10px; }
    .composer-tools { gap: 8px; }
    .auth-page { padding: 10px; }
    .auth-aside { padding: 19px; }
    .auth-card { padding: 26px 19px 28px; }
    .auth-description { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.history-label { margin-top: 21px; }
.conversation-list { display: grid; max-height: min(36vh, 300px); gap: 4px; overflow-y: auto; margin: 0 -3px; color: #858b9d; font-size: 10px; }
.conversation-item { display: flex; min-width: 0; align-items: center; gap: 2px; padding: 2px 3px; border-radius: 7px; }
.conversation-item:hover, .conversation-item.active { background: #1b1f2c; }
.conversation-open { min-width: 0; flex: 1; overflow: hidden; padding: 7px 6px; color: #a8adbd; border: 0; background: transparent; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.conversation-item.active .conversation-open, .conversation-open:hover { color: #fff; }
.conversation-action { flex: 0 0 auto; padding: 4px; color: #858b9d; border: 0; border-radius: 5px; background: transparent; font-size: 9px; }
.conversation-action:hover { color: #fff; background: #29233d; }
.conversation-delete { font-size: 14px; }
.profile-logout { display: grid; width: 28px; height: 28px; place-items: center; color: #b6bbca; border: 1px solid #343847; border-radius: 7px; background: transparent; font-size: 16px; }
.profile-logout:hover { color: #fff; border-color: #7562d6; background: #29233d; }
.calculator-panel { padding: 17px 15px 15px; border: 1px solid #e9ebf1; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(33,38,58,.025); }
.calculator-form { display: grid; gap: 9px; }
.calculator-form > label { display: grid; gap: 5px; color: #858b9b; font-size: 9px; }
.calculator-form select, .calculator-form input { width: 100%; min-width: 0; height: 34px; padding: 0 9px; color: #43495a; border: 1px solid #e5e7ee; border-radius: 7px; outline: 0; background: #fff; font-size: 10px; }
.calculator-form select:focus, .calculator-form input:focus { border-color: #b9aefa; box-shadow: 0 0 0 2px #f4f1ff; }
.calculator-form .save-button { min-height: 34px; margin-top: 3px; font-size: 10px; }
.calculator-form [hidden] { display: none; }
.calculation-result[hidden] { display: none; }
.calculation-result strong { color: #5546a7; font-size: 11px; }
.calculation-result > span { color: #868b9b; font-size: 9px; line-height: 1.5; }
.calculation-result .cancel-button { justify-self: start; color: #6552c1; font-size: 9px; }
.goal-actions { display: flex; align-items: center; gap: 3px; }
.edit-goal { padding: 3px 6px; color: #7664cc; border: 1px solid #ece9fa; border-radius: 5px; background: #fbfaff; font-size: 8px; }
.edit-goal:hover { border-color: #cfc5ff; background: #f5f2ff; }
.goal-period-form { display: grid; gap: 6px; margin-top: 10px; padding: 8px; border: 1px solid #f0eff5; border-radius: 7px; background: #fcfcfe; }
.goal-period-form label { display: grid; gap: 4px; color: #969baa; font-size: 8px; }
.goal-period-form input { width: 100%; min-width: 0; height: 29px; padding: 0 7px; color: #43495a; border: 1px solid #e8e9ef; border-radius: 6px; background: #fff; font-size: 9px; }
.goal-period-form button { justify-self: end; padding: 5px 7px; color: #6552c1; border: 1px solid #e8e3fc; border-radius: 6px; background: #f8f6ff; font-size: 8px; }
.goal-period-form button:hover { border-color: #cfc5ff; background: #f1eeff; }
.goal-trend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.goal-trend strong { flex-basis: 100%; color: #8b90a0; font-size: 8px; font-weight: 600; }
.goal-trend span { padding: 4px 6px; color: #6f668f; border: 1px solid #efedf7; border-radius: 5px; background: #fbfaff; font-size: 8px; }

.sidebar { overflow-y: auto; overscroll-behavior: contain; }
.conversation-list { min-height: 0; max-height: min(42vh, 360px); }
.history-label { margin-top: 20px; }
.history-trigger { display: none; }
.history-modal[hidden] { display: none; }
.history-modal {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgb(16 29 32 / 46%);
    backdrop-filter: blur(2px);
}
.history-dialog {
    display: flex;
    width: min(440px, 100%);
    max-height: min(680px, calc(100dvh - 36px));
    flex-direction: column;
    padding: 20px;
    border: 1px solid #e0e7e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 55px rgb(24 43 44 / 20%);
}
.history-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.history-dialog-kicker { color: #647a73; font-size: 10px; font-weight: 650; letter-spacing: .8px; }
.history-dialog-header h2 { margin: 5px 0 0; color: #26363d; font-size: 21px; font-weight: 650; letter-spacing: -.3px; }
.history-close { width: 34px; height: 34px; color: #64736f; border: 1px solid #e0e7e4; border-radius: 8px; background: #fff; font-size: 20px; line-height: 1; }
.history-new-chat { display: flex; min-height: 40px; align-items: center; margin: 16px 0 10px; padding: 0 11px; color: #326c62; border: 1px solid #dfe9e4; border-radius: 8px; background: #f7faf8; font-size: 13px; font-weight: 550; text-align: left; }
.history-new-chat:hover { border-color: #b7d2c7; background: #f0f7f3; }
.history-dialog-list { min-height: 90px; max-height: none; flex: 1 1 auto; gap: 4px; overflow-y: auto; margin: 0; padding: 4px 2px; color: #687782; font-size: 13px; }
.history-dialog-list .conversation-item { min-height: 42px; gap: 4px; padding: 3px 4px; border-radius: 7px; }
.history-dialog-list .conversation-item:hover, .history-dialog-list .conversation-item.active { background: #f0f5f2; }
.history-dialog-list .conversation-open { padding: 8px; color: #3c4c51; font-size: 13px; }
.history-dialog-list .conversation-item.active .conversation-open, .history-dialog-list .conversation-open:hover { color: #285d56; }
.history-dialog-list .conversation-action { min-height: 32px; padding: 5px 7px; color: #5a716c; font-size: 11px; }
.history-dialog-list .conversation-action:hover { color: #285d56; background: #e4efe9; }

@media (max-width: 820px) {
    .sidebar .history-label, .sidebar #conversation-list { display: none; }
    .history-trigger {
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        gap: 7px;
        padding: 0 10px;
        color: #e0ebe6;
        border: 1px solid #3a5051;
        border-radius: 8px;
        background: #223b3e;
        font-size: 12px;
    }
    .history-trigger:hover { border-color: #668f7e; background: #294749; }
    .history-trigger svg { width: 16px; height: 16px; }
}

@media (max-width: 420px) {
    .history-trigger { width: 34px; min-height: 34px; justify-content: center; padding: 0; }
    .history-trigger span { display: none; }
    .history-dialog { max-height: min(680px, calc(100dvh - 24px)); padding: 16px; }
}
