/* EM REWARDS WORLD — Overview design language across legacy and standalone pages.
   Appearance-only override. No account/action logic is changed. */
:root {
  --emrw-ui-surface:#18283b;
  --emrw-ui-surface-deep:#142236;
  --emrw-ui-raised:#1e3043;
  --emrw-ui-line:rgba(136,177,203,.20);
  --emrw-ui-mint:#73e4c1;
  --emrw-ui-text:#f1f7fd;
  --emrw-ui-muted:#aec3d0;
  --emrw-ui-radius:18px;
}
html { color-scheme:dark; }
body.emrw-unified-ui,body.emrw-unified-ui input,body.emrw-unified-ui button,body.emrw-unified-ui select,body.emrw-unified-ui textarea { font-family:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
body.emrw-unified-ui .page-content,body.emrw-unified-ui .emrw-ranks-main,body.emrw-unified-ui .chat-main,body.emrw-unified-ui .chat-admin-layout { min-width:0; }
body.emrw-unified-ui .page-content > .page-intro:not(#emrw-overview-v2 .page-intro) {
  box-sizing:border-box; border:1px solid rgba(113,221,190,.23);
  background:radial-gradient(ellipse at 92% 0%,rgba(38,171,143,.19),transparent 44%),linear-gradient(115deg,#172b40,#172538 60%,#18363f);
  border-radius:23px; padding:26px 29px; gap:18px; min-width:0;
  box-shadow:0 14px 35px rgba(5,12,22,.14); margin-bottom:20px;
}
body.emrw-unified-ui .page-content > .page-intro h1 { color:#f5fcff; font-weight:800; letter-spacing:-.035em; font-size:clamp(25px,2.8vw,38px); line-height:1.14; }
body.emrw-unified-ui .page-content > .page-intro p { color:#b5cbd4; line-height:1.65; }
body.emrw-unified-ui .page-content > .page-intro .eyebrow { color:var(--emrw-ui-mint);font-weight:800;letter-spacing:.11em; }

/* Cards/panels derived from Overview. Respect special visual effects and charts. */
body.emrw-unified-ui :is(.page-content > .panel,.page-content > .dashboard-grid > .panel,
  .page-content .stat-card,.page-content .info-card,.page-content .activity-panel,
  .page-content .task-card,.page-content .faucet-card,.page-content .withdraw-card,
  .page-content .level-card,.page-content .referral-card,
  .rp-panel,.rp-stat,.rp-tier,.rp-condition,
  .emrw-ranks-panel,.emrw-ranks-stat,.emrw-ranks-hero,
  .chat-card,.chat-side-card,.chat-admin-panel,.emrw-hub-card,.emrw-hub-section) {
  box-sizing:border-box; border:1px solid var(--emrw-ui-line); border-radius:var(--emrw-ui-radius);
  background:linear-gradient(145deg,rgba(24,40,59,.96),rgba(20,34,53,.98));
  color:var(--emrw-ui-text); box-shadow:0 9px 27px rgba(5,12,22,.10); min-width:0;
}
body.emrw-unified-ui :is(.page-content .stat-card,.rp-stat,.rp-tier,.emrw-ranks-stat){transition:border-color .2s,transform .2s,box-shadow .2s;}
@media (hover:hover) {
  body.emrw-unified-ui :is(.page-content .stat-card,.rp-stat,.rp-tier,.emrw-ranks-stat):hover {
    border-color:rgba(113,226,190,.43);transform:translateY(-2px);box-shadow:0 14px 34px rgba(6,13,28,.16);
  }
}
body.emrw-unified-ui :is(.page-content .panel-heading h2,.page-content .section-title h2,.rp-heading h2,.emrw-ranks-section-head h2,.chat-side-heading h2,.chat-admin-panel h2) {
  color:#f2f9ff;letter-spacing:-.025em;font-weight:800;
}
body.emrw-unified-ui :is(.page-content p,.page-content small,.rp-heading p,.emrw-ranks-hint,.chat-faint) { line-height:1.6; }
body.emrw-unified-ui :is(.page-content .panel,.rp-panel,.emrw-ranks-panel,.chat-side-card) { backdrop-filter:none; }
body.emrw-unified-ui :is(.page-content button:not(.mobile-menu):not(.icon-button),.page-content a.btn,.rp-primary,.emrw-ranks-tabs a,.chat-send,.chat-archive-link) { border-radius:11px; }
body.emrw-unified-ui :is(.page-content button,.page-content a.btn,.rp-primary,.chat-send):focus-visible { outline:2px solid #86f8cd; outline-offset:3px; }
body.emrw-unified-ui :is(.page-content input:not([type=checkbox]):not([type=radio]),.page-content select,.page-content textarea,.rp-copy input,.chat-composer textarea,.emrw-ranks-toolbar select) {
  max-width:100%;color:#eff7ff;outline-offset:2px;border-color:rgba(134,183,205,.24);border-radius:11px;
}
body.emrw-unified-ui :is(.page-content input,.page-content textarea,.page-content select,.rp-copy input,.chat-composer textarea):focus-visible { border-color:rgba(118,228,196,.7);outline:2px solid rgba(118,228,196,.25); }
body.emrw-unified-ui :is(.page-content .table-wrap,.page-content .table-scroll,.page-content .data-table-wrap,.rp-table-wrap,.emrw-ranks-table-wrap,.chat-admin-scroll){ max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain; }
body.emrw-unified-ui :is(.page-content table,.rp-table,.emrw-ranks-table-wrap table,.chat-admin-table) { border-collapse:separate;border-spacing:0; }
body.emrw-unified-ui :is(.page-content th,.rp-table th,.emrw-ranks-table-wrap th,.chat-admin-table th) { color:#9dcdbf;font-weight:800;letter-spacing:.035em; }
body.emrw-unified-ui :is(.page-content td,.page-content th,.rp-table td,.rp-table th,.emrw-ranks-table-wrap td,.emrw-ranks-table-wrap th){vertical-align:middle;}
body.emrw-unified-ui :is(.page-content .badge,.rp-count,.emrw-ranks-pill,.chat-count){ border-radius:999px; }

/* Supplementary page families without a shared page wrapper. */
body.emrw-unified-ui .rp { --rp-mint:var(--emrw-ui-mint); }
body.emrw-unified-ui .rp-intro,body.emrw-unified-ui .emrw-ranks-hero {
  background:radial-gradient(ellipse at 92% 4%,rgba(39,172,139,.19),transparent 40%),linear-gradient(116deg,#172b40,#172538 59%,#193b42);
  border:1px solid rgba(103,223,191,.27);border-radius:23px;
}
body.emrw-unified-ui .emrw-hub-hero {border-radius:23px;background:radial-gradient(ellipse at 88% 3%,rgba(39,172,139,.20),transparent 40%),linear-gradient(115deg,#172b40,#172538 60%,#193b42);border:1px solid rgba(103,223,191,.27);}
body.emrw-unified-ui .chat-topbar,body.emrw-unified-ui .topbar { border-bottom-color:rgba(119,186,186,.14); }
body.emrw-unified-ui .chat-room-tabs > * { border-radius:12px; }
body.emrw-unified-ui .chat-message { overflow-wrap:anywhere; }

/* Language control: same tri-language flag switcher on every page. */
body.emrw-unified-ui .emrw-language-uniform,
body.emrw-unified-ui .language-picker.language-flags,
body.emrw-unified-ui .emrw-ranks-toolbar .emrw-language-uniform {
  display:inline-flex!important;flex-flow:row nowrap!important;align-items:center;justify-content:center;
  padding:4px!important;gap:4px!important;min-width:0;max-width:100%;
  border:1px solid rgba(121,213,185,.27)!important;border-radius:13px!important;
  background:rgba(12,31,47,.65)!important;box-shadow:inset 0 1px 0 rgba(232,255,249,.03);
}
body.emrw-unified-ui .emrw-language-uniform .emrw-lang-button,
body.emrw-unified-ui .language-picker.language-flags [data-language-choice] {
  appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;
  flex:0 0 auto!important;min-width:41px;min-height:34px;padding:5px 8px!important;
  border:1px solid transparent!important;border-radius:9px!important;
  color:#b7cbd5!important;background:transparent!important;
  font-size:12px!important;font-weight:800!important;line-height:1.2;cursor:pointer;
}
body.emrw-unified-ui .emrw-language-uniform .emrw-lang-button[aria-pressed=true],
body.emrw-unified-ui .language-picker.language-flags [data-language-choice].is-active {
  background:linear-gradient(145deg,rgba(47,171,138,.25),rgba(52,109,117,.3))!important;
  border-color:rgba(106,230,187,.46)!important;color:#b7ffe1!important;
  box-shadow:0 0 0 1px rgba(20,97,76,.16) inset;
}
body.emrw-unified-ui .emrw-language-uniform .emrw-lang-button:focus-visible,
body.emrw-unified-ui .language-picker.language-flags [data-language-choice]:focus-visible {outline:2px solid #91f2d1!important;outline-offset:2px!important;}
body.emrw-unified-ui .emrw-language-uniform .emrw-lang-button:hover {color:#f0fffa!important;background:rgba(82,176,152,.14)!important;}
body.emrw-unified-ui .emrw-language-uniform .emrw-lang-flag{display:inline-flex;align-items:center;justify-content:center;width:24px;height:17px;line-height:1;}
body.emrw-unified-ui .emrw-language-uniform .emrw-lang-flag-svg{display:block;width:24px;height:16px;border-radius:3px;box-shadow:0 0 0 1px rgba(246,255,251,.14);}
body.emrw-unified-ui .emrw-original-lang-select {position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;clip-path:inset(50%)!important;pointer-events:none!important;white-space:nowrap!important;}
/* Refuse layout overflow in top bars, notably at 320px. */
body.emrw-unified-ui .topbar .topbar-right,body.emrw-unified-ui .chat-top-right,body.emrw-unified-ui .emrw-ranks-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:100%;}
body.emrw-unified-ui .emrw-ranks-toolbar > label:not(.emrw-language-uniform) {display:none;}
body.emrw-unified-ui .chat-lang-field{margin:0!important;}

/* Menu icon: true centered 32px circular medallion. CSS translate is independent
   from animated transforms so the 22px glyph animations still work. */
body.emrw-unified-ui #sidebar .main-nav a.nav-link {gap:9px!important;min-width:0;}
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .nav-icon {
  box-sizing:border-box!important;position:relative!important;display:grid!important;place-items:center!important;
  width:32px!important;min-width:32px!important;max-width:32px!important;
  height:32px!important;min-height:32px!important;max-height:32px!important;
  flex:0 0 32px!important;margin:0!important;padding:0!important;border-radius:50%!important;
  color:#a8f5dd;font-size:19px!important;text-align:center!important;line-height:1!important;
  border:1px solid rgba(117,225,190,.33)!important;
  background:radial-gradient(circle at 38% 28%,rgba(101,206,167,.23),rgba(23,48,64,.9) 73%)!important;
  box-shadow:inset 0 1px 0 rgba(210,255,244,.08),0 3px 12px rgba(0,0,0,.2)!important;
  overflow:hidden;isolation:isolate;
}
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .nav-icon.emrw-menu-icon::before,
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .nav-icon.emrw-menu-icon::after {translate:5px 5px;scale:1.1;}
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .nav-icon.emrw-menu-icon > .emrw-menu-core {inset:5px!important;scale:1.1;}
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .nav-icon.emrw-menu-icon {overflow:visible;}
body.emrw-unified-ui #sidebar .main-nav a.nav-link:hover > .nav-icon,
body.emrw-unified-ui #sidebar .main-nav a.nav-link.active > .nav-icon {
  border-color:rgba(137,252,210,.68)!important;box-shadow:0 0 13px rgba(98,229,181,.16),inset 0 1px 0 rgba(231,255,245,.12)!important;
}
body.emrw-unified-ui #sidebar .main-nav a.nav-link > span:nth-child(2) {flex:1 1 auto!important;min-width:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .emrw-nav-pill,
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .emrw-ptc-nav-badge,
body.emrw-unified-ui #sidebar .main-nav a.nav-link > .emrw-chat-online-badge {
  position:static!important;flex:0 0 auto!important;margin-left:auto!important;transform:none!important;
  max-width:68px!important;white-space:nowrap;box-sizing:border-box;
}
@media (min-width:901px){
 body.emrw-unified-ui #sidebar .main-nav a.nav-link{min-height:39px!important;padding:4px 10px!important;}
 body.emrw-unified-ui #sidebar .main-nav{gap:2px;}
}
@media (max-width:900px){
 body.emrw-unified-ui #sidebar .main-nav a.nav-link{height:auto!important;min-height:46px!important;padding:6px 10px!important;}
 body.emrw-unified-ui #sidebar .main-nav a.nav-link > .nav-icon{width:32px!important;flex-basis:32px!important;height:32px!important;}
}
@media (max-width:520px){
 body.emrw-unified-ui .page-content > .page-intro {padding:19px 18px;}
 body.emrw-unified-ui .emrw-language-uniform .emrw-lang-button {min-width:37px;padding:5px 6px!important;}
 body.emrw-unified-ui .topbar .breadcrumbs{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 body.emrw-unified-ui .topbar .topbar-right {gap:5px;}
}
@media (prefers-reduced-motion:reduce){body.emrw-unified-ui :is(.page-content .stat-card,.rp-stat,.rp-tier,.emrw-ranks-stat){transition:none!important;}}

/* Specific dynamic modules: the same card surfaces without replacing them. */
body.emrw-unified-ui :is(
  .emrw-tk-daily-card,.emrw-tk-overview,.emrw-tk-section,
  .emrw-lv2-stat,.emrw-lv2-claim,.emrw-lv2-formula,.emrw-lv2-table-panel,
  .emrw-pv2-panel,.emrw-pv2-tier,.emrw-pv2-ad,.emrw-pv2-wallet-card,
  .emrw-auto-flow-group,.emrw-auto-flow-forecast,.emrw-auto-flow-tile,
  .emrw-faucet-rewards,.emrw-faucet-reward,.emrw-speed,
  .emrw-hub-card,.emrw-hub-section,.emrw-hub-status
) {
  box-sizing:border-box;border:1px solid rgba(136,177,203,.21);
  background:linear-gradient(145deg,rgba(24,40,59,.95),rgba(20,34,53,.98));
  border-radius:17px;box-shadow:0 9px 27px rgba(5,12,22,.10);min-width:0;
}
body.emrw-unified-ui :is(.emrw-tk-hero,.emrw-lv2-hero,.emrw-pv2-hero,.emrw-auto-hero,.emrw-faucet-hero,.emrw-hub-hero){
  border-radius:23px;border:1px solid rgba(105,220,185,.26);
}
body.emrw-unified-ui :is(.emrw-lv2-section-head h2,.emrw-tk-section-head h2,.emrw-pv2-sectionhead h2,.emrw-auto-flow-heading h2,.emrw-faucet-rewards-head h2){
  font-weight:800;letter-spacing:-.024em;color:#f4faff;
}
body.emrw-unified-ui :is(.emrw-lv2-eyebrow,.emrw-tk-eyebrow,.emrw-pv2-kicker,.emrw-auto-flow-kicker,.emrw-faucet-rewards-eyebrow){
  color:#84e9ca;letter-spacing:.10em;font-weight:800;
}
body.emrw-unified-ui :is(.emrw-tk-daily-card,.emrw-pv2-tier,.emrw-speed) {
  transition:border-color .2s,transform .2s;
}
@media(hover:hover){body.emrw-unified-ui :is(.emrw-tk-daily-card,.emrw-pv2-tier,.emrw-speed):hover{border-color:rgba(111,225,190,.48);transform:translateY(-2px)}}
body.emrw-unified-ui :is(.emrw-lv2-table-panel,.emrw-pv2-wallet-row,.emrw-speeds__grid,.emrw-auto-flow-columns,.emrw-faucet-rewards-grid) {max-width:100%;min-width:0;}
body.emrw-unified-ui :is(.emrw-pv2-ad-list,.emrw-pv2-requests,.emrw-lv2-table-panel) {overflow-wrap:anywhere;}
body.emrw-unified-ui :is(.emrw-speeds__grid,.emrw-pv2-tier-grid,.emrw-tk-daily-grid,.emrw-lv2-stat-grid) > * {min-width:0;}
@media (max-width:650px){
 body.emrw-unified-ui :is(.emrw-tk-hero,.emrw-lv2-hero,.emrw-pv2-hero,.emrw-ranks-hero,.emrw-hub-hero){border-radius:18px;}
 body.emrw-unified-ui :is(.emrw-speeds__grid,.emrw-pv2-tier-grid,.emrw-tk-daily-grid){max-width:100%;}
}
