/* mailworld-logo2-20261027: original supplied artwork, without cropping or recoloring. */
.brand .mailworld-lockup{position:relative;display:block;width:230px;height:82px;max-width:100%;flex:none}
.brand .mailworld-lockup img{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0;border-radius:0;object-fit:contain;background:transparent}
.brand .mailworld-lockup .mailworld-logo-dark{display:none}
[data-theme=dark] .brand .mailworld-lockup .mailworld-logo-light{display:none}
[data-theme=dark] .brand .mailworld-lockup .mailworld-logo-dark{display:block}
.login-card .brand .mailworld-lockup{width:258px;height:92px}
.heading .brand .mailworld-lockup{width:218px;height:78px}
@media(max-width:600px){.brand .mailworld-lockup{width:160px;height:57px}.login-card .brand .mailworld-lockup{width:196px;height:70px}.heading .brand .mailworld-lockup{width:196px;height:70px}.login-brand-row .brand{min-width:0;flex:1}}

/* Keep the login form within a normal desktop viewport without hiding overflow. */
:root .login{min-height:100vh;min-height:100dvh;padding:20px 24px}
:root .login-card{padding:32px;gap:20px}
@media(max-height:650px){:root .login{padding:12px 18px}:root .login-card{padding:24px;gap:16px}.login-card .brand .mailworld-lockup{width:220px;height:78px}}
@media(max-width:600px){:root .login{padding:16px}:root .login-card{padding:24px;gap:18px}}

/* Softer circular controls on the login card. */
:root .login-card .theme-toggle{width:44px;height:44px;min-height:44px;aspect-ratio:1;border:1px solid var(--line);border-radius:50%;padding:9px!important;box-shadow:0 0 0 3px rgba(128,136,148,.16)}
:root .login-card .auth-tabs{padding:6px;border-radius:999px;overflow:hidden;box-shadow:inset 0 0 0 1px var(--line)}
:root .login-card .auth-tabs button{min-height:42px;border-radius:999px}

/* R5 surfaces come from palette-r5.css, loaded after the component styles. */
:root:not([data-theme=dark]) .app-header,
:root:not([data-theme=dark]) header,
:root[data-theme=dark] .app-header,
:root[data-theme=dark] header{background:var(--header)}
:root:not([data-theme=dark]) #tabs button.active,
:root:not([data-theme=dark]) .inbox-folders button.active,
:root:not([data-theme=dark]) .mail-row.selected,
:root[data-theme=dark] #tabs button.active,
:root[data-theme=dark] .inbox-folders button.active,
:root[data-theme=dark] .mail-row.selected{background:var(--blue-soft)}
:root .mail-index,:root .reader{background:var(--panel)}
:root .notice,:root .planned-dns,:root .tools-nav-link{background:var(--soft)}
:root .sms-table th,:root .sms-message,:root .tools-back,:root .sms-token-link{background:var(--soft)}
:root[data-theme=dark] .panel button:not(.primary):not(.danger):not(.mail-row):not(.active){background:var(--soft)}
:root[data-theme=dark] .panel button:not(.primary):not(.danger):not(.mail-row):not(.active):hover{background:var(--hover)}
/* The pager is filled after the mail request. Avoid an empty strip before it arrives. */
.mail-index>.pager:empty{display:none}

/* Align the domain receiver with the input and actions in the same row. */
#domain-form #domain-receive-server{
  flex:0 1 258px;width:258px;height:44px;min-height:44px;padding:10px 14px;
}
.domain-row .actions .domain-more{position:relative;flex:0 0 auto;margin:0;padding:0;border:0}
.domain-row .actions .domain-more>summary{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:7px 12px;border:1px solid transparent;border-radius:999px;background:var(--soft);color:var(--text);font-size:13px;line-height:20px;white-space:nowrap;list-style:none}
.domain-row .actions .domain-more>summary::-webkit-details-marker{display:none}
.domain-row .actions .domain-more[open]>summary{background:var(--blue-soft);color:var(--accent)}
.domain-more-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:30;display:grid;gap:3px;width:max-content;min-width:174px;padding:7px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 10px 30px #0003}
.domain-more-menu button{display:block;width:100%;min-height:38px;margin:0;padding:8px 12px;border:0;border-radius:8px;background:transparent;text-align:left;white-space:nowrap}
.domain-more-menu button:hover{background:var(--blue-soft)}
details:not([open])>.domain-more-menu,
details:not([open])>.export-menu-options,
details:not([open])>.mailbox-more-menu{display:none}
@media(max-width:700px){#domain-form #domain-receive-server{width:100%;flex:1 1 auto}}

/* The dark panel button rule must not invert the login/register selection. */
:root[data-theme=dark] .panel .auth-tabs button:not(.primary):not(.danger):not(.mail-row):not(.active){
  background:transparent;color:var(--muted);box-shadow:none;
}
:root[data-theme=dark] .login-card .auth-tabs button.active{
  background:var(--blue-soft);color:var(--accent);box-shadow:none;
}
:root[data-theme=dark] .login-card .theme-toggle{background:var(--panel)!important}
:root[data-theme=dark] .login-card .theme-toggle:hover{background:var(--hover)!important}

/* 4.0.2: account-scoped classification bell. */
.notification-wrap{position:relative;display:flex;align-items:center;flex:0 0 auto}
.header-account .notification-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;min-height:38px;padding:7px;border:1px solid var(--line);border-radius:50%;background:var(--panel);color:var(--text)}
.notification-toggle svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-toggle:hover,.notification-toggle[aria-expanded=true]{background:var(--blue-soft);color:var(--accent)}
.notification-badge:not([hidden]){position:absolute;top:-5px;right:-5px;display:flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border-radius:20px;background:#e94949;color:#fff;font-size:10px;font-weight:700;line-height:1}
.notification-panel:not([hidden]){position:absolute;top:calc(100% + 12px);right:0;z-index:1000;display:block;width:min(400px,calc(100vw - 24px));max-height:min(600px,calc(100vh - 100px));overflow:auto;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);box-shadow:0 20px 55px #0005}
.notification-head,.notification-item-main,.notification-item-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
.notification-head strong{font-size:18px}
.header-account .notification-head button,.header-account .notification-item-foot button{border:0;background:transparent;color:var(--accent);font-size:12px;padding:4px;min-height:28px;white-space:nowrap}
.notification-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:14px 0 8px}
.header-account .notification-tabs button{min-height:34px;padding:6px 11px;border:0;border-radius:999px;background:var(--soft);color:var(--muted);font-size:14px;font-weight:500;line-height:20px}
.header-account .notification-tabs button.active{background:var(--hover);color:var(--text)}
.notification-items{display:grid;gap:8px}
.notification-item{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.notification-item.unread{background:var(--soft)}
:root[data-theme=dark] .notification-item{background:var(--panel);border-color:var(--line)}
:root[data-theme=dark] .notification-item.unread{background:var(--soft);border-color:var(--line)}
:root:not([data-theme=dark]) .notification-item.unread{background:var(--soft)}
.notification-item-main strong{min-width:0;overflow-wrap:anywhere;font-size:13px}
.notification-kind{flex:none;padding:4px 7px;border-radius:999px;background:var(--panel);font-size:12px}
.notification-kind.paid{color:#27a66a}.notification-kind.suspended{color:#df6868}
.notification-details{display:grid;justify-items:start;gap:7px;margin-top:10px;min-width:0;font-size:12px;line-height:1.45}
.notification-customer,.notification-forward{max-width:100%;padding:5px 9px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);overflow-wrap:anywhere}
.notification-forward{color:var(--accent)}
.notification-item-foot{margin-top:8px;color:var(--muted);font-size:12px}
.notification-empty{margin:0;padding:30px 12px;text-align:center;color:var(--muted);font-size:14px}
.header-account .notification-tabs button[hidden],.notification-tabs .notification-tab-divider[hidden]{display:none!important}
.header-account .notification-domain-link{margin-top:8px;padding:4px 0;border:0;background:transparent;color:var(--accent);font-size:12px;text-align:left}
.header-account .notification-domain-link:hover{text-decoration:underline}
@media(max-width:600px){.header-account .notification-toggle{width:34px;height:34px;min-height:34px}.notification-panel:not([hidden]){position:fixed;top:calc(var(--app-header-height,110px) - 2px);right:12px;max-height:calc(100vh - var(--app-header-height,110px) - 12px)}}

/* 4.1.0: dropdown triggers use the same filled surface as adjacent buttons. */
:root[data-theme=dark] #export-menu>summary,
:root[data-theme=dark] .mailbox-more>summary{background:var(--soft);color:var(--text)}
:root[data-theme=dark] #export-menu>summary:hover,
:root[data-theme=dark] .mailbox-more>summary:hover{background:var(--hover)}
:root:not([data-theme=dark]) #export-menu>summary,
:root:not([data-theme=dark]) .mailbox-more>summary{background:var(--soft);color:var(--text)}

/* Keep both selected-mailbox actions visually identical in each state. */
:root .bulk :is(#bulk-forward,#transfer-selected){box-sizing:border-box;min-height:36px;padding:7px 12px;border:1px solid transparent;border-radius:999px;font-size:13px;font-weight:500;line-height:1.5}
:root[data-theme=dark] .panel .bulk :is(#bulk-forward,#transfer-selected):disabled,
:root[data-theme=dark] .panel .bulk :is(#bulk-forward,#transfer-selected):disabled:hover{background:var(--soft);border-color:transparent;color:var(--text);opacity:1;box-shadow:none;cursor:default}
:root:not([data-theme=dark]) .panel .bulk :is(#bulk-forward,#transfer-selected):disabled,
:root:not([data-theme=dark]) .panel .bulk :is(#bulk-forward,#transfer-selected):disabled:hover{background:var(--soft);border-color:transparent;color:var(--text);opacity:1;box-shadow:none;cursor:default}
