/* Shared Acho signing UI: the native create form and token Documents page use identical grammar. */
.acho-method-picker{margin:18px 0 14px;padding:16px;border:1px solid var(--line,#dfe5ee);border-radius:17px;background:var(--subtle,#f8f9fb)}
.acho-picker-label{margin:0 0 12px;font-size:13px;font-weight:800;color:var(--ink,#242c3b)}
.acho-method-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.acho-method{appearance:none;border:1.5px solid var(--line,#dfe5ee);background:var(--surface,#fff);color:var(--ink,#242c3b);border-radius:14px;padding:14px 10px;text-align:left;min-height:75px;cursor:pointer}
.acho-method.selected{border-color:var(--blue,#5969e8);box-shadow:inset 0 0 0 1px var(--blue,#5969e8);background:var(--blue-soft,#eef1ff)}
.acho-method strong,.acho-method small{display:block}.acho-method strong{font-size:14px;font-weight:800}.acho-method small{font-size:11px;margin-top:5px;color:var(--muted,#68788d)}
.acho-code-mode>.primary-action:not(.acho-manual-start){display:none!important}.acho-manual-start{width:100%}
.acho-method-picker button{color:var(--ink,#242c3b)!important}
.acho-flow{margin-top:10px;border-top:1px solid var(--line,#dee2ec);padding-top:16px;max-width:100%;overflow:hidden}
.acho-flow[hidden],.acho-token-pane[hidden],.acho-active-error[hidden],.acho-manual-start[hidden]{display:none!important}
.acho-step-head{display:flex;gap:9px;align-items:center;justify-content:space-between}.acho-step-head strong{font-size:16px}.acho-step-head small{font-size:11px;color:var(--muted,#8591a1)}
.acho-flow p{font-size:13px;line-height:1.55;color:var(--muted,#667384)}
.acho-digits,.acho-otp{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;width:100%;margin:12px 0}
.acho-digit,.acho-otp input{display:grid;place-items:center;min-width:0;aspect-ratio:0.88;border:1.4px solid var(--line,#d4dbe7);border-radius:10px;background:var(--surface,#fff);font-size:clamp(16px,3.5vw,26px);font-weight:850;letter-spacing:0;font-variant-numeric:tabular-nums;color:var(--ink,#202b3b);padding:0;text-align:center}
.acho-digit{display:flex;align-items:center;justify-content:center;background:var(--blue-soft,#eef1ff);border-color:var(--blue,#5969e8);color:var(--blue,#5969e8)}
.acho-otp input{width:100%;max-width:100%;box-sizing:border-box!important;min-height:42px;height:auto;outline:none}
.acho-otp input:focus{border:2px solid var(--blue,#5969e8);box-shadow:0 0 0 2px var(--blue-soft,#eef1ff)}
.acho-copy{display:block;margin:0 auto 12px;border:0;background:transparent;color:var(--blue,#5969e8);font-weight:800;font-size:13px;padding:10px 16px}
.acho-token-open{display:flex!important;align-items:center;justify-content:center;text-decoration:none;min-height:46px;border-radius:13px!important;margin:8px 0 20px}
.acho-answer-label{display:block;font-weight:760;font-size:13px;margin:10px 0}.acho-manual-complete{width:100%}
.acho-active-error:not([hidden]){display:block!important;background:rgba(226,52,73,.08);padding:12px;border-radius:11px;font-size:12px;color:#cb3345!important}
.acho-status,.acho-delivery-status{font-size:12px;color:var(--muted,#8690a1)}
.acho-sign-done{text-align:center;display:grid;justify-items:center;gap:8px;padding:20px 0}.acho-sign-done span,.acho-token-success{display:grid;place-items:center;background:#d9f6e8;color:#138450;font-size:27px;width:54px;height:54px;border-radius:16px}.acho-sign-done small{font-size:12px;color:var(--muted,#68788d)}
.acho-token-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;background:var(--subtle,#edf1f8);border:1px solid var(--line,#e5eaf1);border-radius:14px;margin:14px 0}
.acho-token-tabs button{padding:12px;border:0;border-radius:11px;background:transparent;color:var(--muted,#697a94);font-weight:780;font-size:13px}
.acho-token-tabs button.selected{background:var(--surface,#fff);color:var(--ink,#182538);box-shadow:0 1px 7px #19335412}
.acho-gone{display:none!important}.acho-token-pane{margin:0 0 16px}.acho-mini-mark{display:flex;align-items:center;justify-content:center;width:37px;height:37px;border-radius:12px;color:#fff;background:#4768ee;font-weight:900}
.acho-token-pane .acho-otp input{height:45px!important;min-width:0!important;min-height:45px!important;padding:0!important}
.acho-token-pane .acho-digit{height:46px!important}.acho-token-pane .acho-token-next{width:100%;margin-top:12px}
.acho-token-pane .acho-pdf-preview{width:100%;height:44vh;min-height:280px;border:1px solid var(--line,#e1e6ef);border-radius:12px}
.acho-token-pane details{margin:15px 0;font-size:12px;overflow-wrap:anywhere}.acho-token-pane code{display:block;overflow-wrap:anywhere;padding:10px}
.acho-file-name{display:block;margin:8px 0 12px}.acho-consent{display:flex;gap:9px;align-items:flex-start;font-size:13px;margin:15px 0;line-height:1.45}.acho-consent input{flex:none;width:20px;height:20px}
.acho-token-success{margin-bottom:13px}.acho-reset{width:100%;border:0;background:transparent;color:var(--blue,#5969e8);padding:12px;font-weight:750}
@media(max-width:380px){.acho-digit,.acho-otp input{font-size:16px;border-radius:8px}.acho-digits,.acho-otp{gap:4px}.acho-method{padding:11px 8px}}
/* Token PWA: automatic request review without a signing-method picker */
.acho-auto-pane[hidden]{display:none!important}
.acho-auto-pane{margin:16px 0 8px;padding:16px 0 4px;border-top:1px solid var(--line,rgba(255,255,255,.1));color:var(--ink,#fff)}
.acho-auto-pane .token-section-title{display:flex;gap:12px;align-items:center;margin:0 0 16px}
.acho-auto-pane .token-section-title h2{margin:0;font-size:17px}
.acho-auto-pane .token-section-title small{display:block;font-size:12px;color:var(--muted,#adb7c5)}
.acho-document-viewer{width:100%;max-width:100%;min-width:0;max-height:430px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-x:none;touch-action:pan-y;background:#1e293a;border:1px solid #36445b;border-radius:16px;padding:12px 8px;scrollbar-width:thin;scrollbar-color:#51617e transparent}
.acho-pages{width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;gap:20px}
.acho-page-wrap{display:flex;max-width:100%;min-width:0;flex-direction:column;align-items:center;gap:6px}
.acho-page-wrap canvas{display:block;max-width:100%;height:auto;background:#e7ebf1;box-shadow:0 3px 18px #0004;border:1px solid #ced5df;border-radius:4px;filter:brightness(.95)}
.acho-page-number{color:#b6c5df;font-size:11px;padding-bottom:8px;font-variant-numeric:tabular-nums}
.acho-viewer-loading{background:#1e293a;color:#d9e3f2;text-align:center;padding:45px 15px;border-radius:14px}
.acho-auto-pane .acho-hash{margin:14px 0 15px;color:var(--muted,#b0bdcb);overflow-wrap:anywhere}
.acho-auto-pane .acho-hash summary{font-size:12px;cursor:pointer;padding:9px 0}
.acho-auto-pane .acho-hash code{display:block;overflow-wrap:anywhere;line-height:1.6;font-size:10px}
.acho-consent-card{position:relative;display:flex;align-items:center;gap:12px;cursor:pointer;border:1.5px solid #35465e;border-radius:16px;background:linear-gradient(140deg,#263248,#1b2534);padding:15px 12px;margin:15px 0;min-height:88px;color:#edf3fd;transition:background .2s,border-color .2s,box-shadow .2s}
.acho-consent-card input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.acho-consent-icon{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:#33425b;color:#a5b9df;flex:0 0 auto;font-size:22px;border:1px solid #4d5b73}
.acho-consent-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.acho-consent-copy strong{font-size:14px;font-weight:800}
.acho-consent-copy small{font-size:12px;line-height:1.45;color:#aab9cf}
.acho-consent-card:has(input:checked){background:linear-gradient(125deg,#223c42,#192f38);border-color:#28bba5;box-shadow:0 0 0 2px #1cc5ac22}
.acho-consent-card:has(input:checked) .acho-consent-icon{background:#087e70;border-color:#1fb7a6;color:white}
.acho-consent-card:has(input:focus-visible){outline:3px solid #7c9cff;outline-offset:3px}
.acho-auto-pane .acho-auto-sign{width:100%;min-height:54px;border-radius:13px}
.acho-auto-pane .acho-auto-sign:disabled{opacity:.5}
.acho-auto-pane .acho-digit{font-size:clamp(16px,4vw,25px);height:46px;aspect-ratio:auto}
.acho-auto-pane .acho-digits{gap:5px}
.acho-push-status{font-size:13px;background:var(--blue-soft,rgba(89,105,232,.1));color:var(--blue,#5969e8);border-radius:11px;padding:12px;margin:9px 0 14px;font-weight:700}
.acho-enable-mac-push{width:100%;border:1px solid var(--blue,#5969e8);border-radius:12px;color:var(--blue,#5969e8);background:transparent;padding:12px;font-weight:750;margin:10px 0}
.acho-auto-pane .acho-active-error{font-size:13px;color:#ff9cac;line-height:1.5}
.personal-token iframe[title="PDF за подписване"]{max-width:100%;background:#202b3a;border:1px solid #36465e;border-radius:14px;overflow-x:hidden}
@media(max-width:380px){.acho-document-viewer{padding:8px 4px}.acho-consent-card{padding:11px 9px}.acho-digit{font-size:15px!important}}
.acho-history-pane{margin-top:12px}
.acho-history-row{width:100%;text-align:left;padding:12px 14px;margin:6px 0;display:flex;flex-direction:column;gap:5px;background:var(--subtle,#1e2735);color:var(--ink,#f1f5fb);border:1px solid var(--line,#324155);border-radius:12px}
.acho-history-row strong{font-size:13px;overflow-wrap:anywhere}
.acho-history-row small{font-size:11px;color:var(--muted,#a3b1c4)}
.acho-history-row:disabled{opacity:.7}
.personal-token .token-card:has(iframe[title="PDF за подписване"]) label:has(input[type="checkbox"]){padding:13px;border:1px solid #3d4c68;border-radius:14px;background:#202d43;line-height:1.45}
.personal-token .token-card:has(iframe[title="PDF за подписване"]) label:has(input[type="checkbox"]:checked){border-color:#1fb8a4;background:#183439}
/* Dedicated token History section and four-item bottom navigation. */
.token-nav:has(.acho-history-nav){grid-template-columns:repeat(4,minmax(0,1fr))!important}
.token-nav .acho-history-nav{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;padding:9px 2px;font:inherit;color:inherit;background:transparent;border:0;cursor:pointer}
.token-nav .acho-history-nav svg{width:23px;height:23px;flex:none}
.token-nav .acho-history-nav span{font-size:11px;font-weight:700;white-space:nowrap}
.token-nav .acho-history-nav[aria-current=page]{color:#6487ff;background:var(--blue-soft,#202c48);border-radius:14px}
body.acho-history-active .personal-token.token-with-nav>section:not(.acho-history-view){display:none!important}
body.acho-history-active .personal-token.token-with-nav>div:not(.acho-history-view):not(.token-loading){display:none!important}
body.acho-history-active .token-nav>button[aria-current=page]:not(.acho-history-nav){background:transparent!important;color:var(--muted,#9da9be)!important}
.acho-history-view{margin:10px 0 120px;min-height:280px;padding:20px 16px!important}
.acho-history-view[hidden]{display:none!important}
.acho-history-heading{display:flex;align-items:center;gap:12px;margin:0 0 22px}
.acho-history-heading h2{margin:0;font-size:19px;line-height:1.3;letter-spacing:-.3px}
.acho-history-heading small{display:block;color:var(--muted,#9da9be);font-size:12px;margin-top:4px}
.acho-history-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:38px 18px;gap:10px;color:var(--muted,#a0aec2)}
.acho-history-empty span{width:54px;height:54px;display:grid;place-items:center;background:#243c36;color:#69d2b4;border-radius:18px;font-size:29px}
.acho-history-empty strong{color:var(--ink,#e9effa);font-size:15px}
.acho-history-empty p{font-size:13px;line-height:1.5;max-width:310px}
.acho-history-list{display:grid;gap:12px}
.acho-history-entry{padding:15px;border:1px solid var(--line,#344157);border-radius:15px;background:var(--surface,#182333);display:flex;flex-direction:column;gap:9px;min-width:0}
.acho-history-entry-text{display:grid;gap:5px}
.acho-history-entry-text strong{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.acho-history-entry-text small{color:var(--muted,#a0aec2);font-size:11px}
.acho-history-delivery{font-size:11px;color:#5ccbb4;font-weight:700}
.acho-history-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.acho-history-actions button{width:100%;min-width:0;min-height:42px;margin:0;border-radius:12px;font-size:12px}
.acho-history-preview[hidden]{display:none!important}
.acho-history-preview{width:100%;max-width:100%;overflow-x:hidden;max-height:450px;border-radius:13px}
.acho-history-load{font-size:13px;color:var(--muted,#9da9be)}
@media(max-width:365px){.token-nav:has(.acho-history-nav)>button{padding:7px 0!important}.token-nav .acho-history-nav span{font-size:10px}.acho-history-entry{padding:12px}}
/* Keep History outside React's managed tree; preserve native navigation underneath. */
body.acho-history-active .personal-token.token-with-nav>section:not(.acho-history-view){display:none!important}
body.acho-history-active .personal-token.token-with-nav>div:not(.token-loading){display:none!important}
body.acho-history-active nav.token-nav{z-index:90!important}
body>.acho-history-view{position:fixed;z-index:55;top:max(88px,env(safe-area-inset-top) + 60px);bottom:calc(83px + env(safe-area-inset-bottom));left:0;right:0;width:calc(100% - 24px);max-width:600px;margin:0 auto!important;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;box-shadow:0 14px 50px #0001;background:var(--surface,#151b25)}
body>.acho-history-view[hidden]{display:none!important}
.acho-history-actions .acho-history-resend{grid-column:1/-1;margin-top:3px}

/* SIMO recipient UX: registration owns identity; send form only accepts email/phone. */
.mtoken-main .signer-row.simo-contact-row{grid-template-columns:minmax(0,1fr) auto!important}
.mtoken-main .signer-row.simo-contact-row input[aria-label^="Име "]{display:none!important}
.mtoken-main .signer-row.simo-contact-row input[data-simo-contact="1"]{min-width:0;width:100%}
