:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#142b3b;background:#f7fbfd;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,textarea,select{font:inherit}button{cursor:pointer}.app-shell{display:flex;height:100dvh;min-height:480px;overflow:hidden}.sidebar{width:268px;flex:none;display:flex;flex-direction:column;background:#081e31;color:#eaf8ff;padding:27px 17px 18px}.brand{padding:4px 11px 32px;display:flex;flex-direction:column;gap:9px}.brand img{width:178px;max-width:100%;height:auto}.brand span{font-size:11px;letter-spacing:.17em;text-transform:uppercase;color:#88b6d1;margin-left:3px}.new-chat{width:100%;display:flex;align-items:center;gap:11px;background:#149fe8;color:white;border:1px solid #40b9f3;border-radius:11px;padding:12px 15px;text-align:left;font-weight:650;box-shadow:0 8px 22px #0002}.new-chat:hover{background:#32b4f5}.new-chat span{font-size:24px;line-height:16px;font-weight:300}.sidebar-label{font-size:10px;letter-spacing:.16em;color:#8baac0;font-weight:700;margin:34px 12px 12px}.chat-list{overflow-y:auto;min-height:0;display:flex;flex-direction:column;gap:4px;flex:1}.chat-item{width:100%;border:0;background:transparent;color:#c6dbe8;border-radius:9px;padding:11px 12px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.chat-item:hover,.chat-item.active{background:#183b54;color:white}.chat-item.active{box-shadow:inset 3px 0 #30b8f4}.chat-item::before{content:"◻";color:#6aa5c7;margin-right:11px}.empty-history{font-size:13px;color:#86a6ba;padding:10px 12px}.sidebar-footer{border-top:1px solid #25445a;padding:20px 10px 3px;font-size:12px;color:#bed3e1;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.privacy-dot{width:7px;height:7px;border-radius:50%;background:#55d0a5;box-shadow:0 0 0 3px #55d0a520}.sidebar-footer button{background:none;border:0;color:#90ccef;padding:7px 0 0;text-align:left;width:100%;font-size:12px}.main-panel{min-width:0;flex:1;display:flex;flex-direction:column;background:radial-gradient(circle at 52% 32%,#fff 0,#f8fcfe 55%,#f2f9fd 100%)}.topbar{height:78px;flex:none;border-bottom:1px solid #e3edf3;display:flex;align-items:center;justify-content:space-between;padding:0 34px;background:#ffffffa6}.workspace-title{display:flex;flex-direction:column;gap:2px}.workspace-eyebrow{font-size:10px;letter-spacing:.16em;font-weight:750;color:#279bd4}.workspace-title strong{font-size:17px;color:#112c3e}.topbar select{border:1px solid #d6e6ef;background:white;border-radius:10px;color:#335369;padding:9px 34px 9px 12px;font-size:13px}.menu-button{display:none;border:0;background:transparent;color:#12354b;font-size:22px}.conversation{flex:1;overflow-y:auto;padding:42px max(28px,calc((100% - 780px)/2)) 24px}.welcome{text-align:center;margin:12vh auto 0}.welcome-mark{width:54px;height:54px;display:grid;place-items:center;margin:auto auto 20px;border-radius:16px;color:white;font-size:28px;background:linear-gradient(135deg,#36c4f4,#087ac6);box-shadow:0 12px 30px #149fe833}.welcome h1{font-size:clamp(25px,3vw,37px);letter-spacing:-.04em;margin:0 0 10px;color:#0d2b40}.welcome p{margin:0;color:#668091;font-size:15px}.messages{max-width:780px;margin:auto}.message{display:flex;gap:14px;margin:0 0 30px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.avatar{width:31px;height:31px;flex:none;border-radius:10px;display:grid;place-items:center;background:#daf2ff;color:#087dbb;font-size:16px;font-weight:750}.message.user .avatar{background:#e9eef2;color:#5b7180}.message-content{min-width:0;padding-top:3px}.role{font-size:12px;font-weight:750;color:#557285;margin-bottom:5px}.message-text{font-size:15px;color:#1a3445}.composer-area{padding:16px max(28px,calc((100% - 780px)/2)) 18px;background:linear-gradient(transparent,#f7fbfd 14%)}.composer{display:flex;align-items:flex-end;gap:10px;background:white;border:1px solid #c9e1ef;border-radius:18px;padding:10px 10px 10px 17px;box-shadow:0 9px 30px #0b56770d}.composer:focus-within{border-color:#55b9ec;box-shadow:0 0 0 3px #48bbf018,0 9px 30px #0b56770d}.composer textarea{border:0;outline:0;resize:none;min-height:42px;max-height:160px;line-height:1.5;flex:1;padding:9px 0;background:transparent;color:#183548}.composer textarea::placeholder{color:#8ba4b4}.composer button{width:39px;height:39px;flex:none;display:grid;place-items:center;background:#119ce4;color:white;border:0;border-radius:12px}.composer button:hover{background:#007fc6}.composer button:disabled{opacity:.45;cursor:wait}.composer svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.composer-meta{min-height:25px;display:flex;justify-content:space-between;gap:12px;padding:7px 5px 0;font-size:11px;color:#8aa0ae}.composer-meta #status{color:#b34949}.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}.sidebar-scrim{display:none}@media(max-width:760px){.sidebar{position:fixed;inset:0 auto 0 0;z-index:20;transform:translateX(-100%);transition:transform .2s}.sidebar.open{transform:translateX(0)}.sidebar-scrim.open{display:block;position:fixed;inset:0;background:#041a2aa8;z-index:19}.topbar{height:66px;padding:0 18px;gap:13px}.menu-button{display:block}.workspace-title{margin-right:auto}.topbar select{max-width:120px}.conversation{padding:28px 18px}.composer-area{padding:10px 14px 12px}.welcome{margin-top:13vh}.composer-meta span:last-child{display:none}}
.composer .attach-button{background:#e7f5fc;color:#1689c7;font-size:25px;font-weight:300;border-radius:11px;line-height:1}.composer .attach-button:hover{background:#d3edfb}.pending-files,.message-files{display:flex;gap:7px;flex-wrap:wrap}.pending-files{margin:0 0 9px}.file-chip{border:1px solid #cae3f0;background:#eef8fd;color:#176b98;border-radius:9px;padding:6px 9px;font-size:12px;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-chip:hover{background:#dff2fc}.message-files{margin-top:9px}
.composer-meta #image-mode{border:1px solid #cae3f0;border-radius:8px;background:white;color:#237cac;padding:3px 8px;font-size:11px;margin-left:auto}.composer-meta #image-mode[aria-pressed="true"]{background:#d8f1ff;border-color:#56bce9;color:#075f93;font-weight:700}.generated-preview{display:block;max-width:min(100%,400px);max-height:360px;object-fit:contain;border-radius:12px;margin:10px 0 0;border:1px solid #d7e9f2}
.image-preview{display:block;max-width:min(100%,480px);padding:0;border:1px solid #d7e9f2;border-radius:12px;overflow:hidden;background:transparent;cursor:pointer}.image-preview img:not([hidden]){display:block;width:100%;height:auto;max-height:420px;object-fit:contain}.image-preview.loading{width:min(400px,100%);height:240px;background:linear-gradient(110deg,#e5f1f7 8%,#f3f9fc 18%,#e5f1f7 33%);background-size:200% 100%;animation:image-loading 1.6s linear infinite}.image-preview img[hidden]{display:none}.pending-image{display:flex;align-items:center;gap:8px;max-width:260px;padding:4px 8px 4px 4px;border:1px solid #cae3f0;border-radius:10px;background:#eef8fd;color:#176b98;font-size:12px}.pending-image img{width:48px;height:48px;object-fit:cover;border-radius:6px}.pending-image span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes image-loading{to{background-position-x:-200%}}
:root[data-theme="dark"] .image-preview{border-color:#36566a}:root[data-theme="dark"] .image-preview.loading{background-image:linear-gradient(110deg,#19384b 8%,#27516a 18%,#19384b 33%)}:root[data-theme="dark"] .pending-image{background:#1b3b50;border-color:#3b6680;color:#a8dfff}
.auth-pending body{background:#081e31}.auth-pending .app-shell,.auth-pending #chat-menu,.auth-pending #chat-dialog{display:none!important}.auth-splash{display:none}.auth-pending .auth-splash{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#081e31;color:#a9c6d8;font-size:13px;letter-spacing:.04em}.auth-splash img{width:min(240px,70vw);height:auto}
@media print{.app-shell{display:block;height:auto;overflow:visible}.sidebar,.sidebar-scrim,.topbar select,.menu-button,.composer-area{display:none!important}.main-panel{display:block;background:white}.topbar{height:auto;padding:0 0 20px;border-bottom:1px solid #aaa}.workspace-title{display:block}.workspace-title strong{display:block}.conversation{overflow:visible;padding:25px 0}.welcome{display:none}.message{break-inside:avoid}.generated-preview{max-height:500px}}
.reply-actions{display:flex;gap:10px;margin-top:9px}.reply-actions button{border:0;background:none;color:#5593b4;font-size:11px;padding:2px 0}.reply-actions button:hover{text-decoration:underline;color:#087fc1}@media print{.reply-actions,.message-files{display:none!important}body.print-reply .message:not(.print-selected){display:none!important}}
.reply-actions{align-items:center;gap:4px}.reply-actions .copy-reply{padding:4px 7px;border-radius:6px}.reply-menu{position:relative}.reply-menu summary{list-style:none;cursor:pointer;border-radius:6px;padding:0 7px;color:#5593b4;font-size:23px;line-height:20px}.reply-menu summary::-webkit-details-marker{display:none}.reply-menu summary:hover,.reply-menu[open] summary{background:#e7f5fc;color:#087fc1}.reply-menu-items{position:absolute;z-index:5;top:25px;left:0;min-width:150px;background:white;border:1px solid #d1e2ec;border-radius:9px;box-shadow:0 9px 22px #0b314326;padding:5px}.reply-menu-items button{display:block;width:100%;text-align:left;padding:8px 10px;font-size:12px;border-radius:5px;color:#254f68}.reply-menu-items button:hover{background:#edf7fc;text-decoration:none}@media print{.reply-menu{display:none!important}}
.composer-meta #sheet-mode{border:1px solid #cae3f0;border-radius:8px;background:white;color:#237cac;padding:3px 8px;font-size:11px}.composer-meta #sheet-mode[aria-pressed="true"]{background:#d8f1ff;border-color:#56bce9;color:#075f93;font-weight:700}@media(max-width:760px){.composer-meta{flex-wrap:wrap}.composer-meta #image-mode{margin-left:0}}

.topbar-actions{display:flex;align-items:center;gap:10px}.theme-toggle{width:37px;height:37px;flex:none;border:1px solid #d6e6ef;border-radius:10px;background:white;color:#335369;font-size:19px;line-height:1}.theme-toggle:hover{border-color:#55b9ec;color:#087fc1}.theme-toggle:focus-visible{outline:3px solid #55b9ec;outline-offset:2px}
.chat-item{flex:0 0 auto;min-height:40px;line-height:18px}
.workspace-title{min-width:0;flex:1}.workspace-title strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;line-height:1.25}.topbar-actions{flex:none}
.chat-row{position:relative;display:flex;align-items:center;flex:0 0 auto;min-width:0}.chat-row .chat-item{flex:1 1 auto;min-width:0;padding-right:38px}.chat-item.pinned::before{content:"✦";color:#48bffa}.chat-more{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:#9bc9e2;font-size:20px;line-height:1;opacity:0;pointer-events:none}.chat-row:hover .chat-more,.chat-row:focus-within .chat-more{opacity:1;pointer-events:auto}.chat-more:hover,.chat-more[aria-expanded="true"]{background:#2a526d;color:white}@media(hover:none){.chat-more{opacity:1;pointer-events:auto}}
.chat-menu{position:fixed;z-index:60;min-width:158px;padding:5px;border:1px solid #d1e2ec;border-radius:10px;background:white;box-shadow:0 14px 34px #051d3440}.chat-menu[hidden]{display:none}.chat-menu button{display:block;width:100%;border:0;border-radius:6px;background:transparent;color:#234b63;text-align:left;padding:9px 11px;font-size:13px}.chat-menu button:hover,.chat-menu button:focus-visible{background:#edf7fc;color:#087fc1}
.chat-dialog{width:min(420px,calc(100vw - 36px));border:1px solid #d1e2ec;border-radius:16px;background:#fff;color:#19384a;padding:24px;box-shadow:0 20px 60px #051d3455}.chat-dialog::backdrop{background:#071927a8}.chat-dialog h2{margin:0 0 8px;font-size:20px}.chat-dialog p{margin:0 0 18px;color:#607c8e;line-height:1.5}.chat-dialog label{display:block;font-size:13px;font-weight:650}.chat-dialog input{display:block;width:100%;margin-top:7px;padding:11px 12px;border:1px solid #bed8e7;border-radius:9px;background:#fff;color:#19384a}.chat-dialog input:focus{outline:3px solid #55b9ec55;border-color:#55b9ec}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.dialog-actions button{border:1px solid #d1e2ec;border-radius:9px;background:#fff;color:#335369;padding:9px 15px}.dialog-actions #chat-confirm{background:#119ce4;border-color:#119ce4;color:#fff}.dialog-actions #chat-confirm.danger{background:#b53e4d;border-color:#b53e4d}
.chat-dialog [hidden]{display:none}
:root[data-theme="dark"] .chat-more:hover,:root[data-theme="dark"] .chat-more[aria-expanded="true"]{background:#28546e}
:root[data-theme="dark"] .chat-menu,:root[data-theme="dark"] .chat-dialog{background:#162d3f;border-color:#36556a;color:#e7f2f9}
:root[data-theme="dark"] .chat-menu button{color:#d8edf8}:root[data-theme="dark"] .chat-menu button:hover,:root[data-theme="dark"] .chat-menu button:focus-visible{background:#24506a;color:white}
:root[data-theme="dark"] .chat-dialog p{color:#a8c1d1}:root[data-theme="dark"] .chat-dialog input,:root[data-theme="dark"] .dialog-actions button:not(#chat-confirm){background:#102434;border-color:#36556a;color:#e7f2f9}
@media print{.chat-menu,.chat-dialog,.chat-more{display:none!important}}
:root[data-theme="dark"]{color-scheme:dark;background:#0b1725;color:#e5f1f8}
:root[data-theme="dark"] .sidebar{background:#061321;color:#e5f1f8}
:root[data-theme="dark"] .chat-item{color:#b9d0df}
:root[data-theme="dark"] .chat-item:hover,:root[data-theme="dark"] .chat-item.active{background:#15354b;color:#fff}
:root[data-theme="dark"] .main-panel{background:radial-gradient(circle at 50% 25%,#142a3a 0,#0e1e2d 55%,#0b1725 100%)}
:root[data-theme="dark"] .topbar{background:#102434;border-color:#294356}
:root[data-theme="dark"] .workspace-title strong,:root[data-theme="dark"] .welcome h1,:root[data-theme="dark"] .message-text{color:#e7f2f9}
:root[data-theme="dark"] .welcome p,:root[data-theme="dark"] .role{color:#a8c1d1}
:root[data-theme="dark"] .topbar select,:root[data-theme="dark"] .theme-toggle{background:#162d3f;border-color:#36556a;color:#e2f1fa}
:root[data-theme="dark"] .menu-button{color:#e2f1fa}
:root[data-theme="dark"] .composer-area{background:linear-gradient(transparent,#0b1725 18%)}
:root[data-theme="dark"] .composer{background:#162c3e;border-color:#36556a;box-shadow:0 9px 30px #0003}
:root[data-theme="dark"] .composer:focus-within{border-color:#50b9ed;box-shadow:0 0 0 3px #50b9ed33}
:root[data-theme="dark"] .composer textarea{color:#e7f2f9}
:root[data-theme="dark"] .composer textarea::placeholder{color:#8daabd}
:root[data-theme="dark"] .composer .attach-button{background:#27485c;color:#88d5fb}
:root[data-theme="dark"] .composer .attach-button:hover{background:#345e76}
:root[data-theme="dark"] .message.user .avatar{background:#314a5c;color:#d3e9f5}
:root[data-theme="dark"] .avatar{background:#174b68;color:#8fddff}
:root[data-theme="dark"] .file-chip{background:#1b3b50;border-color:#3b6680;color:#a8dfff}
:root[data-theme="dark"] .file-chip:hover{background:#27536c}
:root[data-theme="dark"] .generated-preview{border-color:#36566a}
:root[data-theme="dark"] .composer-meta{color:#9db5c4}
:root[data-theme="dark"] .composer-meta #status{color:#ffaaa8}
:root[data-theme="dark"] .composer-meta #image-mode,:root[data-theme="dark"] .composer-meta #sheet-mode{background:#162d3f;border-color:#36556a;color:#a8dfff}
:root[data-theme="dark"] .composer-meta #image-mode[aria-pressed="true"],:root[data-theme="dark"] .composer-meta #sheet-mode[aria-pressed="true"]{background:#184e6d;border-color:#55b9ec;color:#fff}
:root[data-theme="dark"] .reply-actions button,:root[data-theme="dark"] .reply-menu summary{color:#91cdeb}
:root[data-theme="dark"] .reply-menu summary:hover,:root[data-theme="dark"] .reply-menu[open] summary{background:#23485e;color:#e2f6ff}
:root[data-theme="dark"] .reply-menu-items{background:#162d3f;border-color:#36556a;box-shadow:0 9px 22px #0006}
:root[data-theme="dark"] .reply-menu-items button{color:#d8edf8}
:root[data-theme="dark"] .reply-menu-items button:hover{background:#24506a}
@media(max-width:760px){.topbar-actions{gap:7px}.topbar select{max-width:120px}.theme-toggle{width:34px;height:34px}}
@media print{:root[data-theme="dark"] .main-panel,:root[data-theme="dark"] .topbar{background:white}:root[data-theme="dark"] .workspace-title strong,:root[data-theme="dark"] .message-text{color:#142b3b}.theme-toggle{display:none!important}}
