@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}
