.mg-workspace{max-width:920px;margin:auto;color:#173554}.mg-context{display:flex;align-items:center;gap:20px;background:#fff;border:1px solid #dbe5f0;border-radius:16px;padding:16px 20px}.mg-context label{font-size:12px;font-weight:700;flex:1;min-width:180px}.mg-context select{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid #c3d3e6;border-radius:8px;color:#173554;background:#fff}.mg-context p{flex:1;font-size:12px;line-height:1.6;color:#657a92}.mg-messages{display:flex;flex-direction:column;gap:18px;margin:22px 0}.mg-welcome{text-align:center;padding:25px 15px 45px}.mg-mark{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 18px;background:#1856a0;color:#fff;font-size:24px;font-weight:750;border-radius:16px}.mg-welcome h2{font-size:25px;margin-bottom:12px;letter-spacing:-.6px}.mg-welcome p{color:#6c8096;font-size:14px;line-height:1.8}.mg-suggestions{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px;justify-content:center}.mg-suggestions button{padding:10px 14px;border:1px solid #ccdaea;border-radius:22px;background:#fff;color:#2c598d;font-size:13px;text-align:left;cursor:pointer}.mg-question{align-self:flex-end;background:#e5efff;border:1px solid #d3e1fa;border-radius:15px 15px 3px 15px;padding:13px 17px;max-width:85%;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}.mg-answer{background:#fff;border:1px solid #dbe5f0;border-radius:3px 16px 16px 16px;padding:20px;overflow:hidden}.mg-author{font-size:12px;font-weight:800;color:#1a62ab}.mg-answer-scope{display:block;font-size:11px;color:#6d7e92;margin:5px 0}.mg-answer>p{line-height:1.7;font-size:14px;margin:12px 0}.mg-answer h3{font-size:13px;margin:16px 0 10px}.mg-table-scroll{overflow:auto;max-height:420px;border:1px solid #e4ebf3;border-radius:9px}.mg-table-scroll table{border-collapse:collapse;width:100%;font-size:12px;min-width:400px;text-align:left}.mg-table-scroll th{background:#f3f7fc;padding:12px;font-weight:700}.mg-table-scroll td{padding:11px 12px;border-top:1px solid #e6edf5;vertical-align:top;overflow-wrap:anywhere}.mg-muted{font-size:11px;color:#677b93;line-height:1.6;margin-top:10px}.mg-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.mg-actions .btn{font-size:12px}.mg-compose{display:flex;align-items:flex-end;gap:10px;border:1px solid #c3d3e6;background:#fff;padding:12px;border-radius:18px;position:sticky;bottom:12px;box-shadow:0 8px 30px #1e405214}.mg-compose textarea{flex:1;min-width:0;padding:10px;border:0;border-radius:8px;resize:vertical;max-height:160px;font:inherit;font-size:14px;background:#fff;color:#173554}.mg-compose textarea:focus{outline:2px solid #90b7e3}.mg-plus,.mg-send{border:0;display:grid;place-items:center;flex-shrink:0;width:43px;height:43px;border-radius:50%;font-size:27px;background:#edf3fb;color:#215b9c;cursor:pointer}.mg-send{background:#1364bd;color:#fff}.mg-foot{font-size:11px;color:#7a899b;text-align:center;line-height:1.6;margin:10px}.mg-error{padding:13px;background:#fff0e8;border:1px solid #ffd4bf;border-radius:9px;color:#9e4425;font-size:13px}.mg-workspace button:disabled{opacity:.45;cursor:wait}.management-shortcut{white-space:nowrap}.inv-assistant-link{grid-column:1/-1;justify-self:start}
@media(max-width:600px){.mg-context{display:block;padding:14px}.mg-context p{margin-top:10px}.mg-welcome{padding:22px 0}.mg-welcome h2{font-size:22px}.mg-answer{padding:15px}.mg-question{max-width:94%}.mg-compose{padding:8px;gap:7px;bottom:8px}.mg-table-scroll table{min-width:360px}.mg-suggestions{gap:7px}.mg-suggestions button{font-size:12px}.mg-context label{min-width:0}.management-shortcut{font-size:11px!important;padding:8px!important}}

@media(max-width:420px){.management-shortcut svg{display:none}.header-right{gap:8px}.breadcrumbs{gap:7px}}
@media(max-width:360px){.breadcrumbs>svg,.breadcrumbs>span{display:none}}

.mg-private-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:space-between;margin-bottom:14px}.mg-private-bar strong{color:var(--blue,#174c87)}.mg-history{padding:18px;border:1px solid #b4c6db;border-radius:14px;margin:10px 0 20px;background:var(--surface,#fff)}.mg-history-list{display:grid;gap:8px;margin-top:14px}.mg-history-list button{text-align:left;white-space:normal;overflow-wrap:anywhere}.mg-history-answer,.mg-history details p{white-space:pre-wrap;overflow-wrap:anywhere}.mg-history h2{font-size:18px;margin:0}

/* A small set of direct actions, shared by the page and the floating assistant. */
.mg-workspace{display:flex;flex-direction:column;width:100%;min-height:490px}
.mg-context{border:0;background:transparent;border-radius:0;padding:0;gap:10px;align-items:end}
.mg-context label{font-size:11px;color:#667d94;min-width:0;max-width:290px}
.mg-context select{font:inherit;font-size:12px;color:#254c70;padding:10px 26px 10px 10px;border-radius:10px;background:#fff}
.mg-utilities{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:end}
.mg-utility,.mg-invoice-link{font:inherit;font-size:12px;color:#075da7;background:transparent;border:0;padding:10px 8px;cursor:pointer;border-radius:8px}
.mg-utility:hover,.mg-invoice-link:hover{background:#eaf3fb}
.mg-messages{flex:1;gap:16px;margin:18px 0;min-height:170px}
.mg-welcome{padding:24px 0 30px;margin:auto 0}
.mg-mark{border-radius:24px;width:60px;height:60px;background:#075da7;box-shadow:0 8px 22px #075da721;font-size:34px;font-weight:400;margin-bottom:22px}
.mg-welcome h2{font-size:25px;font-weight:650;letter-spacing:-.6px;line-height:1.25;margin:0 0 12px}
.mg-welcome p{font-size:14px;line-height:1.6;margin:0;color:#718398}
.mg-suggestions{margin-top:22px;gap:8px}
.mg-suggestions button{font-size:12px;padding:10px 12px;background:#fff}
.mg-input-area{position:sticky;bottom:0;z-index:3;margin-top:auto;padding:12px 0 0;background:linear-gradient(#f7faff00,#f7faff 12px);flex-shrink:0}
.mg-photo-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px;padding:8px;background:#fff;border:1px solid #d4e1ee;border-radius:18px;box-shadow:0 5px 20px #193e6310}
.mg-tool{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-width:0;min-height:46px;border:1px solid #d4e1ee;border-radius:13px;background:#fff;color:#285c88;padding:10px;font:inherit;font-size:13px;font-weight:550;cursor:pointer;overflow:hidden}
.mg-tool:hover{background:#edf5fc;border-color:#9ebfda}
.mg-tool svg,.mg-send svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.mg-tool input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.mg-tool:focus-within,.mg-tool:focus-visible,.mg-utility:focus-visible,.mg-invoice-link:focus-visible{outline:3px solid #81b0dc;outline-offset:2px}
.mg-voice.mg-listening{background:#fff0ec;color:#a74225}
.mg-tool:has(input:disabled){opacity:.5;cursor:wait}
.mg-compose{position:static;align-items:flex-end;gap:4px;padding:6px;border-radius:28px;border-color:#cfddea;background:#fff;box-shadow:0 5px 20px #193e6310}
.mg-compose .mg-plus,.mg-voice{border:0;display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;border-radius:50%;background:transparent;color:#315879;cursor:pointer;padding:10px}
.mg-compose .mg-plus:hover,.mg-voice:hover{background:#edf3fb}
.mg-compose .mg-plus svg,.mg-voice svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mg-compose button:focus-visible{outline:3px solid #81b0dc;outline-offset:2px}
.mg-compose textarea{resize:none;min-height:40px;max-height:140px;line-height:1.5;padding:9px 7px 9px 12px;font-size:15px}
.mg-send{width:42px;height:42px;background:#075da7;box-shadow:0 3px 8px #075da71c}
.mg-send svg{width:24px;height:24px;stroke-width:2}
.mg-foot{margin:9px 0 4px;font-size:11px;color:#7b8b9a}
.mg-environment{font-size:10px;color:#7b8b9a;text-align:center;margin:8px 0 0}
.mg-voice-notice{font-size:12px;line-height:1.5;color:#385e80;background:#eaf3fc;border-radius:10px;margin:0 0 10px;padding:10px 12px}
.mg-answer>p{white-space:pre-wrap}
@media(max-width:600px){.mg-context{display:flex}.mg-welcome h2{font-size:24px}.mg-workspace{min-height:450px}.mg-utilities{max-width:125px}.mg-context label{flex:1}.mg-tool{font-size:12px;padding:9px 7px;gap:6px}.mg-input-tools{gap:7px}.mg-compose textarea{font-size:16px}.mg-welcome{padding:28px 0}.mg-answer{padding:16px}}
@media(max-width:360px){.mg-context select{font-size:11px}.mg-utility{font-size:11px;padding:9px 4px}.mg-tool{gap:5px}.mg-tool svg{width:18px}.mg-welcome h2{font-size:22px}.mg-utilities{max-width:105px}}

/* Keep long drafts wide and the microphone beside the send arrow. */
.mg-compose.is-expanded{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 42px;border-radius:24px}
.mg-compose.is-expanded textarea{grid-column:1/-1;grid-row:1;width:100%;padding-right:12px}
.mg-compose.is-expanded .mg-plus{grid-column:1;grid-row:2}
.mg-compose.is-expanded .mg-voice{grid-column:3;grid-row:2}
.mg-compose.is-expanded .mg-send{grid-column:4;grid-row:2}

.mg-photo-draft{margin:0 0 12px}.mg-photo-draft p{font-size:13px;margin:8px 0;color:#39536d}.mg-photo-thumbs{display:flex;gap:8px}.mg-photo-thumbs figure{margin:0;position:relative}.mg-photo-thumbs img{width:64px;height:72px;object-fit:cover;border-radius:10px;border:1px solid #c9d7e5}.mg-photo-thumbs button{position:absolute;right:0;top:0;background:#fff;border:1px solid #c9d7e5;border-radius:50%;width:28px;height:28px}.mg-photo-targets{display:flex;gap:6px;flex-wrap:wrap}.mg-photo-targets button{border:1px solid #cbd9e8;background:white;color:#234866;border-radius:18px;padding:9px 13px;font:inherit;font-size:13px;min-height:40px}

/* The message list scrolls; the composer retains its own space. */
.mg-workspace{min-height:0;min-width:0}
.mg-context,.mg-input-area,.mg-environment,.mg-mode{flex-shrink:0}
.mg-messages{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere}
.mg-welcome{margin:auto 0;padding:20px 0}
.sosyf-dock-body .mg-input-area{position:relative;bottom:auto;margin-top:0;padding-top:8px;background:#f7faff}
.mg-history{max-height:45%;overflow-y:auto;flex-shrink:1}
.mg-mode{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;color:#687c90;margin-top:8px}
.mg-mode button{font:inherit;color:#075da7;background:transparent;border:0;padding:6px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.mg-connection-notice{display:block;font-size:11px;color:#687c90;line-height:1.5}
.mg-error{flex-shrink:0;margin:10px 0;font-size:12px;padding:10px 12px}
@media(max-height:600px){.mg-welcome{padding:8px 0}.mg-welcome .mg-mark{display:none}.mg-welcome h2{font-size:20px;margin-bottom:8px}.mg-welcome p{font-size:12px}.mg-welcome .mg-suggestions{margin-top:10px}.mg-welcome .mg-suggestions button{padding:8px 10px}.mg-messages{margin:8px 0}.mg-foot{margin:5px 0 0}.mg-environment{margin:4px 0 0}.mg-context select{padding-top:7px;padding-bottom:7px}}
.mg-messages>*{flex-shrink:0}
.mg-mode a{color:#075da7;text-decoration:underline;text-underline-offset:3px;padding:6px 0}
@media(max-height:600px){.mg-answer{padding:12px}.mg-answer>p{margin:8px 0;line-height:1.5}.mg-author{font-size:11px}.mg-answer-scope{font-size:10px;margin:3px 0}}
