:root{--canvas:#f5f5f1;--paper:#fff;--sidebar:#eeefea;--ink:#202924;--muted:#626d65;--line:#dee3db;--green:#285841;--green-hover:#1c4330;--green-pale:#e6eee6;--amber:#755006;--amber-pale:#fff2d2;--red:#a33432;--red-pale:#fff0ed;--focus:#4b765c;--radius:5px;--shadow:0 12px 36px rgba(30,43,31,.17);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;font-size:13px;color:var(--ink);background:var(--canvas);font-synthesis:none}
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#b7c3b5 transparent}
body{margin:0}button,input,textarea,select{font:inherit;caret-color:var(--green)}
button,a,input,textarea,select{outline-offset:2px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--focus)}
button{cursor:pointer}button:disabled{cursor:default;opacity:.5}
a{color:var(--green);text-underline-offset:3px}a:hover{color:var(--green-hover)}
::selection{background:#cddfcf;color:#152c1d}[hidden]{display:none!important}
h1,h2,h3,p{margin:0}h1{font-size:20px;font-weight:650;letter-spacing:-.02em;line-height:1.4}h2{font-size:17px;line-height:1.4;font-weight:650}h3{font-size:14px;font-weight:650}p{line-height:1.6}
.muted,.hint{color:var(--muted)}.small{font-size:12px}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.skip-link{position:fixed;z-index:20;top:6px;left:6px;background:var(--paper);padding:8px;transform:translateY(-160%)}.skip-link:focus{transform:none}
input:not([type=checkbox]),textarea,select{border:1px solid #cdd6c9;border-radius:4px;background:#fff;color:var(--ink);padding:4px 8px;min-height:30px;max-width:100%}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
input:hover,textarea:hover,select:hover{border-color:#aebda9}textarea{resize:vertical;line-height:1.5;min-height:64px}
input:disabled,select:disabled,textarea:disabled{background:#f0f2ed;color:var(--muted)}
input[type=checkbox]{width:15px;height:15px;margin:0;vertical-align:middle;accent-color:var(--green);cursor:pointer}
label,.field-label{display:block;font-size:12px;font-weight:550;margin-bottom:4px}
.button{display:inline-flex;justify-content:center;align-items:center;gap:5px;min-height:30px;padding:4px 9px;border:1px solid #ccd5c9;border-radius:4px;background:var(--paper);color:var(--ink);text-decoration:none;white-space:nowrap;font-weight:500;transition:background-color 150ms,border-color 150ms}
.button:hover{background:#f0f3ed;border-color:#aebcaa}.button.primary{color:#fff;background:var(--green);border-color:var(--green)}.button.primary:hover{background:var(--green-hover);border-color:var(--green-hover)}
.button.danger{color:var(--red);border-color:#e6c3be;background:var(--paper)}.button.danger:hover{background:var(--red-pale)}
.button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.button.small{min-height:28px;padding:3px 8px;font-size:12px}
.text-button{border:0;background:none;color:var(--green);padding:3px 5px;border-radius:3px;min-height:26px;text-decoration:none;font-size:12px;white-space:nowrap}
.text-button:hover{background:var(--green-pale)}.text-button.danger{color:var(--red)}.text-button.danger:hover{background:var(--red-pale)}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:172px;flex-shrink:0;background:var(--sidebar);position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:16px 10px 12px;border-right:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:8px;font-size:17px;letter-spacing:-.02em;font-weight:700;color:var(--ink);text-decoration:none}
.brand-mark{width:26px;height:26px;display:grid;place-items:center;border-radius:5px;background:var(--green);color:#fff}.brand-mark svg{width:19px;stroke:currentColor;stroke-width:1.6}
.brand-caption{font-size:11px;color:var(--muted);margin:5px 0 12px 34px}
.sidebar nav{display:flex;flex-direction:column;gap:2px}.sidebar nav a{display:flex;align-items:center;gap:8px;color:var(--muted);text-decoration:none;padding:6px 8px;min-height:32px;border-radius:4px;white-space:nowrap;font-size:13px;line-height:20px}
.sidebar nav a:hover{background:#e1e7de;color:var(--ink)}.sidebar nav a[aria-current="page"]{background:var(--green-pale);color:var(--green);font-weight:650}
.sidebar nav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.nav-count{margin-left:auto;font-size:11px;font-variant-numeric:tabular-nums;color:inherit}
.sidebar-bottom{display:flex;align-items:center;gap:6px;border-top:1px solid var(--line);padding-top:8px;margin-top:auto;color:var(--muted);font-size:12px}.account-dot{width:6px;height:6px;border-radius:50%;background:var(--green)}.sidebar-bottom button{margin-left:auto}
main{margin-left:172px;width:calc(100% - 172px);padding:12px 16px 0;min-width:0}
.service-status{display:flex;flex-wrap:wrap;align-items:center;gap:7px;font-size:11px;margin:0 0 12px;min-height:22px;color:var(--muted)}
.status-label{display:inline-flex;gap:5px;align-items:center;font-size:11px;font-weight:500;padding:2px 6px;border-radius:3px;white-space:nowrap;background:#ecefeb;color:#536052}
.status-label.good{background:var(--green-pale);color:var(--green)}.status-label.warn{background:var(--amber-pale);color:var(--amber)}.status-label.bad{background:var(--red-pale);color:var(--red)}.status-label.dot::before{content:"";width:4px;height:4px;border-radius:50%;background:currentColor}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.page-head p{margin-top:3px;color:var(--muted);font-size:12px}.page-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
.table-shell{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.table-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid var(--line)}.table-toolbar form{display:flex;flex:1;gap:6px;flex-wrap:wrap;align-items:center}
.search-field{position:relative;flex:1;min-width:160px;max-width:280px}.search-field svg{position:absolute;left:9px;top:50%;transform:translateY(-50%);width:14px;height:14px;fill:none;stroke:var(--muted);stroke-width:1.6;pointer-events:none}
.search-field input[type=search]{padding-left:30px;width:100%}
.table-count{margin-left:auto;white-space:nowrap;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;text-align:left}
th{font-size:12px;font-weight:500;color:var(--muted);background:#f8f9f6;white-space:nowrap;padding:7px 10px;border-bottom:1px solid var(--line)}
td{padding:7px 10px;border-bottom:1px solid #e9ece6;vertical-align:middle;line-height:1.5}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafbf8}tbody tr.selected{background:#f0f5ee}
th.check,td.check{padding-left:10px;padding-right:4px;width:29px}th.sequence,td.sequence{width:36px;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.route-source{font-weight:550;white-space:nowrap}.route-target{color:#465548;white-space:nowrap}.arrow-cell{color:#7b8976;padding-left:2px;padding-right:2px;width:20px}.arrow-cell svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6}
.row-actions{display:flex;align-items:center;gap:3px;white-space:nowrap}.row-note{max-width:160px;word-break:break-word;color:var(--muted)}
.routes-table{min-width:890px}.route-input-row td{padding-top:5px;padding-bottom:5px}.route-address-input{display:flex;align-items:center;gap:4px;min-width:264px;max-width:320px}
.route-address-input input{width:140px;min-width:100px;flex:1}.route-address-input select{width:115px;flex-shrink:0}.route-address-input>span{color:var(--muted)}
.route-target-input{min-width:190px}.route-target-input input{width:100%;max-width:340px}.route-label-input{width:135px}.route-label-input input{width:125px}
.route-enabled{display:flex;align-items:center;gap:4px;white-space:nowrap;margin:0;font-weight:400;font-size:12px}.route-inline-form{display:flex;align-items:center;gap:4px;white-space:nowrap}
.route-error-row td{padding:0 10px 6px}.route-error-row .form-error{margin:0;padding:5px 8px}
.route-add-line{display:flex;gap:8px;align-items:center;padding:6px 10px;border-top:1px solid var(--line)}
.table-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 10px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.page-note{margin-top:8px;font-size:11px;color:var(--muted)}
.empty-state{text-align:center;padding:20px 14px}.empty-state svg{width:28px;height:28px;stroke:#6a7e69;fill:none;stroke-width:1.2;margin-bottom:6px}.empty-state h2{font-size:14px;margin-bottom:4px}.empty-state p{font-size:12px;color:var(--muted);max-width:440px;margin:auto}.empty-state .button{margin-top:10px}
.loading-state{padding:18px 14px;display:grid;gap:10px}.skeleton{height:13px;background:#edf0e9;border-radius:3px;animation:loading 1.1s ease-in-out infinite alternate}.skeleton:nth-child(2){width:87%}.skeleton:nth-child(3){width:67%}@keyframes loading{to{background:#e2e8de}}
.error-state{padding:18px;text-align:center}.error-state p{color:var(--red);margin-bottom:8px}
.site-footer{margin-top:14px;padding:8px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted)}
.field{margin-bottom:12px}.field input:not([type=checkbox]),.field textarea,.field select{width:100%}.field .hint{font-size:11px;margin-top:4px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field-row .field{min-width:0}
.checkbox-label{display:flex;gap:6px;align-items:center;font-weight:400;line-height:1.5}
.form-error{color:var(--red);background:var(--red-pale);padding:6px 9px;border-radius:4px;font-size:12px;line-height:1.5;margin:8px 0}
.notice{font-size:12px;line-height:1.5;color:var(--muted);padding:8px 10px;background:#f3f5ef;border-radius:4px;margin:10px 0}.notice.warning{background:var(--amber-pale);color:var(--amber)}
dialog{border:0;box-shadow:var(--shadow);border-radius:6px;padding:0;width:min(560px,calc(100% - 24px));max-height:calc(100% - 24px);color:var(--ink);background:var(--paper)}dialog::backdrop{background:rgba(26,36,26,.32)}
.dialog-inner{padding:16px}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);margin-bottom:12px}.dialog-header p{font-size:12px;color:var(--muted);margin-top:3px}.dialog-header h2{font-size:17px}
.close-button{display:grid;place-items:center;border:0;background:transparent;border-radius:4px;width:28px;height:28px;flex-shrink:0;color:var(--muted)}.close-button:hover{background:#edf1e9;color:var(--ink)}.close-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
.editor-form{padding:0 16px 14px}.dialog-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.confirm-dialog{width:min(400px,calc(100% - 24px))}.confirm-dialog h2{font-size:17px;margin-bottom:8px}.confirm-dialog p{color:var(--muted);font-size:12px;white-space:pre-line}
.notifications{position:fixed;right:14px;bottom:14px;z-index:50;display:grid;gap:6px;max-width:min(360px,calc(100% - 24px))}.toast{background:var(--ink);color:#fff;padding:7px 11px;border-radius:4px;box-shadow:0 4px 14px #20292426;font-size:12px;line-height:1.5}.toast.error{background:#833532}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:16px}.login-panel{width:340px;max-width:100%}.login-panel .brand{margin-bottom:24px}.login-panel h1{font-size:22px;margin-bottom:5px}.login-panel form{margin-top:20px}.login-panel input{width:100%;margin-bottom:10px}.login-panel button{width:100%}.login-footnote{font-size:12px;color:var(--muted);margin-top:12px}
.read-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:6px}.message-time{white-space:nowrap;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.mailbox-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line)}
.mailbox-controls select[name=domain]{width:130px}.mailbox-controls select[name=recipient]{width:320px;min-width:180px;max-width:100%;flex:0 1 320px}
.mailbox-finder{display:flex;align-items:center;gap:4px}.mailbox-finder input{width:160px}
.mailbox-group+.mailbox-group{border-top:1px solid var(--line)}
.mailbox-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;background:#f3f5ef;border-bottom:1px solid var(--line)}.mailbox-heading h2{font-size:13px;overflow-wrap:anywhere}.mailbox-heading>span{white-space:nowrap}
.mail-summary-table{table-layout:auto}.summary-sender{width:220px;min-width:220px;max-width:260px;overflow-wrap:anywhere}.sender-name{font-weight:500}.message-unread .sender-name{font-weight:650}
.summary-cell{min-width:220px;width:100%}.summary-output{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.summary-copy,.summary-details{white-space:nowrap}.api-debug-panel{padding:10px;border-bottom:1px solid var(--line)}.api-section>.api-debug-panel{padding:0;border:0}
.api-debug-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:6px;font-size:12px}.api-debug-controls select{max-width:180px}.api-debug-controls a{margin-left:auto}
.api-debug-path{display:block;font-size:12px;line-height:1.5;margin-bottom:6px}.api-debug-result{max-height:280px;overflow:auto}
.drawer{position:fixed;inset:0 0 0 auto;margin:0;border-radius:0;width:min(720px,100%);height:100%;max-height:100%;overflow:auto}.drawer .dialog-header{position:sticky;top:0;background:#fff;z-index:1;margin-bottom:0}
.mail-detail{padding:14px 16px}.mail-subject{font-size:20px;line-height:1.4;word-break:break-word;margin-bottom:12px}.mail-meta{display:grid;grid-template-columns:58px 1fr;gap:5px 10px;font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 12px}.mail-meta dt{font-weight:500}.mail-meta dd{margin:0;color:var(--ink);word-break:break-word}
.detail-section{padding-top:12px;margin-top:12px;border-top:1px solid var(--line)}.detail-section h3{margin-bottom:8px}.detail-section textarea{width:100%;min-height:60px}
.mail-body{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:13px;line-height:1.65;margin:0;max-width:75ch;color:#303c31}
.extracted-item{display:grid;grid-template-columns:64px 1fr auto;gap:8px;align-items:start;padding:8px 0;border-bottom:1px solid #e9ece6}.extracted-item:last-child{border-bottom:0}.extracted-kind{color:var(--muted);font-size:12px;padding-top:3px}
.extracted-value{font-family:ui-monospace,Consolas,monospace;font-size:15px;color:var(--green);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.extracted-value.summary{font-family:inherit;font-size:13px;color:var(--ink)}.extracted-description{font-size:12px;color:var(--muted);line-height:1.5;margin-top:3px}
.attachment-list{list-style:none;margin:0;padding:0}.attachment-list li{display:flex;justify-content:space-between;gap:10px;padding:7px 0;align-items:center;border-bottom:1px solid #e9ece6;font-size:12px}.attachment-list a{overflow-wrap:anywhere}
.mail-controls{display:flex;gap:5px;flex-wrap:wrap}.delivery-item{font-size:12px;display:flex;gap:7px;align-items:center;flex-wrap:wrap;line-height:1.5;margin:5px 0}
.inline-panel{background:#f7f9f4;padding:10px;border-radius:4px;margin:10px 0}.inline-panel h3{margin-bottom:8px}.result-box{background:#fff;border:1px solid var(--line);padding:8px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;font-size:12px;margin-top:8px}
.rule-condition{font-size:12px;color:var(--muted);max-width:250px;overflow-wrap:anywhere}.template-cell{white-space:pre-wrap;font-size:12px;font-family:ui-monospace,Consolas,monospace;color:var(--muted);max-width:240px;overflow-wrap:anywhere}
.api-section{margin-bottom:18px}.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}.section-head h2{font-size:16px}.section-head p{color:var(--muted);font-size:12px;margin-top:3px}
.connection-info{display:grid;grid-template-columns:100px 1fr;gap:8px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:5px;align-items:center;font-size:12px}.connection-info .value-row{display:flex;align-items:center;gap:8px;min-width:0}.connection-info .mono{flex:1}
.code-block{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:0;background:#f0f3ec;padding:10px 12px;border-radius:4px;font-size:12px;font-family:ui-monospace,Consolas,monospace}
.api-info{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-top:8px}.api-info p{font-size:12px;color:var(--muted);max-width:68ch}
.key-token{display:block;width:100%;font-family:ui-monospace,Consolas,monospace;font-size:12px;overflow-wrap:anywhere;line-height:1.6;user-select:all;background:#eff4eb;padding:10px;margin-top:8px;border-radius:4px}.audit-resource{font-size:12px;max-width:260px;overflow-wrap:anywhere}.control-end{display:flex;justify-content:flex-end;gap:6px;margin-top:8px}
.link-action{margin-top:4px}
@media(max-width:760px){
 .app-shell{display:block}.sidebar{position:static;width:100%;padding:10px 10px 0;border-right:0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto}.brand{font-size:16px}.brand-caption{display:none}
 .sidebar nav{grid-column:1/-1;flex-direction:row;overflow:auto;gap:2px;margin-top:8px;padding-bottom:6px}.sidebar nav a{padding:5px 7px;font-size:12px;min-height:30px}.sidebar nav svg{width:15px}.nav-count{display:none}
 .sidebar-bottom{grid-column:2;grid-row:1;margin:0;padding:0;border:0;gap:4px;justify-content:end}.sidebar-bottom .account-dot{display:none}.sidebar-bottom button{margin-left:3px}
 main{margin:0;width:100%;padding:10px 10px 0}.service-status{margin-bottom:10px;gap:5px;line-height:1.5}.service-status .service-detail{flex-basis:100%}
 h1{font-size:19px}.page-head{margin-bottom:10px;gap:8px}.page-head p{font-size:12px;max-width:30ch}.page-actions{flex-wrap:wrap;justify-content:flex-end;gap:4px;max-width:120px}
 .table-toolbar{padding:7px 8px}.table-toolbar form{gap:5px}.search-field{max-width:none;flex-basis:100%}.table-footer{padding:6px 8px}.table-footer>span{max-width:190px;line-height:1.5}
 .site-footer{font-size:10px;gap:6px}.connection-info{grid-template-columns:1fr;padding:10px;gap:5px}.connection-info>.muted:not(:first-child){margin-top:5px}.connection-info .value-row{gap:5px}
 .api-info{flex-direction:column;gap:6px}.section-head{gap:8px}.field-row{grid-template-columns:1fr;gap:0}.mail-detail{padding:12px}.mail-subject{font-size:19px}
 .extracted-item{grid-template-columns:60px 1fr;gap:6px}.extracted-item .copy-action{grid-column:2;justify-self:start}.notifications{right:10px;bottom:10px}.row-note{max-width:130px}.mail-meta{grid-template-columns:52px 1fr;gap:5px}
 .mailbox-controls{padding:7px 8px}.mailbox-controls select[name=recipient]{flex:1 1 100%;width:100%}.mailbox-finder{flex:1}.mailbox-finder input{flex:1;min-width:0;width:150px}
 .mail-summary-table thead{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
 .mail-summary-table,.mail-summary-table tbody{display:block;width:100%}.mail-summary-table tr{display:grid;grid-template-columns:1fr auto;padding:6px 8px;border-bottom:1px solid var(--line)}
 .mail-summary-table td{display:block;padding:3px 0;border:0;min-width:0;max-width:none}.mail-summary-table .message-time,.mail-summary-table .summary-sender,.mail-summary-table .summary-cell{grid-column:1/-1}
 .mail-summary-table .summary-copy{grid-column:1}.mail-summary-table .summary-details{grid-column:2}.mail-summary-table .summary-output{-webkit-line-clamp:4}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
