:root {
  color-scheme: dark;
  --canvas: #101214;
  --panel: #1a1d1f;
  --masthead: #141719;
  --ink: #f1f3f3;
  --muted: #b3bbbc;
  --faint: #9aa5a7;
  --border: #33393c;
  --field: #121517;
  --field-line: #687478;
  --control-line: #596367;
  --hover: #272c2e;
  --selected: #33271f;
  --icon-bg: #30241d;
  --icon-line: #61402b;
  --accent-ink: #ff9b69;
  --orange: #ff762e;
  --focus: #ff9d69;
  --disabled-bg: #262b2e;
  --disabled-ink: #a1aaae;
  --new-bg: #4b301f;
  --new-ink: #ffc29d;
  --progress-bg: #233648;
  --progress-ink: #bddbff;
  --done-bg: #23382c;
  --done-ink: #a7e3bc;
  --error: #ffa59d;
  --track: #6b777b;
  --shadow: 0 14px 36px -24px #000b;
  font-family: Manrope, Inter, Arial, sans-serif;
  font-size: 100%;
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f4f5f3;
  --panel: #ffffff;
  --masthead: #fbfcfa;
  --ink: #151a1d;
  --muted: #525e61;
  --faint: #59676b;
  --border: #d2d8d6;
  --field: #fff;
  --field-line: #899598;
  --control-line: #899598;
  --hover: #ebefee;
  --selected: #fff0e6;
  --icon-bg: #fff1e5;
  --icon-line: #e6bfa5;
  --accent-ink: #943e0d;
  --focus: #a34816;
  --disabled-bg: #e6e9e8;
  --disabled-ink: #5f6b70;
  --new-bg: #ffebd8;
  --new-ink: #874100;
  --progress-bg: #e3edf9;
  --progress-ink: #224d80;
  --done-bg: #e4efe9;
  --done-ink: #245940;
  --error: #a12c20;
  --track: #6c777d;
  --shadow: 0 10px 34px -28px #22332977;
}
*{box-sizing:border-box}
body{margin:0;min-width:280px}
button,input,textarea,select{font:inherit}
a{color:inherit}
button,select{cursor:pointer}
button:disabled{cursor:default}
[hidden]{display:none!important}
.skip,.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{clip-path:none;width:auto;height:auto;z-index:10;background:var(--panel);color:var(--ink);padding:.8rem}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
svg{width:1.25rem;height:1.25rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.masthead{background:var(--masthead);color:var(--ink);border-bottom:1px solid var(--border)}
.masthead-inner{max-width:1550px;min-height:74px;display:flex;align-items:center;gap:1.65rem;margin:auto;padding:0 clamp(1rem,3vw,3.25rem)}
.brand{display:inline-flex;align-items:center;gap:.65rem;font-size:1.5rem;font-weight:760;letter-spacing:-.045em;text-decoration:none}
.brand svg{width:2.1rem;height:2.1rem;stroke:none}
.header-name{border-left:1px solid var(--border);padding-left:1.65rem;color:var(--muted);font-size:.9rem}
.back{display:inline-flex;align-items:center;gap:.55rem;font-size:.9rem;text-decoration:none}
.back:hover{text-decoration:underline}
.back svg{width:1rem;height:1rem}
.shell{max-width:1550px;min-height:calc(100vh - 74px);display:grid;grid-template-columns:minmax(150px,185px) minmax(0,1fr);margin:auto;padding:0 clamp(1rem,3vw,3.25rem)}
.sidebar{padding:2.55rem 1.1rem 1.5rem 0;border-right:1px solid var(--border);display:flex;flex-direction:column;gap:.35rem}
.nav-link{display:flex;gap:.65rem;align-items:center;color:var(--muted);padding:.78rem .8rem;font-weight:600;border-radius:6px;font-size:.95rem;text-decoration:none}
.nav-link[aria-current="page"]{background:var(--selected);color:var(--ink);box-shadow:inset 2px 0 var(--orange)}
.nav-link[aria-current="page"] svg{color:var(--accent-ink)}
.nav-link:hover{background:var(--hover)}
main{min-width:0;padding:2.35rem 0 4rem clamp(1.4rem,3vw,3.5rem)}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(2.35rem,4vw,3.45rem);letter-spacing:-.065em;line-height:1.05}
h2{font-size:1.35rem;letter-spacing:-.035em;line-height:1.25}
h3,.field label,.editor label,.toggle{font-size:.925rem;font-weight:650;line-height:1.4}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.8rem}
.btn,.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:42px;background:var(--panel);border:1px solid var(--control-line);border-radius:5px;color:var(--ink);padding:.56rem .88rem;text-decoration:none;font-size:.9rem;font-weight:600;line-height:1.25}
.btn:hover:enabled,.icon-btn:hover:enabled{background:var(--hover)}
.btn.primary{background:var(--orange);border-color:var(--orange);color:#13171a}
.btn.primary:hover:enabled{background:#ff9156;border-color:#ff9156}
.btn:disabled{color:var(--disabled-ink);background:var(--disabled-bg);border-color:var(--border)}
.btn.subtle{background:transparent}
.btn svg{width:1rem;height:1rem}
.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin-bottom:.9rem}
input:not([type=checkbox]),select,textarea{border:1px solid var(--field-line);border-radius:5px;color:var(--ink);background:var(--field);min-height:44px;padding:.65rem .8rem;font-size:1rem;max-width:100%}
input::placeholder,textarea::placeholder{color:var(--faint)}
.search{position:relative;flex:0 1 320px}
.search svg{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:var(--muted);width:1.05rem}
.search input{width:100%;padding-left:2.3rem}
.select-wrap{position:relative;display:inline-block}
.select-wrap::after{content:'';position:absolute;top:calc(50% - .28rem);right:.95rem;width:.45rem;height:.45rem;border:solid var(--muted);border-width:0 1.7px 1.7px 0;transform:rotate(45deg);pointer-events:none}
select{appearance:none;width:100%;padding-right:2.35rem}
.toolbar select{min-width:9.7rem}
.panel{background:var(--panel);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow)}
.workarea{display:grid;gap:1rem;align-items:start}
.workarea.selected{grid-template-columns:minmax(220px,.85fr) minmax(285px,1.15fr)}
.request-list{overflow:hidden}
.empty{padding:clamp(2.8rem,6.5vw,5.2rem) 1.1rem;text-align:center}
.empty-icon{display:grid;place-items:center;margin:0 auto 1rem;border:1px solid var(--icon-line);border-radius:10px;color:var(--accent-ink);background:var(--icon-bg);width:53px;height:53px}
.empty-icon svg{width:24px;height:24px}
.empty strong{font-size:1.12rem;display:block;margin-bottom:.35rem}
.empty p,.inline-state,.access p,.card-heading p,.connection p{color:var(--muted);line-height:1.5}
ul{margin:0;padding:0;list-style:none}
.request-list li+li{border-top:1px solid var(--border)}
.request-row{display:block;width:100%;padding:1rem 1.15rem;text-align:left;background:var(--panel);border:0;color:var(--ink);border-left:3px solid transparent}
.request-row:hover{background:var(--hover)}
.request-row[aria-pressed=true]{border-left-color:var(--orange);background:var(--selected)}
.row-top,.row-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.65rem}
.row-top strong{line-height:1.4;font-size:1rem;overflow-wrap:anywhere}
.row-meta{align-items:center;color:var(--muted);line-height:1.45;font-size:.875rem;margin-top:.35rem;flex-wrap:wrap}
.row-meta span:first-child{overflow-wrap:anywhere}
.row-top time{font-size:.78rem;color:var(--muted);white-space:nowrap}
.pill{display:inline-block;padding:.15rem .5rem;border-radius:20px;font-size:.75rem;line-height:1.45;font-weight:600;white-space:nowrap}
.new{background:var(--new-bg);color:var(--new-ink)}
.in_progress{background:var(--progress-bg);color:var(--progress-ink)}
.done{background:var(--done-bg);color:var(--done-ink)}
.more{display:flex;margin:.75rem auto}
.detail,.mail-panel,.connection,.access{padding:clamp(1.15rem,2.25vw,2rem)}
.detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.8rem}
.detail h2{overflow-wrap:anywhere}
.icon-btn{padding:0;min-height:32px;min-width:32px;background:transparent;border-color:transparent}
.facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.55rem 1rem;font-size:.92rem;line-height:1.45;margin:1.1rem 0}
.facts dt{color:var(--muted)}
.facts dd{margin:0;overflow-wrap:anywhere}
.facts a{text-underline-offset:3px}
.msg-wrap{margin:1.15rem 0}
.msg-wrap p{margin:.45rem 0 0;font-size:1rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.editor{display:grid;gap:.5rem;border-top:1px solid var(--border);padding-top:1.15rem}
.editor label:not(:first-child){margin-top:.5rem}
textarea{width:100%;resize:vertical;min-height:80px;line-height:1.45}
.save-row{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;margin-top:.6rem}
.result{font-size:.9rem;line-height:1.4;color:var(--done-ink)}
.result.error{color:var(--error)}
#list-result:not(:empty){margin-top:.7rem}
.mail-panel,.connection,.inline-state,.access{max-width:760px}
.inline-state{padding:2rem}
.card-heading p,.connection p,.access p{margin-top:.55rem}
.mail-fields{display:grid;gap:1.2rem;margin-top:1.5rem}
.field{display:grid;gap:.45rem}
.field small{color:var(--muted);font-size:.83rem;line-height:1.4}
.toggle{position:relative;display:flex;align-items:center;justify-content:space-between;gap:1rem;border-top:1px solid var(--border);padding-top:1.25rem;cursor:pointer}
.toggle input{position:absolute;bottom:.3rem;right:1rem;opacity:0;width:1px;height:1px}
.switch{width:42px;height:25px;border-radius:16px;background:var(--track);padding:3px;flex:none;display:flex;align-items:center}
.switch::before{content:'';height:19px;width:19px;border-radius:50%;background:white}
.toggle input:checked+.switch{background:var(--orange)}
.toggle input:checked+.switch::before{transform:translateX(17px);background:#141b20}
.toggle input:focus-visible+.switch{outline:3px solid var(--focus);outline-offset:3px}
.connection{margin-top:1rem}
.connection button,.access :is(button,a){margin-top:1rem}
.connection code{font-size:.9em;display:inline-block;color:var(--ink);background:var(--hover);border:1px solid var(--border);border-radius:4px;padding:0 .35em;word-break:break-word}
.connection .result:not(:empty){margin-top:.7rem}
@media(max-width:980px){.shell{grid-template-columns:145px minmax(0,1fr)}.workarea.selected{grid-template-columns:1fr}.sidebar{padding-right:.75rem}.request-list:has(+.detail:not([hidden])) ul{max-height:420px;overflow:auto}}
@media(max-width:680px){.masthead-inner{min-height:60px;gap:.75rem}.brand{font-size:1.25rem}.brand svg{width:1.8rem;height:1.8rem}.header-name{display:none}.shell{display:block;min-height:calc(100vh - 60px)}.sidebar{flex-direction:row;padding:1rem 0 .8rem;border-right:0;border-bottom:1px solid var(--border);gap:.5rem}.nav-link{padding:.6rem .9rem}.nav-link svg{width:1.05rem;height:1.05rem}main{padding:1.55rem 0 2.5rem}.page-heading{margin-bottom:1.15rem}.toolbar .search{flex:1 1 100%}.toolbar select{width:100%}.detail,.request-list{scroll-margin-top:.8rem}}

.scope-hint{color:var(--muted);font-size:.875rem;margin:0 0 .8rem;line-height:1.45}

.header-actions{display:flex;align-items:center;gap:1rem;margin-left:auto}
.theme-switch{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--control-line);border-radius:7px;color:var(--ink);background:transparent}
.theme-switch svg{width:19px;height:19px}
.theme-switch:hover{color:var(--accent-ink);border-color:var(--accent-ink);background:var(--hover)}
[data-dark-icon],:root[data-theme="light"] [data-light-icon]{display:none}
:root[data-theme="light"] [data-dark-icon]{display:inline}
.request-row:focus-visible{outline-offset:-4px}
.nav-link:not([aria-current="page"]):hover{color:var(--ink)}
.facts a,.back:hover{color:var(--accent-ink)}
.connection .result{color:var(--done-ink)}
.connection .result.error{color:var(--error)}
.toggle:has(input:disabled){cursor:default;color:var(--muted)}
.toggle input:disabled+.switch{opacity:.65}
@media(prefers-reduced-motion:no-preference){
  .btn,.icon-btn,.theme-switch,.nav-link,.request-row,input,textarea,select{transition:background-color 160ms ease,color 160ms ease,border-color 160ms ease}
  .btn.primary:active:enabled,.theme-switch:active{transform:translateY(1px)}
  .switch::before{transition:transform 150ms ease}
  .detail:not([hidden]),#mail-form:not([hidden]){animation:panel-enter 180ms ease-out}
  @keyframes panel-enter{from{opacity:.55;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
}
@media(max-width:420px){.header-actions{gap:.65rem}.theme-switch{width:36px;height:36px}}
.texts-editor{max-width:880px}
.texts-tools{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(220px,1.2fr);gap:1rem;margin-bottom:1rem}
.texts-tools label,.text-row>label{font-size:.94rem;font-weight:680}
.text-group{padding:clamp(1rem,2.3vw,1.8rem);margin-bottom:1rem}
.text-group h2{margin-bottom:.35rem}
.text-row{padding:1.1rem 0;border-top:1px solid var(--border)}
.text-row:first-of-type{border-top:0}
.text-row:last-child{padding-bottom:0}
.text-row>label{display:block;margin-bottom:.45rem}
.text-row.is-edited textarea{border-left:3px solid var(--orange)}
.text-default{margin-top:.4rem;color:var(--muted);font-size:.875rem}
.text-default summary{width:max-content;max-width:100%;cursor:pointer;padding:.2rem 0}
.text-default p,.text-conflict p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;margin:.5rem 0}
.text-default .btn,.text-conflict .btn{min-height:36px;font-size:.84rem}
.text-conflict{background:var(--selected);border:1px solid var(--icon-line);border-radius:6px;padding:.75rem 1rem;margin-top:.8rem}
.text-conflict .btn{margin:.3rem .4rem 0 0}
.texts-actions{position:sticky;bottom:.6rem;z-index:1;margin-top:.8rem;padding:.8rem 1rem}
.texts-action-buttons{display:flex;gap:.6rem;flex-wrap:wrap}
.texts-actions .result:not(:empty){margin-top:.6rem}
@media(max-width:680px){.texts-tools{grid-template-columns:minmax(0,1fr);gap:.7rem}.texts-actions{bottom:0}.texts-action-buttons .btn{flex:1 1 auto}}
.shell:has(#admin-navigation[hidden]){display:block}
.shell:has(#admin-navigation[hidden]) main{max-width:520px;padding:clamp(2rem,7vw,6rem) 0;margin:auto}
.access h1{font-size:clamp(1.85rem,4vw,2.75rem)}
.login-fields,.provider-fields{display:grid;gap:1rem}
.login-fields{margin-top:1.35rem}
.login-fields .save-row,.login-fields .save-row button{margin-top:0}
.header-actions .logout{min-height:36px}
fieldset.mail-fields,fieldset.provider-fields{min-width:0;margin-inline:0;padding:0;border:0}
fieldset.provider-fields{padding:1rem;border:1px solid var(--border);border-radius:6px}
.provider-fields legend{padding:0 .4rem;font-size:.92rem;font-weight:700}
.field-pair{display:grid;grid-template-columns:minmax(0,2fr) minmax(6rem,1fr);gap:1rem}
.field input,.field select{min-width:0;width:100%}
.setup-help{border-block:1px solid var(--border);padding-block:.9rem;font-size:.94rem}
.setup-help summary{cursor:pointer;color:var(--accent-ink);font-weight:650;line-height:1.4}
.setup-help ol{margin:.75rem 0 0;padding-left:1.25rem;color:var(--muted);line-height:1.6}
.setup-help li+li{margin-top:.45rem}
.setup-help code{color:var(--ink);overflow-wrap:anywhere}
.setup-help a{text-underline-offset:3px}
#logout-result:not(:empty){margin-bottom:.8rem}
@media(max-width:680px){.sidebar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.3rem}.nav-link{justify-content:center;padding:.65rem .15rem;font-size:.835rem;gap:.28rem}}
@media(max-width:420px){.nav-link{flex-direction:column;font-size:.8rem;gap:.25rem}.header-actions .logout{font-size:.8rem;padding:.35rem .5rem}.field-pair{gap:.6rem}}
