:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172236;background:#0b1220;font-synthesis:none}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100vh}
button,input,textarea{font:inherit}
button{cursor:pointer}
.app-shell{display:grid;grid-template-columns:326px minmax(0,1fr);min-height:100vh;background:#f7f8fb}
.sidebar{display:flex;flex-direction:column;min-height:100vh;padding:34px 30px 26px;color:#f9fbff;background:radial-gradient(circle at 18% 5%,#203a62 0,#121e33 36%,#0b1220 78%);position:relative;overflow:hidden}
.sidebar:after{content:"";position:absolute;width:340px;height:340px;right:-185px;bottom:70px;border:1px solid rgba(142,182,230,.15);border-radius:50%;box-shadow:0 0 0 48px rgba(142,182,230,.035),0 0 0 98px rgba(142,182,230,.025);pointer-events:none}
.brand{display:flex;align-items:center;gap:13px;position:relative;z-index:1}
.brand-mark,.login-icon,.welcome-mark{display:grid;place-items:center;background:linear-gradient(145deg,#a8ddff,#77a7f4 45%,#a99df4);color:#0e1b34;box-shadow:0 8px 28px rgba(96,165,250,.16)}
.brand-mark{width:43px;height:43px;border-radius:14px;font-size:24px}
.brand strong{display:block;font-size:19px;letter-spacing:-.03em}
.brand span{display:block;margin-top:2px;color:#aabbd2;font-size:9px;font-weight:800;letter-spacing:.16em}
.sidebar-body{position:relative;z-index:1;margin:auto 0;padding-bottom:28px}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:.19em;color:#7e9ac3}
.sidebar h1{max-width:260px;margin:12px 0 17px;font-size:38px;line-height:1.12;letter-spacing:-.045em;font-weight:650}
.sidebar-copy{max-width:240px;color:#bdc9d9;font-size:14px;line-height:1.65}
.sidebar-rule{height:1px;background:rgba(255,255,255,.13);margin:34px 0 24px}
.status{display:flex;align-items:center;gap:10px;color:#c8d7e8;font-size:12px}
.status-dot{width:7px;height:7px;border-radius:50%;background:#6ee7b7;box-shadow:0 0 0 5px rgba(110,231,183,.11)}
.sidebar-footer{position:relative;z-index:1;color:#8495ae;font-size:11px;line-height:1.5}
.sidebar.has-history .sidebar-body{display:none}
.history-panel{position:relative;z-index:1;display:flex;flex-direction:column;min-height:0;flex:1;margin-top:38px}
.history-heading{display:flex;align-items:center;justify-content:space-between;color:#9eb1cb;font-size:10px;font-weight:800;letter-spacing:.12em}
.history-heading button{border:1px solid rgba(255,255,255,.18);background:transparent;color:#d5e4f6;border-radius:8px;font-size:19px;width:29px;height:29px;line-height:1}
.conversation-list{display:flex;flex-direction:column;gap:5px;overflow-y:auto;margin-top:15px;padding-right:3px}
.conversation-item{text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;padding:11px 12px;border:0;border-radius:10px;background:transparent;color:#bbcce1;font-size:12px}
.conversation-item:hover,.conversation-item.active{background:rgba(149,187,233,.16);color:#fff}
/* Xoá cuộc trò chuyện khỏi lịch sử (17/11/2026) */
.history-actions{display:flex;align-items:center;gap:6px}
.history-heading .select-toggle{width:auto;height:29px;padding:0 10px;font-size:11px;font-weight:700;letter-spacing:.02em}
.history-heading .select-toggle.active{background:rgba(149,187,233,.22);color:#fff}
.conversation-row{position:relative;display:flex;align-items:center;gap:6px;border-radius:10px}
.conversation-row .conversation-item{flex:1;min-width:0}
.conversation-row.picked .conversation-item{background:rgba(94,234,212,.14);color:#fff}
.conversation-check{flex:none;width:16px;height:16px;margin:0 0 0 8px;accent-color:#5eead4;cursor:pointer}
.conversation-delete{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:26px;height:26px;border:0;border-radius:8px;background:rgba(15,23,42,.55);color:#cbd5e1;font-size:17px;line-height:1;opacity:0;cursor:pointer;transition:opacity .15s}
.conversation-row:hover .conversation-delete,.conversation-delete:focus-visible{opacity:1}
.conversation-delete:hover{background:#b91c1c;color:#fff}
@media(hover:none){.conversation-delete{opacity:.75}}
.select-bar,.undo-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px;padding:8px 10px;border-radius:10px;background:rgba(149,187,233,.12);color:#d5e4f6;font-size:12px}
.select-bar[hidden],.undo-bar[hidden]{display:none}
.select-bar span,.undo-bar span{flex:1;min-width:110px}
.select-bar button,.undo-bar button{border:1px solid rgba(255,255,255,.2);background:transparent;color:#e2ecf8;border-radius:7px;padding:4px 9px;font-size:11px;font-weight:700;cursor:pointer}
.select-bar button.danger{background:#b91c1c;border-color:#b91c1c;color:#fff}
.select-bar button:disabled{opacity:.45;cursor:not-allowed}
.main-panel{min-width:0;display:flex;flex-direction:column;min-height:100vh}
.topbar{height:94px;padding:23px 44px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9edf3;background:#fff}
.topbar-kicker{margin:0 0 4px;color:#8797aa;font-size:10px;font-weight:800;letter-spacing:.18em}
.topbar h2{margin:0;font-size:20px;font-weight:650;letter-spacing:-.035em}
.topbar-actions{display:flex;align-items:center;gap:10px}
.ghost-button,.icon-button{border:1px solid #e1e6ef;background:#fff;color:#45536a;transition:.15s ease}
.ghost-button{padding:10px 16px;border-radius:11px;font-size:12px;font-weight:650}
.icon-button{width:38px;height:38px;border-radius:11px;font-size:17px}
.ghost-button:hover,.icon-button:hover{border-color:#aebed7;background:#f5f8fc}
.login-view{display:grid;place-items:center;flex:1;padding:38px 20px}
.login-card{width:min(100%,430px);padding:43px 43px 37px;background:#fff;border:1px solid #e8edf4;border-radius:24px;box-shadow:0 22px 75px rgba(25,46,77,.08)}
.login-icon{width:54px;height:54px;border-radius:18px;font-size:29px;margin-bottom:31px}
.login-card h2,.welcome h2{font-weight:650;letter-spacing:-.045em}
.login-card h2{font-size:27px;margin:10px 0 9px}
.login-card>p:not(.eyebrow):not(.form-error){color:#738198;font-size:14px;line-height:1.55;margin:0 0 29px}
.login-card label{display:block;margin-bottom:9px;font-size:12px;font-weight:700;color:#36445a}
.login-card input{display:block;width:100%;padding:14px 15px;border:1px solid #dce4ee;border-radius:11px;outline:none;color:#1b2a40;background:#fbfcfe}
.login-card input:focus,.composer:focus-within{border-color:#89aeee;box-shadow:0 0 0 4px rgba(117,160,234,.12)}
.primary-button{display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:17px;padding:14px 16px;border:0;border-radius:11px;color:#fff;background:#245fac;font-size:13px;font-weight:750;transition:.15s ease}
.primary-button:hover{background:#174f98}
.primary-button:disabled,.send-button:disabled{opacity:.55;cursor:wait}
.form-error{margin:16px 0 0;color:#be4545;font-size:12px;line-height:1.5}
.chat-view{display:flex;flex:1;flex-direction:column;min-height:0}
.messages{flex:1;overflow-y:auto;padding:30px max(36px,calc((100% - 820px)/2)) 24px;scroll-behavior:auto}
.welcome{max-width:650px;margin:clamp(55px,14vh,160px) auto 0}
.welcome-mark{width:55px;height:55px;border-radius:18px;font-size:29px;margin-bottom:33px}
.welcome h2{margin:12px 0 10px;font-size:35px;line-height:1.15}
.welcome>p:not(.eyebrow){max-width:500px;color:#7c899a;font-size:14px;line-height:1.6}
.suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:34px}
.suggestions button{text-align:left;min-height:82px;padding:15px;border:1px solid #e4eaf2;border-radius:14px;background:#fff;color:#46566f;font-size:12px;line-height:1.4;font-weight:650;box-shadow:0 4px 18px rgba(29,55,88,.025);transition:.15s ease}
.suggestions button span{display:block;margin-top:10px;color:#7b9ccc;font-size:15px}
.suggestions button:hover{border-color:#9bb7df;transform:translateY(-2px)}
.message{max-width:820px;margin:0 auto 23px;display:flex;gap:13px;align-items:flex-start}
.message-avatar{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:10px;background:#dceafa;color:#2f66a4;font-size:16px}
.message.user .message-avatar{background:#e6eaf0;color:#61718a}
.message-body{min-width:0;flex:1;padding-top:3px}
.message-label{margin:0 0 8px;color:#718097;font-size:11px;font-weight:750}
.message-text{white-space:pre-wrap;overflow-wrap:anywhere;color:#26354c;font-size:14px;line-height:1.7}
.message-text .message-blank{height:.8em}
.message-text .message-heading{font-weight:750;margin:.3em 0}
.message-text .message-bullet{padding-left:1.25em;position:relative}
.message-text .message-bullet:before{content:"•";position:absolute;left:.35em}
.message-text a{color:#245fac;text-decoration:underline}
.message.user .message-text{background:#edf2f8;border-radius:0 13px 13px 13px;display:inline-block;padding:12px 15px}
.message.error .message-text{color:#b54444}
.message.pending .message-text:after{content:"";display:inline-block;width:6px;height:6px;margin-left:5px;border-radius:50%;background:#6f93be;animation:pulse 1s infinite alternate}
.message-media{display:block;max-width:min(100%,620px);max-height:520px;margin:13px 0 8px;border-radius:13px;background:#e8edf4;object-fit:contain}
.message-media:where(audio){width:min(100%,620px);height:54px;max-height:none;object-fit:initial}
.message-body>a{color:#245fac;font-size:12px;text-decoration:none}
.message-body>a:hover{text-decoration:underline}
@keyframes pulse{to{opacity:.18}}
.composer-wrap{padding:18px max(36px,calc((100% - 820px)/2)) 23px;background:linear-gradient(to bottom,rgba(247,248,251,.85),#f7f8fb 28%)}
.composer{display:flex;align-items:flex-end;gap:12px;border:1px solid #dfe6f0;border-radius:17px;background:#fff;padding:12px 12px 12px 18px;box-shadow:0 10px 32px rgba(31,54,85,.065);transition:.15s ease}
.composer textarea{flex:1;resize:none;border:0;outline:none;min-height:30px;max-height:150px;line-height:1.5;font-size:14px;color:#25364e;background:transparent;padding:5px 0}
.composer textarea::placeholder{color:#9ca9b9}
.send-button{display:grid;place-items:center;flex:none;width:34px;height:34px;border:0;border-radius:10px;background:#245fac;color:#fff;font-size:20px;line-height:1}
.send-button:hover{background:#174f98}
.composer-note{text-align:center;margin:10px 0 0;color:#a0aabb;font-size:10px}
.composer-options{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;color:#8390a3;font-size:11px}
.composer-options select{border:1px solid #dce4ee;border-radius:7px;padding:3px 7px;background:#fff;color:#40516b;font-size:11px}
.composer-options span{margin-left:12px;color:#a0aabb}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px){.app-shell{grid-template-columns:1fr}.sidebar{min-height:auto;padding:16px 22px;background:#101d31}.sidebar-body,.sidebar-footer{display:none}.history-panel{margin-top:12px;flex:none}.conversation-list{display:flex;flex-direction:row;overflow-x:auto;margin-top:7px}.conversation-item{flex:none;width:165px}.conversation-row{flex:none;width:175px}.conversation-row .conversation-item{width:auto}.brand-mark{width:34px;height:34px;border-radius:11px;font-size:19px}.brand strong{font-size:16px}.topbar{height:70px;padding:12px 22px}.topbar-kicker{font-size:8px}.topbar h2{font-size:17px}.messages{padding:22px 20px}.composer-wrap{padding:12px 16px 16px}.welcome{margin:9vh auto 0}.welcome h2{font-size:29px}.suggestions{grid-template-columns:1fr;gap:8px}.suggestions button{min-height:0;padding:12px}.suggestions button span{display:inline;margin:0 0 0 8px}.ghost-button{font-size:0;padding:9px 11px}.ghost-button:after{content:"+";font-size:17px}.login-card{padding:32px 25px}.message{margin-bottom:19px}.composer-options span{display:none}}

/* Keep the whole app inside the viewport; only the transcript and history scroll. */
html,body{height:100%;overflow:hidden}
body{min-height:0}
.app-shell{--sidebar-width:326px;height:100dvh;min-height:0;grid-template-columns:minmax(0,var(--sidebar-width)) 8px minmax(0,1fr);overflow:hidden}
.sidebar{height:100%;min-height:0;overflow:hidden}
.main-panel{height:100%;min-height:0;overflow:hidden}
.topbar{flex:none;position:relative;z-index:3}
.chat-view{min-height:0;overflow:hidden}
.messages{min-height:0;overscroll-behavior:contain}
.composer-wrap{position:relative;z-index:2;flex:none;padding-top:12px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
.sidebar-resizer{position:relative;z-index:4;cursor:col-resize;touch-action:none;background:#e8edf5}
.sidebar-resizer:before{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background:transparent;transition:background .15s}
.sidebar-resizer:hover:before,.sidebar-resizer:focus-visible:before{background:#79a5e6}
.app-shell.sidebar-collapsed{--sidebar-width:0px;grid-template-columns:0 0 minmax(0,1fr)}
.sidebar-collapsed .sidebar,.sidebar-collapsed .sidebar-resizer{visibility:hidden;pointer-events:none}
.sidebar-toggle{margin-right:14px;flex:none;color:#49627f}
.topbar>div:first-of-type{margin-right:auto}
.attachment-list{display:flex;flex-wrap:wrap;gap:8px;max-width:820px;margin:0 auto 9px;padding:0 4px}
.attachment-list[hidden]{display:none}
.attachment-chip{display:flex;align-items:center;gap:8px;max-width:100%;padding:6px 9px 6px 11px;border:1px solid #dce6f3;border-radius:10px;background:#fff;color:#435875;font-size:11px;box-shadow:0 3px 12px rgba(31,54,85,.04)}
.attachment-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(280px,45vw)}
.attachment-chip-remove{border:0;border-radius:6px;background:#eff3f8;color:#61728c;width:22px;height:22px;font-size:14px;line-height:1}
.attach-button{display:grid;place-items:center;flex:none;width:34px;height:34px;border:0;border-radius:10px;background:transparent;color:#536781;font-size:25px;line-height:1}
.attach-button:hover{background:#eef3fa;color:#245fac}
.message-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.message-option{max-width:100%;padding:8px 13px;border:1px solid #cfdcee;border-radius:999px;background:#fff;color:#245fac;font:inherit;font-size:13px;font-weight:650;line-height:1.35;text-align:left;cursor:pointer}
.message-option:hover:not(:disabled){border-color:#8fb0de;background:#f2f7ff}
.message-option:focus-visible{outline:2px solid #2f6fc4;outline-offset:2px}
.message-option:disabled{cursor:default;color:#7b8798;background:#f7f9fc;border-color:#e3e9f1}
.message-option.chosen,.message-option.chosen:disabled{border-color:#2f6fc4;background:#eaf2fc;color:#1d4f91}
.message-attachments{display:flex;flex-wrap:wrap;gap:9px;margin-top:11px}
.message-attachment-image{max-width:min(100%,300px);max-height:240px;border:1px solid #e4eaf2;border-radius:11px;object-fit:contain;background:#fff}
.message-attachment-file{display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:8px 11px;border:1px solid #e1e8f1;border-radius:10px;background:#fff;color:#365f92;text-decoration:none;font-size:12px}
.message-attachment-file:hover{border-color:#9bb7df;background:#f7faff}
@media(max-width:850px){
  .app-shell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .sidebar{height:auto;min-height:0;padding:12px 16px 8px;overflow:hidden}
  .sidebar-resizer{display:none}
  .main-panel{height:100%;min-height:0}
  .sidebar-collapsed .sidebar{display:none}
  .app-shell.sidebar-collapsed{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  .topbar{height:68px;padding:10px 14px}
  .sidebar-toggle{margin-right:10px;width:34px;height:34px}
  .topbar>div:first-of-type{margin-right:auto}
  .ghost-button{font-size:0;padding:9px 11px}
  .ghost-button:after{content:"+";font-size:17px}
  .composer-wrap{padding:9px 12px max(12px,env(safe-area-inset-bottom))}
  .attachment-list{margin-bottom:7px}
}
@media(prefers-reduced-motion:reduce){.messages{scroll-behavior:auto}.suggestions button{transition:none}}

/* Password visibility, credential update and owner control panel. */
.login-card label{margin-top:16px}
.login-card form label:first-child{margin-top:0}
.password-field{position:relative;display:flex;align-items:center}
.password-field input{padding-right:48px}
.password-visibility{position:absolute;right:8px;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#71829a}
.password-visibility:hover{background:#edf2f8;color:#245fac}
.password-visibility.is-visible:after{content:"";position:absolute;width:22px;height:1.5px;border-radius:2px;background:currentColor;transform:rotate(45deg)}
.password-visibility svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.text-button{margin-top:17px;padding:6px 0;border:0;background:transparent;color:#245fac;font-size:12px;font-weight:700}
.text-button:hover{text-decoration:underline}
.form-success{margin:15px 0 0;color:#16805a;font-size:12px;line-height:1.5}
.toolbar-button{display:flex;align-items:center;gap:7px;white-space:nowrap}
.toolbar-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#eaf1fb;color:#245fac;font-size:10px}
.main-panel{position:relative}
.activity-drawer{position:absolute;z-index:8;top:94px;right:0;bottom:0;display:flex;flex-direction:column;width:min(440px,92vw);background:#fff;border-left:1px solid #e6ebf2;box-shadow:-18px 0 42px rgba(21,39,66,.12)}
.drawer-heading{display:flex;align-items:center;justify-content:space-between;padding:21px 22px 14px}
.drawer-heading .topbar-kicker{margin-bottom:4px}
.drawer-heading h2{margin:0;color:#1d2d45;font-size:20px;letter-spacing:-.03em}
.activity-tabs{display:flex;gap:7px;margin:0 18px 13px;padding:5px;border-radius:12px;background:#f2f5f9}
.activity-tab{flex:1;padding:9px 8px;border:0;border-radius:9px;background:transparent;color:#6f7f93;font-size:12px;font-weight:700}
.activity-tab.active{background:#fff;color:#255c9a;box-shadow:0 2px 8px rgba(25,50,80,.08)}
.activity-content{flex:1;overflow:auto;padding:0 20px 22px;overscroll-behavior:contain}
.activity-section-heading{display:flex;align-items:center;justify-content:space-between;margin:8px 0 9px}
.activity-section-heading h3{margin:0;color:#2d3d54;font-size:13px;font-weight:750}
.recent-heading{margin-top:22px}
.refresh-button{display:grid;place-items:center;width:29px;height:29px;border:1px solid #e0e7f0;border-radius:9px;background:#fff;color:#5f7591;font-size:18px}
.refresh-button:hover{border-color:#a9bedb;color:#245fac}
.activity-list{display:flex;flex-direction:column;gap:9px}
.activity-card{padding:13px 14px;border:1px solid #e5ebf3;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(24,45,76,.035)}
.activity-card-title{margin:0;color:#263851;font-size:13px;font-weight:750;line-height:1.45;overflow-wrap:anywhere}
.activity-card-detail{margin:7px 0 0;color:#62738a;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.activity-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;color:#8391a3;font-size:10px;line-height:1.4}
.activity-pill{padding:4px 7px;border-radius:7px;background:#f1f5fa;color:#62758f}
.activity-pill.enabled{background:#eaf8f1;color:#16805a}
.activity-pill.disabled{background:#f2f3f5;color:#788495}
.activity-actions{display:flex;gap:8px;margin-top:12px}
.activity-action{flex:1;padding:8px 10px;border:1px solid #dce6f2;border-radius:9px;background:#f7faff;color:#245fac;font-size:11px;font-weight:750}
.activity-action:hover{background:#eaf2fc}
.activity-action.deny{border-color:#ece1e1;background:#fffafa;color:#a54b4b}
.activity-action.deny:hover{background:#fff0f0}
.activity-action:disabled{opacity:.55;cursor:wait}
.activity-bulk{margin:0 0 12px}
.activity-bulk .activity-action{padding:10px;font-size:12px;background:#245fac;border-color:#245fac;color:#fff}
.activity-bulk .activity-action:hover{background:#1d4f90}
.activity-bulk .activity-action.deny{background:#fffafa;border-color:#ece1e1;color:#a54b4b}
.activity-loading,.activity-empty{margin:4px 0;padding:14px;border:1px dashed #dce4ee;border-radius:11px;color:#8190a3;font-size:12px;line-height:1.5;text-align:center}
.activity-error{flex:none;margin:0;padding:10px 20px 16px;color:#a74747;font-size:11px;line-height:1.5}
.activity-error[hidden]{display:none}
@media(max-width:850px){
  .activity-drawer{top:68px;width:min(420px,100vw);box-shadow:-12px 0 30px rgba(21,39,66,.14)}
  .topbar-actions{gap:6px}
  .toolbar-button{font-size:0;padding:9px 10px;gap:0}
  .toolbar-button>span:first-child{font-size:15px}
  .toolbar-count{font-size:10px}
  .drawer-heading{padding:16px 16px 11px}
  .activity-content{padding-right:14px;padding-left:14px}
}
/* Waiting reply: approval hint and a way out, so a silent upstream never locks the chat. */
.message.stalled .message-text{color:#6a7890;background:#f4f7fb;border:1px dashed #d6e0ec;border-radius:12px;padding:10px 13px;display:inline-block}
.message-wait{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.message-wait-hint{flex-basis:100%;margin:0;color:#8a5a12;background:#fff7e8;border:1px solid #f2dfb7;border-radius:10px;padding:8px 11px;font-size:12.5px;line-height:1.45}
.message-wait-button{padding:7px 13px;border:1px solid #d5deea;border-radius:999px;background:#fff;color:#45536a;font-size:12.5px;font-weight:650}
.message-wait-button:hover{border-color:#9fb6d6;background:#f5f8fc}
.message-wait-button.primary{border-color:#2f6fc4;background:#245fac;color:#fff}
.message-wait-button.primary:hover{background:#174f98}
/* Links in messages wrap instead of overflowing on phones. */
.message-text a{overflow-wrap:anywhere}
.message-url{text-decoration:underline}
.message-file-ref{color:#4e6283;font-weight:600}
/* Presentation cards mirrored from the assistant (links, files, tasks, lists). */
.message-card{max-width:560px;margin-top:2px;border:1px solid #e1e8f1;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(24,45,76,.04);overflow:hidden}
.message-card>p,.message-card>.message-text,.message-card>.card-list{margin:0;padding:0 14px}
.message-card>p:first-child,.message-card>.message-text:first-child{padding-top:12px}
.message-card>:last-child{padding-bottom:12px}
.card-anchor{display:block;padding:12px 14px;color:inherit;text-decoration:none}
.card-anchor:hover{background:#f7faff}
.card-site{margin:0 0 3px;color:#7a8aa2;font-size:11px;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.card-title{margin:0;color:#1d2e49;font-size:13.5px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.card-url{margin:4px 0 0;color:#245fac;font-size:12px;overflow-wrap:anywhere}
.card-meta{margin:4px 0 0;color:#74839a;font-size:12px;line-height:1.45}
.card-body{margin:6px 0 0;color:#40516b;font-size:13px;line-height:1.55;white-space:pre-wrap}
.card-action{display:inline-block;margin:10px 14px 0;padding:7px 12px;border:1px solid #cfdcee;border-radius:999px;color:#245fac;font-size:12.5px;font-weight:650;text-decoration:none}
.card-action:hover{background:#f2f7ff}
.card-list{margin:6px 0 0;padding-left:30px!important;color:#40516b;font-size:13px;line-height:1.6}
.card-task{background:#f7f9fc}
.card-text>.message-text{font-size:13.5px}
/* Media: open inside the app instead of a new tab. */
.message-media.zoomable,.message-attachment-image.zoomable{cursor:zoom-in}
.message-media-actions{display:flex;gap:10px;margin:2px 0 4px}
.message-media-actions a,.message-media-open{padding:0;border:0;background:none;color:#245fac;font-size:12px;font-weight:650;text-decoration:none;cursor:pointer}
.message-media-open:hover,.message-media-actions a:hover{text-decoration:underline}
.media-viewer{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:rgba(6,11,20,.96)}
.media-viewer[hidden]{display:none}
.media-viewer-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:max(12px,env(safe-area-inset-top)) 14px 12px}
.media-viewer-back{padding:10px 16px;border:0;border-radius:999px;background:#fff;color:#14223a;font-size:14px;font-weight:750;cursor:pointer}
.media-viewer-download{padding:9px 14px;border:1px solid rgba(255,255,255,.35);border-radius:999px;color:#e6eefb;font-size:13px;font-weight:650;text-decoration:none}
.media-viewer-stage{flex:1;min-height:0;display:grid;place-items:center;padding:8px 10px max(14px,env(safe-area-inset-bottom))}
.media-viewer-item{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;background:#000}
body.viewer-open{overflow:hidden}
/* Notifications toggle in the top bar. */
.notify-button{position:relative;font-size:15px}
.notify-dot{position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:#e4574f}
@media(max-width:850px){.notify-button{width:34px;height:34px}}
/* Markdown tables from the assistant: scroll sideways on narrow screens. */
.message-table-wrap{max-width:100%;margin:10px 0 12px;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:10px;background:#fff;border:1px solid #e4eaf2}
.message-table{width:100%;border-collapse:collapse;font-size:13.5px;line-height:1.5;white-space:normal}
.message-table th,.message-table td{padding:9px 14px;border-bottom:1px solid #edf1f6;vertical-align:top;overflow-wrap:normal;word-break:normal}
.message-table th{color:#1d2e49;font-weight:750;background:#f7f9fc;border-bottom:2px solid #dfe6f0;white-space:nowrap}
.message-table td{color:#26354c}
.message-table td:first-child{color:#1d2e49}
.message-table tbody tr:last-child td{border-bottom:0}
.message-table tbody tr:nth-child(even) td{background:#fbfcfe}
@media(max-width:850px){.message-table{font-size:12.5px}.message-table th,.message-table td{padding:8px 10px}}
