@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans','Noto Sans SC',sans-serif;color:#182230;background:#f4f7fb;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;border:0}.loading{min-height:100vh;display:grid;place-items:center;color:#697586}header{height:68px;padding:0 max(calc((100% - 1120px)/2),24px);display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e7ebf0}.brand{font-size:18px;font-weight:700;text-decoration:none;color:#182230;display:flex;gap:10px;align-items:center}.brand:first-letter{color:#4868e8}nav{display:flex;gap:8px}.quiet{color:#566274;background:transparent;padding:10px 13px;border-radius:9px}.quiet:hover{background:#f1f3f7}.primary{background:#435fe2;color:#fff;padding:11px 16px;border-radius:9px;font-weight:600;box-shadow:0 4px 10px #435fe224}.primary:hover{background:#344fd0}.auth{width:min(430px,calc(100% - 32px));margin:10vh auto;padding:36px}.card{background:white;border:1px solid #e8ecf2;border-radius:16px;box-shadow:0 8px 26px #1d2c4609}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.14em;color:#5269d8}h1{font-size:28px;margin:9px 0}h2{font-size:18px;margin:0 0 18px}p{color:#788395;line-height:1.6}.auth p{margin:0 0 24px}.auth form,label{display:flex;flex-direction:column;gap:8px}.auth form{gap:18px}.auth label,.dialog label{font-size:13px;font-weight:600;color:#4c596a}.auth input,.dialog input,.dialog textarea{width:100%;margin-top:2px;padding:12px;border:1px solid #dce2eb;border-radius:9px;outline:0}.auth input:focus,.dialog input:focus,.dialog textarea:focus{border-color:#6279eb;box-shadow:0 0 0 3px #6279eb20}.auth small,.hint{color:#8993a2;font-size:12px}.layout{max-width:1120px;margin:48px auto;padding:0 24px}.intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.intro p{margin:7px 0}.table-card{overflow:hidden}.table-head{padding:20px 24px;border-bottom:1px solid #edf0f4;display:flex;justify-content:space-between;align-items:center}.count{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:20px;background:#eef1ff;color:#5268d7;font-size:12px}.row{display:flex;align-items:center;gap:14px;padding:15px 24px;border-bottom:1px solid #f0f2f6}.row:last-child{border:0}.row.active,.row:hover{background:#f9faff}.avatar{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:#edf0ff;color:#5268d7;font-weight:700}.mail{display:flex;flex-direction:column;gap:4px;flex:1;min-width:100px}.mail b{font-size:14px}.mail small,.message small{color:#929baa;font-size:12px}.actions{display:flex;gap:5px}.actions button{background:transparent;padding:8px;color:#526174;border-radius:7px;font-size:12px}.actions button:hover{background:#eaf0ff;color:#435fe2}.actions .danger:hover{background:#fff0f0;color:#d34c4c}.empty{padding:64px 16px;display:flex;align-items:center;flex-direction:column}.empty>span{font-size:34px;color:#8290ee}.empty b{margin-top:10px}.empty p{font-size:13px}.results{margin-top:22px;padding:23px}.message{padding:14px 0;border-bottom:1px solid #edf0f4}.message:last-child{border:0}.message small{display:block;margin:6px 0}.message p{margin:5px 0;font-size:13px}.code-card{margin-top:20px;padding:24px;display:flex;align-items:center;gap:15px}.code-card small,.code-card span{color:#768194}.code-card strong{font:700 28px 'DM Sans';letter-spacing:.15em;color:#435fe2}.code-card button{margin-left:auto;padding:9px 13px;color:#435fe2;background:#eef1ff;border-radius:8px}dialog{border:0;border-radius:16px;padding:0;width:min(520px,calc(100% - 30px));box-shadow:0 24px 80px #14233b40}dialog::backdrop{background:#14233b66;backdrop-filter:blur(3px)}.dialog{padding:28px;display:flex;flex-direction:column;gap:16px;position:relative}.dialog h2{margin:0}.dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.x{position:absolute;right:16px;top:12px;background:transparent;color:#8791a0;font-size:24px}.dialog .hint{margin:0}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;padding:11px 17px;border-radius:10px;background:#202b3c;color:white;font-size:13px;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}@media(max-width:720px){header{padding:0 16px}.layout{margin:30px auto;padding:0 14px}.intro{align-items:flex-start;gap:8px}.intro h1{font-size:24px}.row{padding:13px;flex-wrap:wrap}.actions{width:100%;justify-content:flex-end}.mail{min-width:0}.code-card{flex-wrap:wrap}.code-card button{margin-left:0}.table-head{padding:16px}}

/* Mail retrieval uses a fixed, scrollable dialog instead of appending below the mailbox table. */
dialog:has(.mail-dialog){width:min(760px,calc(100% - 28px));max-height:min(82vh,760px);overflow:hidden}.mail-dialog{display:flex;flex-direction:column;max-height:min(82vh,760px)}.mail-dialog-head{height:auto;min-height:78px;padding:20px 58px 16px 24px;display:flex;align-items:center;border-bottom:1px solid #edf0f4;position:relative}.mail-dialog-head small{font-size:12px;color:#8791a0}.mail-dialog-head h2{margin:4px 0 0;font-size:17px}.mail-dialog-head .x{right:18px;top:16px}.mail-dialog-content{overflow-y:auto;padding:8px 24px 18px}.inbox-summary{padding:10px 0 3px;font-size:13px;font-weight:600;color:#566274}.inbox-empty{padding:60px 16px;text-align:center;color:#8993a2;font-size:14px}.mail-dialog .message{padding:16px 0}.mail-dialog .message b{overflow-wrap:anywhere}.mail-dialog .message p{overflow-wrap:anywhere}@media(max-width:720px){dialog:has(.mail-dialog),.mail-dialog{max-height:86vh}.mail-dialog-head{padding-left:17px}.mail-dialog-content{padding-left:17px;padding-right:17px}}
.copy-field{display:flex;align-items:stretch;gap:8px}.copy-field input,.copy-field textarea{flex:1;min-width:0}.copy-field textarea{resize:vertical}.copy-button{align-self:stretch;padding:0 13px;border:1px solid #dce2eb;border-radius:9px;background:#f7f8fc;color:#435fe2;font-size:13px;font-weight:600;white-space:nowrap}.copy-button:hover{background:#eef1ff;border-color:#cbd4ff}@media(max-width:560px){.copy-field{gap:6px}.copy-button{padding:0 9px}}
.row-number{width:30px;flex:none;text-align:center;color:#8791a0;font-size:13px;font-variant-numeric:tabular-nums}.message-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;color:#68758a}.rows .row{gap:12px}@media(max-width:720px){.row-number{width:22px}.rows .row{gap:9px}}
.mail b{cursor:copy;user-select:all}.mail b:hover{color:#435fe2}
.table-tools{display:flex;align-items:center;gap:6px}.table-tools select{padding:8px 10px;border:1px solid #e0e5ed;border-radius:8px;background:white;color:#566274;font-size:12px;outline:0}.mail small{overflow-wrap:anywhere}@media(max-width:560px){.table-tools{gap:2px}.table-tools select{max-width:145px;padding:7px 5px;font-size:11px}}
.bulk-tools{display:flex;align-items:center;gap:10px;color:#68758a;font-size:12px}.bulk-tools label{display:flex;flex-direction:row;align-items:center;gap:5px;font-weight:500;white-space:nowrap}.mail-select,.bulk-tools input{accent-color:#435fe2;width:16px;height:16px;flex:none;cursor:pointer}.danger-button{padding:8px 10px;border-radius:8px;background:#fff0f0;color:#c74646;font-size:12px;white-space:nowrap}.danger-button:disabled{opacity:.45;cursor:not-allowed}.table-head{gap:10px}.row{cursor:pointer}@media(max-width:900px){.table-head{flex-wrap:wrap}.bulk-tools{order:3;width:100%;padding-top:8px;border-top:1px solid #edf0f4}.row{gap:8px}}
.filter-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 20px;border-bottom:1px solid #edf0f4}.filter-toolbar>input[type=search]{flex:1;min-width:210px;padding:9px 11px;border:1px solid #e0e5ed;border-radius:8px;outline:0;color:#344054}.filter-toolbar>input:focus,.filter-toolbar label input:focus{border-color:#6279eb;box-shadow:0 0 0 2px #6279eb18}.filter-toolbar label{display:flex;flex-direction:row;align-items:center;gap:7px;font-size:12px;font-weight:500;color:#68758a;white-space:nowrap}.filter-toolbar label input{padding:8px;border:1px solid #e0e5ed;border-radius:8px;color:#566274;font:inherit}.filter-toolbar .quiet{padding:8px;font-size:12px}@media(max-width:720px){.filter-toolbar{padding:11px;gap:8px}.filter-toolbar>input[type=search]{min-width:100%;}.filter-toolbar label{width:100%;justify-content:flex-start}.filter-toolbar label input{flex:1;min-width:0}}
.mail-column-head,.rows .row{display:grid;grid-template-columns:76px 36px 42px minmax(180px,1fr) minmax(120px,160px) auto;align-items:center;gap:12px}.mail-column-head{padding:10px 24px;background:#fafbfc;border-bottom:1px solid #edf0f4;color:#8791a0;font-size:12px;font-weight:600}.select-all-head{display:flex;flex-direction:row;align-items:center;gap:7px;font-weight:600;white-space:nowrap}.select-all-head input{accent-color:#435fe2;width:16px;height:16px;cursor:pointer}.mail-column-head span:nth-child(3){min-width:0}.mail-date{font-size:12px;color:#68758a;font-variant-numeric:tabular-nums;white-space:nowrap}.rows .row{cursor:pointer}.rows .row-number{width:auto}.rows .mail{min-width:0}.rows .actions{justify-content:flex-end;flex-wrap:wrap}@media(max-width:900px){.mail-column-head,.rows .row{grid-template-columns:68px 24px 36px minmax(130px,1fr) minmax(100px,120px) auto;gap:7px}.mail-column-head{padding:9px 12px}.rows .row{padding:12px}.rows .actions{gap:1px}.rows .actions button{padding:6px 5px}}
.rows .row[hidden]{display:none!important}.filter-button{padding:9px 13px;font-size:12px;white-space:nowrap}
.mail-column-head,.rows .row{grid-template-columns:52px 36px 42px minmax(0,1fr) 128px 150px 260px}.mail-column-head{width:100%}.rows .actions{width:300px}@media(max-width:900px){.mail-column-head,.rows .row{grid-template-columns:44px 24px 36px minmax(0,1fr) 128px 140px 230px}.rows .actions{width:260px}}@media(max-width:680px){.rows .row{grid-template-columns:16px 22px 34px minmax(0,1fr)}.rows .actions{width:100%}}
.folder-tabs{display:flex;align-items:center;gap:5px;overflow-x:auto;padding:10px 18px;border-bottom:1px solid #edf0f4;background:#fafbff}.folder-tab{flex:none;padding:8px 12px;border-radius:8px;color:#667085;background:transparent;font-size:13px;white-space:nowrap}.folder-tab:hover{background:#f0f2f8}.folder-tab.active{background:#e9edff;color:#435fe2;font-weight:600}
.mail-column-head span:last-child{text-align:center}.rows .actions{justify-content:center}
.mail-dialog{width:min(1500px,96vw)}dialog:has(.mail-dialog){width:min(1500px,calc(100% - 28px));max-height:90vh}.inbox-three-pane{display:grid;grid-template-columns:180px minmax(280px,32%) minmax(0,1fr);min-height:520px;max-height:calc(90vh - 78px)}.folder-sidebar{display:flex;flex-direction:column;align-items:stretch;gap:4px;overflow-y:auto;padding:14px 10px;border-right:1px solid #e5e9f0;background:#f8f9fd}.folder-sidebar .folder-tab{width:100%;text-align:left}.mail-list-pane{min-width:0;display:flex;flex-direction:column;border-right:1px solid #e5e9f0}.mail-list-pane .inbox-toolbar{flex:none}.mail-list-pane .mail-list{flex:1;max-height:none;border:0}.mail-reader{min-width:0;overflow-y:auto;padding:24px 28px}.mail-reader-empty{min-height:100%;display:grid;place-items:center;color:#8a94a6;font-size:14px}.mail-list-pane .inbox-empty{flex:1;display:grid;place-items:center;padding:20px}.mail-reader{grid-column:auto}@media(max-width:850px){.inbox-three-pane{grid-template-columns:145px minmax(230px,38%) minmax(0,1fr)}}@media(max-width:680px){.inbox-three-pane{grid-template-columns:minmax(130px,35%) minmax(0,1fr);grid-template-rows:auto minmax(300px,1fr);min-height:560px}.folder-sidebar{grid-column:1/-1;flex-direction:row;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid #e5e9f0;padding:8px}.folder-sidebar .folder-tab{width:auto}.mail-list-pane{min-height:0}.mail-reader{padding:16px}.mail-reader h3{font-size:17px}}
.folder-sidebar .folder-tab{display:flex;align-items:center;justify-content:space-between;gap:10px}.folder-count{min-width:22px;padding:2px 7px;border-radius:999px;background:#edf0f6;color:#68758a;font-size:11px;font-variant-numeric:tabular-nums;text-align:center}.folder-tab.active .folder-count{background:#dce3ff;color:#435fe2}
.rows .actions button.is-loading,.rows .actions button.is-loading:disabled{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#435fe2;background:#eef1ff;opacity:1;cursor:wait;white-space:nowrap}.button-spinner{display:inline-block;width:13px;height:13px;border:2px solid #cbd4ff;border-top-color:#435fe2;border-radius:50%;animation:mail-spin .75s linear infinite;flex:none}@keyframes mail-spin{to{transform:rotate(360deg)}}
@media(max-width:680px){.mail-column-head{display:none}.rows .row{grid-template-columns:16px 22px 34px minmax(0,1fr);gap:8px}.rows .mail-date{grid-column:4;font-size:11px}.rows .actions{grid-column:1/-1;width:100%;justify-content:flex-end}}
.mail-dialog{width:min(1120px,96vw)}dialog:has(.mail-dialog){width:min(1120px,calc(100% - 28px));max-height:88vh}.inbox-toolbar{padding:12px 20px;border-bottom:1px solid #edf0f4;font-size:13px;font-weight:600;color:#566274}.inbox-split{display:grid;grid-template-columns:minmax(260px,34%) minmax(0,1fr);min-height:420px;max-height:calc(88vh - 150px)}.mail-list{display:block!important;overflow-y:auto;border-right:1px solid #e9edf3;gap:0!important}.mail-list-item{display:flex;flex-direction:column;align-items:flex-start;width:100%;padding:14px 16px;text-align:left;background:white;border-bottom:1px solid #edf0f4;gap:5px;color:#263244}.mail-list-item:hover{background:#f7f8fc}.mail-list-item.active{background:#eef2ff;box-shadow:inset 3px 0 #5269d8}.mail-list-item b{width:100%;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mail-list-item span,.mail-list-item time,.mail-list-item small{width:100%;font-size:11px;color:#8791a0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mail-reader{min-width:0;overflow-y:auto;padding:24px 28px}.mail-reader h3{font-size:20px;line-height:1.4;margin:0 0 10px;overflow-wrap:anywhere}.mail-reader-meta{padding-bottom:16px;border-bottom:1px solid #edf0f4;color:#8791a0;font-size:12px}.mail-reader-body{padding-top:18px;color:#566274;font-size:14px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}.mail-reader:empty{display:grid;place-items:center;color:#8791a0}@media(max-width:720px){.inbox-split{grid-template-columns:1fr;grid-template-rows:minmax(140px,34%) minmax(220px,1fr);min-height:500px;max-height:calc(88vh - 145px)}.mail-list{border-right:0;border-bottom:1px solid #e9edf3}.mail-reader{padding:18px}.mail-reader h3{font-size:17px}}

.mail-column-head span:nth-last-child(2){text-align:center}.usage-state{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.usage-state small{color:#8791a0;font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap}.usage-toggle{padding:6px 10px;border-radius:999px;font-size:11px;white-space:nowrap}.usage-toggle.unused{background:#f1f3f7;color:#68758a}.usage-toggle.used{background:#e8f7ef;color:#17834a}.usage-toggle:disabled{opacity:.65;cursor:wait}@media(max-width:680px){.rows .usage-state{grid-column:4;justify-self:start;align-items:flex-start}.rows .usage-state small{font-size:10px}}

.usage-meta{display:flex;align-items:center;justify-content:center;gap:5px}.usage-refresh{padding:2px 5px;border-radius:5px;background:transparent;color:#5268d7;font-size:10px;white-space:nowrap}.usage-refresh:hover{background:#eef1ff}.usage-refresh:disabled{opacity:.6;cursor:wait}@media(max-width:680px){.rows .usage-meta{justify-content:flex-start}}

.rows .mail{overflow:hidden}.rows .mail b{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.load-more-wrap{display:flex;justify-content:center;padding:10px}.load-more-wrap button{font-size:13px}

.back-to-top{position:fixed;right:24px;bottom:24px;z-index:1000;width:46px;height:46px;display:grid;place-items:center;border-radius:50%;background:#435fe2;color:white;box-shadow:0 6px 18px #182e5a35;transition:transform .18s,background .18s}.back-to-top:hover{background:#344fd0;transform:translateY(-2px)}.back-to-top svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.back-to-top[hidden]{display:none!important}@media(max-width:680px){.back-to-top{right:16px;bottom:16px;width:42px;height:42px}}

.rows .actions .icon-action{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:5px;border:1px solid #e1e6ef;border-radius:7px;background:#fff;color:#546174;line-height:1;flex:none}.rows .actions .icon-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.rows .actions .icon-action:hover{color:#435fe2;border-color:#b9c5ff;background:#f5f7ff}.rows .actions .icon-action.danger:hover{color:#d92d20;border-color:#f2b8b5;background:#fff7f6}.rows .actions .icon-action:focus-visible{outline:2px solid #435fe2;outline-offset:2px}
.account-nav{position:relative}.account-button{width:42px;height:42px;display:grid;place-items:center;border:1px solid #e1e6ef;border-radius:50%;background:#fff;color:#536174}.account-button:hover{background:#f5f7ff;color:#435fe2}.account-button svg,.profile-avatar svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.account-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:20;min-width:160px;padding:6px;border:1px solid #e5e9f0;border-radius:11px;background:#fff;box-shadow:0 12px 32px #17243b20}.account-menu[hidden]{display:none}.account-menu button{display:block;width:100%;padding:10px 12px;text-align:left;border-radius:7px;background:transparent;color:#344054}.account-menu button:hover{background:#f2f4f8}.profile-card{display:flex;align-items:center;gap:13px;padding:14px;border:1px solid #edf0f4;border-radius:12px}.profile-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:#eef1ff;color:#5268d7}.profile-card p{margin:4px 0 0}.totp-page{min-height:100vh;padding:32px 16px;background:#f8fafc;color:#1f2937}.totp-card{max-width:896px;margin:0 auto;padding:32px;border:1px solid #edf0f4;border-radius:18px;background:#fff;box-shadow:0 2px 9px #17243b0a}.totp-card h1{margin:0;font-size:30px}.totp-card hr{margin:20px 0;border:0;border-top:1px solid #e5e7eb}.totp-desc{margin:8px 0;color:#6b7280;font-size:14px;line-height:1.65}.totp-card form label{display:block;margin-bottom:8px;font-size:14px;font-weight:600}.totp-card input{width:100%;padding:14px 16px;border:1px solid #d1d5db;border-radius:9px;background:#f9fafb;font-family:monospace;font-size:14px;letter-spacing:.08em;text-transform:uppercase}.totp-card input:focus{outline:2px solid #10b98155;border-color:#10b981}.totp-controls{display:flex;align-items:center;gap:13px;margin-top:12px}.totp-controls span{color:#6b7280;font-size:13px}.totp-submit{padding:10px 20px;border-radius:9px;background:#059669;color:white;font-weight:600}.totp-submit:hover{background:#047857}.totp-card #totpResult{display:flex;align-items:center;gap:18px;margin-top:20px;padding:20px;border:1px solid #a7f3d0;border-radius:12px;background:#ecfdf5}.totp-card #totpResult>div{flex:1}.totp-card #totpResult small{display:block;color:#6b7280}.totp-card #totpResult strong{display:block;margin-top:4px;color:#047857;font:700 36px monospace;letter-spacing:.25em}.totp-card #totpResult>span{color:#4b5563;font-size:13px}.totp-card #totpCopy{padding:8px 12px;border-radius:8px;background:#d1fae5;color:#047857}.totp-card #totpMessage{min-height:20px;margin:14px 0;color:#6b7280;font-size:13px}.totp-card h2{font-size:16px}.totp-page footer{max-width:896px;margin:20px auto 0;text-align:center;color:#9ca3af;font-size:13px}@media(max-width:600px){.totp-page{padding:18px 12px}.totp-card{padding:22px 18px}.totp-card #totpResult{flex-wrap:wrap}.totp-card #totpResult strong{font-size:30px}}

.twofa-link{display:inline-flex;align-items:center;margin-right:12px;padding:9px 12px;border:1px solid #e1e6ef;border-radius:8px;color:#526174;font-size:14px;text-decoration:none;white-space:nowrap}.twofa-link:hover{border-color:#b9c5ff;background:#f5f7ff;color:#435fe2}@media(max-width:520px){.twofa-link{margin-right:6px;padding:8px;font-size:13px}}

.tools-nav{position:relative}.tools-button{display:inline-flex;align-items:center;gap:7px;margin-right:12px;padding:9px 12px;border:1px solid #e1e6ef;border-radius:8px;background:#fff;color:#526174;font-size:14px;white-space:nowrap}.tools-button:hover,.tools-button[aria-expanded=true]{border-color:#b9c5ff;background:#f5f7ff;color:#435fe2}.tools-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5}.tools-menu{right:12px;top:calc(100% + 8px)}.tools-menu a{display:block;padding:10px 12px;border-radius:7px;color:#344054;text-decoration:none;white-space:nowrap}.tools-menu a:hover{background:#f2f4f8;color:#435fe2}@media(max-width:520px){.tools-button{margin-right:6px;padding:8px;font-size:13px}}
.ai-shell{height:calc(100vh - 1px);display:grid;grid-template-columns:250px minmax(0,1fr);background:#fff;color:#1f2937}.ai-sidebar{display:flex;flex-direction:column;padding:20px 14px;border-right:1px solid #e5e7eb;background:#f9fafb}.ai-brand{margin:5px 8px 24px;color:#1f2937;text-decoration:none;font-weight:700}.ai-new-chat,.ai-nav button{padding:11px 12px;border:1px solid #e5e7eb;border-radius:9px;background:white;text-align:left;color:#374151}.ai-nav{display:grid;gap:6px;margin-top:14px}.ai-nav button{border-color:transparent;background:transparent}.ai-nav button.active,.ai-nav button:hover{background:#eceff3}.ai-sidebar-note{margin-top:auto;color:#9ca3af;font-size:12px}.ai-main{position:relative;display:flex;flex-direction:column;min-width:0;height:100vh}.ai-top{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #f0f1f3}.ai-top div{display:flex;align-items:center;gap:12px}.ai-top span,.ai-top a{color:#8a9099;font-size:12px}.ai-top a{text-decoration:none}.ai-chat{flex:1;overflow:auto;padding:30px max(24px,calc((100% - 800px)/2)) 120px}.ai-welcome{position:absolute;top:42%;left:50%;transform:translate(-50%,-50%);width:min(92%,650px);text-align:center}.ai-welcome h1{font-size:30px}.ai-welcome p{color:#777f8a}.ai-mark{margin:auto;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:#f1f3f5;font-size:23px}.ai-message{display:flex;gap:14px;margin:18px auto;max-width:800px;line-height:1.7}.ai-avatar{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:50%;background:#edf0f4;font-size:12px}.ai-message.assistant .ai-avatar{background:#dff5e9;color:#078749}.ai-content{padding-top:3px;overflow-wrap:anywhere}.ai-composer{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);width:min(800px,calc(100% - 40px));display:flex;align-items:flex-end;gap:10px;padding:10px;border:1px solid #d9dde3;border-radius:18px;background:#fff;box-shadow:0 3px 16px #17243b10}.ai-composer select{max-width:145px;border:0;background:transparent;color:#58616c;font-size:12px}.ai-composer textarea,.ai-image-form textarea{flex:1;resize:vertical;min-height:42px;max-height:180px;padding:10px;border:0;outline:0;font:inherit}.ai-composer button,.ai-image-form button{width:38px;height:38px;border-radius:50%;background:#1f2937;color:white;font-size:20px}.ai-disclaimer{position:absolute;bottom:5px;left:0;width:100%;text-align:center;color:#9ca3af;font-size:11px}.ai-image-form{width:min(760px,calc(100% - 40px));margin:12vh auto 0}.ai-image-form h1{font-size:26px}.ai-image-form>textarea{display:block;width:100%;padding:14px;border:1px solid #d9dde3;border-radius:14px}.ai-image-form>div{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}.ai-image-form select{padding:9px;border:1px solid #d9dde3;border-radius:8px;background:#fff}.ai-image-form button{width:auto;height:auto;padding:10px 16px;border-radius:9px;font-size:14px}.ai-image-form #imageResults{margin-top:22px;display:grid;gap:12px}.ai-image-form #imageResults img{max-width:100%;max-height:65vh;object-fit:contain;border-radius:12px}.ai-image-form #imageResults a{color:#2563eb}@media(max-width:700px){.ai-shell{grid-template-columns:68px minmax(0,1fr)}.ai-sidebar{padding:12px 7px}.ai-brand{font-size:0}.ai-new-chat{font-size:0;text-align:center}.ai-new-chat:first-letter{font-size:20px}.ai-nav button{padding:10px 4px;text-align:center;font-size:12px}.ai-sidebar-note{display:none}.ai-top{padding:0 12px}.ai-chat{padding-left:14px;padding-right:14px}.ai-image-form{margin-top:8vh}.ai-image-form>div{flex-wrap:wrap}}
.ai-message.pending .ai-content{color:#6b7280}.thinking-dots{display:inline-flex;gap:4px;margin-right:7px;vertical-align:middle}.thinking-dots i{width:6px;height:6px;border-radius:50%;background:#64748b;animation:ai-dot 1.1s infinite ease-in-out}.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}@keyframes ai-dot{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}.ai-content .elapsed{display:block;margin-top:4px;color:#9aa1aa;font-size:12px}.ai-composer button:disabled,.ai-image-form button:disabled{opacity:.55;cursor:wait}.reference-picker{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:14px;border:1px dashed #cbd2dc;border-radius:12px;background:#fafbfc;cursor:pointer}.reference-picker:hover{border-color:#7b8dea;background:#f7f8ff}.reference-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:9px;background:#eef1ff;color:#4b5ed7;font-size:22px}.reference-picker b,.reference-picker small{display:block}.reference-picker small{margin-top:3px;color:#8a9099;font-size:12px}.reference-preview{display:flex;align-items:flex-start;gap:8px;margin:0 0 10px;padding:0;border:0;background:transparent}.reference-preview[hidden]{display:none!important}.reference-thumb-wrap{position:relative;width:68px;height:68px;flex:none}.reference-preview img{display:block;width:68px;height:68px;object-fit:cover;border-radius:10px}.reference-preview .reference-remove{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid #fff;border-radius:50%;background:#fff;color:#586273;box-shadow:0 1px 5px #17243b30;font-size:16px;line-height:1;cursor:pointer}.reference-preview .reference-remove:hover{background:#f3f4f6;color:#d14343}.image-status{min-height:25px;margin-top:12px;color:#596273;font-size:13px}.image-spinner{display:inline-block;width:14px;height:14px;margin-right:7px;vertical-align:-2px;border:2px solid #d7dcef;border-top-color:#5268d7;border-radius:50%;animation:mail-spin .8s linear infinite}.ai-image-form #imageResults figure{margin:0}.ai-image-form #imageResults figure img{display:block}.ai-image-form #imageResults figure a{display:inline-block;margin-top:8px}

#aiComposer[hidden],#aiChat[hidden]{display:none!important}
.ai-image-history{flex:1;min-height:0;overflow-y:auto;padding:26px max(24px,calc((100% - 900px)/2)) 400px}.ai-image-history[hidden]{display:none!important}.ai-image-form{position:absolute;z-index:4;left:50%;bottom:34px;transform:translateX(-50%);width:min(900px,calc(100% - 40px));max-height:48vh;overflow:auto;margin:0;padding:16px 18px;border:1px solid #dce1e8;border-radius:18px;background:#fff;box-shadow:0 5px 24px #17243b16}.ai-image-form h1{margin:0 0 12px;font-size:19px}.ai-image-form .reference-picker{min-height:66px;margin-bottom:10px;padding:10px 13px}.ai-image-form .reference-icon{width:34px;height:34px}.ai-image-form>textarea{width:100%;min-height:76px;max-height:140px;padding:12px;border:1px solid #e0e4ea;border-radius:12px}.ai-image-form .image-form-controls{display:flex;justify-content:flex-end;align-items:center;gap:9px;margin-top:10px}.ai-image-turn{max-width:900px;margin:0 auto 28px}.ai-image-prompt{display:flex;justify-content:flex-end;margin-bottom:18px}.ai-image-prompt>div{max-width:80%;padding:14px 17px;border-radius:18px 18px 4px 18px;background:#f1f3f5}.ai-image-prompt p{margin:0;line-height:1.65;white-space:normal;overflow-wrap:anywhere}.ai-reference-thumb{display:block;width:120px;height:120px;margin:0 0 10px;object-fit:cover;border-radius:10px}.ai-image-progress{display:flex;align-items:center;gap:6px;margin:8px 0 16px;color:#747d89;font-size:13px}.ai-image-output{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.ai-image-output figure{margin:0}.ai-image-output img{display:block;width:100%;height:auto;max-height:70vh;object-fit:contain;border-radius:14px;background:#f5f6f8}.ai-image-output a{display:inline-block;margin-top:8px;color:#405ed5;text-decoration:none}.ai-image-form #imageStatus,.ai-image-form #imageResults{display:none!important}@media(max-width:700px){.ai-image-history{padding:16px 14px 380px}.ai-image-form{bottom:12px;width:calc(100% - 24px);max-height:52vh;padding:12px;border-radius:15px}.ai-image-form h1{font-size:17px}.ai-image-form .image-form-controls{flex-wrap:wrap}.ai-image-form .image-form-controls select{flex:1;min-width:105px}.ai-image-form .image-form-controls button{flex:1}.ai-image-prompt>div{max-width:94%}}
.ai-image-form .reference-picker{flex-direction:row;justify-content:flex-start;text-align:left}.ai-image-form .reference-picker>span:nth-child(2){display:flex;flex-direction:column;gap:3px}.ai-conversations{flex:1;min-height:40px;overflow-y:auto;margin:14px -4px 8px;padding:0 4px}.ai-conversation{display:flex;align-items:center;gap:4px;margin-bottom:5px;padding:3px;border-radius:9px}.ai-conversation:hover,.ai-conversation.active{background:#eceff3}.ai-conversation>button:first-child{flex:1;min-width:0;overflow:hidden;padding:9px 8px;background:transparent;color:#374151;text-align:left;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.ai-delete-conversation{width:28px;height:28px;border-radius:6px;background:transparent;color:#858d98;font-size:19px;line-height:1}.ai-delete-conversation:hover{background:#fff;color:#c53535}.ai-sidebar-note{flex:none}.ai-new-chat{width:100%}@media(max-width:700px){.ai-conversation>button:first-child{font-size:11px;padding:7px 3px}.ai-delete-conversation{width:24px;height:24px;font-size:16px}}
.ai-main>.ai-top{flex:none}.ai-image-history{flex:1;min-height:0;padding-bottom:24px}.ai-image-form{position:relative;left:auto;bottom:auto;transform:none;align-self:center;flex:none;width:min(900px,calc(100% - 40px));max-height:42vh;margin:0 20px 20px;overflow-y:auto}.ai-image-form .reference-picker{min-height:62px}.ai-image-form>textarea{min-height:68px;max-height:120px}@media(max-width:700px){.ai-image-history{padding-bottom:18px}.ai-image-form{width:calc(100% - 24px);max-height:46vh;margin:0 12px 12px}}
dialog.ai-image-viewer{width:min(96vw,1600px);height:min(94vh,1100px);max-width:none;max-height:none;padding:34px;background:#101114;border:0;border-radius:12px;overflow:hidden}dialog.ai-image-viewer::backdrop{background:#050608dd;backdrop-filter:blur(3px)}.ai-image-viewer img{display:block;width:100%;height:100%;object-fit:contain}.ai-image-viewer-close{position:absolute;top:8px;right:10px;z-index:1;width:34px;height:34px;border-radius:50%;background:#ffffff20;color:white;font-size:25px;line-height:1}.ai-image-viewer-close:hover{background:#ffffff40}.ai-image-output img{cursor:zoom-in}.ai-image-output img:hover{filter:brightness(.97)}
.ai-image-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.ai-image-action{font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 12px;border:1px solid #e1e5eb;border-radius:999px;background:#fff;color:#475467;text-decoration:none;font-size:13px;line-height:1;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.ai-image-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.ai-image-action:hover{border-color:#c9d2e0;background:#f8fafc;color:#27364b}.ai-image-action.reference-action{border-color:#d8defb;background:#f6f7ff;color:#4358c8}.ai-image-action.reference-action:hover{border-color:#aebaf5;background:#eef0ff;color:#3046b4}

.ai-image-actions .ai-image-action{appearance:none;-webkit-appearance:none;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;gap:8px;width:190px;height:48px;min-height:48px;margin:0;padding:0 12px;border-radius:999px;font:500 14px/1 'DM Sans','Noto Sans SC',sans-serif;vertical-align:middle;white-space:nowrap}.ai-image-actions .ai-image-action svg{width:17px;height:17px;flex:none}.ai-image-actions .ai-image-action span{line-height:1}

.ai-image-actions .ai-image-action{width:150px;height:38px;min-height:38px;padding:0 10px;gap:6px;font-size:13px}.ai-image-actions .ai-image-action svg{width:15px;height:15px}@media(max-width:520px){.ai-image-actions .ai-image-action{width:140px;height:36px;min-height:36px;font-size:12px}}

/* Keep image history and its composer inside the AI workspace viewport. */
.ai-shell{height:100dvh;overflow:hidden}.ai-main{height:100%;min-height:0;overflow:hidden}.ai-image-history{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:240px}.ai-image-history::-webkit-scrollbar{display:none}.ai-image-form[hidden]{display:none!important}.ai-image-form{position:absolute!important;z-index:4;left:50%!important;right:auto!important;bottom:20px!important;transform:translateX(-50%)!important;align-self:auto!important;width:min(900px,calc(100% - 40px))!important;max-height:calc(100% - 96px)!important;margin:0!important;padding:16px 18px!important;overflow:visible!important;border:1px solid #dce1e8;border-radius:20px;background:#fff;box-shadow:0 5px 24px #17243b16}.ai-image-form>.reference-preview{display:flex;align-items:flex-start;justify-content:flex-start;gap:8px;margin:0 0 8px;padding:0;border:0;background:transparent}.ai-image-form>.reference-preview[hidden]{display:none!important}.ai-image-form>textarea{display:block;width:100%;height:108px;min-height:84px;max-height:30vh;resize:none;overflow-y:auto;padding:8px 4px;border:0!important;border-radius:0;outline:0;font:inherit}.ai-image-form>.image-form-controls{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:9px;margin:8px 0 0}.image-reference-button{display:inline-flex;flex:none;flex-direction:row;align-items:center;justify-content:center;gap:7px;min-height:40px;margin-right:auto;padding:0 13px;border:1px solid #e1e5eb;border-radius:999px;background:#fff;color:#475467;font-size:14px;font-weight:400;cursor:pointer}.image-reference-button:hover{border-color:#c9d2e0;background:#f8fafc}.image-reference-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.ai-image-form .image-form-controls select{flex:none;min-width:120px;padding:9px 11px;border:1px solid #d9dde3;border-radius:10px;background:#fff}.ai-image-form .image-form-controls button{flex:none;min-height:40px;padding:9px 16px;border-radius:10px;background:#1f2937;color:#fff;font-size:14px}.ai-image-form .image-form-controls button:hover{background:#111827}.ai-image-form>.image-status,.ai-image-form>#imageResults{display:none!important}@media(max-width:700px){.ai-image-form{bottom:12px!important;width:calc(100% - 24px)!important;padding:12px!important;border-radius:16px}.ai-image-form>textarea{height:92px;min-height:76px}.ai-image-form>.image-form-controls{flex-wrap:wrap;gap:7px}.image-reference-button{margin-right:auto}.ai-image-form .image-form-controls select{flex:1;min-width:100px;padding:8px}.ai-image-form .image-form-controls button{flex:none;min-width:110px;padding:8px 12px}.ai-image-history{padding-left:14px;padding-right:14px}}


/* ChatGPT-like message copy and drag-in attachment composer. */
.ai-chat{padding-bottom:220px}.ai-composer{flex-direction:column;align-items:stretch;gap:8px;padding:12px 14px 10px}.ai-composer textarea{display:block;width:100%;flex:none;min-height:62px;max-height:140px;resize:vertical;overflow-y:auto;padding:8px 6px;border:0;outline:0}.chat-composer-actions{display:flex;align-items:center;gap:10px;min-height:40px}.chat-upload-button{display:inline-flex;flex:none;flex-direction:row;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:0 12px;border:1px solid #e1e5eb;border-radius:999px;background:#fff;color:#475467;font-size:13px;font-weight:400;cursor:pointer}.chat-upload-button:hover{border-color:#c9d2e0;background:#f8fafc}.chat-upload-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.ai-composer select{max-width:160px;padding:7px 10px;border-radius:8px}.ai-composer #chatSend{flex:none;width:40px;height:40px;margin-left:auto;border-radius:50%;background:#1f2937;color:#fff;font-size:22px}.ai-composer #chatSend:hover{background:#111827}.chat-attachment-preview{display:flex;align-items:flex-start;flex-wrap:wrap;gap:9px;padding:2px 4px 4px}.chat-attachment-preview[hidden]{display:none!important}.chat-attachment-item{position:relative;flex:none;width:68px;height:68px}.chat-attachment-item>img,.chat-file-tile{display:flex;width:68px;height:68px;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e4e8ee;border-radius:10px;background:#f7f8fa;object-fit:cover}.chat-file-tile{flex-direction:column;gap:4px;padding:5px}.chat-file-tile>span,.ai-file-card>span:first-child{display:grid;place-items:center;width:24px;height:24px;border-radius:6px;background:#e9edff;color:#5268d7;font-size:12px;font-weight:700}.chat-file-tile small{width:100%;overflow:hidden;color:#596273;text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.chat-attachment-remove{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;width:21px;height:21px;padding:0;border:1px solid #fff;border-radius:50%;background:#fff;color:#536174;box-shadow:0 1px 5px #17243b30;font-size:16px;line-height:1;cursor:pointer}.chat-attachment-remove:hover{color:#d14343}.ai-message-text{white-space:normal;overflow-wrap:anywhere}.ai-message-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.ai-message-attachments>img{display:block;width:auto;max-width:min(220px,55vw);height:auto;max-height:220px;object-fit:contain;border:1px solid #e7e9ed;border-radius:10px;cursor:zoom-in}.ai-file-card{display:inline-flex;align-items:center;gap:8px;max-width:260px;padding:7px 10px;border:1px solid #e5e7eb;border-radius:9px;background:#fafafa;color:#596273;font-size:12px}.ai-file-card>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-message-tools{display:flex;justify-content:flex-start;margin-top:6px;opacity:0;transition:opacity .15s}.ai-message:hover .ai-message-tools,.ai-message:focus-within .ai-message-tools{opacity:1}.ai-message-tools button{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:6px;background:transparent;color:#8a9099;font-size:11px;cursor:pointer}.ai-message-tools button:hover,.ai-message-tools button.copied{background:#f1f3f5;color:#4358c8}.ai-message-tools svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.ai-chat.drop-target{outline:2px dashed #5268d7;outline-offset:-8px;background:#f8f9ff}.ai-composer.drop-target{border-color:#5268d7;box-shadow:0 0 0 3px #5268d720,0 3px 16px #17243b10}@media(max-width:700px){.ai-chat{padding-bottom:210px}.ai-composer{bottom:16px;width:calc(100% - 20px);padding:10px}.ai-composer textarea{min-height:56px;max-height:110px}.chat-composer-actions{gap:6px}.chat-upload-button{min-height:36px;padding:0 9px;font-size:12px}.ai-composer select{max-width:128px;padding:6px 7px;font-size:11px}.ai-composer #chatSend{width:36px;height:36px}.chat-attachment-item,.chat-attachment-item>img,.chat-file-tile{width:58px;height:58px}.ai-message-tools{opacity:1}}

.ai-image-form>.reference-preview{position:absolute;left:16px;bottom:calc(100% + 10px);z-index:5;margin:0!important}

.ai-composer .chat-attachment-preview{position:absolute;left:14px;bottom:calc(100% + 10px);z-index:5;display:flex;align-items:flex-start;max-width:calc(100% - 28px);padding:0;background:transparent}
.ai-composer .chat-attachment-preview[hidden]{display:none!important}

.ai-image-history{margin-bottom:300px;padding-bottom:8px!important}@media(max-width:700px){.ai-image-history{margin-bottom:270px;padding-bottom:8px!important}}

.ai-chat{min-height:0;margin-bottom:250px;padding-bottom:8px!important}.ai-composer textarea{resize:none}@media(max-width:700px){.ai-chat{margin-bottom:220px;padding-bottom:8px!important}}

.ai-chat{margin-bottom:176px}#aiChat.has-attachments{margin-bottom:250px}#aiImageHistory{margin-bottom:220px}#aiImageHistory.has-reference{margin-bottom:300px}@media(max-width:700px){.ai-chat{margin-bottom:168px}#aiChat.has-attachments{margin-bottom:220px}#aiImageHistory{margin-bottom:260px}#aiImageHistory.has-reference{margin-bottom:330px}}

.ai-image-form>.reference-preview{flex-wrap:wrap;max-width:calc(100% - 32px)}.ai-image-prompt>div{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px}.ai-image-prompt>div p{flex:0 0 100%;order:2;margin:0}.ai-image-prompt .ai-reference-thumb{margin:0}
.ai-image-copy-prompt{order:3;align-self:flex-end;min-height:28px;padding:4px 10px;border:1px solid #e1e5eb;border-radius:8px;background:#fff;color:#596273;font-size:12px;line-height:1;cursor:pointer}.ai-image-copy-prompt:hover{border-color:#c9d2e0;background:#f8fafc;color:#27364b}
.ai-image-prompt img,.ai-image-output img{cursor:grab}.ai-image-prompt img:active,.ai-image-output img:active{cursor:grabbing}.ai-image-form.drop-target{outline:2px dashed #6478e8;outline-offset:4px}.ai-image-context-menu{position:fixed;z-index:10000;min-width:176px;padding:5px;border:1px solid #e1e5eb;border-radius:12px;background:#fff;box-shadow:0 10px 32px #17243b24}.ai-image-context-menu button{display:block;width:100%;padding:10px 12px;border-radius:8px;background:transparent;color:#344054;text-align:left;font-size:13px;cursor:pointer}.ai-image-context-menu button:hover{background:#f2f4f7;color:#405ed5}
.ai-message-attachments img{cursor:grab}.ai-message-attachments img:active{cursor:grabbing}
