/* Component layouts retained in the legacy cascade layer. */
@layer mira-legacy {
/* Shared MIRAVPN components. Pages and dialogs use this single visual system. */
body:is(.mira-landing, .mira-admin, .mira-account) {
  --mira-bg:#0b1426; --mira-surface:#152238; --mira-raised:#1b2b43;
  --mira-line:#324761; --mira-text:#eef4ff; --mira-muted:#a1b3cc;
  --mira-accent:#9de5d4; --mira-danger:#ffb9c8;
  color-scheme:dark;
}
[hidden] { display:none !important; }
.mira-brand-icon { display:block; flex:none; object-fit:contain; border:0; border-radius:24%; }
body:has(dialog[open]) { overflow:hidden; }
.nova-loading { opacity:.58; pointer-events:none; }

/* Email login, trial and purchase. */
dialog.nova-auth {
  position:fixed; inset:0; z-index:9999; display:grid; place-items:center;
  width:100%; height:100%; max-width:none; max-height:none; margin:0;
  box-sizing:border-box; padding:24px 16px; border:0; overflow-y:auto;
  overscroll-behavior:contain; background:rgba(3,8,20,.78); backdrop-filter:blur(6px);
  color:var(--mira-text); font:14px/1.55 "Segoe UI",Arial,sans-serif;
}
dialog.nova-auth:not([open]) { display:none; }
dialog.nova-auth::backdrop { background:transparent; }
.nova-auth-card {
  position:relative; box-sizing:border-box; width:min(440px,100%);
  max-height:calc(100dvh - 48px); overflow-y:auto; overscroll-behavior:contain;
  margin:auto; padding:30px; background:var(--mira-surface);
  border:1px solid #3c4f6b; border-radius:23px; box-shadow:0 25px 100px rgba(0,0,0,.45);
}
.nova-auth-card h2 { margin:0 26px 12px 0; font-size:26px; font-weight:650; line-height:1.18; letter-spacing:-.035em; }
.nova-auth-card p { margin:0 0 20px; color:var(--mira-muted); font-size:13px; line-height:1.7; }
.nova-auth-card button {
  box-sizing:border-box; width:100%; min-height:48px; padding:12px 16px;
  color:var(--mira-text); background:var(--mira-raised); border:1px solid var(--mira-line);
  border-radius:13px; font:600 14px/1.4 "Segoe UI",Arial,sans-serif; cursor:pointer;
}
.nova-auth-card button:hover:not(:disabled) { border-color:#7599a4; }
.nova-auth-card button:disabled { opacity:.55; cursor:wait; }
.nova-auth-card .nova-auth-back {
  display:inline-flex; align-items:center; justify-content:flex-start; gap:8px; width:auto; min-height:36px;
  margin:0 0 14px; padding:5px 9px; border-color:transparent; border-radius:10px;
  background:transparent; color:#b8cce2; font-size:12px; font-weight:650;
}
.nova-auth-card .nova-auth-back svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.nova-auth-card .nova-auth-back:hover:not(:disabled) { border-color:#3b596c; background:#1a2c42; color:#9de5d4; }
.nova-auth-card .nova-submit { margin-top:10px; color:#082c31; border-color:#8addcc; background:#9de5d4; }
.nova-auth-card .nova-submit:hover:not(:disabled) { background:#b0efdf; }
.nova-auth-card .nova-auth-close {
  position:absolute; top:15px; right:15px; display:grid; place-items:center;
  width:32px; height:32px; min-height:32px; padding:0; border-radius:50%;
  background:#223248; color:#cfdef5; font:23px/1 Arial,sans-serif;
}
.nova-auth-card input {
  box-sizing:border-box; width:100%; height:52px; margin:9px 0 14px; padding:0 14px;
  border:1px solid #3d526e; border-radius:12px; background:#101c30; color:var(--mira-text);
  font:400 16px/1.5 "Segoe UI",Arial,sans-serif;
}
.nova-auth-card input::placeholder { color:#8199b8; }
:is(.nova-auth-card input,.nova-support-form textarea):focus { border-color:#8addcc; outline:2px solid rgba(138,221,204,.18); outline-offset:2px; }
:is(.nova-auth button,.nova-support-panel button,.nova-support-launcher):focus-visible { outline:2px solid var(--mira-accent); outline-offset:3px; }
.mira-inline-notice, dialog .mira-inline-notice, .nova-auth-card .mira-inline-notice { display:flex; align-items:center; gap:10px; box-sizing:border-box; min-width:0; padding:12px 14px; margin:14px 0 0; border:1px solid #4d817b; border-radius:10px; background:#19343c; color:#e4fff8; font:12px/1.6 "Segoe UI",Arial,sans-serif; }
.mira-inline-notice.error, .nova-auth-card .mira-inline-notice.error { background:#392b40; border-color:#805468; color:#ffd8e0; }
.mira-notice-icon { display:block; flex:0 0 32px; width:32px; height:32px; object-fit:contain; border:0; border-radius:24%; }
.mira-notice-text { display:block; flex:1; min-width:0; overflow-wrap:anywhere; }
body:is(.mira-account,.mira-admin,.mira-landing) :is(.mira-error,.notice,.nova-email-auth-status):not(:empty),
body.mira-admin #userModal.mira-user-page .mud-feedback:not(:empty) {
  box-sizing:border-box; min-height:52px; padding-inline-start:56px;
  background-image:url("/miravpn-icon-192.png?v=20261017-robot1"); background-position:12px center;
  background-size:32px 32px; background-repeat:no-repeat; overflow-wrap:anywhere;
}
.nova-trial-email-label { display:block; color:#d3e1f3; font-size:12px; line-height:1.6; font-weight:500; }
.nova-method-caption,.nova-telegram-hint,.nova-auth-divider { color:#9eb2cb; font-size:11px; line-height:1.65; }
.mira-yandex-payment{display:grid;gap:4px;margin:14px 0;padding:13px 15px;border:1px solid #ef8b70;border-radius:12px;background:linear-gradient(110deg,#5d302c,#442c39);color:#fff1e9;box-shadow:0 5px 20px #fb765322}.mira-yandex-payment b{font-size:13px;color:#ffd7b4}.mira-yandex-payment span{font-size:11px;line-height:1.5;color:#f1c7ba}
.nova-method-caption { margin-top:12px; text-align:center; }
.nova-auth-divider { display:flex; align-items:center; gap:12px; margin:18px 0; }
.nova-auth-divider::before,.nova-auth-divider::after { content:""; height:1px; flex:1; background:var(--mira-line); }
.nova-email-auth { padding:15px; border:1px solid #354b67; border-radius:15px; background:#111e32; }
.nova-auth-card .nova-email-auth label { display:block; margin:0 0 4px; color:#c9d8e9; font-size:12px; font-weight:600; }
.nova-auth-card .nova-email-auth input { height:46px; margin:5px 0 10px; }
.nova-auth-card .nova-email-auth button { min-height:43px; }
.nova-auth-card .nova-email-auth .nova-submit { margin:0; color:#082c31; border-color:#8addcc; background:#9de5d4; }
.nova-email-code-step[hidden] { display:none; }
.nova-email-code-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:8px; }
.nova-auth-card .nova-email-code-actions button { min-height:38px; padding:7px 8px; font-size:10px; line-height:1.3; }
.nova-auth-card .nova-email-auth-status { min-height:0; margin:8px 0 0; color:#b9d4e3; font-size:11px; line-height:1.45; }
.nova-auth-card .nova-email-auth-status:empty { display:none; }
.nova-auth-card .nova-email-auth-status.error { color:#ffc0cd; }
.nova-email-auth-hint { display:block; margin-top:8px; color:#8fa7c2; font-size:10px; line-height:1.45; }
.nova-purchase-plans { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:14px 0; }
.nova-purchase-plans button { min-height:52px; padding:10px; font-size:13px; }
.nova-purchase-plans button.selected { color:#bef5e6; border-color:#8dd6c6; background:#244049; }
.nova-selected-offer { margin:0 0 12px; padding:12px 14px; border-radius:10px; background:#101c30; color:#b7ccdf; font-size:12px; }
.nova-tariff-empty-message { grid-column:1/-1; padding:22px 16px; text-align:center; color:var(--mira-muted); border:1px dashed var(--mira-line); border-radius:13px; }
.mira-consent-actions{display:grid;gap:10px;margin-top:16px}.mira-consent-choice{display:grid;gap:4px;width:100%;padding:15px 16px;border:1px solid #526a84;border-radius:15px;background:linear-gradient(135deg,#263b55,#1c2d43);color:#edf5ff;text-align:left;cursor:pointer;transition:transform .16s ease,border-color .16s ease,filter .16s ease;font:inherit}.mira-consent-choice:hover{transform:translateY(-1px);border-color:#92b7ca;filter:brightness(1.08)}.mira-consent-choice b{font-size:14px}.mira-consent-choice small{font-size:11px;line-height:1.45;color:#bfd0df}.mira-consent-choice.mira-consent-yes{border-color:#6acbb2;background:linear-gradient(120deg,#245d58,#234453);box-shadow:0 5px 18px #35d4a323}.mira-consent-choice:focus-visible{outline:2px solid #a2f0dd;outline-offset:3px}

/* Telegram's native iframe remains the clickable authentication control. */
.nova-telegram-button {
  position:relative; box-sizing:border-box; display:flex; align-items:center; justify-content:center;
  gap:10px; width:100%; min-width:0; height:44px; min-height:44px; margin:0;
  padding:0 12px; overflow:hidden; border:1px solid #446579; border-radius:11px;
  background:#20354b; color:#c9e8e5; cursor:pointer;
}
.nova-telegram-button > svg { position:relative; z-index:2; width:22px; height:22px; flex:none; fill:currentColor; }
.nova-telegram-button > b { position:relative; z-index:2; font-size:13px; font-weight:600; line-height:1.2; text-align:center; }
.nova-telegram-button.ready > span,.nova-telegram-button.ready > div { position:absolute; inset:0; z-index:5; width:100%; height:100%; margin:0; }
.nova-telegram-button iframe {
  position:absolute !important; left:50% !important; top:0 !important; z-index:6;
  display:block; width:var(--nova-tg-native-width,236px) !important; max-width:none !important;
  height:44px !important; min-height:44px !important; margin:0 !important; border:0;
  transform:translateX(-50%) scaleX(var(--nova-tg-scale,1)); transform-origin:center center;
  opacity:.015; visibility:visible; pointer-events:auto; cursor:pointer;
}
.nova-telegram-status { min-height:18px; margin-top:12px; color:#bfd4e9; text-align:center; font-size:12px; line-height:1.45; }
.nova-telegram-hint { display:block; margin-top:10px; text-align:center; }

/* Feedback. */
.mira-account .nova-save-method,.mira-dialog .mira-save-card{display:flex;align-items:flex-start;gap:14px;margin:16px 0;padding:17px;border:1px solid #598579;border-radius:13px;background:#203c42;color:#d9f3ed;font-size:13px;line-height:1.6;cursor:pointer}
.mira-account .nova-save-method input,.mira-dialog .mira-save-card input{appearance:auto;width:25px;height:25px;flex:0 0 25px;margin:1px 0;accent-color:#9de5d4;cursor:pointer}
.mira-account .nova-save-method:has(input:checked),.mira-dialog .mira-save-card:has(input:checked){border-color:#9de5d4;background:#29514f}
.mira-account .nova-save-method:has(input:disabled),.mira-dialog .mira-save-card:has(input:disabled){opacity:.65;cursor:default}
.nova-notice {
  position:fixed; left:50%; top:calc(76px + max(env(safe-area-inset-top,0px),var(--mira-mini-top,0px))); bottom:auto; z-index:10000;
  display:flex; align-items:center; gap:12px; box-sizing:border-box;
  width:max-content; max-width:min(440px,calc(100% - 32px)); min-height:56px;
  padding:12px 15px; transform:translate(-50%,-10px); opacity:0;
  border:1px solid #4d817b; border-radius:13px; background:#19343c; color:#e4fff8;
  box-shadow:0 10px 30px #020a1859; font:13px/1.6 "Segoe UI",Arial,sans-serif;
  pointer-events:none; transition:opacity .2s,transform .2s;
}
.nova-notice.show { transform:translate(-50%,0); opacity:1; }
.nova-notice.error { background:#392b40; border-color:#805468; color:#ffd8e0; }

/* Guest and authenticated support share the same conversation panel. */
.nova-support-launcher {
  position:fixed; right:18px; bottom:20px; z-index:8990; display:flex;
  align-items:center; justify-content:center; gap:10px; min-width:140px; height:52px; padding:0 18px;
  border:1px solid #779cac; border-radius:15px; color:#e6f5ff; background:#203650;
  box-shadow:0 8px 28px rgba(0,0,0,.24); font:600 13px/1.4 "Segoe UI",Arial,sans-serif; cursor:pointer;
}
.nova-support-launcher:hover { background:#2b465f; }
.nova-support-launcher.has-unread { border-color:var(--mira-accent); background:#255046; }
body .nova-support-launcher svg { width:20px; height:20px; flex:none; color:#a4e4d6; fill:currentColor; }
.nova-support-launcher > span { white-space:nowrap; }
.nova-support-badge { position:absolute; right:-7px; top:-8px; min-width:24px; height:24px; display:grid; place-items:center; padding:0 6px; border:2px solid #19343c; border-radius:999px; color:#092d31; background:#9de5d4; font-size:11px; }
.nova-support-hint { position:fixed; right:18px; bottom:86px; z-index:8989; max-width:255px; padding:12px 15px; transform:translateY(9px); opacity:0; pointer-events:none; border:1px solid #4b6b80; border-radius:15px; background:#192d46; color:#dbe9f6; font:13px/1.5 "Segoe UI",Arial,sans-serif; transition:opacity .2s,transform .2s; }
.nova-support-hint.show { transform:none; opacity:1; }
.nova-support-panel {
  position:fixed; right:18px; bottom:82px; z-index:8991;
  width:min(390px,calc(100vw - 28px)); height:min(590px,calc(100dvh - 110px));
  display:flex; flex-direction:column; overflow:hidden; border:1px solid #3c4f6b;
  border-radius:21px; background:var(--mira-surface); color:var(--mira-text);
  box-shadow:0 24px 80px rgba(0,0,0,.4); font:13px/1.55 "Segoe UI",Arial,sans-serif;
}
.nova-support-head { display:flex; align-items:center; gap:12px; padding:17px 18px; background:#1c2d44; border-bottom:1px solid #34465e; }
.nova-support-head strong { display:block; font-size:14px; font-weight:600; }
.nova-support-head small { display:block; margin-top:2px; color:#aad9cf; font-size:11px; }
.nova-support-head button { margin-left:auto; width:36px; height:36px; border:1px solid #405772; border-radius:11px; color:#d8e7fa; background:#233951; cursor:pointer; }
.nova-support-messages { flex:1; min-height:0; display:flex; flex-direction:column; gap:9px; overflow:auto; padding:17px; }
.nova-support-empty { margin:auto; color:var(--mira-muted); text-align:center; line-height:1.55; }
.nova-support-message { align-self:flex-start; max-width:84%; padding:10px 13px; border:1px solid #36536c; border-radius:15px 15px 15px 4px; background:#233951; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.42; }
.nova-support-message.user { align-self:flex-end; border-color:#487670; border-radius:15px 15px 4px 15px; background:#284b4e; }
.nova-support-message.system { align-self:center; padding:6px 10px; background:none; border:0; color:var(--mira-muted); font-size:12px; text-align:center; }
.nova-support-message time { display:block; margin-top:5px; color:#b2c5d8; font-size:10px; text-align:right; }
.nova-support-form { display:flex; gap:9px; padding:13px; border-top:1px solid #34465e; }
.nova-support-form textarea { flex:1; min-width:0; height:48px; max-height:110px; resize:none; padding:13px 14px; box-sizing:border-box; border:1px solid #3d526e; border-radius:12px; background:#101c30; color:var(--mira-text); font:14px/1.4 "Segoe UI",Arial,sans-serif; }
.nova-support-send { width:50px; flex:none; display:grid; place-items:center; border:1px solid #8addcc; border-radius:12px; background:#9de5d4; color:#123b3d; cursor:pointer; }
.nova-support-send svg { width:22px; height:22px; fill:currentColor; }
.nova-support-send:disabled { opacity:.5; cursor:wait; }

@media(max-width:480px) {
  dialog.nova-auth { padding:12px; }
  .nova-auth-card { max-height:calc(100dvh - 24px); padding:26px 20px; border-radius:20px; }
  .nova-auth-card h2 { font-size:24px; }
  .nova-support-panel { right:8px; bottom:76px; width:calc(100vw - 16px); height:min(570px,calc(100dvh - 96px)); }
  .nova-support-launcher { right:12px; bottom:12px; min-width:128px; height:48px; padding:0 14px; }
  .nova-support-hint { right:12px; bottom:72px; max-width:230px; }
}
@media(prefers-reduced-motion:reduce) {
  .nova-notice,.nova-support-hint { transition:none; }
}

.mira-existing-account{display:block;margin-top:14px;padding:12px 14px;border:1px solid #487272;border-radius:11px;color:#bcebdc;text-decoration:none;font-size:12px;text-align:center;background:#203b45}.mira-existing-account:hover{border-color:#a4e5d2;background:#294b51}

/* Account support occupies its own row after the page's actions. */
body.mira-account:has(.nova-support-dock) .wrap { padding-bottom:24px; }
.mira-account .nova-support-dock { min-width:0; margin-top:18px; padding-top:14px; border-top:1px solid #45607966; }
.mira-account .nova-support-dock .nova-support-launcher { position:relative; inset:auto; z-index:auto; box-sizing:border-box; width:100%; min-width:0; height:auto; min-height:54px; padding:11px 13px; justify-content:flex-start; gap:11px; border-radius:13px; box-shadow:inset 0 1px 0 #ffffff08; text-align:left; }
.mira-account .nova-support-dock .nova-support-launcher > span { display:block; flex:1; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.mira-account .nova-support-dock .nova-support-launcher strong { display:block; font-size:12px; font-weight:600; }
.mira-account .nova-support-dock .nova-support-launcher small { display:block; margin-top:3px; font-size:10px; line-height:1.5; color:#aec5d9; font-weight:400; }
.mira-account .nova-support-dock .nova-support-badge { position:static; flex:none; min-width:23px; height:23px; padding:0 5px; box-sizing:border-box; border:0; }
.mira-account .nova-support-hint { display:none!important; }
body.mira-account .nova-support-panel { --nova-support-scale:1; --nova-support-safe-top:max(env(safe-area-inset-top,0px),var(--mira-mini-top,0px)); --nova-support-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--mira-mini-bottom,0px)); left:calc(12px + max(env(safe-area-inset-left,0px),var(--mira-mini-left,0px))); right:calc(12px + max(env(safe-area-inset-right,0px),var(--mira-mini-right,0px))); bottom:calc(12px + max(var(--nova-support-safe-bottom),var(--nova-support-keyboard-gap,0px)) / var(--nova-support-scale)); box-sizing:border-box; width:auto; max-width:390px; margin-left:auto; height:min(590px,calc(var(--nova-support-view-height,100dvh) / var(--nova-support-scale) - var(--nova-support-safe-top) - var(--nova-support-safe-bottom) - 24px)); max-height:calc(var(--nova-support-view-height,100dvh) / var(--nova-support-scale) - var(--nova-support-safe-top) - var(--nova-support-safe-bottom) - 24px); }
@media(min-width:768px) { html:not(.mira-mini-app) body.mira-account .nova-support-panel { --nova-support-scale:1.1; } }
@media(max-height:480px) { .mira-account .nova-support-head { padding:10px 12px; } .mira-account .nova-support-form { padding:9px; } .mira-account .nova-support-messages { padding:12px; } }

/* Shared control contrast. Keep each page's spacing and native switch geometry. */
body:is(.mira-landing,.mira-account,.mira-admin) {
  --mira-control-bg:linear-gradient(120deg,#2b4565,#233951);
  --mira-control-hover:#355475;
  --mira-control-line:#6583a3;
  --mira-control-hover-line:#9cb9d4;
  --mira-control-text:#f0f6ff;
  --mira-control-shadow:inset 0 1px 0 #e0efff12,0 3px 9px #030a172b;
  --mira-control-transition:background .16s,border-color .16s,box-shadow .16s,color .16s;
}

/* Variables live on the control, so semantic variants also work in dialogs. */
body:is(.mira-landing,.mira-account,.mira-admin) :is(
  .primary,.mira-primary,.landing-primary,.nova-submit,.nova-topup-button,
  .nova-support-send,.nova-install-action.connect,.mira-mini-gate button
) {
  --mira-control-bg:linear-gradient(115deg,#b0f0df,#80d6c6);
  --mira-control-hover:#baf5e7;
  --mira-control-line:#c1f8ea;
  --mira-control-hover-line:#e0fff6;
  --mira-control-text:#103a3c;
  --mira-control-shadow:inset 0 1px 0 #ffffff38,0 4px 16px #64ccb51c;
}
body:is(.mira-landing,.mira-account,.mira-admin) :is(
  .mira-accent,.mira-renew-action:where(:not(.mira-primary)),.landing-secondary,.nova-telegram-button,
  .mira-page-back,.mira-existing-account
) {
  --mira-control-bg:linear-gradient(115deg,#315b61,#27435b);
  --mira-control-hover:#3c6970;
  --mira-control-line:#82b6b4;
  --mira-control-hover-line:#b6eee0;
  --mira-control-text:#e0fff5;
}
body:is(.mira-landing,.mira-account,.mira-admin) :is(
  button.active,button.selected,button[aria-pressed="true"],button[aria-selected="true"],
  button[aria-current="page"],.mira-users-tool-button.changed,.mira-users-tool-button[aria-expanded="true"]
) {
  --mira-control-bg:#a0e8d5;
  --mira-control-hover:#baf3e4;
  --mira-control-line:#c4f9e9;
  --mira-control-hover-line:#e0fff6;
  --mira-control-text:#103a3c;
  --mira-control-shadow:inset 0 1px 0 #ffffff26,0 2px 8px #030a171a;
}
body:is(.mira-landing,.mira-account,.mira-admin) :is(
  button.danger,.btn.danger,.mud-btn.danger,.mira-danger,.mira-text-button,.nova-payment-delete
) {
  --mira-control-bg:#543449;
  --mira-control-hover:#684056;
  --mira-control-line:#bc8098;
  --mira-control-hover-line:#f6b4c7;
  --mira-control-text:#ffe3eb;
}
body.mira-account :is(.admin-entry,.mira-header-admin) {
  --mira-control-bg:linear-gradient(110deg,#bd3c53,#942b47);
  --mira-control-hover:#c34861;
  --mira-control-line:#f39dad;
  --mira-control-hover-line:#ffc8d3;
  --mira-control-text:#fff4f7;
}
body.mira-account .mira-main-actions > .mira-main-action[data-connect] {
  --mira-control-bg:linear-gradient(115deg,#20844a,#176b42 62%,#16746d) padding-box,linear-gradient(115deg,#a5f0b8,#78e4d8,#9ecbf3,#a5f0b8) 0 50% / 300% 100% border-box;
  --mira-control-hover:linear-gradient(115deg,#24834c,#1b7546 62%,#197c74) padding-box,linear-gradient(115deg,#c4f8cf,#a1fff0,#bddfff,#c4f8cf) 0 50% / 300% 100% border-box;
  --mira-control-line:transparent;
  --mira-control-hover-line:transparent;
  --mira-control-text:#f0fff7;
  --mira-control-shadow:inset 0 1px 0 #ffffff2b,0 5px 18px #1f9b4938,0 0 14px #51d2b222;
  animation:mira-connect-border-flow 8s ease-in-out infinite alternate;
}
body.mira-account .mira-manage-action {
  --mira-control-bg:linear-gradient(115deg,#365e91,#2a4872);
  --mira-control-hover:linear-gradient(115deg,#3b679b,#30537f);
  --mira-control-line:#809fc9;
  --mira-control-hover-line:#aac9ee;
  --mira-control-text:#f2f7ff;
  --mira-control-shadow:inset 0 1px 0 #ffffff20,0 4px 14px #244c852b;
}
body.mira-account .mira-main-actions > .mira-main-action.mira-renew-action,
body.mira-account .mira-account-panel .mira-renew-action {
  --mira-control-bg:linear-gradient(115deg,#2d67be,#254f99);
  --mira-control-hover:linear-gradient(115deg,#316dbf,#2b5aa8);
  --mira-control-line:#91baf0;
  --mira-control-hover-line:#c0dbff;
  --mira-control-text:#f2f7ff;
  --mira-control-shadow:inset 0 1px 0 #ffffff2b,0 5px 18px #2a66c83b;
}
@keyframes mira-connect-border-flow {
  from { background-position:0 0,0% 50%; }
  to { background-position:0 0,100% 50%; }
}
body.mira-account .mira-main-actions > .mira-main-action[data-connect]:is(:disabled,[aria-disabled="true"]) {
  animation:none;
}
body.mira-account .mira-main-actions > .mira-main-action[data-connect] :is(small,svg,i) { color:#f0fff7; }
body.mira-account .mira-manage-action :is(small,svg,i),
body.mira-account .mira-main-actions > .mira-main-action.mira-renew-action :is(small,svg,i),
body.mira-account .mira-account-panel .mira-renew-action :is(small,svg,i) { color:#eef6ff; }

body.mira-account .mira-order-payment {
  --mira-control-bg:linear-gradient(120deg,#21364e,#192b43);
  --mira-control-hover:#2b465e;
  --mira-control-line:#526e8b;
  --mira-control-hover-line:#94b7cf;
  --mira-control-text:#eff6ff;
}
body.mira-account .mira-order-payment[aria-checked="true"],
body:is(.mira-landing,.mira-account) .mira-consent-yes {
  --mira-control-bg:linear-gradient(115deg,#24554f,#1c3d46);
  --mira-control-hover:#2f655d;
  --mira-control-line:#8ad5c1;
  --mira-control-hover-line:#bdffe9;
  --mira-control-text:#effff9;
  --mira-control-shadow:inset 0 1px 0 #b3f5de1c,0 4px 14px #2bab8e18;
}
body.mira-account .mira-order-submit {
  --mira-control-bg:linear-gradient(110deg,#b3efdd,#7bd5c6);
  --mira-control-hover:linear-gradient(110deg,#c6f9e9,#91e7d6);
  --mira-control-line:#c7f6e9;
  --mira-control-hover-line:#e5fff7;
  --mira-control-text:#103b38;
  --mira-control-shadow:inset 0 1px 0 #ffffff55,0 6px 20px #58b9a52e;
}
body:is(.mira-landing,.mira-account,.mira-admin) .nova-auth-back {
  --mira-control-bg:#1b2d43;
  --mira-control-hover:#29425a;
  --mira-control-line:#4d6a82;
  --mira-control-text:#d8eafb;
}

body:is(.mira-landing,.mira-account,.mira-admin) :is(
  button,.btn,.mira-button,.landing-button,.landing-account,.mira-page-back,
  .nova-install-action,.nova-telegram-button,.mira-existing-account,.mira-header-admin,a.back,summary.mud-btn
):not(:where([role="switch"],[role="checkbox"],.nova-switch)),
body.mira-account a.row,
body.mira-admin.mira-workspace #users :is(button,.btn):not(:where([role="switch"],[role="checkbox"])),
body.mira-admin.mira-workspace #users #userTable .open-api-user,
body.mira-admin.mira-workspace #userModal.mira-user-page :is(button,.btn,.mud-btn):not(:where([role="switch"],[role="checkbox"])) {
  color:var(--mira-control-text);
  background:var(--mira-control-bg);
  border-color:var(--mira-control-line);
  border-style:solid;
  border-width:1px;
  box-shadow:var(--mira-control-shadow);
  transition:var(--mira-control-transition);
}

/* Match the component selectors so selected choices always use their mint tokens. */
body.mira-account :is(.period.active,.nova-platform.active,.mira-device-option[aria-pressed="true"]),
body:is(.mira-landing,.mira-account) .nova-purchase-plans button.selected,
body.mira-admin :is(.nav button.active,.admin-user-tabs button[aria-selected="true"]) {
  color:var(--mira-control-text);
  background:var(--mira-control-bg);
  border-color:var(--mira-control-line);
}

/* Text-only delete controls still read as deliberate, bounded actions. */
body.mira-account .mira-text-button { padding:7px 10px; border-radius:9px; }

@media(hover:hover) {
  body:is(.mira-landing,.mira-account,.mira-admin) :is(
    button,.btn,.mira-button,.landing-button,.landing-account,.mira-page-back,
    .nova-install-action,.nova-telegram-button,.mira-existing-account,.mira-header-admin,a.back,summary.mud-btn
  ):not(:where([role="switch"],[role="checkbox"],.nova-switch,:disabled,[aria-disabled="true"])):hover,
  body.mira-account a.row:not([aria-disabled="true"]):hover,
  body.mira-admin.mira-workspace #users :is(button,.btn):not(:where(:disabled,[aria-disabled="true"],[role="switch"],[role="checkbox"])):hover,
  body.mira-admin.mira-workspace #users #userTable .open-api-user:not(:where(:disabled,[aria-disabled="true"])):hover,
  body.mira-admin.mira-workspace #userModal.mira-user-page :is(button,.btn,.mud-btn):not(:where(:disabled,[aria-disabled="true"],[role="switch"],[role="checkbox"])):hover {
    color:var(--mira-control-text);
    background:var(--mira-control-hover);
    border-color:var(--mira-control-hover-line);
    box-shadow:inset 0 1px 0 #e0efff21,0 4px 12px #030a1738;
    filter:none;
  }
}
body:is(.mira-landing,.mira-account,.mira-admin) :is(
  button,.btn,.mira-button,.landing-button,.landing-account,.mira-page-back,
  .nova-install-action,.nova-telegram-button,.mira-existing-account,.mira-header-admin,a.back,summary.mud-btn
):focus-visible,
body.mira-account a.row:focus-visible,
body.mira-admin.mira-workspace #users button:focus-visible,
body.mira-admin.mira-workspace #userModal.mira-user-page :is(button,.btn,.mud-btn):focus-visible {
  outline:3px solid #c0f8e9;
  outline-offset:3px;
}
body:is(.mira-landing,.mira-account,.mira-admin) :is(button,.btn,.mira-button):is(:disabled,[aria-disabled="true"]),
body.mira-account a.row[aria-disabled="true"] {
  opacity:.5;
  box-shadow:none;
  cursor:not-allowed;
  transform:none;
}

/* Override pale component captions/icons when their control becomes mint. */
body.mira-account .mira-primary.mira-renew-action :is(small,svg,i),
body.mira-account :is(.period.active,.nova-platform.active,.mira-device-option[aria-pressed="true"]) :is(strong,small,svg,i,b),
body:is(.mira-landing,.mira-account) .nova-purchase-plans button.selected :is(strong,small,svg,i,b),
body.mira-admin :is(.nav button.active,.admin-user-tabs button[aria-selected="true"]) :is(strong,small,svg,i,b),
body.mira-admin #userModal.mira-user-page .mud-tabs button[aria-selected="true"] :is(strong,small,svg,i,b) {
  color:var(--mira-control-text);
}
@media(prefers-reduced-motion:reduce) {
  body:is(.mira-landing,.mira-account,.mira-admin) {
    --mira-control-transition:none;
  }
  body.mira-account .mira-main-actions > .mira-main-action[data-connect] {
    animation:none;
  }
}

/* Action captions share one central axis. Payment rows and switches retain their field layout. */
body:is(.mira-landing,.mira-account,.mira-admin) :is(
  button,a.btn,a.mira-button,.landing-button,.landing-account,.mira-header-admin,
  .nova-install-action,.mira-existing-account,.mira-page-back,.mira-panel-back,summary.mud-btn
):not(:where([role="switch"],[role="checkbox"],[role="radio"],.nova-switch,.mira-order-payment)) {
  text-align:center;
  justify-content:center;
}
body.mira-account .mira-button:not(.mira-automation):has(> svg):has(> span) {
  display:grid;
  grid-template-columns:24px minmax(0,1fr) 24px;
  align-items:center;
  gap:10px;
  text-align:center;
}
body.mira-account .mira-button:not(.mira-automation):has(> svg):has(> span) > svg {
  grid-column:1;
  width:24px;
  height:24px;
  justify-self:center;
  stroke-linecap:round;
  stroke-linejoin:round;
}
body.mira-account .mira-button:not(.mira-automation):has(> svg):has(> span) > span {
  grid-column:2;
  min-width:0;
  text-align:center;
}
body.mira-account .mira-button:not(.mira-automation):has(> svg):has(> span) > i:not(.mira-toggle) {
  grid-column:3;
  margin:0;
  justify-self:center;
}
body.mira-account .mira-menu-pair .mira-button:not(.mira-automation) { gap:6px; }
body.mira-account .mira-menu-pair .mira-button > span { overflow-wrap:anywhere; }
body.mira-account .mira-panel-back { display:inline-flex; align-items:center; gap:8px; }
body.mira-account :is(.mira-panel-back,.mira-page-back) {
  --mira-control-bg:#253c54;
  --mira-control-hover:#355475;
  --mira-control-line:#506e89;
  --mira-control-hover-line:#9cb9d4;
  --mira-control-text:#d7edfc;
  --mira-control-shadow:inset 0 1px 0 #ffffff08;
}
body.mira-account .nova-support-dock .nova-support-launcher {
  display:grid;
  grid-template-columns:24px minmax(0,1fr) 24px;
  align-items:center;
  text-align:center;
}
body.mira-account .nova-support-dock .nova-support-launcher > svg { grid-column:1; justify-self:center; }
body.mira-account .nova-support-dock .nova-support-launcher > span:not(.nova-support-badge) { grid-column:2; text-align:center; }
body.mira-account .nova-support-dock .nova-support-launcher > .nova-support-badge { grid-column:3; justify-self:center; }
body.mira-landing .landing-button {
  display:grid;
  grid-template-columns:54px minmax(0,1fr) 54px;
  gap:8px;
  align-items:center;
}
body.mira-landing .landing-button > span:first-child { grid-column:2; text-align:center; }
body.mira-landing .landing-button > :last-child:not(:first-child) { grid-column:3; justify-self:center; }
body.mira-landing .landing-button .landing-trial-label { font-size:9px; padding:4px 5px; }
body.mira-admin .admin-category button {
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 30px;
  align-items:center;
  gap:10px;
}
body.mira-admin .admin-category button > span { grid-column:2; text-align:center; }
body.mira-admin .admin-category button > i { grid-column:3; margin:0; justify-self:center; }

}
