/* iOS-inspired material layer and complete light/dark theme. */
:root{--ios-bg:#0b0b0d;--ios-surface:#171719;--ios-raised:#202023;--ios-text:#f5f5f7;--ios-secondary:#929299;--ios-line:#ffffff14;--ios-blue:#0a84ff;--ios-cyan:#32ade6;--ios-green:#30d158;--ios-purple:#bf5af2;color-scheme:dark}
html[data-theme="light"]{--ios-bg:#f2f2f7;--ios-surface:#ffffff;--ios-raised:#f7f7fa;--ios-text:#1c1c1e;--ios-secondary:#6e6e73;--ios-line:#3c3c431f;--ios-blue:#007aff;--ios-cyan:#0071e3;--ios-green:#28a745;--ios-purple:#af52de;color-scheme:light}
html,body,.app{background:var(--ios-bg)!important;color:var(--ios-text)}body{transition:background .22s,color .22s}.app{background:var(--ios-bg)!important}.pagehead h1,.result h1,.locked h1,.sectiontitle h2,.steptitle h2,.surface h2{color:var(--ios-text)}.pagehead p,.pagehead em,.muted,.steptitle p,.empty p,.docrow small,.companybar small{color:var(--ios-secondary)!important}
header{color:var(--ios-text);background:color-mix(in srgb,var(--ios-surface) 92%,transparent);border-color:var(--ios-line)}.brand{color:var(--ios-text)}.notice{color:var(--ios-blue);background:#0a84ff18;border:1px solid #0a84ff24}
.dashboard-top-single{max-width:380px}.dashboard-top .setup-progress{min-height:64px;padding:8px 13px;background:var(--ios-surface);border:1px solid var(--ios-line);box-shadow:0 8px 30px #00000014}.dashboard-top .setup-progress>i:after{background:var(--ios-surface)}.dashboard-top .setup-progress strong{color:var(--ios-text)}.dashboard-top .setup-progress small{color:var(--ios-secondary)}
.home-search{margin-top:8px}
.setup-guide{margin:4px 0 24px;padding:20px;background:linear-gradient(145deg,color-mix(in srgb,var(--ios-surface) 96%,var(--ios-blue) 4%),var(--ios-surface));border:1px solid var(--ios-line);border-radius:26px;box-shadow:0 14px 42px #00000018}.setup-guide-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.setup-guide-head span{color:var(--ios-cyan);font-size:11px;line-height:1;font-weight:720;letter-spacing:.16em}.setup-guide-head strong{min-width:43px;padding:6px 9px;color:var(--ios-blue);background:#0a84ff18;border-radius:999px;font-size:12px;line-height:1;text-align:center}.setup-guide h2{margin:0;color:var(--ios-text);font-size:22px;line-height:1.18;letter-spacing:-.025em}.setup-guide>p{margin:8px 0 18px;color:var(--ios-secondary);font-size:13px;line-height:1.45}.setup-guide-list{display:grid;gap:10px}.setup-guide-step{width:100%;min-height:76px;padding:12px;display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;color:var(--ios-text);background:var(--ios-raised);border:1px solid var(--ios-line);border-radius:19px;box-shadow:none}.setup-guide-step.current{border-color:color-mix(in srgb,var(--ios-blue) 58%,transparent);background:color-mix(in srgb,var(--ios-raised) 90%,var(--ios-blue) 10%)}.setup-guide-step.pending{opacity:.72}.setup-guide-step>i{width:46px;height:46px;display:grid;place-items:center;color:white;background:linear-gradient(145deg,var(--ios-cyan),var(--ios-blue));border-radius:15px;font-style:normal}.setup-guide-step.done>i{background:linear-gradient(145deg,#37d39a,#20a974)}.setup-guide-step>i svg{width:23px;height:23px}.setup-guide-step>span{min-width:0;display:grid;gap:5px}.setup-guide-step b{font-size:15px;line-height:1.2;letter-spacing:-.01em}.setup-guide-step small{color:var(--ios-secondary);font-size:12px;line-height:1.3}.setup-guide-step>svg{width:19px;height:19px;color:var(--ios-blue)}.setup-guide-step em{padding:5px 8px;color:var(--ios-green);background:color-mix(in srgb,var(--ios-green) 14%,transparent);border-radius:999px;font-size:10px;font-style:normal;font-weight:700}.setup-guide-step:active{transform:scale(.988)}
@media(max-width:420px){.setup-guide{padding:17px;border-radius:23px}.setup-guide h2{font-size:20px}.setup-guide-step{grid-template-columns:42px minmax(0,1fr) auto;gap:10px;padding:11px}.setup-guide-step>i{width:42px;height:42px;border-radius:14px}.setup-guide-step b{font-size:14px}.setup-guide-step em{padding:4px 6px;font-size:9px}}
.quick-launches{max-width:390px;gap:20px}.quick-launches i{width:58px;height:58px;box-shadow:inset 0 1px #ffffff40,0 9px 22px #00000024}.quick-launches span{color:var(--ios-cyan);font-weight:600}
.dashboard-promo{min-height:94px;background:var(--ios-surface);border:1px solid var(--ios-line);border-left:1px solid var(--ios-line);box-shadow:0 10px 32px #00000012}.dashboard-promo b{color:var(--ios-text)}.dashboard-promo small{color:var(--ios-secondary)}
.search>div,.searchline{background:var(--ios-surface);border:1px solid var(--ios-line);box-shadow:none}.search>div:focus-within,.searchline:focus-within{border-color:var(--ios-blue);box-shadow:0 0 0 3px #0a84ff24}.search input,.searchline input{color:var(--ios-text)}.search button,.searchline button,.primary{color:white;background:var(--ios-blue);box-shadow:none}
.surface,.archive,.template-card,.surface.compact,.asset-list,.companybar{color:var(--ios-text);background:var(--ios-surface)!important;border:1px solid var(--ios-line)!important;box-shadow:0 8px 28px #0000000f}.docrow{border-color:var(--ios-line)}.docrow>i{background:var(--ios-raised)}.secondary,.ghost,.choice-button{color:var(--ios-text);background:var(--ios-raised);border-color:var(--ios-line)}.field{color:var(--ios-secondary)}.field input,.field textarea,.field select,select{color:var(--ios-text);background:var(--ios-raised);border-color:var(--ios-line)}.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--ios-blue);box-shadow:0 0 0 3px #0a84ff20}.item,.preview{background:var(--ios-raised)}.modelist{background:var(--ios-surface)}.modelist>button.active{background:#0a84ff1b}.segments{background:var(--ios-raised)}.segments button.active{color:var(--ios-text);background:var(--ios-surface)}
.surface.formpart>.primary:last-child{margin-top:18px}.surface.formpart>.cols{gap:14px}.surface.formpart>.steptitle{margin-bottom:20px}
.empty>i{background:#32ade61c;color:var(--ios-cyan)}.empty h3{color:var(--ios-text)}.settings-back,.sectiontitle button{color:var(--ios-blue)}.launcher-section>h2{color:var(--ios-secondary)}.launcher-section .settings-tile{color:var(--ios-text)}
nav{--glass-x:7px;--glass-w:68px;width:min(455px,calc(100% - 24px));height:72px;padding:6px;bottom:max(8px,env(safe-area-inset-bottom));background:#202024b8;border:1px solid #ffffff16;border-radius:28px;box-shadow:0 12px 36px #00000055;backdrop-filter:blur(36px) saturate(1.7);-webkit-backdrop-filter:blur(36px) saturate(1.7);touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}html[data-theme="light"] nav{background:#f8f8facc;border-color:#ffffffc9;box-shadow:0 12px 38px #5151542a}nav::before{content:none!important}.nav-glass{position:absolute;z-index:0;left:0;top:6px;height:58px;display:block;pointer-events:none;border-radius:22px;background:linear-gradient(145deg,#ffffff1c,#8e8e931e);border:1px solid #ffffff17;box-shadow:inset 0 1px #ffffff24,0 4px 14px #0000002e;backdrop-filter:blur(18px) saturate(1.45);-webkit-backdrop-filter:blur(18px) saturate(1.45);will-change:transform,width;transition:transform .36s cubic-bezier(.22,1,.36,1),width .36s cubic-bezier(.22,1,.36,1),background .18s,box-shadow .18s}html[data-theme="light"] .nav-glass{background:linear-gradient(145deg,#ffffffec,#e5e5eaad);border-color:#ffffff;box-shadow:0 3px 12px #54545a20}nav.glass-holding .nav-glass{background:linear-gradient(145deg,#ffffff27,#8e8e9322);box-shadow:inset 0 1px #ffffff34,0 5px 16px #0004}html[data-theme="light"] nav.glass-holding .nav-glass{background:linear-gradient(145deg,#fff,#e5e5eac7);box-shadow:0 4px 15px #54545a28}nav.glass-dragging .nav-glass{transition:width .16s,background .18s,box-shadow .18s}nav button,nav button.active{height:60px;grid-template-rows:37px 16px;color:var(--ios-secondary)}nav button.active,nav button.glass-preview{color:var(--ios-blue)}nav button span,nav button.active span{width:34px;height:34px}nav button span svg{width:22px;height:22px}nav small{font-size:9px;font-weight:590}
nav{align-items:center}nav button,nav button.active{align-self:center;height:58px;padding:1px 1px 3px;display:grid;grid-template-rows:33px 14px;align-content:center;justify-items:center;row-gap:2px;color:var(--ios-secondary);line-height:1;box-sizing:border-box}nav button span,nav button.active span{width:33px;height:33px;display:grid;place-items:center;line-height:0}nav button span svg{display:block;width:23px;height:23px;margin:0}nav button[data-view="home"] span svg{transform:translateY(.5px)}nav button[data-view="templates"] span svg{transform:translateX(-.5px)}nav small{display:block;width:100%;height:14px;margin:0;padding:0;overflow:hidden;font-size:10px;line-height:14px;font-weight:590;letter-spacing:-.01em;text-align:center;text-overflow:ellipsis;white-space:nowrap}nav button.active,nav button.glass-preview{color:var(--ios-blue)}
.theme-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.theme-picker>button{display:grid;gap:7px;padding:12px;text-align:left;color:var(--ios-text);background:var(--ios-surface);border:2px solid transparent;border-radius:20px;box-shadow:0 8px 28px #00000012}.theme-picker>button[aria-pressed="true"]{border-color:var(--ios-blue)}.theme-picker strong,.theme-picker small{display:block}.theme-picker strong{font-size:15px}.theme-picker small{color:var(--ios-secondary);font-size:11px}.theme-preview{height:112px;display:block;position:relative;overflow:hidden;border-radius:14px;border:1px solid #8e8e932c}.theme-preview:before{content:"";position:absolute;left:10px;right:10px;top:13px;height:12px;border-radius:8px}.theme-preview:after{content:"";position:absolute;left:10px;right:42px;top:35px;height:8px;border-radius:6px;box-shadow:0 16px 0,0 32px 0}.theme-preview b{position:absolute;left:9px;right:9px;bottom:8px;height:24px;border-radius:11px}.theme-preview-light{color:#d1d1d6;background:#f2f2f7}.theme-preview-light:before{background:#fff}.theme-preview-light:after{background:#d1d1d6}.theme-preview-light b{background:#fff}.theme-preview-dark{color:#3a3a3c;background:#0b0b0d}.theme-preview-dark:before{background:#242426}.theme-preview-dark:after{background:#3a3a3c}.theme-preview-dark b{background:#242426}.theme-system{width:100%;min-height:64px;margin-top:12px;padding:12px 15px;display:flex;align-items:center;justify-content:space-between;text-align:left;color:var(--ios-text);background:var(--ios-surface);border:2px solid transparent;border-radius:18px}.theme-system span{display:grid;gap:3px}.theme-system small{color:var(--ios-secondary)}.theme-system i{width:22px;height:22px;border:2px solid var(--ios-secondary);border-radius:50%}.theme-system[aria-pressed="true"]{border-color:var(--ios-blue)}.theme-system[aria-pressed="true"] i{border:6px solid var(--ios-blue)}
dialog,.choice-dialog{color:var(--ios-text);background:var(--ios-surface)}dialog::backdrop{background:#0008}.choice-options button{color:var(--ios-text);background:var(--ios-surface);border-color:var(--ios-line)}
html[data-theme="light"] #globalresults,html[data-theme="light"] #registryresults,html[data-theme="light"] #companyresults,html[data-theme="light"] #clientresults,html[data-theme="light"] #registration-results{background:var(--ios-surface)}html[data-theme="light"] #globalresults .lookupnote,html[data-theme="light"] #registryresults .lookupnote,html[data-theme="light"] #companyresults .lookupnote,html[data-theme="light"] #clientresults .lookupnote,html[data-theme="light"] #registration-results .lookupnote{color:var(--ios-secondary);background:var(--ios-raised)}html[data-theme="light"] #globalresults .option,html[data-theme="light"] #registryresults .option,html[data-theme="light"] #companyresults .option,html[data-theme="light"] #clientresults .option,html[data-theme="light"] #registration-results .option{color:var(--ios-text)!important;background:var(--ios-surface)!important;border-color:var(--ios-line)!important}html[data-theme="light"] #globalresults .option>i,html[data-theme="light"] #registryresults .option>i,html[data-theme="light"] #companyresults .option>i,html[data-theme="light"] #clientresults .option>i,html[data-theme="light"] #registration-results .option>i{background:var(--ios-raised)}

/* Search results share one strict grid on phones, tablets and desktop Telegram. */
.search,.search>div,.search>section{width:100%;min-width:0;max-width:100%}.search>div{min-height:60px;padding:6px 7px 6px 16px;gap:12px}.search>div>svg{flex:0 0 24px;width:24px;height:24px}.search input{min-width:0;font-size:17px}.search button{flex:0 0 auto;min-width:104px;min-height:48px;padding-inline:20px;font-size:16px}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results){width:100%;min-width:0;max-width:100%;margin:10px 0 0!important;padding:0;gap:0!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;border:1px solid var(--ios-line);border-radius:20px;background:var(--ios-surface);box-sizing:border-box}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results):empty{display:none;border:0}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .lookupnote{display:block;width:100%;min-width:0;max-width:100%;margin:0!important;padding:13px 16px!important;overflow-wrap:anywhere;white-space:normal;line-height:1.42;color:#a9dfff;background:var(--ios-raised);border:0!important;border-bottom:1px solid var(--ios-line)!important;border-radius:0!important;box-sizing:border-box}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .lookupnote:last-child{border-bottom:0!important}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option{width:100%;min-width:0;max-width:100%;min-height:118px;margin:0!important;padding:16px!important;display:grid;grid-template-columns:48px minmax(0,1fr) 24px!important;gap:14px!important;align-items:center;overflow:hidden;border:0!important;border-bottom:1px solid var(--ios-line)!important;border-radius:0!important;box-shadow:none!important;box-sizing:border-box}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option:last-child{border-bottom:0!important}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option>i{width:48px;height:48px;align-self:center;border-radius:50%}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option>span{display:block;min-width:0;max-width:100%}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option b{display:block;margin:0 0 4px;font-size:16px;line-height:1.25;font-weight:650;white-space:normal;overflow-wrap:anywhere}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option small{display:block;min-width:0;max-width:100%;margin-top:3px;font-size:13px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option small[title]{display:-webkit-box;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option .status-badge{display:inline-flex;width:max-content;max-width:100%;margin:5px 0 2px;padding:5px 9px;font-size:11px!important;line-height:1!important}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option .choose-company-action{margin-top:8px!important;font-size:13px;line-height:1.3;white-space:normal;overflow:visible;text-overflow:clip}
:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option>svg{justify-self:center;width:20px;height:20px}
#registration-results .option[data-registration]{grid-template-columns:minmax(0,1fr)!important;min-height:92px}
@media(max-width:360px){nav{width:calc(100% - 16px)}.quick-launches{gap:10px}.theme-picker{gap:8px}.theme-picker>button{padding:8px}.theme-preview{height:96px}}
@media(max-width:420px){.search>div{padding-left:13px;gap:9px}.search button{min-width:88px;padding-inline:15px}:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option{grid-template-columns:42px minmax(0,1fr) 20px!important;gap:11px!important;padding:14px 12px!important}:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option>i{width:42px;height:42px}:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .option b{font-size:15px}:is(#globalresults,#registryresults,#companyresults,#clientresults,#registration-results) .lookupnote{padding:12px 14px!important}#registration-results .option[data-registration]{grid-template-columns:minmax(0,1fr)!important}}
.template-layout-note{color:var(--ios-secondary)!important;background:var(--ios-surface);border-color:var(--ios-line)}.template-layout-note b{color:var(--ios-text)}.editor-tools>small,.table-zoom>span{color:var(--ios-secondary)}.table-zoom button{color:var(--ios-secondary);background:var(--ios-raised);border-color:var(--ios-line)}.table-zoom button[aria-pressed=true]{color:white;background:var(--ios-blue);border-color:var(--ios-blue)}
/* Deliberately editorial onboarding: no nested dashboard cards or decorative gradients. */
.setup-guide{margin:2px 0 26px;padding:12px 2px 0;background:transparent;border:0;border-top:1px solid var(--ios-line);border-bottom:1px solid var(--ios-line);border-radius:0;box-shadow:none}.setup-guide-head{margin:0;padding:0 0 9px}.setup-guide-head span{color:var(--ios-secondary);font-size:9px;letter-spacing:.19em}.setup-guide-head strong{min-width:0;padding:0;color:var(--ios-blue);background:transparent;border-radius:0;font-size:9px;letter-spacing:.08em}.setup-guide>p{max-width:410px;margin:0 0 8px;color:var(--ios-secondary);font-size:12px;line-height:1.45}.setup-guide-list{gap:0}.setup-guide-step{min-height:68px;padding:11px 0;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;background:transparent;border:0;border-top:1px solid var(--ios-line);border-radius:0}.setup-guide-step.current{background:transparent;border-color:var(--ios-line);box-shadow:inset 2px 0 var(--ios-blue);padding-left:10px}.setup-guide-step.pending{opacity:.58}.setup-guide-step>i{width:34px;height:34px;color:var(--ios-blue);background:transparent;border:1px solid color-mix(in srgb,var(--ios-blue) 42%,var(--ios-line));border-radius:11px}.setup-guide-step.done>i{color:var(--ios-green);background:transparent;border-color:color-mix(in srgb,var(--ios-green) 45%,var(--ios-line))}.setup-guide-step>i svg{width:18px;height:18px}.setup-guide-step b{font-size:14px;font-weight:650}.setup-guide-step small{font-size:11px}.setup-guide-step em{padding:0;color:var(--ios-green);background:transparent;border-radius:0;font-size:9px;letter-spacing:.05em}.setup-guide-step>svg{width:17px;height:17px}.setup-guide-step:active{transform:none;opacity:.7}
@media(max-width:420px){.setup-guide{padding:11px 0 0;border-radius:0}.setup-guide-step{grid-template-columns:34px minmax(0,1fr) auto;padding:10px 0}.setup-guide-step.current{padding-left:8px}.setup-guide-step>i{width:32px;height:32px;border-radius:10px}.setup-guide-step b{font-size:13px}.setup-guide-step em{font-size:8px}}
.app .document-preview{max-height:none;overflow:visible;overscroll-behavior:auto;touch-action:pan-y;overflow-wrap:normal}
.app .document-table-scroll{max-width:100%;overflow-x:hidden;overflow-y:hidden;overscroll-behavior:auto;touch-action:pan-y}
.app .document-table{width:100%;min-width:100%;font-size:clamp(8.5px,2.6vw,11px);line-height:1.38;table-layout:fixed}
.app .document-table td{min-width:0;padding:3px clamp(3px,1.4vw,8px);overflow-wrap:anywhere;word-break:break-word}
.app .document-table p{min-height:0;margin:5px 0}
.app .table-zoom{display:none}
.app .mapped-fragment{display:inline;background:#c6e6ff;color:#123a58;box-decoration-break:clone;-webkit-box-decoration-break:clone;border-radius:2px;white-space:inherit}.app .mapping-tag{max-width:100%;margin:2px 3px;padding:1px 5px;white-space:normal;overflow-wrap:anywhere;vertical-align:baseline}
.document-list-tools{display:flex;justify-content:flex-end;margin:-9px 0 12px}.document-list-tools button{padding:9px 2px;color:var(--ios-blue);background:transparent;font-size:13px}
.document-package{border-bottom:1px solid var(--ios-line)}.document-package:last-child{border-bottom:0}.document-package>summary{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;color:var(--ios-text)}.document-package>summary::-webkit-details-marker{display:none}.document-package>summary span{min-width:0}.document-package>summary b,.document-package>summary small{display:block}.document-package>summary b{font-size:15px}.document-package>summary small{margin-top:5px;color:var(--ios-secondary);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-package>summary svg{flex:none;width:18px;transform:rotate(90deg);transition:transform .2s}.document-package[open]>summary svg{transform:rotate(-90deg)}.document-package-files{padding-left:10px;border-left:2px solid var(--ios-blue)}.document-entry{padding:0 0 12px;border-bottom:1px solid var(--ios-line)}.document-entry:last-child{border-bottom:0}.document-entry .docrow{border:0}.document-visibility{padding:5px 0 5px 48px;background:none;color:var(--ios-secondary);font-size:11px;text-align:left}
.app .document-word-editor{padding:clamp(18px,6vw,42px);background:#f7f9fc;box-shadow:inset 0 0 0 1px #d3deea,0 12px 34px #0003;font-family:Georgia,"Times New Roman",serif;font-size:clamp(12px,3.5vw,16px);line-height:1.65;color:#102842}.app .document-word-editor [contenteditable]{min-height:1.65em;margin:0 0 .75em;padding:3px 5px;border:1px solid transparent;border-radius:4px;white-space:pre-wrap;overflow-wrap:anywhere;outline:0}.app .document-word-editor [contenteditable]:hover{border-color:#bfd7ea}.app .document-word-editor [contenteditable]:focus{background:#fff;border-color:#1688ee;box-shadow:0 0 0 3px #1688ee24}.app .document-word-editor .document-table-scroll{margin:12px 0;border-radius:6px}.app .document-word-editor .document-table p{margin:0!important;padding:7px!important;min-height:38px}.app .mapping-tag{position:relative;top:-1px;line-height:1.35}.app .mapped-fragment+.mapping-tag{margin-left:5px}
