/* One shared visual language for member and admin workspaces. */
body[data-shell=member],body[data-shell=admin]{--ui-bg:var(--brand-black,#080808);--ui-panel:var(--brand-panel,#151515);--ui-raised:var(--brand-panel-raised,#202020);--ui-text:var(--brand-white,#fff);--ui-muted:var(--brand-muted,#b8b8b8);--ui-accent:var(--brand-gold,#f6bd3a);--ui-border:var(--brand-border,#f6bd3a3d);--ui-radius:18px;color-scheme:dark}
body[data-shell=member] .em_main,body[data-shell=admin] .em_main{min-width:0;overflow-wrap:anywhere}
body[data-shell=member] .em_main>:is(.ma_col,.cmz-ws,.bo-page,.ar,.ul-page,.admkt,.cm-notification-page,.account-preferences){width:100%;max-width:1440px;margin-inline:auto;box-sizing:border-box}
body[data-shell=member] .em_main :is(.ma_col,.ma_row,.ma_content,.wh-wrap,.eh-wrap,.cm-plan-center,.cm-plan-page,.lb-page,.team-center){min-width:0}
body[data-shell=member] :is(.bo-hero,.wh-hero,.eh-hero,.lb-hero,.team-hero,.ul-hero,.admkt-hero,.cm-plan-hero,.cpp-hero,.wc5-hero,.wdc-hero,.cm-mining-hero,.cmz-ws-hero),body[data-shell=admin] :is(.cm-admin-hero,.bo-admin-hero){border:1px solid var(--ui-border);border-radius:22px;background:radial-gradient(ellipse at 95% 0%,#f6bd3a12,transparent 60%),linear-gradient(135deg,#202020,#111);color:var(--ui-text);padding:clamp(18px,2.3vw,28px)}
body[data-shell=member] :is(.bo-card,.bo-summary article,.lb-card,.wh-panel,.eh-panel,.team-card,.ul-card,.cmz-panel,.ar-panel,.wdc-panel,.cm-notification-page article,.account-preferences section),body[data-shell=admin] :is(.bo-admin-card,.ar-panel,.nd-admin section,.nd-admin article,.acops-panel){background:var(--ui-panel);border-color:var(--ui-border);border-radius:var(--ui-radius);color:var(--ui-text)}
body[data-shell=member] :is(.bo-tabs,.wh-tabs,.eh-tabs,.cmz-tabs),body[data-shell=admin] :is(.bo-admin-tabs,.ar-admin-nav){gap:8px;scrollbar-width:thin}
body[data-shell=member] :is(.bo-tab,.wh-tabs a,.eh-tab,.cmz-tab),body[data-shell=admin] .ar-admin-nav a{min-height:44px;display:inline-flex;align-items:center;padding:10px 14px;box-sizing:border-box;border-radius:11px;line-height:1.4}
body[data-shell=member] .em_main :is(h1,h2,h3){color:var(--ui-text);text-wrap:balance}body[data-shell=member] .em_main h1{font-size:clamp(25px,3vw,38px);line-height:1.2;letter-spacing:-.03em}
body[data-shell=member] .em_main :is(p,li){line-height:1.65}
body[data-shell=member] .em_main :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=file]),select,textarea),body[data-shell=admin] .em_main :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=file]),select,textarea){max-width:100%;min-width:0;min-height:44px;box-sizing:border-box;border:1px solid #ffffff30;border-radius:10px;background:#101010;color:#f4f4f4;font:inherit;padding:10px 12px}
body[data-shell=member] .em_main :is(input,select,textarea):disabled,body[data-shell=admin] .em_main :is(input,select,textarea):disabled{opacity:.65}
body[data-shell=member] .em_main button:disabled,body[data-shell=admin] .em_main button:disabled{cursor:not-allowed;opacity:.6}
body[data-shell=member] .em_main button:not(.mmh_close):not(.hb_mob_menu){min-height:44px;max-width:100%;white-space:normal}
body[data-shell=member] .em_main :is(a,button,input,select,textarea,summary):focus-visible,body[data-shell=admin] .em_main :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
body[data-shell=member] .em_main :is(img,video){max-width:100%}
.cm-ui-table-scroll{width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
.cm-ui-table-scroll:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
body[data-shell=member] :is(.cm-ui-table-scroll,.em_table) table{width:100%;border-collapse:collapse}body[data-shell=member] .em_table th,body[data-shell=member] .em_table td{font-size:13px;line-height:1.5;padding:13px 12px}
.cm-ui-table-hint{font-size:12px;color:var(--ui-muted);margin:6px 0 10px}.cm-ui-table-hint[hidden]{display:none!important}
body[data-shell=member] .rain-page{--panel:var(--ui-panel);--panel2:var(--ui-raised);--gold:var(--ui-accent);--line:var(--ui-border);--pool-accent:var(--ui-accent);--muted:var(--ui-muted);--text:var(--ui-text)}
body[data-shell=member] .rain-page :is(.rain-hero,.cmz-pool-card,.chain-coin-grid .cmz-service){background:linear-gradient(140deg,#222,#141414);border-color:var(--ui-border)}body[data-shell=member] .rain-page :is(.cmz-panel,.rain-demo,.cmz-pool-wallet,.pool-activation-card){background:var(--ui-panel);border-color:var(--ui-border)}body[data-shell=member] .rain-page :is(.cmz-tabs,.cmz-pool-action select,.chain-stage-strip a){background:#121212}
body[data-shell=member] .cm-notification-page form,body[data-shell=member] .account-preferences form{gap:12px;align-items:center}body[data-shell=member] .cm-notification-page label{min-width:0!important;flex:1 1 180px!important}body[data-shell=member] .cm-notification-page :is(select,input){display:block;width:100%;margin-top:6px}body[data-shell=member] .cm-notification-page button,body[data-shell=member] .account-preferences button{padding:10px 18px;border:1px solid var(--ui-accent);border-radius:10px;background:var(--ui-accent);color:#17120a;font-weight:700;cursor:pointer}
body[data-shell=member] .cm-notification-page nav a,body[data-shell=member] .cm-notification-page nav span{display:inline-flex;align-items:center;min-height:44px}
body[data-shell=member] .cm-notification-page article{padding:20px;margin-top:12px}body[data-shell=admin] .nd-admin article{margin-top:12px}
@media(max-width:760px){body[data-shell=member] .em_main :is(input,select,textarea){font-size:16px!important}body[data-shell=member] .em_main>:is(.bo-page,.cm-notification-page,.account-preferences){padding-inline:0}.cm-ui-table-scroll table{min-width:600px}.cm-ui-table-hint{display:block}body[data-shell=member] .em_table td{font-size:12px}body[data-shell=member] .cm-notification-page form{align-items:stretch}body[data-shell=member] .cm-notification-page form>label{flex-basis:100%!important}}
@media(prefers-reduced-motion:reduce){body[data-shell=member] .em_main *,body[data-shell=admin] .em_main *{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
/* Keep labels above controls across both old and new forms; avoid label/input collisions. */
body[data-shell] .em_main .em_form :is(.f_input,.f_select){position:relative;display:flex;flex-direction:column;gap:7px;padding:0;border:0;background:transparent;overflow:visible;cursor:auto}
body[data-shell] .em_main .em_form .f_input .fi_title,body[data-shell] .em_main .em_form .f_select .fs_title{position:static;display:block;inset:auto;transform:none;font-size:13px;line-height:1.5;transition:none}
body[data-shell] .em_main .em_form .f_input .fi_inp{width:100%;min-height:46px;padding:10px 12px;border:1px solid #ffffff30;border-radius:10px;background:#101010;color:#f4f4f4;box-sizing:border-box}
body[data-shell] .em_main .em_form .f_input .fi_pass{top:auto;bottom:1px;right:1px;transform:none;width:44px;height:44px;line-height:44px;border-radius:9px;color:var(--ui-muted)}
body[data-shell] .em_main .em_form .f_input:has(.fi_pass) .fi_inp{padding-right:48px}
body[data-shell] .em_main .em_form .f_select select{padding:10px 35px 10px 12px}
html.shell-menu-open .dw-dock,body:has(.em_main :is(input,select,textarea):focus) .dw-dock,body:has(.em_main :is(input,select,textarea):focus) .cm-notification-bell{visibility:hidden;pointer-events:none}
body[data-shell=member] .rain-page :is(.rain-demo button,.chain-plan-filter button){background:#242424;color:#f5f5f5;border-color:var(--ui-border)}body[data-shell=member] .rain-page .chain-plan-filter button[aria-pressed=true]{background:var(--ui-accent);color:#17120a}
.cmz-account-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:0 0 16px;min-width:0}
.cmz-account-tools .cm-notification-bell{position:static;inset:auto;box-shadow:none;min-height:44px;box-sizing:border-box;font-size:12px;padding:10px 14px}
.cmz-account-tools #daily-welcome{min-width:0}.cmz-account-tools .dw-dock{position:static;inset:auto;max-width:100%;display:block}
.cmz-account-tools .dw-dock>.dw-launch{position:static;inset:auto;min-height:44px;padding:10px 14px;border-radius:30px;box-shadow:none;box-sizing:border-box;font-size:12px}
.cmz-account-tools .dw-dock>.dw-result{position:fixed;left:16px;right:auto;bottom:16px;max-width:min(420px,calc(100vw - 32px));z-index:1100}
body[data-shell=member] .cm-notification-page>p,body[data-shell=member] .cm-notification-page article p{color:var(--ui-muted)}
@media(max-width:540px){.cmz-account-tools{justify-content:flex-start}.cmz-account-tools .cm-notification-bell{padding:10px 12px}.cmz-account-tools .dw-dock>.dw-launch{padding:10px 12px}}
/* Pool cards are narrower than the full workspace: never clip payment controls. */
body[data-shell=member] .rain-page .cmz-pool-card-foot{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:12px}
body[data-shell=member] .rain-page :is(.cmz-pool-action,.cmz-pool-action .em_form,.cmz-pool-action .f_data){min-width:0;width:100%;max-width:100%}
body[data-shell=member] .rain-page .cmz-pool-action :is(select,button){width:100%;min-width:0;max-width:100%;box-sizing:border-box}
body[data-shell=member] .rain-page .cmz-pool-payment-preview{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
body[data-shell=member] .rain-page :is(.cmz-pool-primary-stats small,.cmz-pool-primary-stats span,.cmz-pool-secondary-stats span){font-size:11px;line-height:1.5}
.activation-retry{padding:16px 18px;margin:14px 0;border:1px solid var(--ui-border,#f6bd3a3d);border-radius:16px;background:var(--ui-panel,#151515);color:var(--ui-text,#fff);display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.activation-retry p{flex:1 1 280px;margin:0;font-size:13px;line-height:1.65;color:var(--ui-muted,#b8b8b8)}.activation-retry button{min-height:44px;padding:10px 16px;border:1px solid var(--ui-accent,#f6bd3a);border-radius:11px;background:var(--ui-accent,#f6bd3a);color:#17120a;font-weight:700;cursor:pointer}.activation-retry button:disabled{opacity:.6;cursor:wait}

/* Shared action feedback for dashboard and administration. */
body[data-shell] .em_alert {
  inset-inline-end: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(380px, calc(100% - 24px));
  max-width: none;
  gap: 10px;
}
body[data-shell] .em_alert .msg {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 13px 52px 13px 16px;
  background: var(--ui-panel);
  color: var(--ui-text);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  overflow-wrap: anywhere;
  box-shadow: 0 12px 30px #0006;
  transition: opacity 180ms ease, transform 180ms ease;
}
body[data-shell] .em_alert .msg.success { border-inline-start: 4px solid var(--brand-success, #77d7a4); }
body[data-shell] .em_alert .msg.error { border-inline-start: 4px solid var(--brand-error, #f48c8c); }
body[data-shell] .em_alert .msg.warning { border-inline-start: 4px solid var(--ui-accent); }
body[data-shell] .em_alert .msg.is-closing { opacity: 0; transform: translateY(5px); }
body[data-shell] .em_alert .em-alert-close {
  position: absolute;
  inset-inline-end: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}
body[data-shell] .em_alert .msg.success,
body[data-shell] .em_form_msg.success:not(.dnone) {
  animation: cm-action-confirmed 220ms ease-out;
}
@keyframes cm-action-confirmed {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-shell] .em_alert .msg,
  body[data-shell] .em_form_msg.success:not(.dnone) {
    animation: none !important;
    transition: none !important;
  }
}
